Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
UGActivity categories
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
hartsteins  
View profile  
 More options Nov 9 2012, 1:15 pm
From: hartsteins <ghartst...@gmail.com>
Date: Fri, 9 Nov 2012 10:15:03 -0800 (PST)
Local: Fri, Nov 9 2012 1:15 pm
Subject: UGActivity categories

I am working with the obj-c UGAPI code and hoping for some more detailed
examples.

-(BOOL) setBasics: (NSString *)verb category:(NSString *)category
content:(NSString *)content title:(NSString *)title;

is there a list of acceptable categories and verbs?

Thanks

Greg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hartsteins  
View profile  
 More options Nov 9 2012, 1:47 pm
From: hartsteins <ghartst...@gmail.com>
Date: Fri, 9 Nov 2012 10:47:16 -0800 (PST)
Local: Fri, Nov 9 2012 1:47 pm
Subject: Re: UGActivity categories

Here is a basic send method but it fails listing "null-pointer" as the
error.  User is signed in and activity feed is accessible.  What am I
missing?

thanks - Greg

-(void)send {
 UGActivity *postActivity = [[UGActivity alloc] init];
 [postActivity setBasics:@"post"
   category:@"TestCategory"
content:@"This is a test"
title:@"Test #1"];
 [postActivity  setActorInfo:[[g_client getLoggedInUser] username]
   actorDisplayName:[[g_client getLoggedInUser] username]
  actorUUID:[[g_client getLoggedInUser] uuid]];

UGClientResponse *response = nil;
response = [g_client postUserActivity:[[g_client getLoggedInUser] uuid]
  activity:[postActivity toNSDictionary]];
 [self outputResponse:response title:@"Send Response"];


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Anglade  
View profile  
 More options Nov 9 2012, 6:34 pm
From: Tim Anglade <t...@apigee.com>
Date: Fri, 9 Nov 2012 18:34:01 -0500
Local: Fri, Nov 9 2012 6:34 pm
Subject: Re: [usergrid] Re: UGActivity categories

Hi Greg, very sorry about the error you’re encountering!

Would it be possible for you share the full project with us on github or
send us a zip? I want to try to reproduce this locally. Please feel free to
reach out privately if preferred.

Cheers!
Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hartsteins  
View profile  
 More options Nov 9 2012, 10:12 pm
From: hartsteins <ghartst...@gmail.com>
Date: Fri, 9 Nov 2012 19:12:53 -0800 (PST)
Local: Fri, Nov 9 2012 10:12 pm
Subject: Re: [usergrid] Re: UGActivity categories

Tim,

Thanks for the reply.  While I am incorporating the UGAPI into a larger
app, the error appears when just trying to post from your UGAPIApp sample
included in iOS SDK.

Here is the single method I added along with the testUGClient method from
your UGAPIApp project.  Have I set up the UGActivity correctly?  I am
making up Category entry.  Where should I be getting this info from?

-(void)testUGClient
{
    // creation and init
    if ( !g_client )
    {
        g_client =[[UGClient alloc] initWithApplicationID:<MY APP ID>];
    }

    UGClientResponse *response = nil;
    response = [g_client logInUser:<MY_USERNAME> password:<MY_PASSWORD>];
    if ( [response transactionState] == kUGClientResponseFailure )
    {
        [self outputResponse:response title:@"LOG IN ERROR"];
        return;
    }

    CLLocation *fakeLocation = [[CLLocation alloc]
initWithLatitude:37.776753 longitude:-122.407846];

    UGQuery *query = [UGQuery new];
    [query addRequiredWithinLocation:@"location" location:fakeLocation
distance:2000];

    response = [g_client getUsers:query];
    [self outputResponse:response title:@"getUsersActivity Response"];

    [self performSelector:@selector(send) withObject:nil afterDelay:1];

}

-(void)send {
 UGActivity *postActivity = [[UGActivity alloc] init];
 [postActivity setBasics:@"post"
   category:@"TestCategory"
content:@"This is a test" title:@"Test #1"];
 [postActivity  setActorInfo:[[g_client getLoggedInUser] username]
   actorDisplayName:[[g_client getLoggedInUser] username]
  actorUUID:[[g_client getLoggedInUser] uuid]];

UGClientResponse *response = nil;
response = [g_client postUserActivity:[[g_client getLoggedInUser] uuid]
  activity:[postActivity toNSDictionary]];
 [self outputResponse:response title:@"Send Response"];

}

Here is the JSON that's returned:

{"error":"null_pointer","timestamp":1352516491510,"duration":0,"exception": "java.lang.NullPointerException"}

I am working with both native iOS version and a HTML5 version.

Even odder...the new message added via API that returns an error does not
appear within the user's activity when refreshed via the API....BUT...its
does appear in the HTML5 sample when refreshed.  Any message added via
HTML5 appears fine in API sample.  The new message added via API does not
appear in the web browser portal under user activity either.

yeesh....does any of that make sense?

Thanks for your help

Greg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hartsteins  
View profile  
 More options Nov 14 2012, 4:14 pm
From: hartsteins <ghartst...@gmail.com>
Date: Wed, 14 Nov 2012 13:14:43 -0800 (PST)
Local: Wed, Nov 14 2012 4:14 pm
Subject: Re: [usergrid] Re: UGActivity categories

Tim,

Any insights as to this issue?

As an update....I am able to post to groups with the same UGActivity
dictionary but not directly to a user activity.  What do you think?

thanks

Greg


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Anglade  
View profile  
 More options Nov 16 2012, 2:53 pm
From: Tim Anglade <t...@apigee.com>
Date: Fri, 16 Nov 2012 11:52:40 -0800
Local: Fri, Nov 16 2012 2:52 pm
Subject: Re: [usergrid] Re: UGActivity categories

Hi Greg, sorry for the delay. This is out of my depth so I’m trying to get
one of our core developers on this. Should have more news for you shortly.

Cheers,
Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Anglade  
View profile  
 More options Nov 19 2012, 3:46 pm
From: Tim Anglade <t...@apigee.com>
Date: Mon, 19 Nov 2012 15:46:04 -0500
Local: Mon, Nov 19 2012 3:46 pm
Subject: Re: [usergrid] Re: UGActivity categories

Hey hi Greg,

so I’ve been investigating this with an iOS developer and we’re reasonably
confident that you are not properly logged in. Basically unless you are
calling the testUGClient code from somewhere else (in the template, it gets
called only if you touch the screen), it may not be called by your, app
which means that getLoggedInUser will (silently) return nil, which would
make the user activity call fail (but not necessarily the group activity
call).

It’s also possible that your app & user details may be improperly set
(since you swapped them out in the code you posted here, I can’t tell for
sure). In particular, the application ID needs to be of the form
orgname/appname (e.g. “tim/sandbox”).

Worse comes to worse, can you wrap the code in your “send” method with the
following condition to see if an error gets logged?

UGUser *user = [g_client getLoggedInUser];

if (user != nil) {

// put existing contents of 'send' method in here

} else {

NSLog( @"user is not logged in");

}

I know you mentioned earlier that the user was properly logged in by your
code but it really seemed like the only possible explanation to us without
access to your full app. If the explanation above doesn’t help, can you
share your full app code with me on a private repository or gist somewhere?
It would really help us take a deeper look!

Cheers,
Tim


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »