Hi im looking for method to disable my android phones display running on pie. I don't want to use tap to sleep, power button or simulate that option but I want to simply disable display completely and then turn it back on when I need it. I have rooted my phone already.
Example: I want to watch a YouTube video with only audio. So if I disable the display it can save my battery but pressing power button stops the buffering.
it's just an example for what I want to do this. I don't want it. I'm aware of youtube vanced..
PS: I have non amoled display.
I'm thinking for the following methods (though I'm not an expert):
Make brightness zero.
Change display driver's file name with adb to disable or enable display.
Take code of android where it simply disables the display after pressing power key (without performing other functions).
I expect the display to be turned off exactly like when pressing power button, but without other tasks that happens with power button.
Maybe it works for you to install a Youtube client app.
Xiaomi app Mi Music (com.miui.player) allows you to reproduce a Youtube video in background and wih screen off.
https://play.google.com/store/apps/details?id=com.miui.player
Related
Is it possible to utilize button-hold on mobile phone as a trigger for some programmed action? E.g. my app runs in background and it is programmed to open up if I hold both volume up and volume down buttons for 3 seconds.
I want to make iPhone/Android app. I haven't choose any framework yet, it's a question of technical possibility of such an idea, but I'll probably use objective-C/Swift as I have an iPhone.
I found an information for iOS on how to use events from volume buttons here, however it seems to be impossible to use events from power button or home button in the background, except from noticing that the app went from foreground to the background at home/power-button action.
I'm researching for a project that would need to send messages and/or have interaction with a user while watching a video full-screen on a website. My understanding was that once Flash (or any of the other programs) start, the browser has no control over the process. I can find little to no information on the possibilities. Would this be possible without having an user install separate software?
Any help is appreciated
Clearly didn't do my homework, have found that this will be nearly impossible:
Are overlays on top of full-screen flash video possible?
I think for flash (flash player 11.3 and higher) and HTML5 it is possible, for silverlight I don't know.
For flash, for interaction in fullscreen mode, you should use stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE instead of stage.displayState = StageDisplayState.FULL_SCREEN, take a look here for more details about that : Adobe.com : Working with full-screen mode and then add what you need of interaction.
For HTML5, you can do like youtube player for exemple so you create you own video player and when you want to pass to fullscreen mode, you do a fullscreen of your video player and not the <video> element and then you can do all what you need as in a normal html page in the normal mode.
I'm trying to make an automation tool to play a flash game or a video game for the purpose of learning. I found that in Windows we can use AutoIT to locate a specific region on the screen and immediately send a mouse click into that region. However, I'm haven't found anything similar in Linux, probably this can all be done at the lower level. Can anyone show me some ideas how I can do this (find a pattern on the screen and mouse click into that) in Linux? I heart that there is some Java package named awt.robot that can do this and be platform independent, but I prefer doing it in C or C++.
Thanks.
You can use xdotool in Linux for moving mouse cursor, mouse click and typing. I use it and it works fine.
awt.robot seem to do the same thing,
I have not found anything for pattern matching unfortunately. I checked AutoIT website but they do not say anything about pattern maching.
This is a WP 7.1/7.5/Mango Silverlight app.
I have a requirement where I need to play sounds on image click (3-4 images) and also an audio plays when user navigates to the page first time.
So I implemented that using MediaElement as mentioned here: Windows Phone 7.1 - Media Element not playing
Issue: Now I was testing the app. I started playing radio on the phone. Then started my app. Radio was still playing. Now when I navigated to the page that has audion on page Load, radio stopped.
Certification Requirements (6.5 - Non Music..) is very confusing: http://msdn.microsoft.com/en-us/library/hh184838(v=vs.92).aspx
Questions:
1: Do I need to ask user permission in this case (using a pop-up) before playing my audio?
2: Req 6.5.3 says no need to ask permission for non-interactive audio. What is that?
3: If I have to ask the user and if user selects No i.e. not to stop thier radio(or other music), then the only was for me to still allow to play my audio is using SoundEffect insted of MediaElement. So am I doing wrong with MediaElement?
4: I am also planning to add a background/ambience music to my app in future once I am done setting up above audios. Req 6.5.4. says - The SoundEffect class must not be used to play a continuous background music track in an application. No so in that case I am left with MedieElement only.
Here's rhe Sound Sample(second one) I found: http://msdn.microsoft.com/en-us/library/ff431744(v=vs.92).aspx#BKMK_Media Is this the only way I can do?
Any suggestions really appreciate.
Note: The button click and page load audio files are short clips(max 5 secs) e.g. How are you?, What's your name? It's so much fun here, etc. So they are not songs.
To answer one (or more) of you questions:
You do not need to ask the user permission before playing audio
All this means is if something is playing before your sound plays you must resume it
No you should be using a sound effect if its a sound effect and a media element if its a media file. Sound effect are usually 5-10seconds and not continuous. BAckground music that loops is not a sound effect.
In Silverlight for WP7 only one MediaPlay can be played at a time. I got around this by making my project a Windows Phone Silverlight an XNA application Refer to my previous post. The idea is that my XNA part plays the sound effects while my mediaelement plays the background audio.
It can be a little confusing sometimes. Here is how I understand it:
You don't ask permission when all these conditions are met:
The sound doesn't repeat
The sound is interactive (in response to something the user did, like click a button)
You don't stop the background music (which means not using a MediaElement)
You do ask permission when:
The sound repeats or is continuous
The sound is like background music
You use a MediaElement (Because it stops the background music)
A clarification on interactive sounds: in my opinion a sound to signify that the program's state has changed (such as a timer's alarm going off) is still somewhat interactive and wouldn't need permission. Unless of course you start playing a song that functions more as background music.
I am trying to write an X11 input driver that can use the touchscreen on my Android phone to move and click the mouse. I've gotten moving the mouse alright, but I'm having trouble getting the clicks recognized correctly by the applications. My current code is up at https://gist.github.com/3981cedec9d5c55af15f .
First of all, when I click on a background window, it becomes the primary window, but it does is not moved to the front of the screen. Second of all, if I right click, the entire screen becomes unresponsive to my clicking. Finally, clicking on the window buttons (close, minimize, maximize) don't seem to do anything. Are there any events that I am not sending?
If you're writing a driver, why are using synthetic input events, instead of writing a X server driver module, that gets loaded by the X server? I'd start with the xf86-input-evdev driver as a starting point and rewrite it as needed.
http://cgit.freedesktop.org/xorg/driver/xf86-input-evdev/tree/?h=master