Android controlling other apps - android

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.

Related

React Native: Make sure an external app is running in the background

I want to make sure an external app on the phone (say Spotify) is open in the background without me having to manually open it and make it appear in the foreground (using intents or links).
I'm making an app that uses the Spotify API with React Native.
I read in another thread that you can not implement a Web Playback for React Native so I'm stuck with using the API.
My problem is that in order to use the phone as a playback device you need the Spotify app running in the background. Now I have a solution, use Linking and make the app open in the foreground. But that way I make the users leave my app, and somehow I have to tell them to come back which sounds like a terrible design. I also tried nesting the links into each other (first being Spotify the second being my app), it worked a few times but it is pretty unreliable.
So my question would be if there's any way to call an external app and open it WITHOUT having it take foreground over my app.
I'm pretty new with React Native so I'm still learning, but I would appreciate your guidance on this issue

Is there any way to launch my application right away without 'Ok Google"?

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.

NativeScript lockdown (or kiosk) application

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.

Android: Detect App Launch

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.

Showing lockscreen widget to control application only when the application needs it

I would like to add lockscreen controls for my app similar to what netflix or youtube does when casting to a chromecast device.
Do I do this with a lockscreen widget that I add and remove on demand or is there a different method?
Thank you.
The proper way to add a lock screen controller is to use the RemoteControlClient. There are limitations to what you can do there, both in terms of the functionality and availability based on the Android version. If you are running Android version 4.1+, then the required functionality is there (check out the Google Play Music to see how it can look like). Give that a try and if run into issues, come back here and post your issue(s).

Categories

Resources