Old changelogs?

by Faber Fedor » Mon, 09 Mar 2009 08:29:47 GMT


Sponsored Links
 I have a piece of code that I *think* is SDK release m5 and I want to port
it to 1.x.  So I need to know what changes were made between them, like
functions names, etc.  Where is that document?

The link I found (code.google.com/*android*/migrating/m5-0.9/*changes*
-overview.html ) takes me to the 1.1 site and the "Previous SDK Releases"
take me to the download page for SDK 1.1.

I swear I saw the document this weekend but I can't find it now. Why am I
reminded of Russian photographs from the Cold war era? ;-)

-- 

Faber Fedor
Linux New Jersey
 http://linuxnj.com 
faberfedor.blogspot.com

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



Other Threads

1. ImageView selection in Custom ListView?

Hi,
I have developed a Custom ListView with following pattern

Name       |-------------------------|
Age         | My Tiny Image  |
Email       | -----------------------|

Now I want to know after clicking on my Tiny Image some function
should be called. How to attach listener to this Image which is part
of Custom ListView row.

Please provide me any needful

Regards,
Narendar
Software Engineer
INDIA

-- 

2. auto stop of app when capture the picture with camera

Dear everyone:

I am facing a problem; when I try to save the picture, the app will
auto stop. but it does not happen everytime.

does anyone know why? Thank you so much.

next is the sourcecode

/**
 * Copyright (c) 2007, Google Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
 * See the License for the specific language governing permissions
and
 * limitations under the License.
 */

package com.android.cameraapitest;


import java.io.File;

import java.io.IOException;
import java.io.OutputStream;

import android.app.Activity;
import android.content.ContentValues;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.net.Uri;
import android.os.Environment;

import android.os.Bundle;
import android.provider.MediaStore;
import android.provider.MediaStore.Images;

import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.SurfaceHolder;
import android.view.SurfaceView;

import android.view.Window;
import android.view.WindowManager;
import android.widget.Toast;
import android.hardware.Camera;

import android.text.format.DateFormat;
import android.util.Log;

public class CameraApiTest 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");
        requestWindowFeature(Window.FEATURE_NO_TITLE);
                getWindow().setFlags(WindowManager.LayoutParams.
FLAG_FULLSCREEN ,
                WindowManager.LayoutParams. FLAG_FULLSCREEN);
     //   getWindow().setFormat(PixelFormat.TRANSLUCENT);
                String status=Environment.getExternalStorageState();
                if (status.equals(Environment.MEDIA_MOUNTED)){

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

        mSurfaceHolder = mSurfaceView.getHolder();
        mSurfaceHolder.addCallback(this);
 
mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
                }
                else{
                        Toast.makeText(getApplicationContext(), "PLease insert 
an SD card
before using the camera!", Toast.LENGTH_LONG).show();
                }

    }

    public boolean onCreateOptionsMenu(android.view.Menu menu) {
        MenuItem item = menu.add(0, 0, 0, "goto 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 camera) {
                 ContentValues values = new ContentValues(8);
             String newname = DateFormat.format("yyyy-MM-dd kk.mm.ss",
System.currentTimeMillis()).toString();
             values.put(MediaStore.Images.Media.TITLE, newname);
             values.put(MediaStore.Images.Media.DISPLAY_NAME,
newname);
             values.put(MediaStore.Images.Media.DESCRIPTION,
"test");//
             values.put(MediaStore.Images.Media.DATE_TAKEN,
System.currentTimeMillis());//
             values.put(MediaStore.Images.Media.MIME_TYPE, "image/
jpeg");//
             values.put(MediaStore.Images.Media.ORIENTATION, 0);//
             final String CAMERA_IMAGE_BUCKET_NAME = "/sdcard/dcim/
camera";
             final String CAMERA_IMAGE_BUCKET_ID =
String.valueOf(CAMERA_IMAGE_BUCKET_NAME.hashCode());
             File parentFile = new File(CAMERA_IMAGE_BUCKET_NAME);
             String name = parentFile.getName().toLowerCase();
             values.put(Images.ImageColumns.BUCKET_ID,
CAMERA_IMAGE_BUCKET_ID);//id
             values.put(Images.ImageColumns.BUCKET_DISPLAY_NAME,
name);
             Uri uri =
getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
values);
             BitmapFactory.Options options=new
BitmapFactory.Options();
                        options.inSampleSize = 2;
                        int quality = 100;
                        Bitmap myImage = BitmapFactory.decodeByteArray(data,
0,data.length,options);
             try {
                 OutputStream outStream =
getContentResolver().openOutputStream(uri);
                 myImage.compress(Bitmap.CompressFormat.JPEG, quality,
outStream);
                 outStream.close();
                 myImage.recycle();
                 return ;
             } catch (Exception e) {
                 Log.e(TAG, "exception while writing image", e);

                }
                }
    };

    public boolean onTrackballEvent (MotionEvent event)
    {
        if (event.getAction() == MotionEvent.ACTION_DOWN) {
            //return super.onKeyDown(keyCode, event);
                mCamera.takePicture(null, null, mPictureCallback);
                mCamera.stopPreview();
                mPreviewRunning = false;
                mCamera.startPreview();
                mPreviewRunning = true;
            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);
        try {
                        mCamera.setPreviewDisplay(holder);
                } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
        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. How to determine current screen brightness?

4. adjustResize not working in landscape mode

5. Issue with launching second one

6. Kalo moto clic bagus ga sh?romnya susah ga ulik2 nya?

7. How to communicate from Javascript back to an app?