Back to project page AsciiCamera.
The source code is released under:
Apache License
If you think the Android project AsciiCamera listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.spectralsoftware.asciicamera; //from w ww . j av a 2 s . co m import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.util.Log; /** * Receiver for the Camera.ACTION_NEW_PICTURE broadcast message sent when the camera app saves * a new picture. Calls ProcessImageOperation to create an ASCII version of the picture. */ public class NewPictureReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { //Log.i(getClass().getName(), "Got picture: " + intent.getData()); try { (new ProcessImageOperation()).processImage(context, intent.getData()); //Toast.makeText(context, "Saved ascii image: " + resultDir, Toast.LENGTH_LONG).show(); } catch(Exception ex) { Log.e(getClass().getName(), "Error saving picture", ex); //Toast.makeText(context, "Error saving ascii image: " + ex, Toast.LENGTH_LONG).show(); } } }