Why is Compose missing my app launcher icon? - android

I've introduced Jetpack Compose into my project. But now my app's icon isn't found in the launcher. If I revert to run my legacy Activity then the launcher icon re-appears. Here's my AndroidManifest in case y'all see something that I don't.
<?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.es0329.app">
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:name=".App"
android:allowBackup="true"
android:fullBackupContent="#xml/backup_descriptor"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.App.DayNight"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".ui.ComposeActivity"
android:exported="true"
android:theme="#style/Theme.App.DayNight.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
android:exported="true" />
<meta-data android:name="io.sentry.auto-init" android:value="false" />
</application>
</manifest>

Related

Android auto APP not showing in pyshical device (is not listed in Android Auto app list) but works fine in DHU

I currently have an app on the Play Store and have created a version for Android Auto.
The Android Auto version works correctly on the DHU (Desktop Head Unit).
To test it on a real device (vehicle), I have created an Internal Test in Play Store, and in it, I have added the original app together with the Android auto bundle.
When I install it from the Play Store, the app does not appear in the list of available for Android Auto.
I suppose it has to do with the configuration of my "manifest" files, but I don't see where the error could be.
Has anyone had the same problem?
--- CODES UPDATED AFTER FIRST ANSWER -----
This is the "manifest" of the Android Auto app.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.recursoseducativos.programameudis_auto">
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="32" />
<application
android:allowBackup="true"
android:appCategory="maps"
android:icon="#mipmap/ic_launcher"
android:label="Prográmame-udis"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Prográmameudis" >
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="#xml/automotive_app_desc"/>
<meta-data
android:name="androidx.car.app.minCarApiLevel"
android:value="1"/>
<service
android:name=".programameudisservice"
android:exported="true">
<intent-filter>
<action android:name="androidx.car.app.CarAppService" />
<category android:name="androidx.car.app.category.NAVIGATION"/>
</intent-filter>
</service>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="androidx.car.app.MAP_TEMPLATES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.hardware.location.network" />
<uses-permission android:name="android.hardware.location.gps" />
<queries>
<package android:name="com.google.android.apps.maps" />
</queries>
<uses-feature android:name="android.hardware.wifi" android:required="false"/>
<uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
<uses-feature android:name="android.hardware.screen.landscape" android:required="false"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
</manifest>
automotive_app_desc.xml
<?xml version="1.0" encoding="utf-8"?>
<automotiveApp xmlns:tools="http://schemas.android.com/tools">
<uses name="template" />
</automotiveApp>
And here is the "manifest" of the phone app (original app)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.programame_udis">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.permission.CAMERA" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<queries>
<intent>
<action android:name="android.media.action.IMAGE_CAPTURE" />
</intent>
</queries>
<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="net.recursoseducativos.programame_udis.canvas_manuscrito"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent"
/>
<activity
android:name="net.recursoseducativos.programame_udis.axenda_parte"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.alumnado_parte"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.diario_parte"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.partes_udi"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.arquivos"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name=".aplicacion.configuracion"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity
android:name="com.canhub.cropper.CropImageActivity"
android:exported="true"
android:theme="#style/Base.Theme.AppCompat" />
<activity
android:name=".aplicacion.cabecera_elector"
android:exported="true"
android:theme="#style/Theme.AppCompat.Translucent" />
<activity android:name=".barcodescanner.lector_qr_camara"
android:exported="true"
/>
<activity android:name=".aplicacion.axenda"
android:exported="true"
/>
<activity
android:name=".aplicacion.alumnado"
android:windowSoftInputMode="stateVisible"
android:exported="true"
/>
<activity android:name=".aplicacion.diario"
android:exported="true"
/>
<activity android:name=".aplicacion.aplicacion"
android:exported="true"
/>
<activity android:name=".login.MainActivity"
android:theme="#style/SplashTheme"
android:background="#color/negro"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="net.recursoseducativos.programame_udis.AlarmBroadcastReceiver" />
</application>
</manifest>
I have tested with and without <uses-permission and uses-feature in the Android Auto app, but ever the same result, no way to launch it in the car, because is not available in the android auto list.
Thanks in advance.
Can you add the contents of the automotive_app_desc.xml file? Also, you should declare the minimum Car App API level as a <meta-data> element in the manifest.

