VideoCamera doesn't exist before Cupcake. -- Jack Ha Open Source Development Center ・T・ ・ ・Mobile・ stick together
The views, opinions and statements in this email are those of the author solely in their individual capacity, and do not necessarily represent those of T-Mobile USA, Inc. On Jul 28, 7:06 am, "[email protected]" <[email protected]> wrote: > My application has buttons to launch gallery and video camera apps but > the below code only seems to work on phones with the standard Cupcake > build : > > // For Gallery > Intent intent = new Intent(); > intent.setClassName("com.android.camera", > "com.android.camera.GalleryPicker"); > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > mContext.startActivity(intent); > > // For Video Camera > Intent intent = new Intent(); > intent.setClassName("com.android.camera", > "com.android.camera.VideoCamera"); > intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); > mContext.startActivity(intent); > > On rooted / non-cupcake phones, I get this error : > > android.content.ActivityNotFoundException: Unable to find explicit > activity class {com.android.camera/com.android.camera.VideoCamera}; > have you declared this activity in your AndroidManifest.xml? > at android.app.Instrumentation.checkStartActivityResult > (Instrumentation.java:1480) > at android.app.Instrumentation.execStartActivity(Instrumentation.java: > 1454) > at android.app.Activity.startActivityForResult(Activity.java:2656) > at android.app.Activity.startActivity(Activity.java:2700) > > Any ideas how to fix for these other phones? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

