I had an android launcher project. After installed on my phone, pressing HOME will NOT make the "default launcher choise" popwindow showing to choose default launcher.
following is related setting:
<activity
android:name="MyLauncherActivity"
.....
.....
<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.MONKEY" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
how can I make that popupWindow show ?
P.S How curiouse it is! I just restart Eclipse and reinstall it, pressing HOME make the default launcher choise popupwindow showing!
<category android:name="android.intent.category.LAUNCHER" />
in your activity intent-filter means this is the start point of the app, when the user clicks on the app icon, will run this activity ( it doesn't mean this activity is a launcher app)
and you are looking for this:
How to make a launcher
Related
i have an android tv application and need to make it launcher application and home application
i added the below code in manifest
<activity
android:name=".ui.main.LandingActivity"
android:launchMode="singleInstance"
android:stateNotNeeded="true"
android:exported="true"
android:screenOrientation="landscape">
<intent-filter>
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</activity>
Also in Settings -> Default -> Home App -> i select my own application
So when i click home button in device it navigate to the launcher activity of my application, but when i restart the device , the application set as default doesn't run by default and immediately
i checked the settings and make sure that is selected by default.
So why the app is not opened by default after reboot?
try
android:launchMode="singleTask"
I want my app to handle the HOME key press with a custom action, and also stay in the foreground. I put the following code in AndroidManidest.xml:
<activity
...
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
....
</intent-filter>
</activity>
However, this has set my app as the new home screen, which I don't want. I only want to capture the key press while my app is in the foreground, just like you can capture other buttons. Is there any way to do that? Perhaps set the intent filter to only work while my app is in the foreground?
I want my app to be in KIOSK mode every startup, so in my AndroidManifest.xml I define my MainActivity as
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</activity>
I am developing in an S99 smart watch. Unfortunately, I couldn't find a setting item where I can customize its default home launcher.
Home launcher selection won't also display when I tap the home menu.
So I am thinking to have it via ADB. Is it possible?
How can I set my Activity to be the default launcher in ADB?
I am developing lock screen application for that i need to disable the home button.
some one told to me kept in the manifest as category as default, home but when ever device boot completed my activity launches but not finishing.because I my application is home How to handle the Home button.How Go locker application handled Home button
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
please give me a proper suggestion i would very thankful to you.
You need to add:
<category android:name="android.intent.category.LAUNCHER" />
so your full intent-filter section looks like this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Not this still won't FORCE the app to run at boot. This will just add it to the list of launchers. It will only launch at boot if the user chooses it as their default launcher.
If you want to run an activity at launch, you can register a broadcast receiver to handle the ON_BOOT_COMPLETED action, but think very carefully before doing so; is this what all users of your app would want?
My application works as a launcher. But, I guess I did something wrong by making it a launcher. For instance, the user selects my application as Default Launcher (clicks 'Always'). However, when the user exits from the application, it appears again, because it's the default launcher. How can I fix it?
<activity
android:name="com.comeks.cocuktablet.Main"
android:label="#string/app_name"
android:launchMode="singleInstance"
android:screenOrientation="portrait" >
<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>
The code comes from my manifest. I also want to make MAIN activity launcher.
Edit:
I realized my exact error. I also wrote a code to start my app on boot. The problem is that when I close my device and open it again, I cannot exit from it.
Thank you for your all answers. I solved my problem by calling Android's home launcher while exiting from app.
Just remove
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
from intent-filter