[android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-03-26 Thread Matt Kanninen
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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-03-26 Thread Dianne Hackborn
On Fri, Mar 26, 2010 at 4:22 PM, Matt Kanninen mathias...@gmail.com 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

[android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-16 Thread jotobjects
On Feb 15, 5:01 pm, Mark Murphy mmur...@commonsware.com 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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-16 Thread Mark Murphy
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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-16 Thread Dianne Hackborn
On Mon, Feb 15, 2010 at 4:37 PM, jotobjects jotobje...@gmail.com 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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-15 Thread sai ongoleee
download free important softwares,movies,games many more http://www.moreutilities.blogspot.com/ On Sat, Feb 13, 2010 at 11:59 PM, Menny menn...@gmail.com 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)

[android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-15 Thread jotobjects
On Feb 13, 11:36 am, Dianne Hackborn hack...@android.com 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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-15 Thread Mark Murphy
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'm

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-14 Thread Dianne Hackborn
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

[android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-14 Thread Menny
I'll look at the examples, and try that. Thanks. On Feb 14, 11:07 am, Dianne Hackborn hack...@android.com 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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-14 Thread Mark Murphy
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 is

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-14 Thread Menny Even Danan
OK, thanks. I'll try that. On Sun, Feb 14, 2010 at 14:15, Mark Murphy mmur...@commonsware.com 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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-14 Thread Mark Murphy
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

[android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-13 Thread Menny
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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-13 Thread Dianne Hackborn
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

[android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-13 Thread Menny
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

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-13 Thread Mark Murphy
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 |

Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-13 Thread Mark Murphy
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 are the

[android-developers] Re: How to start an Activity from a Service and getting a result from it

2010-02-13 Thread Menny
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