i want to disable PushNotificaiton in Notificaton bar top of screen

0 votes
hello, once again i come here to egt my solution i have loys of hope that i will get it here . I am sending push notification to group with parameter like message and list. sucessfully i can send it. But at receiver side if Application is open than i have opened some window on OnMessage function. its also good. but on top of screen i dont want notificaion if my app is currently open. So what should i do with unity Android and ios both. is there any method or class or native file in manifiest file to hide the displaed message on top of screen. Please send Me any suggestion ASAP. Thank You.
asked Apr 19, 2016 in Unity by jns7309 (10 points)

1 Answer

0 votes
Hi,

In iOS, if your app is open then push alert/banner will not be displayed and it is handled by iOS itself. Push Alerts only displays on iOS if app is not open.

For Android, the plugin displays the push alerts when delivered in onMessage function. You can put a check that if app is open then dont call the push alert creation methods.

Let me know if you have any further queries.

Thanks.
answered Apr 19, 2016 by rajeev.etc (1,660 points)
thanks for reply..


where can i find this push alert method in App42 plugin.i have check all script in which there is no any method which same as you told.

please give me information regarding it.
 should i need to modify Manifest file...??
Hi JNS,
You can disable the same by modifying native plugin source of Android which is attached with the sample.
You can open the same in Eclipse IDE and can make validations in App42GCMService.java class that will be responsible for notification UI.
You can write a code here, that will check if your application is opened or not if already opened then don't call sendNotification function.

Build the plugin project and replace it with app42pushservice.jar file in Assets/Android folder.
Thank you very much for reply. i am trying to do this , but i am not familiar with native android and eclipse can you guide me what method i need to stop when app is open??

if i can do this than i will my try to build this plugin and import in my game and check it.
Yes, You need to modify existing plugin based on your business logic.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...