Works like a charm!
I have another question now. For devices that don't have a camera button
(e.g. T-Mobile MyTouch and others) would it be feasible/ok to use the
SEARCH_LONG_PRESS broadcast and do the same thing with that button instead?
This is what I currently have but I can't test it...
Hi Tikoze,
You can very easily implement this feature.
Just have a simple receiver to receive the same intent as the camera that
is:
android.intent.action.CAMERA_BUTTON
In that receiver class start your required activity as required.
And, in the corresponding AndroidManifest.xml of your
Awesome! I will try it tonight. Not very foolproof but it should work in
most cases. Apparently all I was missing was the priority.
Thanks for the help,
Justin
--
There are only 10 types of people in the world...
Those who
Use PendingIntent
On Sep 14, 8:01 pm, Tikoze janderson@gmail.com wrote:
Anyone?
On Aug 31, 4:26 pm, Tikoze janderson@gmail.com wrote:
Any info on this would be appreciated. I know it can be done because
I have installed a few apps that are able to launch via the camera
button
All I have to do is change the code below to use a PendingIntent and pass
that to startActivity?
public void onReceive(Context context, Intent intent)
{
if (intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT) !=
null)
{
Intent newIntent =
I haven't had time to try a PendingIntent object yet, but I am curious
how it will help?
The problem isn't that I can't get my app to launch when the camera
button is pressed... The problem is that is launches the Camera app
and then launches my app.
Since there is no guarantee as to the order
seems unlikely (but i have no idea really). you wouldn't think you would
have control over the intents that other apps can listen for / act upon.
how would you like it if some other app came along and unregistered your
app from that intent?
On 9/15/09 3:40 PM, Tikoze wrote:
Since there is no
Obviously I understand that the ability to do that could cause some
developers to abuse it... And of course I would not like another
application to unregister things that my app listens for (if it
occurred without the user's knowledge).
As an example, I have used an application called Task
Any info on this would be appreciated. I know it can be done because
I have installed a few apps that are able to launch via the camera
button without having the camera app launch as well.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
9 matches
Mail list logo