How would phonegap/html5 app handle push notification. Would it be same code or Android/iPhone? Does this work for phonegap based app on iOS and Android and are there any limitations?
How would phonegap/html5 app handle push notification
You can't handle the push notification in html, but you can in Java or Objective-C
Would it be same code or Android/iPhone?
No, it won't. Push notification works quite the same way on Android and iOS but there are a few differences. Plus, because it is the native side of your PhoneGap application that will handle notifications, you will need to write different methods in both Java and Objective-C
Does this work for phonegap based app on iOS and Android and are there any limitations?
I'm currently working on a PhoneGap application on iOS and Android and push notification works fine on both these OS.
I recommend UrbanAirship:
https://github.com/urbanairship/ios-phonegap-plugin
http://minimoesfuerzo.org/2011/06/6/urban-airship-10-integration-android-phonegap-app/
I am just now in the process of developing the PhoneGap plugin for OpenMobster. From the looks of it for OpenMobster, the Push notification code with its corresponding Broadcast listeners will remain the same as in the pure native app development. On iOS as well there should be no added PhoneGap specific code required to handle the Push notifications via the Apple Push Notification Service.
To answer your question, in theory the html5/javascript codebase using PhoneGap should remain the same for both the platforms.
(p.s. this applies to how OpenMobster handles push notification. I am not sure how Urban Airship handles the PhoneGap side of things)
Thanks
Sohil
Related
I am working on one product using CRA, Service Worker and PWA. Everything is working fine in both iOS and Android devices. But I need push notification for my new functionalities launched in my pwa for end users.
In Android using firebase and push notification api its possible to implement but in iOS I am not able to implement as push notification is not supported in any of the iOS version.
Please suggest how to implement or is any way available for sending push notification in iOS devices also.
I'm working on a progressive web app (PWA) that is targeting Android users.
Is it possible to schedule and send local push notifications without using a Cordova WebView and Plugin like this?
If I understand you well, yes! you can.
How? By using the native Push API with Notification API. Mozilla and Google have great documentation for them.
I have an android app already made and it supports push notification. I used Google cloud messaging for push notification. How to make the same push notification work on ios.
Do I have to make another one using apple push notification services?
Android and iOS are coded very differently, you can't just copy the app code in your android app and put it directly into an iOS app. You will have to learn how iOS push notifications work. I suggest this tutorial:
http://code.tutsplus.com/tutorials/setting-up-push-notifications-on-ios--cms-21925
In order to use Push Notification in IOS device you need to integrate Apple's APNS service.
Follow this link:
Apple's APNS
Assuming my application is based on HTML5/Jquery mobile (Cross platform web app),
How is it possible to create push notifications for Android/iOS ?
Also, does it include developing different "notifications engine" for
each device? (in other words: Do I need to implement two different background processes for each type of device?)
I'd be really glad to get a full answer/references to my conflict.
I have searched for the forum's previous answers but it seems like the threads are quite old so i preferred opening my own question.
GCM is the Google Cloud Messaging Service for Android, while APNS is the push notification service for iOS, both of them are very similar.
If you're already using html5 and jQuery, I would suggest you to use Phonegap which is a framework that allows you to create mobile apps using only html5 css3 javascript(jQuery) it was very useful for me and they've a push notifications plugin which works for Android and iOS.
Be sure to check Phonegap and Phonegap Build (which is a very interesting service)
Regards
1)
Apple has Apple Push Notification Service (APNS) to push out alerts.
More details at
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html.
Google offers a comparable Google Cloud Messaging Service (GCM).
Details at http://developer.android.com/google/gcm/index.html. UPDATE: GCM does support iOS as a client, so can be used for both Android and iOS, with some work. (Technically, it will be an APNS when it reaches the iOS device.)
2) Not sure I understand what you mean by "background processes", If you are referring to backend service/originator of notifications,then the service needs to be able to communicate i with both the Apple APNS or Google CDM using the interfaces supported by these services and send out alerts in appropriate format. If you are looking for a third party service for sending out push notifications, you can checkout UrbanAirship or Parse which can send notifications to either platform.
I was searching for an API like EasyAPNS for Android. EasyAPNS allows to add PUSH Notifications in iOS with minimum codeing required and all tested stuff to reduce development time. I was interested to find similar thing for Android too so I may not need to write the whole backend and service stuff for Android. Have you come across any API so far?
I know how notifications in Android works and how can a service be used to generate notifications. The service in Android must listen for remote requests and as they may arrive, it will add to the notification tray.
Well, Minimoesfuerzo did a plugin that integrates UrbanAirship and PhoneGap Android. That may provide you the functionality you need:
http://minimoesfuerzo.org/2011/06/3/urban-airship-integration-android-phonegap-app/