I am currently working on a calculator application for android. I am finding it difficult to conveniently take a screen shot of the app. So i have put my calculator on pause so I can write a simple screen shot app. It runs in the notification bar and when you click the notification the notification bar slides away and a few seconds later a snapshot is taken. This works perfectly. Now I would like to add functionality to take snapshots even for full screen apps. I have seen apps that put a sliding drawer on the screen onto of whatever app is running. That is there is always a button on the screen no matter what you are doing that when you click/drag it that sliding drawer came out. How did they do that? It should be a simple process to use a button instead of a drawer and when it's clicked hide it, snapshot and unhide it.
So my question bsically is
How can i put a usable button on the screen that stays above whatever app is running, even the homescreen
I realize I'm not answering your question directly, but if you simply want to get a screen capture of your application running, I would use ddms in your android tools directory. It has a menu option for getting a screen grab. I use it frequently.
Just go to Device > Screen Capture
More details here :
http://developer.android.com/guide/developing/debugging/ddms.html
Related
I'm trying to figure out when a device is getting ready to switch off it's screen.
For example, I have a Samsung Galaxy S22 - when I press the power button the phone screen is turned off. I can capture this using a BroadcastReceiver which is ok.
However, before the screen is turned off, the screen actually fades to black. I am building an app that needs to seamlessly show itself for 5 seconds before the screen is turned off. I don't want it to first fade to black, then switch the screen back on and then show my app - which is currently what is happening. Is this possible? I'm just looking for a better user experience. Any other suggestions are welcome.
I have tried to google around and I'm not able to find anything.
EDIT: It's also worth noting that I have an AccessibiltyService running. So my application may not have an active Activity on the screen. The Activity is launched once the screen goes off - but I do want it to launch before the screen actually goes off.
about android capture.
The function of the application is that when you press a specific button,
One overlay button located at the top of the home screen of the device is generated.
When I press the overlay button, I want to capture the screen of the device I'm currently viewing, not the application screen.
I want to capture the top screen, but only the activity done by the application is captured.
How should I capture the screen I'm currently viewing?
I tried researching this problem for days before but I do not think that it is possible. Then I have an idea that instead of try to screen shot "outside" of app, we can use Service to keep our app alive, make back ground transparent and detect screenshot action of device. You may want to try com.abangfadli.shotwatch
I want the App to have predefined gestures like: goOnline(); that opens WhatsApp,
then click on the first chat, read the message and reply with a Dialogflow Interaction.
Yet, i did find something about WhatsApp not having an API and not letting it do things with it Programmatically, so i want to have an app that runs in the background or the foreground, that just controls the phone itself with gestures that do that for me.
Phone battery or having the screen on forever isn't a Problem. It will always be On and Charging.
For example, goOnline(); just draws upwards from the bottom, opening the App Drawer.
Then it clicks on the App that is pre-defined with coordinates, then opens the first chat, once again, with coordinates. Then click on the bottom chat field so the keyboard opens, write something random (Dialogflow) Then answer by pressing the enter key to and then go back to the Chat overview (pressing the back button at the top left) Close WhatsApp again by pressing the home button at the bottom.
Now my actual question and tl;dr:
Can i make scripted paths like swiping and clicking in Android Studio with coordinates and build them into functions?
I hope someone can help.
I want to add fb like bubble icon while i minimize app and it appears. And while clicking on it, minimize app gets open.
Note : not notification but only appear bubble that i can drag anywhere and click on it opens app again.
I would be thankful, if anyone can help me with this code
I'm trying to create an app that will display a video in a VideoView in a transparent activity but keep the touch focus on any underlying activity. For example, if I have one app opened and my app is launched, the video will show but the user can still interact with the app they were previously viewing. I have the transparent activity and video working but I can not find a way to keep interaction in the activity under mine. Please tell me if this is possible and how to do it. Thanks
Matt
Set WindowManager.FLAG_NOT_TOUCH_MODAL for your transparent VideoView Activity Window.
By doing this, it will by-pass the touch events on the area outside of your activity to the previous activity.