Android: BroadcastReceiver intent to Detect Camera Photo Taken?

前端 未结 3 1280
感动是毒
感动是毒 2020-11-30 05:01

I\'m working on an Android application which needs to perform an action each time a new image is taken with the phone. I don\'t want to take the image within my application

3条回答
  •  旧时难觅i
    2020-11-30 05:38

    Quite an old question, if anyone still needs the solution try using

    android.hardware.action.NEW_PICTURE

    as your intent filter

    
        
            
    
                
                
    
                
            
        
    

    It will return the Uri of the image in intent.getData() of its onReceive() function

    Hope it helps

提交回复
热议问题