Click here to Skip to main content
14,268,217 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello last time i added hide icon code trick to my android app :


PackageManager pm =  getContext().getPackageManager();
                                   pm.setComponentEnabledSetting(
                                           new ComponentName(getContext(), Splash_screen.class),
                                           PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
                                           PackageManager.DONT_KILL_APP);




I used splash screen activity because it was started first and after manifest edit splash screen dissapear, now app load without it.
Is there any way to get him back wihtout activity changing? (It must be Splash Activity)

Here s manifest

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.awoapp.soundboard">

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_SETTINGS" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />


 <application
        android:name="com.app.name.MyApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">


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



        <activity-alias
            android:name=".Splash_screen"
            android:enabled="true"
            android:icon="@drawable/newtransparenticon"
            android:label=""
            android:targetActivity=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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


 <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:excludeFromRecents="true"
            android:icon="@drawable/newtransparenticon"
            android:label=""></activity>








        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">

        </activity>




    </application>

</manifest>


What I have tried:

Everything, really need help with it im newbie.
Posted
Comments
Kornfeld Eliyahu Peter 6-May-19 5:38am
   
IIRC, the name for activity-alias must be unique (event it is not a real class's name)... you have the same name for the splash activity and for the alias pointing to main...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100