I am developing a lock application as an academic project. I need to detect the launch of an app so that i can launch my lockscreen on top of it and restrict opening the app till the user put correct pin. I have read a few posts and this one has a few answers that look promising.
Android, Detect when other apps are launched
Is this the right way to do it? Or is there a better way around? I have also heard about the Application class. But don't know how to implement it.
EDIT: My app supports API16 to API22.
Related
I've searched about launching my app with voice. And what I got is using Ok Google. However, I don't want this feature but start my app right a way without calling Ok Google. Instead, Hey, XXX Then, launch my app.
Maybe I can accomplish this feature by getting a permission of using microphone and using service of my app. In this way, At least my app will launch, if the user once launched my app during the device is on. Maybe using startActivity()?
Is it possible or not? If it is yes, What do I need to do to achieve this result?
It is not possible to launch your app using your own customized name like Hey Jarvis , open XYZ app.
You can only use the following commands in your android mobiles to launch your app.
Hey Google, open Facebook
or
Ok Google, open Facebook
The prefix, Ok Google / Hey Google are proprietary to Google's Voice Assistant that comes handy in Android mobiles. So we cannot change them as our wish, may be we can expect the something like you asked in future. But not sure.
You can refer to the google thread related to this here
As mentioned in the comments, you need to design your own voice assistant to do so. Even if you are developing your own voice assistance, not sure you can run them on your mobiles.
Edited
Maybe I can accomplish this feature by getting a permission of using microphone and using service of my app. In this way, At least my app will launch, if the user once launched my app during the device is on. Maybe using startActivity()?
You can use in-app voice features when your app is in foreground. You can give a try to this Google Actions on Android apps. Though this feature is new and limited, you can gain some idea regarding this.
I wondering if it is possible to create a "lockdown" application with NativeScript.
My aim is to place an android tablet in a public area where people may only interact with my NativeScript application:
fullscreen
no home-button access
no sleep/standby
no notification bar
Then, if possible, a pin code may allow to unlock the application.
Example:
You are looking for kiosk app, it's of course possible with NativeScript.
You will have to access android's native apis to do so, here are some heads up.
Also there is a thread in the forums which will give you some initial thoughts on doing this with NativeScript.
I was wondering if there was a way in android to be able to create an app to invoke events such as on touch in other apps. I wanted to have a floating app that could run over other apps and I could invoke touch events on the main running app. If you have any ideas on how to do this without root that would be wonderful.
One idea I had is emulated the main app within my app then controlling the touch events but I'm not sure if that will work.
Thank you for the help!
No, this is not possible. You can pass certain information to the other apps which is allowed by it. Like launch youtube and play video from your app. But you cannot search terms on youtube app without using youtube.
For other apps you should be having their apis. Only methods allowed through the api can be done.
I wanted to know if an app can interact with and change behavior of other apps ? Like, if someone has my app installed and opens whatsapp, I would pre-fill the input with a default text, for example.
It doesn't matter if the phone needs to be rooted. I didn't find any way to do this so just wanted your input !
Thanks !
The other app needs to be using a ContentProvider (I don't know if WhatsApp has one). See the reference doc. Other apps can interact with the ContentProvider app by using ContentResolver. This only works for apps that open up their content in this way. Otherwise, your app can't access the other app without employing other more hacky means (like taking over keyboard/input method, etc.).
I am developing aan android application which hides pictures,music videos and applications. But I got a problem while application hiding module. By a good search i came to know that the phone must be rooted/unlocked for the application locking.
Is there is any way to hide applications in android without rooting/unlocking?
maybe if you make it so that you have to download the app thew your application, and saving it onto a file, in the phone, and not on the front interface of the phone, maybe when they take the picture of save it, it does to the directory of the aplictation