Android i taking picture using Intent
<p>With this code i am able to take picture but in <strong>onCreate() the name of image is static like "name.jpg" but when i change it to  new Date().toString()+".jpg"</strong> it stops working...
Please help me to make the name of image dynamic according to the time of picture taken. 
Thanks</p>

<pre><code>          public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.picturelayout);
        String imageName=new Date().toString();
        path=Environment.getExternalStorageDirectory()+"/TrackMe/"+"name.jpg";
    }
    public void CLICK(View v)
    {
        File f=new File(path);

         Uri myuri=Uri.fromFile(f);
         Intent i =new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
         i.putExtra(MediaStore.EXTRA_OUTPUT, myuri);
         startActivityForResult(i, 0);
    }
     public void back(View view){
         Intent intentBack=new Intent(getApplicationContext(),SettingsActivity.class);
         startActivity(intentBack);
     }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        // TODO Auto-generated method stub
        super.onActivityResult(requestCode, resultCode, data);
        if(resultCode==0)
        {
            Toast.makeText(getApplicationContext(), "Photo not taken", 
Toast.LENGTH_LONG).show();
        }
        else
        {
        Bitmap bm = BitmapFactory.decodeFile(path); 
        ImageView iv=(ImageView)findViewById(R.id.trackMePicture);
        iv.setImageBitmap(bm);
        }
    } 
</code></pre>
