The application camera has stopped error

by Amit Sood » Wed, 21 Jul 2010 03:57:28 GMT

Sponsored Links
 Hello Experts,

I am trying to run my camera on my emulator, but every time i try
running it i get the following error.

the application camera (process has stopped
unexpectedly. please try again

Please advice

Massive thanks


The application camera has stopped error

by tinyang » Wed, 21 Jul 2010 06:20:24 GMT

 First, check your logcat and post the lines generated by the error.
Secondly, what version of android are you running it on when you get this
error, and what are you trying to do with the camera?  The offending code
snippet might be helpful also. 

-----Original Message-----
[] On Behalf Of Amit Sood
Sent: Tuesday, July 20, 2010 2:57 PM
To: Android Beginners
Subject: [android-beginners] The application camera has stopped error

Hello Experts,

I am trying to run my camera on my emulator, but every time i try running it
i get the following error.

the application camera (process has stopped
unexpectedly. please try again

Please advice

Massive thanks


Sponsored Links

Other Threads

1. do you know how to change skin in android project?

hello,boys and girls,
do you have the experience of change skin in android project?
if you had,please share with me,ok?
thank you.


2. Getting mock gps data

Hi All,
I've been struggling with MockLocationProvider for two days and it
doesn't work for me. I'll try to download new sdk. But since it is
downloading now i can express what's not working for me:

Here is my Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""

        <uses-permission android:name="android.permission.INTERNET" />
android:name="android.permission.ACCESS_FINE_LOCATION" />
android:name="android.permission.ACCESS_MOCK_LOCATION" />
    <application android:icon="@drawable/icon" android:label="@string/
        <uses-library android:name="" />
        <activity android:name="pl.itigo.hw.HelloWorld"
                <action android:name="android.intent.action.MAIN" />
android:name="android.intent.category.LAUNCHER" />
    <uses-sdk android:minSdkVersion="3" />

public class HelloWorld extends MapActivity {
        LinearLayout linearLayout;
        MapView mapView;
        ZoomControls mZoom;
        MapController mController;
        TextView txView;

        /** Called when the activity is first created. */
        public void onCreate(Bundle savedInstanceState) {
                txView = (TextView) findViewById(;
                mapView = (MapView) findViewById(;
                mZoom = (ZoomControls) mapView.getZoomControls();
                linearLayout = (LinearLayout) findViewById(;
                mController = mapView.getController();

                LocationManager locationManager = (LocationManager) 
                PendingIntent pIntent = PendingIntent.getBroadcast(this, 0,
                                new Intent(), 0);
                Log.i("location", "Providers: " + 
                // new Thread(new MockGps(locationManager)).start();
                locationManager.requestLocationUpdates("gps", 0, 0, pIntent);
                locationManager.requestLocationUpdates("gps", 0, 0,
                                new LocationListener() {
                                        public void onLocationChanged(Location 
location) {
                                                String locationText = "Location 
changed, current location: "
                                                                + location;
                                                Log.i("hw", locationText);
                                                int lat = (int) Math
.round(location.getLatitude() * 1E6);
                                                int lng = (int) Math
.round(location.getLongitude() * 1E6);
GeoPoint(lat, lng));

                                        public void onProviderDisabled(String 
provider) {
                                                Log.i("hw", "Provider " + 
provider + " disabled");

                                        public void onProviderEnabled(String 
provider) {
                                                Log.i("hw", "Provider " + 
provider + " enabled");


                                        public void onStatusChanged(String 
provider, int status,
                                                        Bundle extras) {
                                                String info = "TEMPORARY 
                                                if (status == 
LocationProvider.AVAILABLE) {
                                                        info = "AVAILABLE";
                                                } else if (status == 
LocationProvider.OUT_OF_SERVICE) {
                                                        info = "OUT OF SERVICE";

                                                Log.i("hw", "Provider status 
changed:" + info);




        protected boolean isRouteDisplayed() {
                return false;

Then i've connected with DDMS and sending any gps locations doesn't
work. Neither gpx nor kml files doesn't load to the ddms view too. So
I've connected with adb shell to see /data/misc/location/
<provider_name> folder. But it is missing there is only /data/misc/
hcid directory. Nothing in /data/app folder interesting as well. After
that i've decided to write simple code to mimic gps, here it is:

public class MockGps implements Runnable {
        public static final String PROVIDER_NAME = "test1";
        private LocationManager manager;

        public MockGps(LocationManager manager) {
                this.manager = manager;
                try {
                        manager.addTestProvider(PROVIDER_NAME, false, false, 
false, false,
false, false, false, 0, 1);
                } catch (IllegalArgumentException e) {
                manager.setTestProviderEnabled(PROVIDER_NAME, true);
        public void run() {
                Location l = new Location(PROVIDER_NAME);
                manager.setTestProviderLocation(PROVIDER_NAME, l);
                Random rand = new Random();
                while(true) {
                        double lat = l.getLatitude();
                        double lng = l.getLongitude();
                        manager.setTestProviderLocation(PROVIDER_NAME, l);

                        try {
                        } catch (InterruptedException e) {
                                Log.e("hw", e.toString());
LocationProvider.AVAILABLE, null, 50);


I've tried both 1.1 and 1.5 SDK neither of those works for me.

Here is LogCat:

05-19 11:56:30.350: DEBUG/LocationManager(732): Constructor: service =
05-19 11:56:30.359: DEBUG/LocationManager(732): getAllProviders
05-19 11:56:30.369: INFO/location(732): Providers: [gps, network]
05-19 11:56:30.369: DEBUG/GpsLocationProvider(570): setMinTime 0
05-19 11:56:30.389: DEBUG/GpsLocationProvider(570): setMinTime 0
05-19 11:56:30.528: INFO/MapActivity(732): Handling network change
05-19 11:56:30.540: ERROR/MapActivity(732): Couldn't get connection
factory client
05-19 11:56:31.278: INFO/ActivityManager(570): Displayed activity
pl.itigo.hw/.HelloWorld: 2207 ms
05-19 11:56:31.420: INFO/hw(732): Provider status changed:TEMPORARY

After pushing some gps data with DDMS:

05-19 11:58:08.968: INFO/hw(732): Provider status changed:AVAILABLE

And thats all. Please help me with this issue, otherwise i'll get grey
hair. I didn't even try to upload app to the (real) device.


3. I can't get into site.

4. Android camera - high resolution image

5. Is there anybody using lookandfeel on android?

6. Focus issue after calling ArrayAdapter.notifyDataSetChanged()

7. Android Bluetooth 2.0 Support