I use the automatic launch of my application when I turn on my ACER tablet Iconia one (6.0), but the android home page appears before for a few seconds.
Is it possible to run the application without showing android homepage ?
Regards,
François
Is it possible to run the application without showing android homepage ?
Make your app be the "android homepage", by implementing a MAIN/HOME <intent-filter>:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME"/>
</intent-filter>
Related
I try to do this for my application to launch automatically when device is rebooted.But this is not working on android 11 devices.
<uses-permissionandroid:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<receiver
android:name=".boot.StartUpBootReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
You can't launch an Activity from the background on Android 11. The Receiver is working fine most likely. It's the launching that is no longer allowed by the OS.
If you want to make a kiosk mode app, the correct way to do this is to make this app the launcher app so it takes over the home screen.
When I run my developed android wear app via Android studio, it normally installs in my watch and can be later launched via wear launcher. Not sure what could happen, my latest project does not appear as icon in the launcher anymore, despite I can see the app being launched and fully functional, but after the ambient mode, when the app is moved to the background, I cannot relaunch from the wear. The only way would be to launch it from Android Studio again. The app icon was deleted from watch and I cannot figure out why!
When I check the list of packages in the phone via ADB, I can see it listed, but it never appears among installed apps in the wear, and it did few days ago.
I have LG G Watch R with Android 5.1.1, Android Wear 1.3.0.2166028, and Android Studio 1.5.0/141.2422023
This is what I figured out by trying different manifest setups:
When providing the intent filter to start your main activity in the wear manifest as a combination of action.Main and action.TRACK category with mime type /running, the activity will not register in the launcher with an icon, only voice action OK GOOGLE START RUNNING will launch the activity.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="vnd.google.fitness.TRACK"/>
<data android:mimeType="vnd.google.fitness.activity/running"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
To get the icon back to the launcher I had to make a compromise of loosing the ability to start the main activity with the voice launcher.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /></intent-filter>
I am currently building an application in Android Studio. When I run my application and Android Studio installs it on my device through the USB, the application doesn't open and doesn't show up in the Apps list of my device. Which is strange because when I travel to Settings > Application Manager in the device, it shows my application as if installed but I can't open it. I also have tested the application in the Nexus emulator and it opens up just fine.
you're missing a intent-filter in your "main" activity so that it can show in the launcher. below is an example:
<activity
android:name="MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
replace "MainActivity" with the name of the activity you want to show in the launcher.
I am trying to run the Timer sample google glass app, but when I run the project, it gets installed and then says DONE, however, I don't see anything on the emulator. I know there is no Launcher and so I tried the RUN CONFIGURATION but I don't see any activity in the dropdown when I chose the Launch option. Any thoughts or guides on to do this ?
First of all there is no avd/emulator available for Glass.But if still you are interested converting your mobile phone into glass.Check these link i.e 1,2,3.But no one works completely treating your phone as Glass.
As you have mentioned above that you try to install an app on emulator.The main reason why it is not showing up is that:
Move to AndroidManifest.xml
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
This is the normal code for the main launcher activity of android.This is the main activity which is launched in the emulator/avd
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
While in Glass code you find something like this.There is no launcher in Glass but still you can add.Here you only found out the voice trigger which open your app
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voicetrigger" />
</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).