Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello last time i added hide icon code trick to my android app :


JavaScript
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

JavaScript
<?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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900