Ok below here is what my log generates when I try to run my application . The application fails unexpectedly and does not even start
09-02 04:28:51.856: D/dalvikvm(781): GC_FOR_ALLOC freed 66K, 7% free 2542K/2728K, paused 51ms, total 66ms
09-02 04:28:51.866: I/dalvikvm-heap(781): Grow heap (frag case) to 3.181MB for 614500-byte allocation
09-02 04:28:51.936: D/dalvikvm(781): GC_FOR_ALLOC freed <1K, 6% free 3142K/3332K, paused 67ms, total 67ms
09-02 04:28:52.406: W/SoundPool(781): sample 1 not READY
09-02 04:28:53.116: D/gralloc_goldfish(781): Emulator without GPU emulation detected.
09-02 04:28:53.376: I/Choreographer(781): Skipped 33 frames! The application may be doing too much work on its main thread.
09-02 04:29:22.606: E/AudioTrack(781): Could not get audio output for stream type 3
09-02 04:29:22.606: E/SoundPool(781): Error creating AudioTrack
09-02 04:29:22.756: D/dalvikvm(781): GC_FOR_ALLOC freed 30K, 5% free 3523K/3672K, paused 19ms, total 21ms
09-02 04:29:22.756: I/dalvikvm-heap(781): Grow heap (frag case) to 4.159MB for 635812-byte allocation
09-02 04:29:22.856: D/dalvikvm(781): GC_FOR_ALLOC freed 1K, 4% free 4143K/4296K, paused 97ms, total 97ms
09-02 04:29:22.966: I/Choreographer(781): Skipped 91 frames! The application may be doing too much work on its main thread.
09-02 04:29:23.206: I/Choreographer(781): Skipped 55 frames! The application may be doing too much work on its main thread.
09-02 04:29:23.375: I/Choreographer(781): Skipped 35 frames! The application may be doing too much work on its main thread.
09-02 04:29:23.776: I/Choreographer(781): Skipped 79 frames! The application may be doing too much work on its main thread.
09-02 04:29:28.016: D/dalvikvm(781): GC_FOR_ALLOC freed 108K, 5% free 4436K/4664K, paused 111ms, total 133ms
09-02 04:29:28.045: I/dalvikvm-heap(781): Grow heap (frag case) to 5.030MB for 614500-byte allocation
09-02 04:29:28.096: D/dalvikvm(781): GC_FOR_ALLOC freed 1K, 5% free 5034K/5268K, paused 55ms, total 56ms
09-02 04:29:28.235: W/SoundPool(781): sample 1 not READY
09-02 04:29:28.785: I/Choreographer(781): Skipped 50 frames! The application may be doing too much work on its main thread.
09-02 04:29:31.626: E/AudioTrack(781): Could not get audio output for stream type 3
09-02 04:29:31.626: E/SoundPool(781): Error creating AudioTrack
09-02 04:29:31.746: E/SlaveBlueTooth(781): +++ ON CREATE +++
09-02 04:29:31.766: W/System.err(781): java.io.IOException: open failed: EROFS (Read-only file system)
09-02 04:29:31.776: W/System.err(781): at java.io.File.createNewFile(File.java:948)
09-02 04:29:31.785: W/System.err(781): at helog.diwesh.NugaBest.BTSmartSlavemodule.onCreate(BTSmartSlavemodule.java:118)
09-02 04:29:31.796: W/System.err(781): at android.app.Activity.performCreate(Activity.java:5133)
09-02 04:29:31.796: W/System.err(781): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-02 04:29:31.796: W/System.err(781): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
09-02 04:29:31.816: W/System.err(781): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
09-02 04:29:31.816: W/System.err(781): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-02 04:29:31.816: W/System.err(781): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
09-02 04:29:31.826: W/System.err(781): at android.os.Handler.dispatchMessage(Handler.java:99)
09-02 04:29:31.826: W/System.err(781): at android.os.Looper.loop(Looper.java:137)
09-02 04:29:31.826: W/System.err(781): at android.app.ActivityThread.main(ActivityThread.java:5103)
09-02 04:29:31.836: W/System.err(781): at java.lang.reflect.Method.invokeNative(Native Method)
09-02 04:29:31.836: W/System.err(781): at java.lang.reflect.Method.invoke(Method.java:525)
09-02 04:29:31.846: W/System.err(781): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-02 04:29:31.846: W/System.err(781): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-02 04:29:31.856: W/System.err(781): at dalvik.system.NativeStart.main(Native Method)
09-02 04:29:31.856: W/System.err(781): Caused by: libcore.io.ErrnoException: open failed: EROFS (Read-only file system)
09-02 04:29:31.876: W/System.err(781): at libcore.io.Posix.open(Native Method)
09-02 04:29:31.886: W/System.err(781): at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
09-02 04:29:31.886: W/System.err(781): at java.io.File.createNewFile(File.java:941)
09-02 04:29:31.896: W/System.err(781): ... 15 more
09-02 04:29:32.016: D/AndroidRuntime(781): Shutting down VM
09-02 04:29:32.016: W/dalvikvm(781): threadid=1: thread exiting with uncaught exception (group=0x41465700)
09-02 04:29:32.066: E/AndroidRuntime(781): FATAL EXCEPTION: main
09-02 04:29:32.066: E/AndroidRuntime(781): java.lang.RuntimeException: Unable to start activity ComponentInfo{hellog.diwesh.NugaBest/helog.diwesh.NugaBest.BTSmartSlavemodule}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.os.Handler.dispatchMessage(Handler.java:99)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.os.Looper.loop(Looper.java:137)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.ActivityThread.main(ActivityThread.java:5103)
09-02 04:29:32.066: E/AndroidRuntime(781): at java.lang.reflect.Method.invokeNative(Native Method)
09-02 04:29:32.066: E/AndroidRuntime(781): at java.lang.reflect.Method.invoke(Method.java:525)
09-02 04:29:32.066: E/AndroidRuntime(781): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-02 04:29:32.066: E/AndroidRuntime(781): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-02 04:29:32.066: E/AndroidRuntime(781): at dalvik.system.NativeStart.main(Native Method)
09-02 04:29:32.066: E/AndroidRuntime(781): Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
09-02 04:29:32.066: E/AndroidRuntime(781): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:226)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.Activity.requestWindowFeature(Activity.java:3264)
09-02 04:29:32.066: E/AndroidRuntime(781): at helog.diwesh.NugaBest.BTSmartSlavemodule.onCreate(BTSmartSlavemodule.java:141)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.Activity.performCreate(Activity.java:5133)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
09-02 04:29:32.066: E/AndroidRuntime(781): ... 11 more
This is the error from your LogCat :
FATAL EXCEPTION: main
09-02 04:29:32.066: E/AndroidRuntime(781): java.lang.RuntimeException: Unable to start activity ComponentInfo{hellog.diwesh.NugaBest/helog.diwesh.NugaBest.BTSmartSlavemodule}: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
Multiple issues here:
09-02 04:29:31.766: W/System.err(781): java.io.IOException: open failed: EROFS (Read-only file system)
09-02 04:29:31.776: W/System.err(781): at java.io.File.createNewFile(File.java:948)
09-02 04:29:31.785: W/System.err(781): at helog.diwesh.NugaBest.BTSmartSlavemodule.onCreate(BTSmartSlavemodule.java:118)
In BTSmartSlavemodule.java line 118 you're trying to create a new file on a read-only file system.
09-02 04:29:32.066: E/AndroidRuntime(781): Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
09-02 04:29:32.066: E/AndroidRuntime(781): at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:226)
09-02 04:29:32.066: E/AndroidRuntime(781): at android.app.Activity.requestWindowFeature(Activity.java:3264)
09-02 04:29:32.066: E/AndroidRuntime(781): at helog.diwesh.NugaBest.BTSmartSlavemodule.onCreate(BTSmartSlavemodule.java:141)
On line 141 of the same file you're trying to call requestWindowFeature() after calling setContentView(). You need to set window features before setContentView().
You call requestFeature() not in right place... try to call this method before setContentView(R.layout.activity)
The cause of this error is :
09-02 04:29:32.066: E/AndroidRuntime(781): Caused by: android.util.AndroidRuntimeException: requestFeature() must be called before adding content
And this cause happened at :
09-02 04:29:31.785: W/System.err(781): at helog.diwesh.NugaBest.BTSmartSlavemodule.onCreate(BTSmartSlavemodule.java:118)
Where you put code .requestWindowFeature(). To avoid this cause you must put this code before setContentView(R.layout.your_layout);
I think you are trying to create file on sdcard but you don't have specified permission to write external storage in manifest file
Add this line to manifest.xml file
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Related
I have an app where users can click on certain buttons in my app and it will launch specific settings page from Android to the user. I uses the android API from their website http://developer.android.com/reference/android/provider/Settings.html
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
currentContext.startActivity(intent);
Intent intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS);
currentContext.startActivity(intent);
These are some of the settings pages that my app will open. So far I have no problem launching these two intents from my app. However, when I try to launch the "About tablet" page with the code below, the Settings process crashes.
Intent intent = new Intent(Settings.ACTION_DEVICE_INFO_SETTINGS);
currentContext.startActivity(intent);
It crashes on android 4.1.1 but it works fine on android 3.2. I'm still new to Android and I am at a lost on why it crashes. I'm new to StackOverflow as well. Hopefully I am able to get some answers here and nice to meet you all.
Here's my logcat:
09-19 09:50:12.830: I/ActivityManager(270): START {act=android.settings.DEVICE_INFO_SETTINGS cmp=com.android.settings/.Settings$DeviceInfoSettingsActivity u=0} from pid 1627
09-19 09:50:12.910: D/dalvikvm(270): GC_FOR_ALLOC freed 738K, 13% free 11824K/13575K, paused 62ms, total 62ms
09-19 09:50:13.010: W/System.err(1675): Removed 2131231183
09-19 09:50:13.020: W/System.err(1675): Removed 2131231190
09-19 09:50:13.060: D/LocalBluetoothProfileManager(1675): LocalBluetoothProfileManager construction complete
09-19 09:50:13.060: D/AndroidRuntime(1675): Shutting down VM
09-19 09:50:13.060: W/dalvikvm(1675): threadid=1: thread exiting with uncaught exception (group=0x40d4c300)
09-19 09:50:13.060: E/AndroidRuntime(1675): FATAL EXCEPTION: main
09-19 09:50:13.060: E/AndroidRuntime(1675): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.Settings$DeviceInfoSettingsActivity}: java.lang.NullPointerException
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.access$600(ActivityThread.java:130)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.os.Looper.loop(Looper.java:137)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.main(ActivityThread.java:4745)
09-19 09:50:13.060: E/AndroidRuntime(1675): at java.lang.reflect.Method.invokeNative(Native Method)
09-19 09:50:13.060: E/AndroidRuntime(1675): at java.lang.reflect.Method.invoke(Method.java:511)
09-19 09:50:13.060: E/AndroidRuntime(1675): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-19 09:50:13.060: E/AndroidRuntime(1675): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-19 09:50:13.060: E/AndroidRuntime(1675): at dalvik.system.NativeStart.main(Native Method)
09-19 09:50:13.060: E/AndroidRuntime(1675): Caused by: java.lang.NullPointerException
09-19 09:50:13.060: E/AndroidRuntime(1675): at com.android.settings.Settings.onCreate(Settings.java:167)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.Activity.performCreate(Activity.java:5008)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
09-19 09:50:13.060: E/AndroidRuntime(1675): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
09-19 09:50:13.060: E/AndroidRuntime(1675): ... 11 more
09-19 09:50:13.090: W/ActivityManager(270): Force finishing activity com.android.settings/.Settings$DeviceInfoSettingsActivity
09-19 09:50:13.090: W/ActivityManager(270): Force finishing activity com.panasonic.tbexperience/.view.templates.TwoColumnsControlActivity
09-19 09:50:13.100: W/InputMethodManagerService(270): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41811de8 attribute=null
09-19 09:50:13.130: D/dalvikvm(1675): GC_CONCURRENT freed 187K, 4% free 6233K/6471K, paused 12ms+5ms, total 60ms
09-19 09:50:13.610: W/ActivityManager(270): Activity pause timeout for ActivityRecord{417ea2e0 com.android.settings/.Settings$DeviceInfoSettingsActivity}
09-19 09:50:13.820: D/dalvikvm(445): GC_FOR_ALLOC freed 1020K, 33% free 14790K/22023K, paused 41ms, total 41ms
09-19 09:50:13.960: D/dalvikvm(445): GC_FOR_ALLOC freed 1057K, 30% free 15633K/22023K, paused 39ms, total 39ms
09-19 09:50:14.010: D/dalvikvm(445): GC_FOR_ALLOC freed 362K, 24% free 16871K/22023K, paused 32ms, total 32ms
09-19 09:50:14.060: D/dalvikvm(445): GC_CONCURRENT freed 1289K, 20% free 17622K/22023K, paused 3ms+7ms, total 39ms
09-19 09:50:14.060: D/dalvikvm(445): WAIT_FOR_CONCURRENT_GC blocked 29ms
09-19 09:50:14.060: D/dalvikvm(445): WAIT_FOR_CONCURRENT_GC blocked 17ms
09-19 09:50:14.100: D/dalvikvm(445): GC_FOR_ALLOC freed 1693K, 25% free 16723K/22023K, paused 31ms, total 31ms
09-19 09:50:14.190: D/dalvikvm(445): GC_CONCURRENT freed 1126K, 21% free 17585K/22023K, paused 14ms+9ms, total 64ms
09-19 09:50:14.190: D/dalvikvm(445): WAIT_FOR_CONCURRENT_GC blocked 50ms
09-19 09:50:14.390: I/dalvikvm(270): Jit: resizing JitTable from 8192 to 16384
09-19 09:50:16.870: I/Process(1675): Sending signal. PID: 1675 SIG: 9
09-19 09:50:16.890: I/ActivityManager(270): Process com.android.settings (pid 1675) has died.
09-19 09:50:16.890: W/ActivityManager(270): Force removing ActivityRecord{4166f668 com.android.settings/.Settings$DeviceInfoSettingsActivity}: app died, no saved state
09-19 09:50:16.890: W/InputMethodManagerService(270): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#415f2878 attribute=null
09-19 09:50:32.250: D/dalvikvm(1552): GC_CONCURRENT freed 424K, 9% free 6942K/7559K, paused 12ms+3ms, total 39ms
Also, I tried to directly set the classname for this api...
Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.Settings$DeviceInfoSettingsActivity");
currentContext.startActivity(intent);
Same thing happens.It works for android 3.2 but doesn't work in 4.1.1. I've got a feeling that maybe I did not get the right class name for the 4.1.1 version. Does anyone know the direct class name to open the "About Tablet" page or whether is it possible to open that page programmatically?
Regards,
shuwen
android api doc say:
In some cases, a matching Activity may not exist, so ensure you safeguard against this.
so you should check this intent or catch this exception yourself.
I drew some markers (from one drawable) on a mapview but I would like to display a different number on each marker.
Numbers are stored into an array. I made a function to write text above drawable and here is what I did :
List<Overlay> mapOverlays = mapView.getOverlays();
GeoPoint geoPoint = null;
Drawable marker;
int size = addresses.length;
marker = writeOnDrawable(R.drawable.marker, "10");//my number to write here
itemizedOverlay = new ItemizedOverlay(marker, mapView);
for(int i = 0; i < size; i++) {
geoPoint = new GeoPoint((int) (latitudes[i] * 1E6), (int) (longitudes[i] * 1E6));
itemizedOverlay.addOverlay(new OverlayItem(geoPoint, addresses[i], ""));
}
mapOverlays.add(itemizedOverlay);
However, in this code, I am displaying the same number for all the markers and I would like to use my array of number to display a different number for each of them.
Does this mean I have to use as many ItemizedOverlay as I have numbers?
Or do you have any suggestions?
I finally got it work by using several ItemizedOverlay.
I put this at the beginning of the for loop:
itemizedOverlay = new ItemizedOverlay(marker, mapView);
and this as well at the end:
mapOverlays.add(itemizedOverlay);
Everything worked fine on my device (GN) until I tested it on the VM where I got this:
09-02 09:36:56.335: E/dalvikvm-heap(231): 20424-byte external allocation too large for this process.
09-02 09:36:56.335: E/(231): VM won't let us allocate 20424 bytes
09-02 09:36:56.335: W/dalvikvm(231): threadid=3: thread exiting with uncaught exception (group=0x4001aa28)
09-02 09:36:56.335: E/AndroidRuntime(231): Uncaught handler: thread main exiting due to uncaught exception
09-02 09:36:56.386: E/AndroidRuntime(231): android.view.InflateException: Binary XML file line #2: Error inflating class java.lang.reflect.Constructor
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.LayoutInflater.createView(LayoutInflater.java:512)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.readystatesoftware.mapviewballoons.BalloonOverlayView.setupView(BalloonOverlayView.java:79)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.readystatesoftware.mapviewballoons.BalloonOverlayView.<init>(BalloonOverlayView.java:58)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.readystatesoftware.mapviewballoons.BalloonItemizedOverlay.createBalloonOverlayView(BalloonItemizedOverlay.java:151)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.readystatesoftware.mapviewballoons.BalloonItemizedOverlay.createAndDisplayBalloonOverlay(BalloonItemizedOverlay.java:284)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.readystatesoftware.mapviewballoons.BalloonItemizedOverlay.onTap(BalloonItemizedOverlay.java:126)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.google.android.maps.ItemizedOverlay.onTap(ItemizedOverlay.java:453)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.google.android.maps.OverlayBundle.onTap(OverlayBundle.java:83)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.google.android.maps.MapView$1.onSingleTapUp(MapView.java:346)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.GestureDetector.onTouchEvent(GestureDetector.java:506)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.google.android.maps.MapView.onTouchEvent(MapView.java:628)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.readystatesoftware.maps.TapControlledMapView.onTouchEvent(TapControlledMapView.java:62)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.View.dispatchTouchEvent(View.java:3672)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:850)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1712)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1202)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.app.Activity.dispatchTouchEvent(Activity.java:1987)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1696)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.os.Handler.dispatchMessage(Handler.java:99)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.os.Looper.loop(Looper.java:123)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.app.ActivityThread.main(ActivityThread.java:4203)
09-02 09:36:56.386: E/AndroidRuntime(231): at java.lang.reflect.Method.invokeNative(Native Method)
09-02 09:36:56.386: E/AndroidRuntime(231): at java.lang.reflect.Method.invoke(Method.java:521)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
09-02 09:36:56.386: E/AndroidRuntime(231): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
09-02 09:36:56.386: E/AndroidRuntime(231): at dalvik.system.NativeStart.main(Native Method)
09-02 09:36:56.386: E/AndroidRuntime(231): Caused by: java.lang.reflect.InvocationTargetException
09-02 09:36:56.386: E/AndroidRuntime(231): at android.widget.LinearLayout.<init>(LinearLayout.java:92)
09-02 09:36:56.386: E/AndroidRuntime(231): at java.lang.reflect.Constructor.constructNative(Native Method)
09-02 09:36:56.386: E/AndroidRuntime(231): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view.LayoutInflater.createView(LayoutInflater.java:499)
09-02 09:36:56.386: E/AndroidRuntime(231): ... 35 more
09-02 09:36:56.386: E/AndroidRuntime(231): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
09-02 09:36:56.386: E/AndroidRuntime(231): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:439)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:322)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:688)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.content.res.Resources.loadDrawable(Resources.java:1710)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.content.res.Resources.getDrawable(Resources.java:585)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:146)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:779)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:720)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.content.res.Resources.loadDrawable(Resources.java:1695)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
09-02 09:36:56.386: E/AndroidRuntime(231): at android.view
As I feared, it takes a lot of memory... is there a way to avoid this?
Do you think this will also happen on low memory devices?
After the program running,click the send button,then pop-up dialog said the program has already exited。
I don‘t know what is the problem,how can I fix it?
Is there anybody has the same issue,can you help me?
package com.secion9.clienttest;
import android.os.Bundle;
import android.app.Activity;
import android.widget.*;
import java.net.Socket;
import java.io.IOException;
import java.io.OutputStream;
import android.view.View;
import android.view.View.OnClickListener;
public class ClientActivity extends Activity {
Button btSend;
EditText etMsg;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_client);
btSend=(Button)this.findViewById(R.id.button1);
etMsg=(EditText)this.findViewById(R.id.EditText1);
btSend.setOnClickListener(
new OnClickListener(){
public void onClick(View v)
{
try
{
Socket socket=new Socket("127.0.0.1",5050);
OutputStream outputStream=socket.getOutputStream();
byte[] buffer=etMsg.getText().toString().getBytes();
outputStream.write(buffer);
outputStream.flush();
}
catch(IOException e)
{
e.printStackTrace();
}
}
});
}
}
logcat
09-02 08:24:31.189: E/Trace(627): error opening trace file: No such file or directory (2)
09-02 08:24:32.259: D/gralloc_goldfish(627): Emulator without GPU emulation detected.
09-02 08:24:32.598: I/Choreographer(627): Skipped 40 frames! The application may be doing too much work on its main thread.
09-02 08:25:04.471: D/AndroidRuntime(627): Shutting down VM
09-02 08:25:04.471: W/dalvikvm(627): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
09-02 08:25:04.539: E/AndroidRuntime(627): FATAL EXCEPTION: main
09-02 08:25:04.539: E/AndroidRuntime(627): android.os.NetworkOnMainThreadException
09-02 08:25:04.539: E/AndroidRuntime(627): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
09-02 08:25:04.539: E/AndroidRuntime(627): at libcore.io.BlockGuardOs.connect(BlockGuardOs.java:84)
09-02 08:25:04.539: E/AndroidRuntime(627): at libcore.io.IoBridge.connectErrno(IoBridge.java:127)
09-02 08:25:04.539: E/AndroidRuntime(627): at libcore.io.IoBridge.connect(IoBridge.java:112)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.net.Socket.startupSocket(Socket.java:566)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.net.Socket.tryAllAddresses(Socket.java:127)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.net.Socket.<init>(Socket.java:177)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.net.Socket.<init>(Socket.java:149)
09-02 08:25:04.539: E/AndroidRuntime(627): at com.secion9.clienttest.ClientActivity$1.onClick(ClientActivity.java:31)
09-02 08:25:04.539: E/AndroidRuntime(627): at android.view.View.performClick(View.java:4084)
09-02 08:25:04.539: E/AndroidRuntime(627): at android.view.View$PerformClick.run(View.java:16966)
09-02 08:25:04.539: E/AndroidRuntime(627): at android.os.Handler.handleCallback(Handler.java:615)
09-02 08:25:04.539: E/AndroidRuntime(627): at android.os.Handler.dispatchMessage(Handler.java:92)
09-02 08:25:04.539: E/AndroidRuntime(627): at android.os.Looper.loop(Looper.java:137)
09-02 08:25:04.539: E/AndroidRuntime(627): at android.app.ActivityThread.main(ActivityThread.java:4745)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.lang.reflect.Method.invokeNative(Native Method)
09-02 08:25:04.539: E/AndroidRuntime(627): at java.lang.reflect.Method.invoke(Method.java:511)
09-02 08:25:04.539: E/AndroidRuntime(627): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-02 08:25:04.539: E/AndroidRuntime(627): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-02 08:25:04.539: E/AndroidRuntime(627): at dalvik.system.NativeStart.main(Native Method)
09-02 08:25:07.079: I/Process(627): Sending signal. PID: 627 SIG: 9
It sounds like you're doing networking on the main thread. That's a no-no:
http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html
SOLUTION:
Modify your app so that it spawns off a thread or async task to do the network I/O.
Here's a good link that discusses how:
http://www.vogella.com/articles/AndroidPerformance/article.html
Have put in AndroidManifest.xml Internet permission?
Regards,
Skipped 40 frames! The application may be doing too much work on its main thread.
and
NetworkOnMainThreadException
Are there to tell you that you're blocking the main thread, which causes and ANR and the app can get killed :)
Try to implement your network stuff on a background thread, or with an AsyncTask
According to the documentation at [Android Developers][1]:
The exception that is thrown when an application attempts to perform a
networking operation on its main thread.
This is only thrown for applications targeting the Honeycomb SDK or
higher. Applications targeting earlier SDK versions are allowed to do
networking on their main event loop threads, but it's heavily
discouraged.
So you need to target a lower SDK or make a new thread for handling networks connections.
I'm designing an application that allows the user to retrieve his data from the server, I'm furnishing this using two different activities, the first one receives the username as a text input and the second one displays the user's data based on the username. I'm using JSON schema for storing and retrieving the data. The app works fine for the first time but when I logout from the second screen using finish() and try to re-enter a new username in the first screen "the app force closes". This has been giving me sleepless nights, want to be overwhelmed with your support.
12-04 16:28:35.289: D/dalvikvm(553): GC_FOR_ALLOC freed 64K, 4% free 6893K/7171K, paused 64ms
12-04 16:28:35.299: I/dalvikvm-heap(553): Grow heap (frag case) to 7.757MB for 1000016-byte allocation
12-04 16:28:35.399: D/dalvikvm(553): GC_CONCURRENT freed 1K, 5% free 7868K/8199K, paused 16ms+3ms
12-04 16:28:35.529: D/dalvikvm(553): GC_FOR_ALLOC freed <1K, 5% free 7869K/8199K, paused 31ms
12-04 16:28:35.539: I/dalvikvm-heap(553): Grow heap (frag case) to 8.180MB for 443572-byte allocation
12-04 16:28:35.589: D/dalvikvm(553): GC_CONCURRENT freed 0K, 4% free 8302K/8647K, paused 3ms+5ms
12-04 16:28:35.889: D/gralloc_goldfish(553): Emulator without GPU emulation detected.
12-04 16:29:16.819: D/dalvikvm(553): GC_FOR_ALLOC freed 1079K, 14% free 7509K/8711K, paused 221ms
12-04 16:29:16.829: I/dalvikvm-heap(553): Grow heap (frag case) to 8.360MB for 1000016-byte allocation
12-04 16:29:16.889: D/dalvikvm(553): GC_CONCURRENT freed 2K, 3% free 8483K/8711K, paused 4ms+4ms
12-04 16:29:17.229: D/dalvikvm(553): GC_CONCURRENT freed 1016K, 13% free 7979K/9159K, paused 3ms+11ms
12-04 16:29:18.149: E/log_tag(553): Error parsing data org.json.JSONException: No value for Alert
12-04 16:29:20.949: D/dalvikvm(553): GC_CONCURRENT freed 274K, 12% free 8090K/9159K, paused 6ms+5ms
12-04 16:29:26.259: E/log_tag(553): Error parsing data org.json.JSONException: No value for Alert
12-04 16:29:26.859: D/AndroidRuntime(553): Shutting down VM
12-04 16:29:26.859: W/dalvikvm(553): threadid=1: thread exiting with uncaught exception (group=0x409951f8)
12-04 16:29:26.929: E/AndroidRuntime(553): FATAL EXCEPTION: main
12-04 16:29:26.929: E/AndroidRuntime(553): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bombil.kustomizer/com.bombil.kustomizer.Menus}: java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1955)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1980)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.ActivityThread.access$600(ActivityThread.java:122)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1146)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.os.Looper.loop(Looper.java:137)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.ActivityThread.main(ActivityThread.java:4340)
12-04 16:29:26.929: E/AndroidRuntime(553): at java.lang.reflect.Method.invokeNative(Native Method)
12-04 16:29:26.929: E/AndroidRuntime(553): at java.lang.reflect.Method.invoke(Method.java:511)
12-04 16:29:26.929: E/AndroidRuntime(553): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-04 16:29:26.929: E/AndroidRuntime(553): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-04 16:29:26.929: E/AndroidRuntime(553): at dalvik.system.NativeStart.main(Native Method)
12-04 16:29:26.929: E/AndroidRuntime(553): Caused by: java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
12-04 16:29:26.929: E/AndroidRuntime(553): at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:251)
12-04 16:29:26.929: E/AndroidRuntime(553): at java.util.ArrayList.get(ArrayList.java:304)
12-04 16:29:26.929: E/AndroidRuntime(553): at com.bombil.kustomizer.Menus.AddEditText(Menus.java:309)
12-04 16:29:26.929: E/AndroidRuntime(553): at com.bombil.kustomizer.Menus.AddInsertView(Menus.java:121)
12-04 16:29:26.929: E/AndroidRuntime(553): at com.bombil.kustomizer.Menus.onCreate(Menus.java:88)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.Activity.performCreate(Activity.java:4465)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
12-04 16:29:26.929: E/AndroidRuntime(553): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1919)
12-04 16:29:26.929: E/AndroidRuntime(553): ... 11 more
12-04 16:29:27.009: D/dalvikvm(553): GC_CONCURRENT freed 273K, 10% free 8248K/9159K, paused 4ms+6ms
12-04 16:32:56.799: I/Process(553): Sending signal. PID: 553 SIG: 9
Apparently, you're trying to access an object in an ArrayList at in your Menus.java file at line 309. You're trying to access the object with the index of 2, but the total ArrayList size is only 2, meaning the highest index would be 1. This causes an IndexOutOfBounds exception as shown here:
ComponentInfo{com.bombil.kustomizer/com.bombil.kustomizer.Menus}:
java.lang.IndexOutOfBoundsException: Invalid index 2, size is 2
E/AndroidRuntime(553): at com.bombil.kustomizer.Menus.AddEditText(Menus.java:309)
Do you have any objects that are being used by both activities? I know I saw this issue once with a project. One of the activities was messing up the HTTPClient object for the other activity. If you are getting a null exception being thrown try and find the variable. If it is a shared resource for both activities then just make sure to deal with it in a clean way when you exit the second activity.
I am trying to make a phone call on a list item click.
Here is my code for the onclick listener:
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse("tel:5173237929"));
startActivity(intent);
}
});
And here is the permission i have in my manifest:
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
Why this is not working is beyond me.... Im creating the intent, and starting it, and then it force closes when i test it??? I feel like you guys on stack can solve this no prob =)
Edit:
[2011-08-27 09:43:00 - HelloListView] ------------------------------
[2011-08-27 09:43:00 - HelloListView] Android Launch!
[2011-08-27 09:43:00 - HelloListView] adb is running normally.
[2011-08-27 09:43:00 - HelloListView] Performing com.hlv.kk.HelloListView activity launch
[2011-08-27 09:43:04 - HelloListView] WARNING: Application does not specify an API levelrequirement!
[2011-08-27 09:43:04 - HelloListView] Device API version is 8 (Android 2.2.2)
[2011-08-27 09:43:05 - HelloListView] Application already deployed. No need to reinstall.
[2011-08-27 09:43:05 - HelloListView] Starting activity com.hlv.kk.HelloListView on device 04036CA51900D00F
[2011-08-27 09:43:05 - HelloListView] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.hlv.kk/.HelloListView }
Edit #2:
09-02 20:25:06.874: INFO/ActivityManager(6146): Starting activity: Intent { act=android.intent.action.CHOOSER cmp=android/com.android.internal.app.ChooserActivity (has extras) }
09-02 20:25:07.030: INFO/ActivityManager(6146): Starting activity: Intent { act=android.intent.action.CALL dat=tel:5173237929 flg=0x3000000 cmp=com.android.phone/.OutgoingCallBroadcaster }
09-02 20:25:07.045: WARN/ActivityManager(6146): Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:5173237929 flg=0x3000000 cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{44a5f890 8386:com.hlv.kk/10051} (pid=8386, uid=10051) requires android.permission.CALL_PHONE
09-02 20:25:07.061: DEBUG/AndroidRuntime(8386): Shutting down VM
09-02 20:25:07.061: WARN/dalvikvm(8386): threadid=1: thread exiting with uncaught exception (group=0x4001d7e0)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): FATAL EXCEPTION: main
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.android.internal.app.ChooserActivity}: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:5173237929 flg=0x3000000 cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{44a5f890 8386:com.hlv.kk/10051} (pid=8386, uid=10051) requires android.permission.CALL_PHONE
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.os.Handler.dispatchMessage(Handler.java:99)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.os.Looper.loop(Looper.java:123)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at java.lang.reflect.Method.invokeNative(Native Method)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at java.lang.reflect.Method.invoke(Method.java:521)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at dalvik.system.NativeStart.main(Native Method)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): Caused by: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.CALL dat=tel:5173237929 flg=0x3000000 cmp=com.android.phone/.OutgoingCallBroadcaster } from ProcessRecord{44a5f890 8386:com.hlv.kk/10051} (pid=8386, uid=10051) requires android.permission.CALL_PHONE
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.os.Parcel.readException(Parcel.java:1247)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.os.Parcel.readException(Parcel.java:1235)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1298)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1373)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.Activity.startActivityForResult(Activity.java:2817)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.Activity.startActivity(Activity.java:2923)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at com.android.internal.app.ResolverActivity.onCreate(ResolverActivity.java:95)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at com.android.internal.app.ChooserActivity.onCreate(ChooserActivity.java:54)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
09-02 20:25:07.100: ERROR/AndroidRuntime(8386): ... 11 more
09-02 20:25:07.147: WARN/ActivityManager(6146): Force finishing activity android/com.android.internal.app.ChooserActivity
09-02 20:25:07.147: WARN/ActivityManager(6146): Force finishing activity com.hlv.kk/.HelloListView
09-02 20:25:07.647: WARN/ActivityManager(6146): Activity pause timeout for HistoryRecord{44ad1490 android/com.android.internal.app.ChooserActivity}
09-02 20:25:07.819: INFO/ActivityManager(6146): No longer want com.google.android.gallery3d (pid 8199): hidden #16
09-02 20:25:10.210: INFO/Process(8386): Sending signal. PID: 8386 SIG: 9
09-02 20:25:10.217: INFO/ActivityManager(6146): Process com.hlv.kk (pid 8386) has died.
09-02 20:25:10.217: INFO/WindowManager(6146): WIN DEATH: Window{44a05de8 com.hlv.kk/com.hlv.kk.HelloListView paused=false}
09-02 20:25:10.264: WARN/InputManagerService(6146): Got RemoteException sending setActive(false) notification to pid 8386 uid 10051
09-02 20:25:12.092: INFO/WindowManager(6146): Setting rotation to 3, animFlags=0
09-02 20:25:12.116: INFO/ActivityManager(6146): Config changed: { scale=1.0 imsi=310/4 loc=en_US touch=3 keys=2/1/2 nav=2/2 orien=2 layout=34 uiMode=17 seq=45}
09-02 20:25:12.163: INFO/UsageStats(6146): Unexpected resume of com.android.launcher while already resumed in com.android.launcher
09-02 20:25:13.186: DEBUG/dalvikvm(6224): GC_EXPLICIT freed 11518 objects / 579136 bytes in 69ms
I forgot to add the permission =/
My mistake lol
But for ppl who stumble on this page, if your having these same problems make sure you have added:
<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>
To your manifest file right above the closing manifest tag
</manifest>
At the end of your manifest file
Sorry everybody else for wasting ur time
Try this one:
startActivity(Intent.createChooser(intent, "phone"));
instead of startActivity(intent)
EDIT:
Just a guess, but make sure that your permission is outside of the application tag:
<uses-permission android:name="android.permission.CALL_PHONE" />
<application ......