Java Question [Closed] Changing a Manifest to suite B4A

Johan Schoeman

Expert
Licensed User
Longtime User
I have the following manifest in a Java project and need to change it to suite a B4A project:
B4X:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.pda.scan1dserver"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="17"
        android:targetSdkVersion="19" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/scan_logo"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
               <!-- receive funkey -->
        <receiver android:name="com.pda.scan1dserver.KeyReceiver">
            <intent-filter>
                <action android:name="android.rfid.FUN_KEY"/>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </receiver>
        <service android:name="com.pda.scan1dserver.Scan1DService"></service>
    </application>

</manifest>

My B4A project manifest now looks as follows:

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
   

AddApplicationText(<activity
            android:name="com.pda.scan1dserver.MainActivity"
            android:label="@string/app_name" >

        </activity>
        <receiver android:name="com.pda.scan1dserver.KeyReceiver">
            <intent-filter>
                <action android:name="android.rfid.FUN_KEY"/>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </receiver>
        <service android:name="com.pda.scan1dserver.Scan1DService"></service>)

Am I missing something?
 
Top