What services and activities are really required for Urban Airship Android push notifications?

420 Views Asked by At

I have some doubts about what is really required for the Urban Airship Android push notifications.

I removed the following lines, given in the doc, from my AndroidManifest.xml because I do not seem to need these services and activity, but get the errors shown below.

When running the app everything seems to work properly, but I'd like to be sure that I can ignore these errors.

Can these lines be safely removed if the corresponding activity and services are not needed?

Lines removed from AndroidManifest.xml

<service android:name="com.urbanairship.analytics.EventService" android:label="Event Service" />
<service android:name="com.urbanairship.actions.ActionService" />
<service android:name="com.urbanairship.richpush.RichPushUpdateService" />

<activity
    android:name="com.urbanairship.actions.LandingPageActivity"
    android:parentActivityName="com.my.package.MainActivity"
    android:exported="false">

    <meta-data
        android:name="android.support.PARENT_ACTIVITY"
        android:value="com.my.package.MainActivity" />

    <intent-filter>
        <action android:name="com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION" />

        <data android:scheme="http" />
        <data android:scheme="https" />

        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
</activity>

Errors returned

MyAppName - UALib﹕ AndroidManifest.xml missing required service: com.urbanairship.analytics.EventService
MyAppName - UALib﹕ AndroidManifest.xml missing required service: com.urbanairship.richpush.RichPushUpdateService
MyAppName - UALib﹕ AndroidManifest.xml missing required service: com.urbanairship.actions.ActionService
MyAppName - UALib﹕ AndroidManifest.xml missing activity with an intent filter for action com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION, category android.intent.category.DEFAULT, and data with scheme http.  Landing page action may not function properly.
MyAppName - UALib﹕ AndroidManifest.xml missing activity with an intent filter for action com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION, category android.intent.category.DEFAULT, and data with scheme https Landing page action may not function properly.
2

There are 2 best solutions below

0
On

The above mentioned services are mandatory.

But that activity is needed only if you are using Landing Page to send the notification.

Notification can be send in different ways using UrbanAirship. MessageCenter, Landing Page or URL can be used for sending the notification. The one send through Landing Page will not be saved in the database and will be lost once it is viewed.

0
On

you need to follow below links.

for documentation: http://docs.urbanairship.com/

For intigration (Android and IOS) : https://github.com/urbanairship/phonegap-ua-push

Please be careful of requirement of cordova version and phonegap version according to doc while implement above urbanairship plugin. hope it helps.

Thanks.