lunching icon no create - android

i facing some problem the lunching icon when i running finish the install the file but the lunching icon is not work. i think is i deleted the Main_Activity by default, but i already at the manifest assign the intent default but still cant create the lunching icon.
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".CategoryActivity"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android:intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

You put a : within the <action> tag in the string.
Replace it by a . and it should work :
<action android:name="android.intent.action.MAIN" />

Related

Android run 2 activities next to each other in task list

Is it possible within Android to run 2 activities side by side in task manager? I can now generate 2 separate icons and they both work properly but I can only open 1 Window at a time . As soon as I open the other icon, the current one is replaced with the new activity. I would have liked it to have its own screen if possible. I've tried various options but failed. Is it even possible within Android?
This is what my manifest looks like without the adjusments.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.allpics">
...
<application
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.AllPics">
<activity
android:exported="true"
android:name=".MainActivity"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:exported="true"
android:name=".GalleryActivity"
android:label="Gallery"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
</application>
</manifest>
In the AndroidManifest, make sure to set the android:taskAffinity attribute of the element differently for each Activity. For example:
<activity
android:name="com.example.ActivityA"
android:label="Activity A"
android:launchMode="singleInstance"
android:taskAffinity="com.example.AffinityA" >
</activity>
<activity
android:name="com.example.ActivityB"
android:label="Activity B"
android:launchMode="singleInstance"
android:taskAffinity="com.example.AffinityB" >
</activity>

How to fix Android manifest.xml in android studio to enable indexing?

App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. See issue explanation for more details. less... (Ctrl+F1)
Inspection info:Adds URLs to get your app into the Google index, to get installs and traffic to your app from Google Search.
But I Have already considered one activity with an action view intent filter.
Please help.
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity"
android:parentActivityName=".StartActivity"/>
<activity android:name=".MainActivity" />
<activity android:name=".LoginActivity"
android:parentActivityName=".StartActivity"/>
</application>
Add android.intent.action.VIEW into your launcher activity like below.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Just add inside application tag
<application
tools:ignore="GoogleAppIndexingWarning">
<application
android:allowBackup="true"
tools:ignore="GoogleAppIndexingWarning" **// Add this Statement Here,**
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".StartActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity"
android:parentActivityName=".StartActivity"/>
<activity android:name=".MainActivity" />
<activity android:name=".LoginActivity"
android:parentActivityName=".StartActivity"/>
</application>

Set an Activity as the initial activity of an android app [duplicate]

This question already has answers here:
Change application's starting activity
(13 answers)
Closed 5 years ago.
In my new android sudio project I created two activities. The first is the MainActivity and the second is called SecondActivity. The second is more like a sort of menĂ¹. Logically, when the app starts, SecondActivity must appear as first.
In the manifest I declared both the activities but I don't know how to declare them correctly so that SecondActivity appears as the first activity in the application after I loaded it on my Android device.
This is my project's manifest :
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SecondActivity"> </activity>
</application>
Did you tried this, my friend
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"></activity>
<activity android:name=".SecondActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Two options...
1) Move the intent filter.
2) Switch the android:name property since ordering does not matter
Try this:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
</activity>
<activity android:name=".SecondActivity"> <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter></activity>
</application>
The intent-filter tag let you choose trough the action wich activity will be the main.
Simply move the intent filters to the second activity like so:
...
<activity android:name=".SecondActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
The parts between the intent-filter tags (<intent-filter> and </intent-filter>) tell Android that this activity should be used when the launcher icon of your app is pressed (i.e. the initial activity).

Android: Changing the default acitivity removes access to application

I'm having an issue changing the default activity in my Android manifest
Initially, the MainAcitivity was the default activity but I would like it to change to the LoginActivity. When I do this however, the app disappears from the app drawer. The only way I can access the app information (uninstall, remove data etc) is via the application manager.
I've changed the tags on the LoginActivity entry in the manifest as suggested here but the issue is still there.
Here is a snippet of my current manifest:
<application
android:name=".ui.MyFirebaseApp"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/title_activity_login"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<activity
android:name=".ui.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="COMPANY_app_notification_click_action" />
</intent-filter>
</activity>
<activity
android:name=".ui.LoginActivity"
android:label="#string/title_activity_login"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
How would I get the application back to the app drawer?

New activity seemed to reset default but XML unchanged

Can't figure this one out.
I added a second activity to a project in Android Studio. The second activity is now what launches on the emulator instead of the Main Activity.
Below is the XML in the manifest. Do I somehow need to declare the "get_started" activity as a child of the Main?
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".GetStarted"
android:label="#string/title_activity_get_started"
android:theme="#style/AppTheme.NoActionBar"></activity>
</application>
Try adding a DEFAULT intent filter to the MainActivity
<category android:name="android.intent.category.DEFAULT" />

Categories

Resources