Article on Android Distribution Channels

by Al Sutton » Fri, 10 Oct 2008 16:23:07 GMT


Sponsored Links
  http://www.networkworld.com/community/node/33850 

Al.

P.S. Mark; Thanks for the AndAppStore mention.


--~--~---------~--~----~------------~-------~--~----~



Article on Android Distribution Channels

by Mark Murphy » Fri, 10 Oct 2008 18:39:26 GMT


 


No prob! Heck, I'm surprised the article hit your radar.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.3 Published!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How do I do to save an Image ????

I want to save image after I make the photo with the Camera of the
Emulator......
My program make a photo but don't save it.
How do I do ???
Thanks !!!!!!!!!!!
--~--~---------~--~----~------------~-------~--~----~

2. Save Image

I want to save image after I make the photo with the Camera of the
Emulator......


This is the Code :::: this program makes a photo when you push
space.....but don't save it !!!!!!


public class AppCam extends Activity implements SurfaceHolder.Callback
{
    private static final String TAG = "CameraApiTest";
    Camera mCamera;
    boolean mPreviewRunning = false;

    public void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);

        Log.e(TAG, "onCreate");

        getWindow().setFormat(PixelFormat.TRANSLUCENT);

        setContentView(R.layout.main);
        mSurfaceView = (SurfaceView)findViewById(R.id.surface);

        mSurfaceHolder = mSurfaceView.getHolder();
        mSurfaceHolder.addCallback(this);
        mSurfaceHolder.setType
(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
    }

    public boolean onCreateOptionsMenu(android.view.Menu menu) {
        MenuItem item = menu.add(0, 0, 0, "Gallery");
        item.setOnMenuItemClickListener(new
MenuItem.OnMenuItemClickListener() {
            public boolean onMenuItemClick(MenuItem item) {
                Uri target = Uri.parse("content://media/external/
images/media");
                Intent intent = new Intent(Intent.ACTION_VIEW,
target);
                startActivity(intent);
                return true;
            }
        });
        return true;
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState)
    {
        super.onRestoreInstanceState(savedInstanceState);
    }

    Camera.PictureCallback mPictureCallback = new
Camera.PictureCallback() {
        public void onPictureTaken(byte[] data, Camera c) {
            Log.e(TAG, "PICTURE CALLBACK: data.length = " +
data.length);
            mCamera.startPreview();
        }
    };

    public boolean onKeyDown(int keyCode, KeyEvent event)
    {
        if (keyCode == KeyEvent.KEYCODE_BACK) {
            return super.onKeyDown(keyCode, event);
        }

        if (keyCode == KeyEvent.KEYCODE_SPACE) {

            mCamera.takePicture(null, null,mPictureCallback);

            mCamera.

            return true;
        }

        return false;
    }

    protected void onResume()
    {
        Log.e(TAG, "onResume");
        super.onResume();
    }

    protected void onSaveInstanceState(Bundle outState)
    {
        super.onSaveInstanceState(outState);
    }

    protected void onStop()
    {
        Log.e(TAG, "onStop");
        super.onStop();
    }

    public void surfaceCreated(SurfaceHolder holder)
    {
        Log.e(TAG, "surfaceCreated");
        mCamera = Camera.open();
        //mCamera.startPreview();
    }

    public void surfaceChanged(SurfaceHolder holder, int format, int
w, int h)
    {
        Log.e(TAG, "surfaceChanged");

        // XXX stopPreview() will crash if preview is not running
        if (mPreviewRunning) {
            mCamera.stopPreview();
        }

        Camera.Parameters p = mCamera.getParameters();
        p.setPreviewSize(w, h);
        mCamera.setParameters(p);
        mCamera.setPreviewDisplay(holder);
        mCamera.startPreview();
        mPreviewRunning = true;
    }

    public void surfaceDestroyed(SurfaceHolder holder)
    {
        Log.e(TAG, "surfaceDestroyed");
        mCamera.stopPreview();
        mPreviewRunning = false;
        mCamera.release();
    }

    private SurfaceView mSurfaceView;
    private SurfaceHolder mSurfaceHolder;
}
--~--~---------~--~----~------------~-------~--~----~

3. Google I/O dates?

4. FYI easy high quality video encoding for android

5. Keyboard Input

6. Sending Multipart SMS

7. network defaultroute