I am making an application but i don't want it to be on the Home Screen as a Launcher icon. It holds Background Service.
Is it possible that when the user install the application it opens the screen automatically so that user could enter the Pin Code or password? But that does not need to be on the launcher icon?
Please Friends Guide
Its possible man.. Just remove intent filter tag under tag activity in the manifest file.
Declare activity as listed below
<activity android:name=".CallIntents"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
Related
I have installed the app programmatically through other application. Now if I click the application icon in home screen it should not open the app. App can be only able to open while clicking through the app I installed. Can Anyone hep on this. Thank you.
Usually the start activity looks like this in the AndroidManifest.xml:
<activity
android:name=".LaunchActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.categor.LAUNCHER" />
</intent-filter>
</activity>
Now, if you remove the <intent-filter> part, it will not have an icon on the home screen.
Finally, you can follow this StackOverflow answer about how you can open your activity from another app: https://stackoverflow.com/a/2210073/1395437
i am using one app, for example chrome with some confidential information and i am switching it to background & i am trying to kill the app.
i uploaded the example image when trying to kill the app. even the session the expired it won't close the information in the killing stage when app comes foreground then only it closes the information. i want the info should be closed or hided when it goes background (In killing stage).
i searched in google i am not getting anything related to this and i don't know whether my search phrase is correct. can anyone pleas help me.
I think ur asking this:
Just add this in manifest file:
android:excludeFromRecents="true"
Example:
<activity
android:name=".MainActivity"
android:excludeFromRecents="true"
android:taskAffinity=".OnInviteActivity"
android:noHistory="true"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
then your app will not show in background or recent app or in menu like that
UPDATE:
for ur app name only u need to add this in Main Activity:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
I have an application where I need to provide a additional icon acccessible in applications to launch an activity from the same application.
So that when application installs it shows two icons in the applications list, one icon to launch the app is already there, how to have the other icon and then how can I start the required activity from that icon/shortcut.
add this in the manifest file inside the activity tag which you want to show in the launcher
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
I found a code on internet for displaying a splash screen before starting an android application. He made some changes in the code which he didn't explain well.
He used Launcher for Splash screen Activity and used Default in main android Activity.
He used Package name with main class name instead of pre-generated code for android:name in action.
Here is the code.
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".StartingPoint"
android:label="#string/title_activity_starting_point" >
<intent-filter>
<action android:name="com.alfred.splashscreenwithsound.STARTINGPOINT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
So my question
What is the difference between LAUNCHER & DEFAULT.
Is there any good behind changing the android:name in action to the package name.
when you write LAUNCHER it will launch application with Icon and if you remove it it will not show you the application Icon
"android.intent.category.LAUNCHER" serves as our main entry into the app.
android.intent.category.DEFAULT be set if the Activity should be an option for the default action (center press) to perform on a piece of data.
Refer this
LAUNCHER is your main page DEFAULT is your Activity page when load the app. on device first LAUNCHER will open. Then If you trigger your activity page DEFAULT will open.
In some modified version(for example, CM7), you can long press the shortcut to rename it.
But CM7 have some bugs now.
I would like to know is there a way I can do that? modify the database, change the programs code or resources is OK. Thanks.
You need to change AndroidManifest.xml file. You should find the activity that is launched by this icon and change android:label value there. This will change the icon name in Application Launcher and on Home Screen.
It should looks something like this:
<activity android:name=".HelloWorld" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The activity definition in AndroidManifest.xml should contain MAIN and LAUNCHER in its intent filter (otherwise the activity will not be visible in Application Launcher).