简体   繁体   English

phonegap本地通知

[英]phonegap local notification

i have implemented a local notification in my android app using phonegap localnotification plugin. 我已经使用phonegap localnotification插件在我的android应用中实现了本地通知。

notification get trigger properly but while clicking on notification app does not open. 通知正确触发,但在单击通知应用程序时无法打开。

what i want to relaunch a app on clicking of status notification. 点击状态通知后,我想重新启动一个应用程序。

Thanks and regards 谢谢并恭祝安康

In AlarmReciever class, in onRecieve event, change the line 79, 在AlarmReciever类的onRecieve事件中,更改第79行,

final PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(), 0);

to

final PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(context,mainActivity.class), 0);

It starts, new activity 开始,新活动

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM