开发者

android - possible to make a user action emulate the hardware 'Back' button?

开发者 https://www.devze.com 2023-01-14 19:21 出处:网络
I looked around and although there are many related 开发者_如何转开发questions I didn\'t see one that answers my exact question:

I looked around and although there are many related 开发者_如何转开发questions I didn't see one that answers my exact question:

I would like to create an app that runs in the background that provides the exact same functionality as the hard coded 'Back' button in all cases.

The reason? I (for example) have a Droid X, and it is BIG. it makes it extremely hard to use one-handed and having a swipe gesture function as a back button (like in Palm Pre for example) would greatly increase the ease of use.

as far as I'm concerned the app could just be one simple class that contains: 1) a listener for the 'back' swipe 2) a call to the physical hard button itself

Is this possible? are there built in APIs for the hard coded buttons that would allow me to call them without actually pressing them?

Again - I'm not interested in overriding the button, I'm interested in making a software call to it - or failing that, in emulating it's behavior in any and all states and other apps!

Please forgive the naivete of this post. I am a very novice programmer and really I just want to know whether this is possible before I start to devote myself to trying to build it.

Thank you, b


Is this possible?

By writing your own firmware, yes. Via an Android SDK application, no.

0

精彩评论

暂无评论...
验证码 换一张
取 消