Android development manifest - android

Hi I'm making an android app for the first time and I am stuck I have made a main menu with buttons and I want it to go to another secondary menu for example console games gets clicked and then goes to the console menu view then from there click on the PlayStation button to get to Google maps. The problem is when I get to the console menu the buttons do nothing even when I have the onclicklistener method set to the right button. I have narrowed it down (I think) to the manifest where the problem is but I can't find what is wrong. Here is the whole code .Please Help thanks. :)
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:icon="#drawable/gf_icon"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar"
android:debuggable="true">
<uses-library android:name="com.google.android.maps" />
<!--splash screen-->
<activity
android:name=".myMain"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- main screen -->
<activity
android:name=".myMenu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CLEARSCREEN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- console games menu -->
<activity
android:name=".consoleGames"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CONSOLEGAMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- console games menu -->
<activity
android:name=".consoleGames"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CONSOLEGAMES" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- hardware menu -->
<activity
android:name=".mainMenu"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.irou.geekfast.MAINMENU" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".helpBox"
android:label="#string/app_name"
android:theme="#android:style/Theme.Dialog">
<intent-filter>
<action android:name="com.irou.geekfast.HELPBOX" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Map activity -->
<activity
android:name=".consoleMap"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.irou.geekfast.CONSOLEMAP" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>

From the information you have provided looks like you are missing Intent Filters
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

Related

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.

Trouble with Android apk

I have an app that I uploaded to the Google Play Store. It stops running once downloaded or can't be downloaded at all. I'm pretty sure there's something wrong with my manifest as that's the error. I'm going to add my app release apk and manifest file.
Asking if someone could help me find the issue, it shouldn't be a terrible error, but I can't seem to figure it out.
Thanks.
Manifest file below:
<?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.Houston_Rockets_Team_App">
<uses-permission android:name="android.permission.INTERNET"/>
<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"
android:debuggable="false"
tools:ignore="HardcodedDebugMode">
<activity
android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.PlayersActivity" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.StaffActivity" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.Settings" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.AboutActivity" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
<activity android:name="com.Houston_Rockets_Team_App.Houston_Rockets_Team_App.EditPrefs" android:label="#string/app_name">
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<!-- <data android:mimeType="image/png" /> -->
</intent-filter>
</activity>
</application>
Here's the apk, I'm hoping it can be opened.
https://drive.google.com/file/d/18VT9Gl4adwBGuMa_omGWtjf0IM4Rc0RD/view?usp=sharing
-I found your bug and its mainActivity not found error raise.
-Please check your MainActivity path into the manifest and set right classpath into the manifest that will solve your error.

How to make default android Launcher

I am trying to create a launcher application and I did it fine.
but there is a problem with my launcher:
When I choose it as default launcher for a device with pressing back button of device my launcher will disappear and last default launcher will appear!
this is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<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">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".AppsListActivity"/>
</application>
Thank you for your help.
<activity
android:name="ah.hathi.simplelauncher.HomeActivity"
android:label="Simple Launcher Home"
android:theme="#android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
do it like this hope this will work for you

My app icon does not appear in the emulator home screen

I want specific ordered reasons why my app icon does not appear, I can run it on the emulator yet and I need to know what's wrong with my app? I'm a beginner my code is so simple, though I can't find why is this happening.
Here is my manifest:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.launcher" />
</intent-filter>
</activity>
<activity
android:name=".MyActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="com.example.hp.app2.MyActivity" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
Instead of
<category android:name="android.intent.category.launcher" />
it must be
<category android:name="android.intent.category.LAUNCHER" />

Android app icon shows on device to allow uninstall but does not allow to execute

I am able to run an android app in two virtual devices when degugging.(Galaxy tab and phone). When I close the app in debug mode the icon is not showing in the virtual device.
The same thing occurs when I load a signed .apk file to the actual devices.
The app icon shows when I go into manage applications. I can uninstall the app. Thats all I can do. I cannot launch the app since the icon is not visible with the other app icons.
I am using platform 2.2 with google api's 8.
What am I doing wrong? How can I get the app icon to show with other apps and be able to launch?
Here is my manifest file.
Any help is appreciated.
<uses-permission
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="android.permission.INTERNET">
</uses-permission>
<uses-permission
xmlns:android="http://schemas.android.com/apk/res/android"
android:name="android.permission.ACCESS_FINE_LOCATION">
</uses-permission>
<uses-permission android:name="android.permission.SET_DEBUG_APP"></uses-permission>
<application
android:label="#string/app_name"
android:icon="#drawable/appicon"
android:name=".ApplicationController"
android:debuggable="true" >
<uses-library android:name="com.google.android.maps" />
<activity android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.Main" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".MainFlippingActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MainFlipping" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PrefsTabWidget"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.PrefsTabWidget" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PrefsTaskingActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.PrefsTasking" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SatelliteSelectionActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.SatelliteSelection" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="MainSettingsActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MainSettings" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="ClassificationActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.Classification" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="ListItemPrefActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.ListItemPref" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="TimeOnTargetActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.TimeOnTarget" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="LatLonActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.LatLon" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="QuantityActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.Quantity" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="IncidenceAngleActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.IncidenceAngle" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="SendUrlActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.SendUrl" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="TestActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.Test" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="Slide"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.Slide" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="8"/>
You should only be using <category android:name="android.intent.category.LAUNCHER" /> for one of your activities, not all of them. Try removing all others except the one that goes with <action android:name="android.intent.action.Main" />
EDIT: I may be wrong but I think you'll also need to capitalize MAIN as in <action android:name="android.intent.action.MAIN" /> for it to be recognised as the 'main' entry point (main activity).
Try to remove "android.intent.category.LAUNCHER" for each activity because android project must have only one LAUNCHER activity.
try to this if your main activity use this
<intent-filter>
<action android:name="android.intent.action.Main" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Other activity you can use this
<intent-filter>
<action android:name="android.intent.action.(your action )" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
I think it can be helpful to you .

Categories

Resources