I have an application want to integrate Urban Airship to push notification. I dont use Android Studio, but I cant find any tutorial about integrate Urban Airship with Eclipse. Anyone can help me? THank you.
Asked
Active
Viewed 242 times
-1
-
Did you try Urban Airship's site: http://docs.urbanairship.com/platform/android.html – Michael Feb 18 '16 at 02:32
-
SDK have aar files. I dont know how to add them to my project in Eclipse – FinalDest Feb 18 '16 at 03:15
1 Answers
0
Urban Airship dropped support for eclipse due to ADT no longer being supported or developed by Google.
The last release that for eclipse style projects is 6.4.3. You can download the release from bintray. Once downloaded you need to add the urbanairship-lib directory to your project along with the latest v4 support library and Google Play Services 8+.
Then add the following to your AndoridManifest.xml (replace ${applicationId} with your package name):
Permissions:
<permission android:name="${applicationId}.permission.UA_DATA" android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.UA_DATA" />
<!-- GCM -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="${applicationId}.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.C2D_MESSAGE" />
<!-- ADM -->
<uses-permission android:name="com.amazon.device.messaging.permission.RECEIVE" />
<permission android:name="${applicationId}.permission.RECEIVE_ADM_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="${applicationId}.permission.RECEIVE_ADM_MESSAGE" />
Components (add under the application tag):
<!-- ADM -->
<amazon:enable-feature
android:name="com.amazon.device.messaging"
android:required="false" />
<activity android:name="com.urbanairship.actions.ActionActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity android:name="com.urbanairship.CoreActivity" />
<activity android:name="com.urbanairship.google.PlayServicesErrorActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity
android:name="com.urbanairship.actions.LandingPageActivity"
android:exported="false"
android:theme="@style/LandingPageStyle">
<meta-data
android:name="com.urbanairship.action.LANDING_PAGE_VIEW"
android:resource="@layout/ua_activity_landing_page"/>
<meta-data
android:name="com.urbanairship.push.iam.EXCLUDE_FROM_AUTO_SHOW"
android:value="true" />
<intent-filter>
<action android:name="com.urbanairship.actions.SHOW_LANDING_PAGE_INTENT_ACTION"/>
<data android:scheme="http"/>
<data android:scheme="https"/>
<data android:scheme="message"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<service android:name="com.urbanairship.push.PushService" android:label="Push Notification Service" />
<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" />
<service android:name="com.urbanairship.location.LocationService" android:label="Segments Service" />
<service
android:name="com.urbanairship.push.UAInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID"/>
</intent-filter>
</service>
<receiver android:name="com.urbanairship.CoreReceiver"
android:exported="false">
<intent-filter android:priority="-999">
<action android:name="com.urbanairship.push.OPENED" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<receiver
android:name="com.urbanairship.push.GcmPushReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<receiver
android:name="com.urbanairship.push.AdmPushReceiver"
android:permission="com.amazon.device.messaging.permission.SEND">
<intent-filter>
<action android:name="com.amazon.device.messaging.intent.REGISTRATION" />
<action android:name="com.amazon.device.messaging.intent.RECEIVE" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<provider
android:name="com.urbanairship.UrbanAirshipProvider"
android:authorities="${applicationId}.urbanairship.provider"
android:permission="${applicationId}.permission.UA_DATA"
android:exported="true"
android:multiprocess="true" />

ralepinski
- 1,756
- 8
- 15