One android application, one startup view, two ico

2019-07-20 02:32发布

I have one application, one startup view, two app icons and two app names.

I have to work with two app names and icons, it's crucial. The app it's the same.

The name and the icon changes with different signature type. free and not free signature.

I have two different icons and two different names for my app. And i want to change that in my java code. it's possible? Or change that in apk generation without change manifest file all the time.

I have icon1.png and icon2.png in drawable-hdpi/.

2条回答
趁早两清
2楼-- · 2019-07-20 03:00

You could automate the different builds using an ANT build.xml file with parameters. There are several examples on how to do this for Android in Google.

查看更多
聊天终结者
3楼-- · 2019-07-20 03:13

Sure, you have to go to the Manifest file and look out for:

<activity
            android:name=".Activity1"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

Please ignore the names, you will find your activity names.

The activity you want to use as the first activity should be as it is. But the activity which you do not want to show up in the launcher needs to be edited like:

<activity
                android:name=".Activity2"
                android:label="@string/title_activity_main" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />


                </intent-filter>
            </activity>

the <category android:name="android.intent.category.LAUNCHER" /> should be removed.

This will create only one icon and one name

<android:label="@string/title_activity_main">

Change the label please

查看更多
登录 后发表回答