urbanairship-cordova | Urban Airship integration with Apache Cordova | Mobile Application library
kandi X-RAY | urbanairship-cordova Summary
kandi X-RAY | urbanairship-cordova Summary
Urban Airship integration with Apache Cordova
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Run animation .
- Called when the server completes
- Returns a special event object for the given event type .
- loop through the request and update the response
- Determine attribute editor instance .
- Clones provided DOM element .
- handle the response
- Subscribers .
- Creates a new TagGroupEditor instance .
- Unsubscribe from a channel .
urbanairship-cordova Key Features
urbanairship-cordova Examples and Code Snippets
Community Discussions
Trending Discussions on urbanairship-cordova
QUESTION
We are trying to update urbanairship-cordova plugin to version 7.2.0 on Ionic Project. We've followed this step https://www.npmjs.com/package/urbanairship-cordova. We send sample notification using urbanairship dashboard but we cannot get the push notification. This is the error log we've got from android studio :
E/UALib: JobDispatcher - UAirship not ready. Rescheduling job: JobInfo{action=ACTION_UPDATE_PUSH_REGISTRATION, id=4, extras='{}', airshipComponentName='com.urbanairship.push.PushManager', isNetworkAccessRequired=true, initialDelay=0, persistent=false}
Can somebody help us to solve that error ?
...ANSWER
Answered 2018-Sep-19 at 08:40I've already fixing this error by update the android platform to 6.3.0 and use the urbanairship-cordova version 6.9.2.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install urbanairship-cordova
Install this plugin using Cordova CLI: cordova plugin add urbanairship-cordova
(Android Only) Add a reference to your google-services.json file in the app's config.xml:
(iOS Only) Add your Apple Developer Account Team ID to the build.json: { "ios": { "debug": { "developmentTeam": "XXXXXXXXXX" }, "release": { "developmentTeam": "XXXXXXXXXX" } } } Your iOS builds will need to reference the build.json using Cordova's "--buildConfig" flag.
Initialize Urban Airship Either call takeOff when the device is ready: // TakeOff UAirship.takeOff({ production: { appKey: "<APP_KEY>", appSecret: "<APP_SECRET>" }, development: { appKey: "<APP_KEY>", appSecret: "<APP_SECRET>" }, site: "US" }) // Configure Android UAirship.setAndroidNotificationConfig({ icon: "ic_notification", largeIcon: "ic_notification_large", accentColor: "#FF0000" }) // Configure iOS UAirship.setPresentationOptions( UAirship.presentationOptions.sound | UAirship.presentationOptions.alert ) Alternatively you can configure Urban Airship through config.xml and it will takeOff automatically. <!-- Urban Airship app credentials --> <preference name="com.urbanairship.production_app_key" value="Your Production App Key" /> <preference name="com.urbanairship.production_app_secret" value="Your Production App Secret" /> <preference name="com.urbanairship.development_app_key" value="Your Development App Key" /> <preference name="com.urbanairship.development_app_secret" value="Your Development App Secret" /> <!-- Optional --> <!-- If the app is in production or not. If not set, Urban Airship will auto detect the mode. --> <preference name="com.urbanairship.in_production" value="true | false" /> <!-- Urban Airship development log level defaults to debug --> <preference name="com.urbanairship.development_log_level" value="none | error | warn | info | debug | verbose" /> <!-- Urban Airship production log level defaults to error --> <preference name="com.urbanairship.production_log_level" value="none | error | warn | info | debug | verbose" /> <!-- Enables/disables auto launching the message center when the corresponding push is opened. --> <preference name="com.urbanairship.auto_launch_message_center" value="true | false" /> <!-- Urban Airship SDK Site (US or EU) defaults to US) --> <preference name="com.urbanairship.site" value="US" /> <!-- Android Notification Settings --> <preference name="com.urbanairship.notification_icon" value="ic_notification" /> <preference name="com.urbanairship.notification_large_icon" value="ic_notification_large" /> <preference name="com.urbanairship.notification_accent_color" value="#0000ff" /> <!-- iOS Foreround Presentation Options --> <preference name="com.urbanairship.ios_foreground_notification_presentation_alert" value="true | false"/> <preference name="com.urbanairship.ios_foreground_notification_presentation_badge" value="true | false"/> <preference name="com.urbanairship.ios_foreground_notification_presentation_sound" value="true | false"/> <!-- iOS Auto Clear Badge --> <preference name="com.urbanairship.clear_badge_onlaunch" value="true | false" /> <!-- Deployment target must be >= iOS 11 --> <preference name="deployment-target" value="11.0" /> UrbanAirship.takeOff can be called multiple times but any changes to the app credentials will not apply until the next app start.
Enable user notifications: // Enable user notifications (will prompt the user to accept push notifications on iOS) UAirship.setUserNotificationsEnabled(true, function (enabled) { console.log("User notifications are enabled! Fire away!") })
(Optional) Listen for events: document.addEventListener("urbanairship.registration", onRegistration) document.addEventListener("urbanairship.push", onPushReceived) document.addEventListener("urbanairship.notification_opened", notificationOpened) document.addEventListener("urbanairship.deep_link", handleDeepLink)
(Optional) Add platform-specific custom notification button groups resource files to config.xml:
Update config.xml with the correct minimum deployment target, if needed.
cordova plugin remove urbanairship-cordova
cordova platform remove ios
cordova platform add ios
cordova plugin add urbanairship-cordova
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page