2014-07-03

01:58 lyzidiamond joined #geoloqi
06:13 patrickarlt joined #geoloqi
06:16 lyzidiamond joined #geoloqi
07:10 patrickarlt joined #geoloqi
07:52 manny__ joined #geoloqi
08:01 patrickarlt joined #geoloqi
08:10 manny__ joined #geoloqi
08:17 lyzidiamond joined #geoloqi
09:27 lyzidiamond joined #geoloqi
11:01 lyzidiamond joined #geoloqi
12:13 manny__ joined #geoloqi
12:34 dkronewi joined #geoloqi
12:35 <dkronewi> Hello - I'm developing a location based app. Battery life is a killer
12:35 <dkronewi> Will the geoloqi iphone sdk help me out?
12:42 lyzidiamond joined #geoloqi
12:47 dkronewi_ joined #geoloqi
12:48 <dkronewi_> Anybody know about the geoloqi iphone sdk?
13:07 andreww joined #geoloqi
13:08 <andreww> Hi Geoloqi, I have a question of how notifications are handled in Android
13:08 <andreww> so right now I am using GeotriggerBroadcastReceiver.PushMessageListener
13:09 <andreww> and it will be fired if the push notification is received and the app is in the foreground
13:10 <andreww> however, I would like it so that when a user receives a push notification, they can click on the notification and they will be redirected to the mainactivity and does something with the data from the push notification
13:12 <andreww> i am not abel to achieve this with onPushMessage, so I am wondering do I have to use one of android's default api methods to handle this, or is there something within the geotrigger api that I can use?
13:13 manny__ joined #geoloqi
13:21 andreww joined #geoloqi
13:21 manny__ joined #geoloqi
13:27 <hsoj> andreww: you can do that by registering a custom url scheme in your manifest and set a url in the push message to link into your app.
13:29 <hsoj> for example, you could set a url like this to be sent when a trigger is fired: yourscheme://mainactivity/handlepush?data=blah
13:31 <hsoj> alternately, you can create a custom notification with whatever actions you'd like to provide in onPushMessage using properties from the data sent along with the notifications
13:32 <hsoj> I'd suggest a custom URL scheme if you want to be able to support both iOS and Android, since it's possible to implement on both platforms. If you only want to support Android, or want to take advantage of notification actions or custom notification views, you'd want to build your own notification in onPushMessage
13:36 <andreww> hsoj: ok, I see, I am still a noob with android. I am only concerned with android, at the moment, I'll take a look into both ways real quick
13:37 <andreww> this is a completely noob android question, but I am already receiving a push notification from the geotrigger service, but you are saying I need to build another notification in onPushMessage?
13:39 <hsoj> not quite... you'd want to disable the built in push notification handling and take care of it yourself in onPushMessage
13:39 <hsoj> that will give you full control over the presentation and behavior of the notification
13:40 <andreww> ohh ok I see, that makes sense
13:40 <hsoj> if you simply want to allow people to tap on the notification and go to a specific view of your application, setting a custom url on the trigger and then registering to handle it is probably going to be your best bet
13:46 <andreww> ok, another question, what exactly is being sent in the message from the geotrigger service, does it include the properties of the trigger(the arbitrary JSON object saved with the trigger)?
14:08 manny__ joined #geoloqi
14:10 <hsoj> andreww: the notification contains the notification message, url, and data
14:12 <hsoj> it's possible to get information about the trigger along with the notification, but it requires you to have a server running somewhere and use callback URLs on your triggers
14:15 <andreww> hsoj: I think one way i can do this is to put some json data into the "data"
14:16 <andreww> and then use the data to do something on the client end
14:17 <andreww> however, I created the triggers using the featureservice2trigger command and there is not a way to specify a value for "data"
14:18 <hsoj> andreww: how many triggers do you have?
14:19 <andreww> almost 200
14:19 <hsoj> you can either use the Geotrigger Editor or one of the client libraries (node, python, ruby, go) to edit your triggers and add data
14:20 <andreww> hmm ok, i'll look into that
14:22 <patrickarlt> andreww: if you used featureservice2trigger 'data' will be equal to the 'attributes' on the features you imported
14:25 <andreww> patrickarlt: what do you mean by 'attributes'?
15:06 <andreww> so i just tried to use the ruby client to look into the triggers
15:06 <andreww> and I am able to see that the 'data' field is set
15:07 <andreww> however, when I go to go the online geotrigger editor, I do not see anything for 'data', but I do see that all the information is stored in the 'properties' field
15:08 <andreww> then I tried to use the android sdk i did: notification.get("text") and everything is fine
15:08 <andreww> but notification.get("data")
15:08 <andreww> crashes the application
15:08 <andreww> and I found out the "data" key does not exist in notification?
15:21 <andreww> nvm, notification.get('data') just returns null, but from the ruby client the 'data' is set
15:27 patrickarlt joined #geoloqi
15:35 <hsoj> yeah
15:36 patrickarlt joined #geoloqi
15:36 <hsoj> andreww: It will crash if there isn't any data on the notification
15:37 <hsoj> I think you can call notification.has("data") to see if there is any data
15:38 erwins joined #geoloqi
15:39 <hsoj> "properties" on the trigger do not get sent with the notification. only "data" in the "notification" object gets sent
16:10 plambwk joined #geoloqi
19:16 patrickarlt joined #geoloqi
20:24 patrickarlt joined #geoloqi
23:26 lyzidiamond joined #geoloqi
23:45 lyzidiamond joined #geoloqi
23:46 lyzidiamond joined #geoloqi