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

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.

Related

Android wear app in development stage does not appear in watch launcher

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>

SmartWatch 2 app without Smart Connect

I have a Sony Smartwatch 2 and I am currently trying to develop an app for it on Android Studio, but I am facing a difficulty:
I want the user to be able to choose if he wants or not to use the smartwatch option, that means I dont want to have my app started only by the "Smart Connect" app. I would like to Launch my app as a normal app and, once the app is running, give the user the possibility of using the Smartwatch.
If I use one of Sony's sample projects as a base to my app, it automatically gets installed on "Smart Connect". By trying to add the Smart Extension Utils and Smart Extension API to my "common" app, I can't get it to work with the smartwatch 2.
How can I do it?
If I am understanding your question correctly you can still have your app launch as a normal app by creating a main activity and setting it in your manifest as the default launcher.
So for instance create your java class:
com.yourapp.package/MainActivity
Then update your manifest file:
<activity android:name=".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>

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.

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

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

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).

Categories

Resources