I want to stop my Android App opening automatically when I click on the PUSH Notification send via Google FCM. I have changed the message type from Data Message to Notification message.
The PUSH I am sending via the server REST API has a promo code in it, but has nothing to do with my App really, so I dont want the Android App to open at all. I can't used the FCM Console to send the PUSH notification as each promo code is unique to the user and their pet, and there are thousands of them. I'm using the test http v1. api but the actual Android App has been built by someone else and I dont have access to the source code. What should I be looking out for ? Is the PUSH auto opening the App due to a call it makes and an intent in the app I can't change?
Thanks for any guidance.
Related
I have developed a chat app using Xamarin, and the app receives push notification when a new chat arrives. The push notifications are delivered through OneSignal platform which uses Firebase for Android and APNS for iOS.
I would like to unsubscribe for push notification from the device itself when a user logouts, so that even if the server sends one, it wont be displayed. I can achieve this in iOS with the following code.
UIApplication.SharedApplication.UnregisterForRemoteNotifications();
What would be the equivalent for this in Android. I have searched a lot in documentation but no luck. Appreciate some help. Even it someone can tell the code in Java or Kotlin, that would do.
In Android you must delete that instance Id to avoid receiving push notifications but also disable auto init so that it doesn't generate a new token registration:
FirebaseMessaging.Instance.AutoInitEnabled = false;
FirebaseInstanceId.Instance.DeleteInstanceId();
I have a very simple app made with android studio, an web viewer for my forum app. I integrated push notfications to be able to send notifications like "Hi! There are some new subjects on our forum, check it out" and make people open the app. I followed the exact documentation from here https://pushbots.com/developer/docs/android-sdk-integration
I am now able to send notifications to all the users that have my application. My problem is that they dont see the notification unless they have the application opened. For example, if I test it and send a push notification, but i dont have the app opened, i wont receive anything. I want to be able to send notifications even if they have the app closed, that's my point, i want to make them open the app to see the new questions on my forum
What should i do?
Make use of what was formerly known as Google Cloud Messaging and is now known as Firebase Cloud Messaging. Can push messages to user phone even when app is closed
I'm trying to figure out a way to send data from a server to a particular android device having my app.so i came across Google cloud messaging service. i wanted to know if its possible to directly send information to my application on a phone from a php web application without showing a notification in the status bar? from all the examples Ive seen, it looks like a push notification is always sent. i would just like my app to directly receive the data without showing any push notification.is it possible? any help is gratefully accepted.
Yes, you have 100% control over what your application does upon receiving a push message. Looking at the sample receive message code, you can see that the GcmIntentService they build to handle the message can run any code you'd like - including or not including sending a notification.
I was wondering if there's a way to send a push notification to a device from an android application that I developed or not. Also, if it is possible to develop my php server in a way that it would request a push notification to be sent to a specific device. I have already tested the SDK with my application and it receives the notification if I sent it from mixpanel.com. I just want to make the thing automated for convenience.
I'm trying to implement an application with a messaging feature and need to notify the user that will receive the message when they receive it. I read a lot about GCM and there doesn't seem any good documentation out there and everything doesn't work no matter what and I always get errors. Mixpanel should do the job, but in order for me to be able to send push notifications, I have to be logged in to their website and use the website to send the notification. I also tried to use HTTP request and send a request to the URL that sends the push notification, but I need to be logged in and it just doesn't work.
Any help would be much appreciated as I have to get this application done as soon as possible!
Thanks
You can get Mixpanel to send your push notifications automatically using the "Notifications" feature- you don't have to log in to Mixpanel every time. You can set up the notifications to be sent based on a user's properties. If you want to send a notification based on some event in your app, you can send a people analytics update to Mixpanel when that event occurs.
So suppose you want people to receive a push notification to their mobile device every time they sign up in your web app. On the "Thanks for signing up" page of your app, you'd put something like the following:
// Assuming you've added the Mixpanel JS snippet to your page
mixpanel.identify(SOME USER DISTINCT ID);
mixpanel.people.set("Signed Up", true);
Then, you could set up a notification in Mixpanel with "Signed Up Is True" in your Mixpanel project. The next time you set a user to "Signed Up", they'll get a GCM notification.
I run Push Notification Sample code on Worklight server and its working.
Now i want to send notification from one device to another device so what are the required changes in the adapter?
The adapter XML:
<displayName>PushAdapter</displayName>
<description>PushAdapter</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>https://android.apis.google.com</domain>
<port>8080</port>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2"/>
</connectivity>
Should i change domain and port and i have to upload the app first on google play so that i can able to recive or send notifications. And should i create a key for android device on GCM
Push notifications in Worklight (and I believe at large as well) are not sent from one device to another per-se; consider it this way:
You have two applications:
A managing app
A receiving app
User A is running the managing app - this application is able to send a request to the server, which tells it to send a notification to some other user(s).
User B is running the receiving app - this application is able to receive notifications.
All of this is not related at all to the Google Play store.
Yes, both apps will require a GCM senderId and Key values in order to have any Push Notification capabilities.
As for implementing all of this... there is no sample to do this, but you already have part of the solution (the sample app is able to receive notifications). What you need to do now is have the managing application be able to retrieve a list of / specific username(s), and create a procedure that will invoke a function to send the notification based on the username(s) you have retrieved.