Android - launcher icon doesn't reappear after manual uninstall - android

The launcher icon of my app is not showing on any homescreens of my device, even though it's running. Going into app info, I can see that it is displaying the correct launcher icon.
My AndroidManifest.xml looks as follows:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".Activities.SelectRoomScreen"
android:screenOrientation="landscape"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<category android:name="android.intent.category.HOME" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
</application>
Screenshot of mipmap
Screenshot of where it should appear next to My Application
As far as I can see, it should work. I've also tried adjusting the intent filter (removing any line except NDEF_DISCOVERED, HOME and LAUNCHER) but I'm either given an error or nothing is changing. What am I not seeing?
Thanks in advance!

In your manifest file, roundIcon is missing
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<application
android:allowBackup="true"
android:icon="#mipmap/logo"
android:label="#string/app_name"
android:roundIcon="#mipmap/logo"
android:supportsRtl="true"
android:theme="#style/Theme.Note">
<activity android:name=".activity.NoteActivity"></activity>
<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=".activity.SettingsActivity"></activity>
</application>

Related

Application doesn't show up in Home Screen

Problem
My mobile application called "Pipe" doesn't show up on Home Screen
How is it before
Before i tried to modify AndroidManifest.xml it working fine before, it's on the Home Screen
What i wanted
App to show up on Home Screen
AndroidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gell.browserx">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:name=".App"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:largeHeap="true"
android:name=".Applications"
android:resizeableActivity="true">
<activity
android:name=".ui.activity.MainActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<data android:scheme="pipe" />
</intent-filter>
</activity>
<activity
android:name=".ui.activity.SettingActivity"
android:label="Pipe Setting">
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="pipe-setting" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
<activity android:name=".common.crash.CrashHandler$CrashActiviy"/>
<activity
android:name=".DebugActivity"
android:screenOrientation="portrait"/>
<meta-data
android:name="android.max_aspect"
android:value="4.0"/>
</application>
</manifest>
You should not pass android:scheme inside the launcher activity intent-filter. You need to either remove this or pass it in a different intent-filter. Have a look at this answer too.

Android app opens app info screen on launch instead of launching main Activity

I am not sure if it is an issue, but this is the first time I ran into it.
I am halfway through developing an app. When I disconnect my app from Android Studio and my PC after some coding stuff, if I try to open my app on my phone, it launches app info screen (screen where we see force stop, clear memory) instead of launching my main activity and I couldn't use the app. And when I relaunch my activity by connecting with Android Studio, it works fine.
I worked on other apps too but did not encounter something like this.
Here is the code from my app manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.meanings_downloader">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:requestLegacyExternalStorage="true"
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=".Music_Activity"></activity>
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings" />
<activity android:name=".settings" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.SEND" />
<data android:mimeType="*/*"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".Music" >
<intent-filter>
<action android:name="android.media.browse.MediaBrowserServic"/>
</intent-filter>
</service>
</application>
Is it an issue or am I doing something wrong ?
Your intent filter is set up incorrectly, meaning that it's not matching the filter for a launcher activity. You probably meant to create two different intent filters, i.e.,
<intent-filter>
<category android:name="android.intent.category.LAUNCHER"/>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND"/>
<data android:mimeType="image/*"/>
</intent-filter>

how to launch specific activity when nfc detect tag?

Currently I am working with nfc reader. In this application nfc read tags and redirect to specific activity. But I want to redirect when user in background or app in kill state.
my manifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="in.adsmn.nfsreader">
<uses-feature
android:name="android.hardware.nfc"
android:required="true" />
<uses-permission android:name="android.permission.NFC" />
<application
android:hardwareAccelerated="false"
android:largeHeap="true"
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:roundIcon="#drawable/app_icon"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Activity.Event_Executed"
android:screenOrientation="landscape"></activity>
<activity android:name=".Activity.VideoViewActivity"
android:screenOrientation="landscape"/>
<activity
android:launchMode="singleTask"
android:name=".Activity.Tech_Activation_Activity"
android:screenOrientation="landscape" />
<activity android:name=".Activity.MainActivity"
android:launchMode="singleTask"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<action android:name="android.nfc.action.ACTION_TAG_DISCOVERED" />
<data android:mimeType="text/plain" />
</intent-filter>
<!-- no need to use this when user to open deafualt app-->
<!-- <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="#xml/nfc_tech_filter" />-->
</activity>
<activity android:name=".Activity.ViewPaigerClass"
android:launchMode="singleTask"
android:screenOrientation="landscape"></activity>
</application>
I have all ready tried some answer from stack overflow but none of them worked, So please tell me some thing that what I am doing wrong. Thanks in advance
You need to use deeplink for launching a specific Activity or Fragment.
And make your activity android:launchMode="singleTop"
Here is the reference for how to make deeplink.
For the fragment, you'd better to check Navigation Component.

My application icon doesn't appear when I debug or Run 'app' on android studio, what happened?

My application icon no longer appears on my android phone screen when I debug like it used to. I know this has something to do with the androidmanifest.xml file. I've looked up several solutions for me but those solutions resulted in my application being unable to even run in the first place.
What could be the problem here?
I have tried the solutions mentioned here:
Android Studio: App icon doesn't appear in the home screen or app list
Launcher icon missing in Android
This is my android manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="sg.edu.singaporetech.teamproject">
<uses-permission android:name="android.permission.INTERNET" /> <!-- allow usage of camera for Android -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/> <!-- to run foreground service for steps -->
<uses-feature
android:name="android.hardware.camera"
android:required="true" />
<application
android:name=".StepsNotification"
android:allowBackup="true"
android:icon="#drawable/exersize"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<activity android:name=".DispatchActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
<activity android:name=".profile.editProfile"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".registration.RegisterActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".home.HomeActivity">
<!--<intent-filter>-->
<!--<action android:name="android.intent.action.MAIN" />-->
<!--<category android:name="android.intent.category.LAUNCHER" />-->
<!--</intent-filter>-->
</activity>
<receiver android:name=".StepsBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
</intent-filter>
</receiver>
<service android:name=".StepsService"/>
</application>
</manifest>
I think the problem is in the line,
android:icon="#drawable/exersize"
In the application tag, app icon must he placed in the mipmap folder as it meant for the app icon only. Mipmap must have all scales of the icon.

App is being divided into 3 parts

Why is this is happening? That's an code error from .xml or from Java?
That's my app, it is divided into 3 parts (every part is a layout that is also an App) and I don't know why]
This app is part of my project for college. Ive used my partners activity and then this error appeared right after the import.
Probably this error appeared because of the import. Im not sure about what I have to do now and Im really new at Android programming.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.carro.robo.mobile.ufj.approbo">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="AllowBackup,GoogleAppIndexingWarning">
<activity
android:name=".MainBluetoothActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".PairedDevices"
android:parentActivityName=".MainBluetoothActivity" >
</activity>
<activity
android:name=".DiscoveredDevices"
android:parentActivityName=".MainBluetoothActivity" >
</activity>
<activity android:name=".Tela_bemVindo">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".CriacaoQuestoes">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
That is my .xml code. Android Version: 19 (KitKat 4.4)
Your app can have more than 1 item in the launcher. Every Activity that has a launcher intent filter gets an entry in it. Yours has 3. If you don't want them to be in the launcher, remove the launcher intent filter from the ones you don't want to show up.

Categories

Resources