Provide "open" in Market without icon in Launcher - android

my app is a widget and without main launcher activity people cannot start it from the Market after installing the app; the "open" button just does not show up. How can I enable people to open the app from the Market, so that I can tell them that the app is a widget, but I do not want my app to show up in the launcher? Thanks!

Seems a duplicate question to this one, in the thread Nikolay Elenkov said that you can create a main activity like below, then it will not be shown in the launcher but it can still be launched when the user select the "Open" button. In the activity you can tell the user how to install your widget.
<activity android:name="MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<!-- don't show the app icon in the launcher
<category android:name="android.intent.category.LAUNCHER" />
-->
</intent-filter>
</activity>

Related

How to make app as a default system launcher?

I have developed the launcher application, for the first time when I installed it on device android system pop up chooser dialogue with two options i.e. Always & Just once. I selected "Always" now my app becomes default launcher but issue is when I update the app, the system pop up the same chooser dialogue again, I don't want to show that pop up. How to make the app as a default system launcher? To achieve this, Do I need to create system level app?
I have used following permission to make the app a launcher
<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" />
</intent-filter>
It is not possible to change the user preferences. Google does not allow developer to change user preferences.
A workaround may be useful, you can check for if your application is default launcher through a service and then prompt user to choose your application as default.
You can find how to check if your application is the default launcher from here (tried this one, it works for me) or here
Then you can prompt the user to select your application if it is not the default launcher. A workaround to do so is given here.

How Launcher decides which app icon to place in launcher?

I have a very naive question. I've written a program which lists down all the installed applications in my Android OS [I've got total 339 in my case]. But in the Launcher [In my case TouchWiz Home] only 148 application Icons are shown.
My Question is: How does the launcher[TouchWiz Home] decide which app icon to show or not in Launcher?
Launcher will show those activities that have the following intent filters declared in the app's manifest file
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
When a developer publishes an app, he/she can decide if app has "launcher" icon(set a launcher intent in manifest file which is embedded in the APK).
Other apps maybe services or other kind of apps that has no launching behavior.

How to open the application from my android application with no launcher

I have 3 android applications. One main application call other 2 applications (main application will be interface for other 2 applications). I would like to have only one icon of this main app. I have 3 applications they can be downloaded separately. Now I need the other applications to check if the main application is installed. If not, download and install main app. But how can I do that, if the secondary applications haven't got LAUNCHER ? Is there any way to do install main app from app without launcher ?
Main app has android manifest:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Secondary app has manifest (because do not want icon)
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
Yes I know how to use code in app where is launcher to check app is installed, but dont want how to operate with, when the launcher is not.
if (installed==false) {
Intent promptInstall = new Intent(Intent.ACTION_VIEW)
.setData(Uri.parse("https://play.google.com......))
.setType("application/vnd.android.package-archive");
startActivity(promptInstall);
Or second question: is it possible to install app with launcher and then uninstall/hide icon of this app ? Let's say simple I will install all aplications with launcher and then after installation and settings hide icon of app, so that stay only icon of main application.
It looks strange for me, there is not any simple way to do that, simple set if icon will be visible or not. The same as you install software on Windows and you can set during installation if icon will be visible on desktop.

can my android application act as default application for tablet

I'm developing an android application for my customer. And in that, the User needs to work with that application only. The User should not use any other applications in the Tablet, and my application need to be the default application after i installed the application...
If i shutdown the Tablet my application will be stoped, and if i switch on the tablet means my application will be automatically started.
could i achieve this, any steps to achieve for it..
Help me to fix this, Thanks in Advance
you can start your application while boot is completed using broadcaste but you cant stop the app getting exit while user pressed home button.
You may define your activity as Home, in the manifest file, define as below:
<activity android:name=".YouClassName">
<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>
</activity>
This way, after install you application, when user long tap the Home button, Android would prompt use to choose which HOME to enter, one is the system default, the other is your activity. At this time, user may also set your activity as default HOME, then when power on, system enter your activity automatically.
If you permission to delete system default launcher (the default home), then your activity becomes to be the unique home.

Android HoneyComb Registering Home Activity

Last year I developed an app on a Xoom running Honeycomb 3.0. When running on that device the following code from the manifest worked.
<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.BROWSER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
As you will know this registers my app (specifically, the Activity) to listen for "Home Intents." This worked fine and after the first time I could set my app as the default activity for this action.
Now I have installed the same app onto a Samsung Galaxy Tab running Honeycomb 3.1 and this functionality no longer works, no matter what state the app is in, or how many times it has been opened.
Is this intentional? Is this a Samsung only issue? Most importantly - can I regain the functionality I used to get on the Xoom?
P.S My app is completely legitimate in its intentions and has a perfectly understandable reason to want to replace the Home app.
Get rid of:
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSER"/>
and see if that helps. Also, try the Home sample app found in your SDK. It uses the following <intent-filter>:
<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>
My solution was to install, and then uninstall the sample Home app for Android 3.1.
Pressing home now allows a choice between my app and the default Launcher app.
My app remains unchanged.
I had this same problem on an ASUS tablet. I believe the problem was because Launcher was set as the default app for the Home button (i.e., I pressed the home button, got the popup that asks which application I wanted to use, clicked the 'Use by default for this action' checkbox at the bottom of the pop-up, then chose Launcher).
You can fix the problem by going to Settings->Applications, choosing the Launcher, then clicking on the Clear Defaults button.
I gather the reason the sample Home app does the trick is because it clears the defaults itself (how, I don't know, but I know it's not done by setting categories in the intent-filter).

Categories

Resources