android - Using JSON Parse push to open fragment -
i have got ios app open views according value stored in json push , trying same in our android app.
this message being sent:
{ "alert": "test push ", "title": "new test push", "view": "circles" }
there have been quite few questions on stack overflow i'm afraid don't understand particular code snippets can go, or how make open fragment rather root activity.
my question is, without asking of code written me, functions, calls , classes need use in order achieve this?
i implement parse push solution: open activity clicking on push notification parse
you best bet writing intent reader detect if activity started clicking push message. above link has example you:
try { intent intent = getintent(); bundle extras = intent.getextras(); if (extras != null) { string jsondata = extras.getstring("com.parse.data"); // data parse push json jsonobject json; json = new jsonobject(jsondata); string view = json.getstring("view"); // write logic start fragment/activity } } catch (jsonexception e) { e.printstacktrace(); }
Comments
Post a Comment