Android: don't boot Launcher - run my application instead on startup - android

I've built Android from source and would like to launch directly into my application and NOT launch Launcher at all. Does anyone know what to change to launch an applicable .apk instead of Launcher on boot?
Running launcher causes a host of problems with my masking the fact Android is running.
- The unlock screen
- The status bar
- The menu & home icons
It would be best simply not to launch Launcher and go directly into the application from the Android boot logo.
Thanks,
Kevin

There is much easier solution that allows you not to rebuild Android. Just fill the main Activity of your application (in AndroidManifest.xml) with:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
And after first start, reboot your device and than make your application's main Activity the default Home Screen (check the CheckBox at the bottom of choose dialog).

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.

Android app with custom URL scheme launching from within Chrome?

I created a basic Android app from the Eclipse wizard. I then added the following intent filter to AndroidManifest.xml, after the existing one. This makes it support a custom "sample://" URL scheme:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sample" />
</intent-filter>
If I run Chrome or the default browser, and click a "sample://" link, it launches my app. However, if I look at the task switcher, my app isn't listed. Instead, Chrome is shown, with my app's screen shot.
Why is this? Can it be fixed? I'm running Android 4.2.2 on a Galaxy Nexus phone.
I notice that if I add android:launchMode="singleInstance" to the activity, it opens in a separate app. But the docs say this is "not recommended for general use". Why not?
The reason why you Activity appears in Recent Apps as Chrome is because it now belongs to the Chrome task, because it was launched from there.
As you noticed android:launchMode="singleInstance" solves your problem, however it is not recommended or discouraged because it would brake the user experience and navigation and how users expect your application to behave.
Fortunately, I think there's a way of specifying Intent flags in your HREF, try something like this:
<A HREF="intent:#Intent;action=android.intent.action.MAIN;category=android.intent.category.LAUNCHER;launchFlags=0x10000000;component=com.example.package/.MyActivity;end" />
in the previous example launchFlags=FLAG_ACTIVITY_NEW_TASK. This flag is generally used by activities that want to present a "launcher" style behavior: they give the user a list of separate things that can be done, which otherwise run completely independently of the activity launching them.

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.

Eclipse Android launcher shows home screen, not my application

When I launch my android application from eclipse, it shows the home screen, and I then need to unlock the screen and go to my app. I would like it to just show my app by default.
I have tried right clicking on the app and selecting Run As..., but Android Application is not a choice there. I need to manually create a new Android run configuration for my application and then I launch that.
Is there a way to just make my app show by default? I'm running with the emulator for Android version 2.2?
Note: I'm also getting an error that says "Emulator] Unknown savevm section type 95" which I'm not sure what that means yet
thanks,
Jeff
The emulator always starts with the screen locked. Unlock it and wait a moment, sometimes it needs a minute to launch your app. If it doesn't work after a few moments, leave the emulator open and try running it again. If it doesn't launch now, there's something wrong.
I'm thinking you either didn't create your project as an android project to begin with, or if you did you didn't create a starting activity (or deleted the one that you did create)? Either way, you probably need to go edit your AndroidManifest.xml file and add an intent filter to an activity. Just guessing. Should look similar to this:
<activity
android:name={String for the name of your app}
android:label={String for the name displayed on the icon}>
<intent-filter>
<action
android:name="android.intent.action.MAIN"/>
<category
android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
** posted before your edit ^^^
In terms of your error, I have no clue what that is, so maybe it has nothing to do with your AndroidManifest, then. :T
Check your manifest, and make sure your activity has the correct intent-filter
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
BTW, Previous to Android 1.6 i think the emulator always started with the screen locked then they changed that and it starts with your app

Categories

Resources