Open push url
-
Hi, I’m trying to get the push notification to go to the post url and I can’t figure this out.
What do I need to do or where do I need to source the documentation that can guide me ?
-
I’ve come across this information
public void onReceive (Context context, Intent intent) { try { String articleId = intent.getAction(); JSONObject json = new JSONObject(intent.getExtras().getString("com.parse.Data")); String int = json.getString("action"); Intent i = new Intent(Intent.ACTION_VIEW); i.setData(myCoolAdress.com/?p=/\"articleId"); context.ApplicationContext().startActivity(i); } catch (JSONException e) { Log.d(TAG, "JSONException: " + e.getMessage()); } }Although I’m still getting errors
Hi, I have the same problem as you. I would like the Open URL with parse and push SWIFT language.
can help us someone, I’m no good programmer and do not speak good English
greeting
sondi2011I’ve partially solved this problem on my end as I can get the uri of my blog sent in the push notification I edited the pushFunctionality.php in the plugin folder and added $posturl = get_the_permalink(); then added $posturl to the data array.
$posturl = get_the_permalink(); $url = 'https://api.parse.com/1/push/'; $data = array( 'expiry' => 1451606400, 'data' => array( 'alert' => $AlertMessage, 'badge' => $Badge, 'uri' => $posturl, ), );Now I can open my blog post link from the push notification but not in my app but the android default browser rendered to hand http requests.
I’ve made a custom Receiver to handle the onPushOpen and this is where I’m stuck as I’ve done this but it not working for me.
Hello Dreamcatcher,
Thank you for your reply with a possible solution. I will also test this.greeting
sondi2011
The topic ‘Open push url’ is closed to new replies.