Hi,

When you are developing on an application level(Services, Activities)
you always get this Context reference automatically.

But what if I am on a lower level and developing a program started
with app_process, how can I get hold of a Context then? Its a huge
part of the API that need this context.

What the proper way to create a Context instance?

I've tried :

ActivityThread main = ActivityThread.systemMain();
Context context = main.getSystemContext();

But when I use this context with the MediaScannerService for example,
I get the following error :

"Unable to find app for caller
android.app.applicationthreadpr...@433f92e8 (pid=1049) when binding
service Intent { action=android.media.IMediaScannerService } "

BR,
Sven
--~--~---------~--~----~------------~-------~--~----~
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-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to