mobilefirst 推送通知更改 android app_name
mobilefirst push notification change android app_name
你好,我在 mobilefirst 6.3 混合应用程序中工作,我在更改 string.xml 中的 app_name 时遇到问题。
我有我的混合名称应用 <string name="app_name">ASDFGHJK</string>
,我需要将其更改为 <string name="app_name">ASDF GHJK</string>
,当我更改 de app_name:
当应用程序在后台时,点击推送没有任何作用,当我在应用程序中时,接收器方法不会触发,如何更改我的应用程序名称而不会出现此问题?
res\values\strings.xml 中的 app_name
值在内部用于创建 Intent 对象。因此,当应用程序关闭并且 GCMIntentService 收到一条消息时,它会创建一个操作为 <packagename>.<app_name>
的意图,并将其发送到通知服务以在通知栏中显示通知。
这是 AndroidManifest.xml 中使用的 Intent 名称,表示应用程序必须在点击通知时启动:
<activity android:name=".PushNotifications" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize" android:launchMode="singleTask" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:screenOrientation="sensor">
....
<intent-filter>
<action android:name="com.PushNotifications.PushNotifications.NOTIFICATION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
所以现在如果 app_name
更改为任何其他字符串,Intent 将在内部创建为 com.PushNotifications.<new_name>
。
但是 AndroidManifest.xml 仍然有例如 com.PushNotifications.PushNotifications
(在示例应用程序的情况下),因此应用程序不会启动,因为意图操作不同。
要显示具有不同名称的应用程序,请按照下列步骤操作:
- 在strings.xml中添加额外的new_name_value
在AndroidManifest.xml中,修改标签为新的字符串名称
<application android:label="@string/app_new_name" android:icon="@drawable/icon">
<activity android:name=".PushNotifications" android:label="@string/app_new_name"...
你好,我在 mobilefirst 6.3 混合应用程序中工作,我在更改 string.xml 中的 app_name 时遇到问题。
我有我的混合名称应用 <string name="app_name">ASDFGHJK</string>
,我需要将其更改为 <string name="app_name">ASDF GHJK</string>
,当我更改 de app_name:
当应用程序在后台时,点击推送没有任何作用,当我在应用程序中时,接收器方法不会触发,如何更改我的应用程序名称而不会出现此问题?
res\values\strings.xml 中的 app_name
值在内部用于创建 Intent 对象。因此,当应用程序关闭并且 GCMIntentService 收到一条消息时,它会创建一个操作为 <packagename>.<app_name>
的意图,并将其发送到通知服务以在通知栏中显示通知。
这是 AndroidManifest.xml 中使用的 Intent 名称,表示应用程序必须在点击通知时启动:
<activity android:name=".PushNotifications" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden|screenSize" android:launchMode="singleTask" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:screenOrientation="sensor">
....
<intent-filter>
<action android:name="com.PushNotifications.PushNotifications.NOTIFICATION"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
所以现在如果 app_name
更改为任何其他字符串,Intent 将在内部创建为 com.PushNotifications.<new_name>
。
但是 AndroidManifest.xml 仍然有例如 com.PushNotifications.PushNotifications
(在示例应用程序的情况下),因此应用程序不会启动,因为意图操作不同。
要显示具有不同名称的应用程序,请按照下列步骤操作:
- 在strings.xml中添加额外的new_name_value
在AndroidManifest.xml中,修改标签为新的字符串名称
<application android:label="@string/app_new_name" android:icon="@drawable/icon"> <activity android:name=".PushNotifications" android:label="@string/app_new_name"...