Contradictory error when using MobileAds in an Android app

I am somewhat confused by an error showing up in an Android app, where I want to use MobileAds.
Here is the Kotlin code:
val adRequest = AdRequest.Builder().build()
adView.loadAd(adRequest)
The AndroidManifest.xml file contains these three lines:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
And these are the errors I get:
Missing permissions required by BaseAdView.loadAd: android.permission.INTERNET
Missing permissions required by FusedLocationProviderClient.getLastLocation: android.permission.ACCESS_COARSE_LOCATION or android.permission.ACCESS_FINE_LOCATION
Is there anyone out there who has an idea of what is going on?
Any relevant tip or explanation would be more than welcome.
Just in case this is the complete AndroidManifest.xml 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="me.soft.app">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:dataExtractionRules="#xml/data_extraction_rules"
android:fullBackupContent="#xml/backup_rules"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.App"
tools:targetApi="31">
<activity
android:name=".WorldExposureActivity"
android:exported="false"
android:parentActivityName=".ShopDetailActivity"
android:screenOrientation="portrait" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="XXXXXXX" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-1234567890012345~1234567890"/>
<activity
android:name=".ShopMapActivity"
android:exported="false"
android:label="#string/title_activity_shop_map"
android:parentActivityName=".MainActivity" />
<activity
android:name=".ShopDetailActivity"
android:exported="false"
android:parentActivityName=".MainActivity"
android:screenOrientation="portrait" />
<activity
android:name=".MainActivity"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

ERR_ACCESS_DENIED in webView in android with test device Android Pie

I am trying to loadURL() in my webview and getting the following error
ERR_ACCESS_DENIED.
PS: I have given the required permission in Android_Manifest.xml
<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" />
Please suggest
Android_Manisfest.xml file content -
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pgm5">
<application
android:usesCleartextTraffic="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=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<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" />
</manifest>
I've modified your AndroidManifest.xml file. Check now
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.pgm5">
<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" />
<application
android:usesCleartextTraffic="true"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="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>
</application>
</manifest>

Places API Not Working

I am trying to use the Google Places API. However, I am always getting errors.
Here is my AndroidManifest.xml
<?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.example.mapthingie">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaKEY" />
<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"
tools:replace="android:icon">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaAPIKEY" />
<activityhttps://stackoverflow.com/tags
android:name=".SettingsActivity"
android:label="#string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
In my LogCat, I am getting this error:
PLACES_API_KEY_INVALID
though, as you can see, I am using a valid key. How can I fix this?
I see there are two different keys in Manfiest.xml
try to remove the one inside the application tag.
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaAPIKEY" />
Here is the edited one, copy and paste and try.
If it din't work, renew your API_Key and then replace it .
<?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.example.mapthingie">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaKEY" />
<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"
tools:replace="android:icon">
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
cheers!

Uses permission is not working in built apk

When built my application, the built apk is not working any other devices. It is only working in my mobile. The error message i founded is user permission is not available and security exception. It is only working in my phone.
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dineshkumar.panicbutton">
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<application
android:allowBackup="true"
android:icon="#drawable/welcome"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:exported="true"
android:theme="#style/AppTheme">
<activity
android:name=".Welcome"
android:label="Panic Button"
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=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<activity android:name=".Emergency" />
<activity android:name=".Contacts" />
<activity android:name=".ManualCadd" />
<activity android:name=".Message" />
<activity android:name=".Guide" />
<activity android:name=".Updatecontacts" />
<activity android:name=".ShowContacts" />
</application>
Your device should have Android 6.0 version or above to handle Runtime Permissions. Also you need to set the Target SDK version to 23 or above for listing dangerous permissions.

Categories

Resources