AIR app, adding activity to manifest changes the app design

社会主义新天地 提交于 2020-01-06 02:52:08

问题


I have a small problem, probably because I'm a newbie in Android development.

I am making an Air mobile App, with an Air Native Extension. My extension is used to create alarms. In my BroadcastReceiver I make an Intent to call my Air App. To make this call possible I had to add the activity in my Air App Manifest like this :

<manifestAdditions><![CDATA[
  <manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<application>
    <receiver android:name="com.atnetplanet.alarminterface.AlarmInterfaceBroadcastReceiver">
    <intent-filter>
        <action android:name="com.atnetplanet.alarminterface.AlarmInterfaceBroadcastReceiver.onReceive"/>
    </intent-filter>
    </receiver>
    <activity android:name="air.com.atnetplanet.pikup.AppEntry" >
    <intent-filter>
        <action android:name="air.com.atnetplanet.pikup.AppEntry" />
        <category android:name="android.intent.category.DEFAULT" />
    </intent-filter>
    </activity>
</application>
  </manifest>

]]>

Since I have added this activity in my manifest my app is awaken by my broadcast and everything is fine... except that the design of my app is changed : I have the name of the app above the actual screen (

I tried to make changes to the manifest, but wasn't able to remove this header without breaking my app.

Does anyone can tell me what I'm doing wrong ?

Thanks.


回答1:


I answer to myself so if someone faces the same problem he can see an answer. The problem was in the AIR manifest. I had to change the declaration of the activity to this :

<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<application>
    <receiver android:name="com.atnetplanet.alarminterface.AlarmInterfaceBroadcastReceiver">
    <intent-filter>
        <action android:name="com.atnetplanet.alarminterface.AlarmInterfaceBroadcastReceiver.onReceive"/>
    </intent-filter>
    </receiver>
    <activity>
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <action android:name="air.com.atnetplanet.pikup.AppEntry" />
        <category android:name="android.intent.category.LAUNCHER"/> 
        <category android:name="android.intent.category.DEFAULT" />
        <data android:scheme="pikup" />
    </intent-filter>
    </activity>
</application>
  </manifest>

Note that the activity node doesn't have the name inserted, and that I must put the or I'll have a misformed Manifest error when compiling.

Hope it will help someone.



来源:https://stackoverflow.com/questions/24700674/air-app-adding-activity-to-manifest-changes-the-app-design

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!