Hi All,

I am trying to register a broadcast receiver in the Camera Framework
class.
As we know, there are two ways are registering the broadcast messages,

1. From the code
         &
2. In the AndroidManifest.xml

* I tried registering it through the AndroidManifest.xml -- Since the
braodcast intent is a custom message I am able to register it using
Manifest. But I am able to register it using the

context.registerReceiver();

* Hence to register from the code, I need a context. From the App
whichever we are trying to access the Camera class, context is not
passed, it is just a open(cameraId) call...
I tried getting the systemContext using

Looper.prepare();
ActivityThread at = ActivityThread.systemMain();
Context mContext = at.getSystemContext();

With this code snippet I am able to get the system context, but I am
not able to register the receiver using it...

* I tried writting an AIDL to return the context from one of the
custom system service.
Here also, I couldn't import the class android.content.context in the
AIDL file..

Any ideas?

Thanks & Regards,
Ramya.M

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to