Motorola Camera Intent

Put your problem here if it does not fit any of the other categories.

Motorola Camera Intent

Postby blundell » Wed May 26, 2010 1:29 pm

I did post this in media, but thinking about it, it's other because it's motorla's fault!

Hey Guys,

I can't get the stock camera to Load on the Motorola Milestone, I must have tried about 10 different intents. I did find this as well:
http://community.developer.motorola.com ... e/m-p/5513

So basically this intent
Code: Select all
Intent cameraIntent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);


Plus any other that Intents to open the camera won't work on Motorola Milestone! grrr

Does anyone have a work around for this problem?

Cheers

Blundell
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Re: Motorola Camera Intent

Postby blundell » Thu May 27, 2010 7:03 pm

So know else has come across this? It is reproduce-able tho, when I get back to my eclipse PC i'll write a test app.
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Motorola Camera Intent

Postby blundell » Fri May 28, 2010 1:49 pm

Can someone try this App APK on the Motorola Milestone for me please! The correct result should be the standard camera opens

Unsigned App:
TestCamera.apk
(12.07 KiB) Downloaded 31 times


Code:
Code: Select all
package te.st;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.MediaStore;
import android.widget.Toast;

public class StartCam extends Activity {
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);

      Intent intent = new Intent(android.provider.MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
      try{
         startActivity(intent);
      }catch(Exception e){
         Toast.makeText(this, "Failed Intent: android.provider.MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA", Toast.LENGTH_SHORT).show();
         Intent i = new Intent().setClassName("com.android.camera", "com.android.camera.Camera");
         try{
            startActivity(i);
         }catch(Exception e1){
            Toast.makeText(this, "Failed Intent: com.android.camera.Camera", Toast.LENGTH_SHORT).show();
            Intent intent2 = new Intent(Intent.ACTION_CAMERA_BUTTON);
            try{
               startActivity(intent2);
            }catch(Exception e2){
               Toast.makeText(this, "Failed Intent: ACTION_CAMERA_BUTTON", Toast.LENGTH_SHORT).show();
               Intent intent4 = new Intent().setClassName("com.motorola.camera", "com.motorola.camera.Camera");
               try{
                  startActivity(intent4);
               }catch(Exception e3){
                  Toast.makeText(this, "Failed Intent: com.motorola.camera", Toast.LENGTH_SHORT).show();
                  Toast.makeText(this, "Trying Video Intent", Toast.LENGTH_SHORT).show();
                  Intent intent5 = new Intent(MediaStore.INTENT_ACTION_VIDEO_CAMERA);
                  try{
                     startActivity(intent5);
                  }catch(Exception e5){
                     Toast.makeText(this, "Failed Video aswell", Toast.LENGTH_SHORT).show();
                  }
               }
            }
         }
      }
   }
}
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Re: Motorola Camera Intent

Postby blundell » Tue Jun 01, 2010 10:30 am

Further confirmation that it just won't work!

http://code.google.com/p/android/issues/detail?id=8092

Someone must have a workaround?
User avatar
blundell
Master Developer
Master Developer
 
Posts: 1610
Joined: Tue Nov 18, 2008 12:58 pm
Location: UK

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 21 guests