push-notification
Enable or Disable Iphone Push Notifications inside the app
[FYI – Few users have reported that it stopped working on iOS 10] You can easily enable and disable push notifications in your application by calling registerForRemoteNotificationTypes and unregisterForRemoteNotificationTypes respectively again. I have tried this and it works.
Android – use external profile image in notification bar like Facebook
This statement will use a method to convert a URL (naturally, one that points to an image) into a Bitmap. Bitmap bitmap = getBitmapFromURL(“https://graph.facebook.com/YOUR_USER_ID/picture?type=large”); Note: Since you mention a Facebook profile, I have included an URL that gets your the large size profile picture of a Facebook User. You can however, change this to any … Read more
Handling Push Notifications when App is NOT running
When your app is not running or killed and you tap on push notification this function will trigger; – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions so you should handle it like this, UILocalNotification *localNotif = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey]; if (localNotif) { NSString *json = [localNotif valueForKey:@”data”]; // Parse your string to dictionary }
how to retrive Registration id and send message to third-party application in android c2dm0+
There has above code code working successfully.There has some change in C2DMBroadcastReceiver.java class for receive message and There has add MessageClass.java class for sending message to server C2DMBroadcastReceiver.java file public class C2DMBroadcastReceiver extends BroadcastReceiver { NotificationManager nm; @Override public final void onReceive(Context context, Intent intent) { if (Constants.RECEIVED_REGISTRATION_ID_FROM_GOOGLE.equals(intent.getAction())) { Log.d(Constants.TAG, “Received a registration ID from … Read more
SwiftUI – Open a specific View when user opens a Push Notification
You need some sort of shared state that you can modify that SwiftUI knows to react to. An ObservableObject is perfect for this: class AppState: ObservableObject { static let shared = AppState() @Published var pageToNavigationTo : String? } Then, to listen to it and respond to it, you can do a couple different methods in … Read more
iOS timed background processing
I don’t have a definite answer for your question, just a rambling set of comments that may help you decide what will work best for your situation. Sorry, this is the best I can offer. One thing to keep in mind is that an app shouldn’t use any of the phone’s data-plan quota without letting … Read more
Push Notification -didFinishLaunchingWithOptions
Since you only want to present a viewController when you get a Push Notification, you may try utilizing NSNotificationCenter for your purposes: Part 1: Set up a class (in your case, the rootViewController) to listen/respond to a NSNotification Suppose, MainMenuViewController is the rootViewController of your navigationController. Set up this class to listen to a NSNotification: … Read more