• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Intent for New Photo

sivaprakash

Lurker
Jan 10, 2011
6
0
Hi

I want to receive a broadcast message whenever a new photo is taken. I have tried with the following intent filter in the configuration but none of them captured the intent. Can you please tell me what intent I have to capture.

Code:
<receiver android:name=".BroadReceiver">
            <intent-filter>
                <action android:name="com.android.camera.NEW_PICTURE"></action>
            </intent-filter>
        </receiver>
 
Hi


Thanks !! Here is the BroadReceiver class


Code:
public class BroadReceiver extends BroadcastReceiver{

    @Override
    public void onReceive(Context context, Intent arg1) {
        
        
        Toast.makeText(context, "It's working!", 10).show();
        Log.d("BroadReceiver", "Received ..... ");
        
        context.startService(new Intent (context, BgService.class));
        
        
    }

}

Permission in Manifest file:-

<uses-permission android:name="android.permission.CAMERA"></uses-permission>
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones