kandi X-RAY | android-push Summary
kandi X-RAY | android-push Summary
The single-channel multi-app push system runs in service mode. If a mobile phone has multiple push-integrated apps installed, only one service instance runs (not every app opens a background service), that is, multiple apps share a push channel. The purpose of this design is to reduce the number of
Top functions reviewed by kandi - BETA
- Handle key down
- Unregister app
- Gets the singleton instance
- Unregister push listener
- Send a packet
- Gets the pack id
- Determines if the socket is connected
- Send a chat message
- Register Push Service
- Initializes the activity
- Initialize view
- Checks if is WiFi
- Get network info
- This method is called when the service is unbind
- Send a message to the log
- Gets an increment ID
- Send a debug log message
- Send INFO log message
- Cancel all pending packets
- Handle start command
- Register push listener
- Checks if the network is mobile
- Initialize the push service
- Invoked to bind a service
- Closes the push service
- Sends a warning message to the log
android-push Key Features
android-push Examples and Code Snippets
Trending Discussions on android-push
At the outset, I already have gone through a couple of forums discussing this topic. As an example: Android Push Notifications: Icon not displaying in notification, white square shown instead
If I add the ic_launcher logo as the small icon to my notification, I see it on running the application. But, If I try to add a custom image (.png) file as the logo, I see an all white image.
What I do not understand is the concept of a transparent image/logo. This has been suggested as the cause of the blank image in many a forums. If this indeed is the case, then how to I go about generating a custom transparent image that can be displayed? It is to be noted that I am using the same image as my start up logo [inside manifest file] and it is working as expected.
My notification object is as follows:...
ANSWERAnswered 2020-Sep-28 at 18:33
As suspected, the custom image must have a transparent background. In order to achieve this, one can make use of online converters. Open the image with a transparent background as an Image Asset (under R.drawable) and the image is good for use as a small icon.
I have successfully sent push notification from Firebase console using FCM registration token. This is my dart file:...
ANSWERAnswered 2020-Apr-24 at 08:35
try to configure your code as
I'm new to push notifications using FCM from php to Android devices. From android side I have generated FCM reg_id & send it over php script & store into mysql database. Now, I would like to send notifications from php script to multiple android devices simultaneously.
Here is the php scripts that are used during sending push notifications :
1.firebase.php (reference link)...
ANSWERAnswered 2017-Apr-19 at 11:16
Try to send device ID of multiple devices as an array. In your case,
$registration_ids must be an array of device IDs.
Google have deprecated GCM for delivering push notifications to Android apps, in favour of FCM. GCM will be switched off on April 11 2019 (See header here: https://developers.google.com/cloud-messaging/android/android-migrate-fcm)
Microsoft have provided a tutorial for setting up a new app with Azure Notification Hubs using FCM, however it still depends on the underlying GCM library (
With just 6 months until GCM switch off, my questions are therefore:
Will Azure Notification Hubs Android SDK be updated to remove the dependency on
Will a GCM to FCM migration guide be written for existing apps using Azure Notification Hubs on Android?
Currently the Android Azure Notification Hubs SDK relies on a deprecated
net.http.AndroidHttpClient, which has been totally removed in Android Pie. When will this be fixed?
What server side changes, if any, will be required to migrate from GCM to FCM when using Azure Notification Hubs?
ANSWERAnswered 2020-Jan-08 at 18:14
The Azure Notification Hubs team updated the SDK to address the issues you identified and also published this blog post describing the state of the GCM/FCM world as it relates to Azure Notification Hubs: https://azure.microsoft.com/en-ca/blog/azure-notification-hubs-and-google-s-firebase-cloud-messaging-migration/ to address customer concerns.
No server-side changes needed.
- I am working on Android app (API level >23). And I have to support Notification.
- And my notification icon is supported more than two colors.
- If I use that icon then icon displays in grey in notification pannel.
So I have created background transparent and completly white icon and set color dynamically.
But I am able to set only one color (setColor()).
So my question is :-
How to support multiple colors (more than two color or color gradients) for Android Notification icon? Note :- I have taken reference of Android Push Notifications: Icon not displaying in notification, white square shown instead
Thanks for support in advance....
ANSWERAnswered 2019-Oct-14 at 08:52
Make sure your notifications take these Android 5.0 changes into account. To learn more about designing your notifications for Android 5.0 and higher, see the notifications design guide.
Material design style
Notifications are drawn with dark text atop white (or very light) backgrounds to match the new material design widgets. Make sure that all your notifications look right with the new color scheme. If your notifications look wrong, fix them:
- Use setColor() to set an accent color in a circle behind your icon image.
- Update or remove assets that involve color. The system ignores all non-alpha channels in action icons and in the main notification icon. You should assume that these icons will be alpha-only. The system draws notification icons in white and action icons in dark gray.
I am using this library to implement azure notification hub in react native. I am able to get the registration ID successfully. But no notification is received. I am sending test notification from azure portal and it is getting delivered successfully. I am followed the integration tutorial from here and here.
ANSWERAnswered 2019-May-15 at 00:34
I followed the same steps and had the same issue with
com.microsoft.windowsazure.notifications.NotificationsBroadcastReceiver being unreferenced. I was able to resolve by adding
I am following this to register my deivce in Firebase
Here I am trying to display and save the notification token...
ANSWERAnswered 2018-Aug-14 at 06:39
onNewToken method will only be called when a new token is generated.
Quite often (especially during development) your app will already have generated an Instance ID token before you added the service. So
onNewToken will not be called, and you won't have a token in your shared preferences.
For this reason you should get the token directly from your main activity with
FirebaseInstanceId.getInstance().getInstanceId() as shown in the documentation. This will pick up the token that was last generated. From there on you use
onNewToken to respond to token changes.
I have configured push notifications for a Xamarin.Android app using Azure Notification Hub and Firebase. I have followed this tutorial
When sending a test push notification from Azure Notification Hub I can see that my notification code is getting called so it seems like everything is configured. No errors occur, but no push notification is received either....
ANSWERAnswered 2019-Jan-24 at 10:26
Call the following method in your MainActivity to set a notification channel:
I have a cross platform app set up using Xamarin forms in Visual Studio 2017. I am wanting to integrate Twilio and their push notification service. I am in the process of setting the service up on Android first using this guide:
However i am stuck on step 3 as it asks to modify the 'project-level build' file. I can't see this anywhere, how do i access this file in Visual Studio 2017?
ANSWERAnswered 2019-Jan-21 at 16:15
build.gradle is specific to Android apps built in Java.
For a Xamarin.Forms app built in C#, you'll want to use the
Xamarin.Firebase.Messaging NuGet package: https://www.nuget.org/packages/Xamarin.Firebase.Messaging/
Xcode10 Legacy build
I followed https://github.com/aggarwalankush/push-notification-server (notification server) and https://github.com/aggarwalankush/ionic-push-base (ionic app)
I have set up FCM using https://medium.com/@ankushaggarwal/gcm-setup-for-android-push-notifications-656cfdd8adbd.
I have also set up the .p12 certificate for both production and development and have targeted the production certificate in my notification server.
Once my app was published to the app-store, the push notification broke. But development build is still working fine. What could be the reason?
I have also upload the certificate into FCM as follows:
ANSWERAnswered 2019-Jan-14 at 02:20
I have finally figured out the issue.
It is due to :
No vulnerabilities reported
You can use android-push like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the android-push component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page