Basically I want to prevent a particular application from starting. A further question may be related to the Android internal behaviors from clicking application button to application running. Help clarifying each internal step will be highly appreciated.
Put it in detail: When the user clicks 'YouTube' button on the screen (assuming YouTube has not been started by far), who gets to know first this particular click is YouTube? Also, I think finally Zygote will spawn a new process representing YouTube, and this process will be written in process table in kernel. Should I let Zygote know this is an application that the user should not start?
If the user starts an app by clicking on an app icon per default you won't be able to intercept it.
You might be able to do something if you made your own launcher application which had it's own shortcuts to all apps that reside on the phone. That would be my best suggestion to a possible work around.
Related
I have a demand for a product, but I don't know where to start to research it.
The idea is to create an app for a totem of an establishment.
It should always be in the foreground and the customer should not have any way to leave this view.
Besides when I open the OS he should already open the app.
Does anyone have any idea how I can follow this idea?
App for android.
I'm just looking a way to launch/open an application automatically every time the camera app starts! I know it will something to do with intent. Does someone has some examples to forward to me? I'd also like to add a toggle withing my application settings to enable/disable automatic launch on camera app opening.
Thanks allot, Diego
If you give an example of an app that does something similar to what you described, then maybe we could understand what you mean if we misunderstood.
The fact is, if I understand your question correctly, you want your app to start whenever a user hits starts the camera app on android.
As CommonsWare noted, this is not supported. It would require you to have control over the code behind the Camera app, and even then I'm not sure if you can start other apps from a given app (I believe you can, as I've seen this behavior before)
Short answer is: you can't. You might be able to start the camera app from your app however, but that is a different question.
Currently I am trying to build my school project in Android and I am afraid I have chosen a really difficult project to complete. I would ask if it is possible to open a 3rd party application in a small window within my application. When I try to start a 3rd party application via a button click, the application starts and I cannot go back to my application any more. I want to start another application IN my application, take a screenshot of it, and close this small window. I would kindly ask you to help me in this subject. Thank you very much in advance.
I would ask if it is possible to open a 3rd party application in a small window within my application
No, sorry.
I want to start another application IN my application, take a screenshot of it, and close this small window
You can start an activity via startActivity(). With user permission, you can take a screenshot of whatever is on the screen, by means of the media projection APIs. You cannot:
embed the UI of the other activity in yours
open the other activity in a "small window" (though the user could, using split-screen capabilities in Android 7.0+)
At the end of the day, I decided to use multiwindow. Adding the line below into my code, I made it to run in a small window. Then I was able to start the other activity in the big window.
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
Is there any way to programmatically pause an Android app in Phonegap? I would like to mimic the behavior that occurs when you hit the HOME button. I've already had to overwrite the back button handler using this, and while in most cases I want it to do my action, when in a particular state the user would expect the app to minimize, and I want to replicate this behavior.
Keep in mind, on Android this is not the same as closing the app. That is quite easy to do with device.exitApp(); but I would like it to remember its state and keep running in the background. Especially if there's still an asynchronous job being done in the background.
Is there a feature in Phonegap to achieve this?
Possible duplicate of Manually pause an application in Android Phonegap, but I couldn't find some of the tools the OP mentioned there such as navigator, so I was nervious to totally edit and rewrite their post
The simple answer appears to be: no.
However, for anyone else that comes down this path, its not impossible. It's just that there isn't a feature of Phonegap to do it for you.
The Android equivalent of "sleeping an app" is actually just opening another intent. Specifically, opening the "Home" intent would sleep the running app and bring you back to the home screen. But as far as I can tell from asking around and scoping the docs, Phonegap doesn't have a direct way of opening intents.
What you (supposedly) can do is one of two things:
This plugin is supposed to be promising
Call the Java code that does it yourself using the means described here
Mind you, as of right now I've decided to not go any further with this, so I make no promises about either of those means, having not attempted them myself.
I invite anyone else who decides to pursue this further to update their experience here.