Wednesday, June 30, 2010

[android-developers] Re: Generate key events on foreground application

You can't, and you shouldn't. This would be a serious security hole.

What you can and should do, is let the user send the text to the
application of his choice.

For example, wrap an ACTION_SEND intent in a chooser, and run that
activity, and the user will be prompted with a choice of email, SMS,
and other options for sending the information along. This is quite
easy and works quite well. But you may be expecting to interface to an
application that doesn't support ACTION_SEND.

I'm not sure about the best way to get it into a notepad application.
ACTION_INSERT should get you a new note, if you use a suitable URI for
the application. Perhaps someone else has other suggestions.

On Jun 30, 11:56 am, biginner <androiddevelope...@gmail.com> wrote:
> I am new android developer. I am writing an application to receive
> data from barcode scanner.
> I am able to receive data from barcode scanner via bluetooth
> connection.
> If user open notepad or other application, I want to display the data
> to the application, so I want to generate key events on foreground
> application.
>
> I am trying to find a way but I can't find. Anyone please tell me how
> to do?
>
> Thanks!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate