我正在使用Urbanairship服务进行推送通知。 在进入查询之前,我想显示我的应用清单文件以供参考。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
debuggable="true"
package="package_name"
android:versionCode="9"
android:versionName="1.3.4" >
<uses-sdk
android:maxSdkVersion="19"
android:minSdkVersion="11" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="false"
android:xlargeScreens="true" >
</supports-screens>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!-- below permission added for mixpanel api -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- for cloud to device messaging -->
<permission
android:name="package_name.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="package_name.permission.C2D_MESSAGE" />
<!-- Required for the Urban Airship library -->
<permission
android:name="package_name.permission.UA_DATA"
android:protectionLevel="signature" />
<uses-permission android:name="package_name.permission.UA_DATA" />
<!-- Required for Push -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
<!-- This app has permission to register with GCM and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="package_name.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="package_name.permission.C2D_MESSAGE" />
<!-- Required only for location -->
<!-- Use ACCESS_COARSE_LOCATION if GPS access is not necessary -->
<!-- uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" / -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!-- OPTIONAL - This permission is only necessary if your app has multiple processes -->
<!-- <uses-permission android:name="android.permission.BROADCAST_STICKY" /> -->
<application
android:name=".ShowApplication"
android:hardwareAccelerated="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:largeHeap="true" >
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<activity
android:name=".SplashActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.Holo.NoActionBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".DomainActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:isScrollContainer="false"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".UploadHome"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".FilePickerActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".TempMediaPlayer"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".ShareSingleAsset"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".UploadResult"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar" >
<!--
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="package_name.SplashActivity"
/> -->
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="audio/*" />
<data android:mimeType="image/*" />
<data android:mimeType="video/*" />
</intent-filter>
</activity>
<activity
android:name=".ThumbActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize|screenLayout"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".SlideShowActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Holo.NoActionBar" >
</activity>
<activity
android:name=".PreviewActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".LoginActivity"
android:alwaysRetainTaskState="true"
android:isScrollContainer="true"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".ForgotPasswordActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Dialog" >
</activity>
<activity
android:name=".BecomeaMemberActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Dialog" >
</activity>
<activity
android:name=".DomainExpiredActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name=".MediaPlayerActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Holo.NoActionBar" >
</activity>
<activity
android:name=".ShareActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name=".ShareSendAgainActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".MenuActivity"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".ViewShowList"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleTop"
android:theme="@android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<data
android:host="*.showontherun.com/"
android:scheme="http" />
<data
android:host="*.showonthecloud.com/"
android:scheme="http" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.ALL_APPS" />
</intent-filter>
</activity>
<activity
android:name=".ShowInfoPage"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".SupportActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.iw.sotc.show.offline.ViewOfflineShows"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.iw.sotc.show.offline.ViewOfflineThumbActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.iw.sotc.show.offline.ViewOfflinePreviewPage"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.iw.sotc.show.offline.SlideShowOfflineActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Holo.NoActionBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.iw.sotc.dialog.SaveShowDialogActivity"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Dialog"
android:windowSoftInputMode="stateVisible" >
</activity>
<activity
android:name="org.acra.CrashReportDialog"
android:excludeFromRecents="true"
android:finishOnTaskLaunch="true"
android:launchMode="singleInstance"
android:theme="@style/InfoDialog" >
</activity>
<service android:name="com.iw.sotc.show.offline.DownloadService" >
</service>
<service android:name=".DownloadActivityPreviewActivity" >
</service>
<service android:name=".MediaPlayerService" >
</service>
<service android:name=".UploadingService" >
</service>
<service android:name=".UploadLinkService" >
</service>
<activity
android:name=".UploadMedia"
android:alwaysRetainTaskState="true"
android:configChanges="keyboardHidden|orientation"
android:label="@string/title_activity_upload_media"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" >
</activity>
<activity
android:name=".MediaPlayer"
android:alwaysRetainTaskState="true"
android:label="@string/title_activity_media_player" >
</activity>
<!--
added by Karthikeyan V
for managing the mixpanel api survey
-->
<activity android:name="com.mixpanel.android.surveys.SurveyActivity" />
<meta-data
android:name="com.mixpanel.android.MPConfig.AutoCheckForSurveys"
android:value="false" />
<!-- added for cloud to Device(C2DM)Messaging service -->
<receiver
android:name="com.mixpanel.android.mpmetrics.GCMReceiver"
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="package_name" />
</intent-filter>
</receiver>
<!-- < added by siva for play the audio by streaming > -->
<activity
android:name=".AudioStream"
android:configChanges="keyboardHidden|orientation"
android:launchMode="singleTask" >
</activity>
<!-- added for mixpanel in-app notification -->
<meta-data
android:name="com.mixpanel.android.MPConfig.AutoShowMixpanelUpdates"
android:value="false" />
<!-- Required for the library -->
<provider
android:name="com.urbanairship.UrbanAirshipProvider"
android:authorities="package_name.urbanairship.provider"
android:exported="true"
android:multiprocess="true"
android:permission="package_name.permission.UA_DATA" />
<!-- Required for Push -->
<service android:name="com.urbanairship.push.PushService" />
<receiver android:name="com.urbanairship.CoreReceiver" />
<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="package_name" />
</intent-filter>
<!-- Required for detecting when the application is upgraded so it can request a new GCM ID -->
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data android:scheme="package_name" />
</intent-filter>
</receiver>
<!-- Required for analytics -->
<service android:name="com.urbanairship.analytics.EventService" />
<!-- Required for Rich Push -->
<service android:name="com.urbanairship.richpush.RichPushUpdateService" />
<!-- Required for Actions -->
<activity android:name="com.urbanairship.actions.ActionActivity" />
<service android:name="com.urbanairship.actions.ActionService" />
<!-- Required for Landing Page Action -->
<activity
android:name="com.urbanairship.actions.LandingPageActivity"
android:exported="false"
android:parentActivityName=".ThumbActivity" >
<!-- MODIFICATION REQUIRED set or remove the parent activity -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="package_name.ThumbActivity" />
<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>
<receiver android:name="package_name.IntentReceiver" >
</receiver>
<activity
android:name=".YoutubeVideoPlayer"
android:label="@string/title_activity_youtube_video_player"
android:theme="@android:style/Theme.Black.NoTitleBar" >
</activity>
</application>
</manifest>
执行我的应用时,我可以收到APID。当我试图从Urbanairship网络帐户推送时,我遇到了如下问题。
UA错误控制台显示&#34;应用程序无权发送到此设备
原始消息:错误:发件人ID不匹配&#34;
注意:在不更改发件人ID的情况下,步骤1和2工作正常但不是第3步。
Manifest文件中的任何内容是否阻止了推送消息? 我错过了任何权限吗?
注意:我正在使用跟踪版本。