I'd like to have my application run in somewhat of a "stealth" mode. Two main things I'd like to do:
Not show app icon in installed app list (drawer?) programmatically.
Launch app via dial pad (some special number combination)
I know I can remove the launcher intent filter to hide the icon:
<category android:name="android.intent.category.LAUNCHER" />
But I'd like to do this programmatically, based on app settings. I guess I could work around that, but the biggest issue for me is figuring out how to launch the app via dial pad. I've googled around and searched SO, but haven't really found anything to help with that.
Thanks in advance.
You can programmatically remove icon from launcher as described here
If you want to launch app as call to magic number, it's quite simple using BroadcastReceivers for outgoing call, you can get solution from Right Number app
Related
I want to be able to tap the statusbar and the contents in the displayed app to be scrolled up to the top.
Is it technically possible that an app intercept my tap and send the appropriate command to the active app? I have noticed for example that AntTek quick settings shows a drop-down window when swiping down from statusbar. While using the app I did also notice that even by just tapping the statusbar (before beginning to move the finger down), the app seems to already interact with the touch as it dims the screen brightness in preparation to display it's "window" (sorry I use the MS Windows term), so clearly a statusbar tap CAN be sensed by an app.
Starting from this, I wonder if such an app could then send a message to the active program telling it to scroll up.
Is that possible? And if yes, the message must be customized to a particular app (let's say the browser as the most important) or is it standardized so the apps speak the same language between themselves?
I am not a programmer so answers with codesamples might be less helpful than a plain english explanation. Finding out that is possible would lead rather to pursuing a programmer to implement the idea rather than starting to develop it myself.
Thanks :-)
There is an XPosed-module which seems to do exactly what you want.
To use XPosed-modules, you'll need to root your phone and install the XPosed-framework.
The XPosed-module is called "Statusbar Scroll to Top" and its repository can be found here:
http://repo.xposed.info/module/com.mohammadag.statusbarscrolltotop
This will work for almost all app-lists, but for example won't work for browser-content.
If you want to scroll to the top of the page in a browser, then you'll probably do best to get a browser which can do that on its own. (For example Habit Browser has it built-in and respective plugins are available for Firefox.)
Yes it is possible. HiroMacro and Frep can do this, but it requires root. https://play.google.com/store/apps/details?id=com.prohiro.macro&hl=en
(how do they simulate mouse and keyboard interactions on other applications? i have no clue :/ anyone?)
Is it technically possible that an app intercept my tap and send the appropriate command to the active app?
No. One app cannot send fake input to another app, for security reasons.
An android app comprises of several activities. Each activity display a GUI that allows the user to perform a specific task. To take the user from one activity to another, app must use an Intent to define our app’s intent to do something.
An intent can be explicit in order to start a specific component (a specific Activity instance) or implicit in order to start any component that can handle the intended action.
Interacting one app to other app in android
google docs link
I have certain apps which i want to show on launcher . When i click on it it should say app not installed . Is that possible ? I checked AllAppsList.java of ICS . I think we need to provide ApplicationInfo object for that . Is there any alternate ?
Please correct me if I am wrong.
As far as I have understood it this is not possible unless you control the launcher itself. The launcher will add Apps that have the "android.intent.action.MAIN" and "android.intent.category.LAUNCHER" in their manifest to the App drawer.
If there was a good way to add shortcuts to the launchers app drawer I am pretty sure the Ad Networks would use that to inject Ads there.
I guess your most viable option is to create shortcuts on the homescreen.
If you manage to find a solution for it though it would be awesome.
Good luck!
It ISN'T possible. Unless I am misunderstanding the question. Perhaps make a seperate app altogether, with the same name and the same icon, but instead of any content in it, just link it to the market where the full app resides; Or something along those lines.
I am intending to develop custom Launcher for Android phone. I have searched web, but I haven't found any valuable information regarding creating "launcher" project. What does an android app needs for being at the top of the GUI (aka launcher)?
I saw this thread a while ago, before creating my own launcher. Here are some crucial things I learned:
Declaring your app to be a launcher
David already mentioned the piece of code that determines your app as a launcher:
<category android:name="android.intent.category.HOME" />
Add this as an intent-filter to the activity your launcher will use for the home screen (in AndroidManifest.xml).
Launcher Issues
As a launcher will run all the time, you need to understand the activity livecycle to prevent issues (like this one).
If you want users (and yourself) to be able to constantly user the app (that's what you usually do with launchers), make sure it never crashes. In the case of a crash users will be taken back to the devices default launcher or other installed ones.
In short: Launchers are expected to be reliable.
Common launcher functions (users usually expect those)
1) A list of apps / appdrawer
From which all apps can be launched or modified. You can use packageManager to list the apps.
As generating such a list may take a while, I suggest you to do it asynchronously and save the list somewhere to speed everything up (which also is expected from launchers ^^)
2) Some settings to change the launcher
I had some users stuck in my launcher before implementing those ^^
You can open the devices launcher settings like this (in Kotlin):
// working in APIs newer than Lollipop
val callHomeSettingIntent = Intent(Settings.ACTION_HOME_SETTINGS)
startActivity(callHomeSettingIntent)
Bonus) An in-app tutorial
This may be useful if you have some features in your app that are not trivial, ways of launching apps that users don't know from other apps.
It also gets you way less messages from users asking how to interact with your software.
Resources:
The GitHub of the minimal launcher I created may be helpful: finnmglas/Launcher
Well, firstly you need to listen to the android.intent.category.HOME intent. Here are some links with full source code which you can have a look at:
Old launcher source code
New launcher source code
Or take a look at launcher plus.
I have source the code of android 2.1, and I want to remove phone app from it. But I am not able to remove it. At list first I want to remove it from launcher that it should not be visible in launcher but in manifest file of Phone app I can not able to find launcher category. I don't know what to do?
Please remove all
<category andorid:name="android.intent.category.LAUNCHER" />
in packages/apps/Contacts/AndroidManifest.xml, I think it will work fine.
Or try to remove Contacts.apk (but this may not work because you may get crash again.)
If you want to remove the phone app completely from your phone, then it's as easy as deleting /system/app/Phone.apk. If you want to compile a framework that does not show the phone app in the launcher, then you will need to modify the launcher, not the phone app.
How to make an android app which contains three other apps?
On the main app, the icons of those three apps are displayed and by clicking on an icon, the coresponding app launches.
Like I want to display the icons of facebook, google map and gmail on the main app and by clicking on the facebook icon, facebook opens up.
Should I make a single APK file for all apps? How?
Do you mean that you want the icons to appear in the main apps list? If so, what you need to do is add these lines:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
To whatever activity you want to appear in the main app drawer.
Anyway, this seems like a bad idea except in a few rare circumstances where each 'app' is distinct from the other apps, but it doesn't make sense to have one of them without having them all.
If they are essentially one app, do the world a favor and make only one icon. If they are many apps that can exist independently of each other, make separate apk files for them so that the user can install what he/she wants.
I quite didnt get what u were trying to do, if you have the source codes of the other 3 apps, you could extract the activities and make the main app call the activitied (will require some more configuration though) , if you just have the apk, i think you can request the user to install all the 3 after the main app has been installed, and call them by using intents. :) Good luck on this
Take a look at this question: bundle multiple apps in one app