I might be bad manners to start an Activity out of the blue like that,
but here's how you do it:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setClass( myContext , ActivityToLaunch.class );
startActivity( intent );
Note that the first arg
startActivity works the same in a service as it does in an activity
(Context vs. Activity argument not withstanding), and I don't think
it's gauche to launch an activity from your service. In many cases,
you need to launch an activity from a service when it needs attention.
Doug
--
You received
would you be able to use the NotificationManager and let the user start the
activity? if possible that might be less intrusive...
On Wed, Oct 6, 2010 at 2:23 AM, Doug wrote:
> startActivity works the same in a service as it does in an activity
> (Context vs. Activity argument not withstanding),
Sorry about resurrecting an old thread, but really? All resources
from all APK's are public to all APK's at all times?
Could yall post a new blog post about how to write secure Android
applications? ;)
How about assets? And whats the deal with the stuff that ends up in
your assets folder that y
OK. I'll be explain my needs:
I'm the author of AnySoftKeyboard (http://
softkeyboard.googlecode.com).
The reason I made this keyboard, is to provide alternative layouts in
the on-screen keyboard (e.g., Hebrew, Russian, DVORAK, etc. and of
course, qwerty).
But the keyboard APK gets bloated with all
I don't know what the other ContentProviders URI are.
They can be anything, I want to release my keyboard service, and then
release layouts as I need.
This means that, somehow, the keyboard service needs to "know" which
layout packages are installed on the device, and what are the URI of
their cont
So you suggest that I'll have a pre-define resource which will hold
all the information I need (let's say it is an XML resource) for
creating the external keyboard. This sounds OK.
The only problem is how to query for packages which have this
resource?
I can still create an Activity which have anot
I'll look at the examples, and try that.
Thanks.
On Feb 14, 11:07 am, Dianne Hackborn wrote:
> You can follow the same model we use for input methods, app widgets, live
> wallpapers, and other things (none of which are fundamentally kinds of
> things in the platform, but built on top of the fun
On Feb 13, 11:36 am, Dianne Hackborn wrote:
> This sounds much more complicated than you need. If you just want to load
> resources from another .apk, you don't need any code in it at all -- just
> use Context.createPackageContext() to get the context for the other package
> and load its resour
On Feb 15, 5:01 pm, Mark Murphy wrote:
> jotobjects wrote:
> > Are the resources of the another application package essentially
> > public - can any application call Context.createPackageContext() to
> > get the context of a different application?
>
> Yes. It shocked the heck out of me when I re
On Fri, Mar 26, 2010 at 4:22 PM, Matt Kanninen wrote:
> Sorry about resurrecting an old thread, but really? All resources
> from all APK's are public to all APK's at all times?
>
Yes.
> Could yall post a new blog post about how to write secure Android
> applications? ;)
>
One possibility is
This sounds much more complicated than you need. If you just want to load
resources from another .apk, you don't need any code in it at all -- just
use Context.createPackageContext() to get the context for the other package
and load its resources from there.
And if you don't need any UI, and real
Menny wrote:
> I don't know what the other ContentProviders URI are.
Then don't use a ContentProvider. Follow Ms. Hackborn's directions
instead and use Context.createPackageContext() and access the other
APKs' resources that way.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twi
Menny wrote:
> I don't know what the other ContentProviders URI are.
> They can be anything, I want to release my keyboard service, and then
> release layouts as I need.
> This means that, somehow, the keyboard service needs to "know" which
> layout packages are installed on the device, and what ar
You can follow the same model we use for input methods, app widgets, live
wallpapers, and other things (none of which are fundamentally kinds of
things in the platform, but built on top of the fundamental generic
activity, receiver, service, and provider components):
1. Pick the kind of component
Menny wrote:
> So you suggest that I'll have a pre-define resource which will hold
> all the information I need (let's say it is an XML resource) for
> creating the external keyboard. This sounds OK.
> The only problem is how to query for packages which have this
> resource?
I'm not sure if there
OK, thanks. I'll try that.
On Sun, Feb 14, 2010 at 14:15, Mark Murphy wrote:
> Menny wrote:
> > So you suggest that I'll have a pre-define resource which will hold
> > all the information I need (let's say it is an XML resource) for
> > creating the external keyboard. This sounds OK.
> > The onl
Menny Even Danan wrote:
> OK, thanks. I'll try that.
Actually, I hadn't seen Ms. Hackborn's response before replying --
definitely consider following her guidance in this area.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android Consulting/App Developme
download free important softwares,movies,games &many more
http://www.moreutilities.blogspot.com/
On Sat, Feb 13, 2010 at 11:59 PM, Menny wrote:
> So you suggest that I'll have a pre-define resource which will hold
> all the information I need (let's say it is an XML resource) for
> creating th
jotobjects wrote:
> Are the resources of the another application package essentially
> public - can any application call Context.createPackageContext() to
> get the context of a different application?
Yes. It shocked the heck out of me when I realized it. It's possible
there are some limits, but I
jotobjects wrote:
> For instance with a Context you
> can get lists of databases and files and delete them!
No, you can't. Linux file permissions will prevent this.
> Getting access to MetaData via PackageManager seems reasonable if you
> are aware that this is how it works, but the rationale for
On Mon, Feb 15, 2010 at 4:37 PM, jotobjects wrote:
> Are the resources of the another application package essentially
> public - can any application call Context.createPackageContext() to
> get the context of a different application?
>
Yep all resources are public. This allows other application
22 matches
Mail list logo