push-notification
How do I send a HTTP/2 POST request in PHP
The CURL extension for PHP >= 5.5.24 has support for HTTP/2. (since this commit) You also need a libcurl installed — the underlying library that the curl functions use — with HTTP/2 support enabled. That means a libcurl newer than 7.38.0 but really, the newer the better. Libcurl has to have been built with HTTP/2 support … Read more
Enable/Disable Apple Push Notification from iPhone app?
You can read your app’s permissions using UIRemoteNotificationType enabledTypes = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; and then performing a bitwise and operation with the different types to see which are enabled. You can also call unregisterForRemoteNotifications to disable notifications. The one thing you can’t do is turn on notifications, although you can direct the user.
apple push notification limitation
If you are sending multiple notifications to the same device within a short period of time, the push service will send only the last one. https://developer.apple.com/library/content/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG23 Look “Some Notifications Received, but Not All” in that documentation.
How to handle push notifications if the application is already running?
You can implement application:didReceiveRemoteNotification: Here is a possible sample code: – (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { NSString *message = nil; id alert = [userInfo objectForKey:@”alert”]; if ([alert isKindOfClass:[NSString class]]) { message = alert; } else if ([alert isKindOfClass:[NSDictionary class]]) { message = [alert objectForKey:@”body”]; } if (alert) { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@”Title” message:@”AThe … Read more
Starting app only if its not currently running
Use a “launch Intent” for your app, like this: PackageManager pm = getPackageManager(); Intent launchIntent = pm.getLaunchIntentForPackage(“your.package.name”); PendingIntent contentIntent = PendingIntent.getActivity(this, 0, launchIntent, 0); Replace “your.package.name” with the name of your package from the Android manifest. Also, you should remove the special launchMode=”singleTask” from your manifest. Standard Android behaviour will do what you want.
iOS Push Notification Banner shown twice for a single Push
I was experiencing the same issue, but after countless hours trying to debug, I realized that I was calling registerUserNotificationSettings(settings) twice in didFinishLaunchingWithOptions:. Verify that you’re not doing the same
Basic Steps for Using MQTT in android
You need: an MQTT broker which runs on the server side. This could be something like the mosquitto broker which is Open Source. an MQTT client library which you include in your Android app, enabling your app to connect, subscribe, and publish messages. There are a number of Java options listed at http://mqtt.org/software to come … Read more