NullPointerExeption Android - android

I am having problems locating the nullpointerexeption that keeps coming up. The log cat does not show a "caused by" tag and that is what is making it difficult to find out what the actual problem is. If anyone could just guide me to finding out what the problem is then that would be great. I have also tried running the debugger and I get the provided error, but I have no clue what to do about it. Below is the error messages that I keep getting, and if need be I will post the code.
Debugger:
Thread [<1> main] (Suspended (exception NullPointerException))
<VM does not provide monitor information>
Choreographer.doCallbacks(int, long) line: 565
Choreographer.doFrame(long, int) line: 532
Choreographer$FrameDisplayEventReceiver.run() line: 735
Handler.handleCallback(Message) line: 725
Choreographer$FrameHandler(Handler).dispatchMessage(Message) line: 92
Looper.loop() line: 137
ActivityThread.main(String[]) line: 5329
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 511
ZygoteInit$MethodAndArgsCaller.run() line: 1102
ZygoteInit.main(String[]) line: 869
NativeStart.main(String[]) line: not available [native method]
Log Cat Error:
10-09 13:14:35.675: D/dalvikvm(12528): GC_CONCURRENT freed 825K, 9% free 35986K/39424K, paused 3ms+6ms, total 26ms
10-09 13:14:35.675: D/dalvikvm(12528): WAIT_FOR_CONCURRENT_GC blocked 2ms
10-09 13:14:35.705: I/endeffect(12528): AbsListView.onMeasure(), getWidth()=1080, getHeight()=1806, this=android.widget.ExpandableListView{43a168c0 VFED.VC. .F....ID 0,0-1080,1806 #7f060023 app:id/exp_list_view_deals_events}
10-09 13:14:35.705: D/AndroidRuntime(12528): Shutting down VM
10-09 13:14:35.705: W/dalvikvm(12528): threadid=1: thread exiting with uncaught exception (group=0x41467ac8)
10-09 13:14:35.716: E/AndroidRuntime(12528): FATAL EXCEPTION: main
10-09 13:14:35.716: E/AndroidRuntime(12528): java.lang.NullPointerException
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.AbsListView.obtainView(AbsListView.java:2615)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.ListView.measureHeightOfChildren(ListView.java:1253)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.ListView.onMeasure(ListView.java:1165)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4923)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4923)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:681)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4923)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4923)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4923)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1410)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:4923)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
10-09 13:14:35.716: E/AndroidRuntime(12528): at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2414)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.View.measure(View.java:16059)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2133)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1286)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1497)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1183)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4863)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.Choreographer.doCallbacks(Choreographer.java:562)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.Choreographer.doFrame(Choreographer.java:532)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.os.Handler.handleCallback(Handler.java:725)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.os.Looper.loop(Looper.java:137)
10-09 13:14:35.716: E/AndroidRuntime(12528): at android.app.ActivityThread.main(ActivityThread.java:5329)
10-09 13:14:35.716: E/AndroidRuntime(12528): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 13:14:35.716: E/AndroidRuntime(12528): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 13:14:35.716: E/AndroidRuntime(12528): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
10-09 13:14:35.716: E/AndroidRuntime(12528): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
10-09 13:14:35.716: E/AndroidRuntime(12528): at dalvik.system.NativeStart.main(Native Method)

You are return null in your getView() function.
See here:
Crash in ListView at AbsListView.obtainView for ListActivity

Related

Worklight app crashes when receiving push notification

Hi I have developed a Worklight application for android which uses Bluemix IBM Push, when I receive the notification, if the app is closed, it works fine and opens the app, but when the app is open the app crashes with the following error.
10-09 18:13:00.676: E/AndroidRuntime(4665): FATAL EXCEPTION: main
10-09 18:13:00.676: E/AndroidRuntime(4665): java.lang.ClassCastException: com.ibm.mobile.services.push.internal.InternalPushMessage cannot be cast to com.worklight.androidgap.push.GCMIntentService$Message
10-09 18:13:00.676: E/AndroidRuntime(4665): at com.worklight.androidgap.plugin.Push.onNewIntent(Push.java:193)
10-09 18:13:00.676: E/AndroidRuntime(4665): at org.apache.cordova.PluginManager.onNewIntent(PluginManager.java:371)
10-09 18:13:00.676: E/AndroidRuntime(4665): at org.apache.cordova.CordovaWebView.onNewIntent(CordovaWebView.java:874)
10-09 18:13:00.676: E/AndroidRuntime(4665): at org.apache.cordova.CordovaActivity.onNewIntent(CordovaActivity.java:702)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1225)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2472)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.app.ActivityThread.performNewIntents(ActivityThread.java:2485)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2494)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.app.ActivityThread.access$1400(ActivityThread.java:165)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1444)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.os.Handler.dispatchMessage(Handler.java:107)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.os.Looper.loop(Looper.java:194)
10-09 18:13:00.676: E/AndroidRuntime(4665): at android.app.ActivityThread.main(ActivityThread.java:5391)
10-09 18:13:00.676: E/AndroidRuntime(4665): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 18:13:00.676: E/AndroidRuntime(4665): at java.lang.reflect.Method.invoke(Method.java:525)
10-09 18:13:00.676: E/AndroidRuntime(4665): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
10-09 18:13:00.676: E/AndroidRuntime(4665): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
10-09 18:13:00.676: E/AndroidRuntime(4665): at dalvik.system.NativeStart.main(Native Method)
10-09 18:13:00.677: D/WLClient(4665): WLClient$ActivityListener.onActivityPaused in WLClient.java:1155 :: on activity paused com.Techathon.Techathon . activity count = 0
10-09 18:13:00.683: D/NONE(4665): Flush called
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): Logger$UncaughtExceptionHandler.uncaughtException in Logger.java:402 :: Uncaught Exception
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): java.lang.ClassCastException: com.ibm.mobile.services.push.internal.InternalPushMessage cannot be cast to com.worklight.androidgap.push.GCMIntentService$Message
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at com.worklight.androidgap.plugin.Push.onNewIntent(Push.java:193)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at org.apache.cordova.PluginManager.onNewIntent(PluginManager.java:371)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at org.apache.cordova.CordovaWebView.onNewIntent(CordovaWebView.java:874)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at org.apache.cordova.CordovaActivity.onNewIntent(CordovaActivity.java:702)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1225)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:2472)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.app.ActivityThread.performNewIntents(ActivityThread.java:2485)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.app.ActivityThread.handleNewIntent(ActivityThread.java:2494)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.app.ActivityThread.access$1400(ActivityThread.java:165)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1444)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.os.Handler.dispatchMessage(Handler.java:107)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.os.Looper.loop(Looper.java:194)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at android.app.ActivityThread.main(ActivityThread.java:5391)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at java.lang.reflect.Method.invoke(Method.java:525)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
10-09 18:13:00.718: E/com.worklight.common.Logger$UncaughtExceptionHandler(4665): at dalvik.system.NativeStart.main(Native Method)
10-09 18:13:02.586: I/Process(4665): Sending signal. PID: 4665 SIG: 9
I have setup my enviroment according the link provided here http://mbaas-gettingstarted.ng.bluemix.net/hybrid
Have you tried editing your AndroidManifest.xml to remove the references to GCMIntentService?
You might be able to comment out the sections as explained here:
https://developer.ibm.com/answers/questions/19343/double-push-notifications/?smartspace=bluemix
That way you will be only using the Bluemix Push SDK to respond to push notifications. Hopefully avoiding that error entirely.
EDIT: After some playing around I figured out that the Push plugin was to blame for the conflicting SDKs. After I commented out the Worklight Push plugin in the config.xml the error disappeared.
Comment these lines and try again:
<feature name="Push">
<param name="android-package" value="com.worklight.androidgap.plugin.Push" />
</feature>

Android Fragment IllegalStateException

Here's the output I'm taking about:
10-09 21:57:56.344: W/dalvikvm(3141): threadid=1: thread exiting with uncaught exception (group=0x40cb8378)
10-09 21:57:56.364: E/AndroidRuntime(3141): FATAL EXCEPTION: main
10-09 21:57:56.364: E/AndroidRuntime(3141): java.lang.IllegalStateException: Activity has been destroyed
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1329)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:548)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:532)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.trade.MainActivity.showFragment(MainActivity.java:85)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.trade.MainActivity.showSettingsFragment(MainActivity.java:179)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.trade.Home.setting(Home.java:40)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.trade.Home.onOptionsItemSelected(Home.java:31)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.app.Activity.onMenuItemSelected(Activity.java:2534)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:353)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:964)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.android.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:735)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:149)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:874)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.android.internal.view.menu.ListMenuPresenter.onItemClick(ListMenuPresenter.java:166)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.widget.AdapterView.performItemClick(AdapterView.java:298)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.widget.AbsListView.performItemClick(AbsListView.java:1086)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2859)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.widget.AbsListView$1.run(AbsListView.java:3533)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.os.Handler.handleCallback(Handler.java:615)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.os.Looper.loop(Looper.java:213)
10-09 21:57:56.364: E/AndroidRuntime(3141): at android.app.ActivityThread.main(ActivityThread.java:4787)
10-09 21:57:56.364: E/AndroidRuntime(3141): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 21:57:56.364: E/AndroidRuntime(3141): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
10-09 21:57:56.364: E/AndroidRuntime(3141): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
10-09 21:57:56.364: E/AndroidRuntime(3141): at dalvik.system.NativeStart.main(Native Method)
10-09 21:57:58.847: I/Process(3141): Sending signal. PID: 3141 SIG: 9
The exception is unknown to me. Please help me understand it.
Thanks
I will try my best to answer your general question in a general regard to the excpetion, since that is what you asked. If you want specific help for a specific bug in your application you will need to post your MainActivity here (especially the parts around line 85).
The excpetion you are getting is an android system exception that is there to tell you that you are operating on an Activity that is not "alive" anymore. This is surprisingly easy to achieve and has most likely to do with improper variable householding (or improper instance householding as was mentioned in the comments below your question. Do not build Activity instances yourself via the new operator). An example might be as follows
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class MyActivity extends Activity {
public static Activity instance;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (instance != null) {
instance.setContentView(R.layout.myLayout);
}
instance = this;
finish();
startActivity(new Intent(this, MyActivity.class));
}
}
As you might recognize in this simple example, the variable instance is only read upon the first re-entrance into the activity! But there is still a reference to the old (now "dead") activity in there. So what should the system do? Perform an action on this "dead" activity? No, it will give you the above seen exception
So in short: it is very likely that you either have a Fragment, a Dialog or another integral part of the UI "operating on" a "dead" activity (operating on = using a reference to it or some resources (FragmentManager...) from it)
As I said your error is probably very easy to fix, give us your code and we'll be able to help. But maybe you are even able to fix it yourself using the above information - which would surely be more satisfactory to yourself I guess :)

android parcel read exception

this is the follow up question to this one
I get the following stack logcat parcel read ecception why do I get this
10-09 10:27:27.993: I/dalvikvm(825): threadid=3: reacting to signal 3
10-09 10:27:28.093: I/dalvikvm(825): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:27:28.422: D/gralloc_goldfish(825): Emulator without GPU emulation detected.
10-09 10:28:45.692: W/ActivityThread(872): Application com.example.sms is waiting for the debugger on port 8100...
10-09 10:28:45.793: I/System.out(872): Sending WAIT chunk
10-09 10:28:45.813: I/dalvikvm(872): Debugger is active
10-09 10:28:45.833: I/System.out(872): Debugger has connected
10-09 10:28:45.853: I/System.out(872): waiting for debugger to settle...
10-09 10:28:46.063: I/System.out(872): waiting for debugger to settle...
10-09 10:28:46.263: I/System.out(872): waiting for debugger to settle...
10-09 10:28:46.273: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:28:46.312: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:28:46.462: I/System.out(872): waiting for debugger to settle...
10-09 10:28:46.662: I/System.out(872): waiting for debugger to settle...
10-09 10:28:46.783: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:28:46.793: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:28:46.863: I/System.out(872): waiting for debugger to settle...
10-09 10:28:47.072: I/System.out(872): waiting for debugger to settle...
10-09 10:28:47.263: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:28:47.293: I/System.out(872): waiting for debugger to settle...
10-09 10:28:47.293: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:28:47.492: I/System.out(872): waiting for debugger to settle...
10-09 10:28:47.692: I/System.out(872): waiting for debugger to settle...
10-09 10:28:47.763: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:28:47.773: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:28:47.893: I/System.out(872): waiting for debugger to settle...
10-09 10:28:48.100: I/System.out(872): debugger has settled (1441)
10-09 10:28:48.273: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:28:48.402: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:28:48.773: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:28:48.813: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:28:49.213: D/gralloc_goldfish(872): Emulator without GPU emulation detected.
10-09 10:28:49.282: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:28:49.322: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:29:00.063: D/AndroidRuntime(872): Shutting down VM
10-09 10:29:00.063: W/dalvikvm(872): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-09 10:29:00.203: E/AndroidRuntime(872): FATAL EXCEPTION: main
10-09 10:29:00.203: E/AndroidRuntime(872): java.lang.NullPointerException
10-09 10:29:00.203: E/AndroidRuntime(872): at android.os.Parcel.readException(Parcel.java:1333)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.os.Parcel.readException(Parcel.java:1281)
10-09 10:29:00.203: E/AndroidRuntime(872): at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:413)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:87)
10-09 10:29:00.203: E/AndroidRuntime(872): at com.example.sms.SendSMSActivity.sendSMS(SendSMSActivity.java:134)
10-09 10:29:00.203: E/AndroidRuntime(872): at com.example.sms.SendSMSActivity.access$0(SendSMSActivity.java:74)
10-09 10:29:00.203: E/AndroidRuntime(872): at com.example.sms.SendSMSActivity$1.onClick(SendSMSActivity.java:59)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.view.View.performClick(View.java:3511)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.view.View$PerformClick.run(View.java:14105)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.os.Handler.handleCallback(Handler.java:605)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.os.Looper.loop(Looper.java:137)
10-09 10:29:00.203: E/AndroidRuntime(872): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-09 10:29:00.203: E/AndroidRuntime(872): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 10:29:00.203: E/AndroidRuntime(872): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 10:29:00.203: E/AndroidRuntime(872): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-09 10:29:00.203: E/AndroidRuntime(872): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-09 10:29:00.203: E/AndroidRuntime(872): at dalvik.system.NativeStart.main(Native Method)
10-09 10:29:00.803: I/dalvikvm(872): threadid=3: reacting to signal 3
10-09 10:29:00.823: I/dalvikvm(872): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:29:48.632: I/dalvikvm(920): threadid=3: reacting to signal 3
10-09 10:29:48.793: I/dalvikvm(920): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:29:49.133: I/dalvikvm(920): threadid=3: reacting to signal 3
10-09 10:29:49.173: I/dalvikvm(920): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:29:49.203: D/gralloc_goldfish(920): Emulator without GPU emulation detected.
10-09 10:30:34.003: W/ActivityThread(960): Application com.example.sms is waiting for the debugger on port 8100...
10-09 10:30:34.093: I/System.out(960): Sending WAIT chunk
10-09 10:30:34.103: I/dalvikvm(960): Debugger is active
10-09 10:30:34.113: I/System.out(960): Debugger has connected
10-09 10:30:34.163: I/System.out(960): waiting for debugger to settle...
10-09 10:30:34.362: I/System.out(960): waiting for debugger to settle...
10-09 10:30:34.432: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:30:34.442: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:30:34.562: I/System.out(960): waiting for debugger to settle...
10-09 10:30:34.763: I/System.out(960): waiting for debugger to settle...
10-09 10:30:34.923: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:30:34.933: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:30:34.963: I/System.out(960): waiting for debugger to settle...
10-09 10:30:35.170: I/System.out(960): waiting for debugger to settle...
10-09 10:30:35.371: I/System.out(960): waiting for debugger to settle...
10-09 10:30:35.442: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:30:35.462: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:30:35.573: I/System.out(960): waiting for debugger to settle...
10-09 10:30:35.773: I/System.out(960): waiting for debugger to settle...
10-09 10:30:35.953: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:30:36.013: I/System.out(960): waiting for debugger to settle...
10-09 10:30:36.013: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:30:36.215: I/System.out(960): debugger has settled (1432)
10-09 10:30:36.452: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:30:36.582: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:30:36.953: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:30:36.983: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:30:37.462: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:30:37.472: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:30:37.502: D/gralloc_goldfish(960): Emulator without GPU emulation detected.
10-09 10:31:08.195: D/AndroidRuntime(960): Shutting down VM
10-09 10:31:08.195: W/dalvikvm(960): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-09 10:31:08.292: E/AndroidRuntime(960): FATAL EXCEPTION: main
10-09 10:31:08.292: E/AndroidRuntime(960): java.lang.NullPointerException
10-09 10:31:08.292: E/AndroidRuntime(960): at android.os.Parcel.readException(Parcel.java:1333)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.os.Parcel.readException(Parcel.java:1281)
10-09 10:31:08.292: E/AndroidRuntime(960): at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:413)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:87)
10-09 10:31:08.292: E/AndroidRuntime(960): at com.example.sms.SendSMSActivity.sendSMS(SendSMSActivity.java:134)
10-09 10:31:08.292: E/AndroidRuntime(960): at com.example.sms.SendSMSActivity.access$0(SendSMSActivity.java:74)
10-09 10:31:08.292: E/AndroidRuntime(960): at com.example.sms.SendSMSActivity$1.onClick(SendSMSActivity.java:57)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.view.View.performClick(View.java:3511)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.view.View$PerformClick.run(View.java:14105)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.os.Handler.handleCallback(Handler.java:605)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.os.Looper.loop(Looper.java:137)
10-09 10:31:08.292: E/AndroidRuntime(960): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-09 10:31:08.292: E/AndroidRuntime(960): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 10:31:08.292: E/AndroidRuntime(960): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 10:31:08.292: E/AndroidRuntime(960): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-09 10:31:08.292: E/AndroidRuntime(960): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-09 10:31:08.292: E/AndroidRuntime(960): at dalvik.system.NativeStart.main(Native Method)
10-09 10:31:08.913: I/dalvikvm(960): threadid=3: reacting to signal 3
10-09 10:31:08.923: I/dalvikvm(960): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:31:11.983: I/Process(960): Sending signal. PID: 960 SIG: 9
10-09 10:31:28.392: I/dalvikvm(1008): threadid=3: reacting to signal 3
10-09 10:31:28.492: I/dalvikvm(1008): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:31:28.843: D/gralloc_goldfish(1008): Emulator without GPU emulation detected.
10-09 10:31:32.713: D/AndroidRuntime(1008): Shutting down VM
10-09 10:31:32.713: W/dalvikvm(1008): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-09 10:31:32.803: E/AndroidRuntime(1008): FATAL EXCEPTION: main
10-09 10:31:32.803: E/AndroidRuntime(1008): java.lang.NullPointerException
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.os.Parcel.readException(Parcel.java:1333)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.os.Parcel.readException(Parcel.java:1281)
10-09 10:31:32.803: E/AndroidRuntime(1008): at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:413)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:87)
10-09 10:31:32.803: E/AndroidRuntime(1008): at com.example.sms.SendSMSActivity.sendSMS(SendSMSActivity.java:134)
10-09 10:31:32.803: E/AndroidRuntime(1008): at com.example.sms.SendSMSActivity.access$0(SendSMSActivity.java:74)
10-09 10:31:32.803: E/AndroidRuntime(1008): at com.example.sms.SendSMSActivity$1.onClick(SendSMSActivity.java:57)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.view.View.performClick(View.java:3511)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.view.View$PerformClick.run(View.java:14105)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.os.Handler.handleCallback(Handler.java:605)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.os.Looper.loop(Looper.java:137)
10-09 10:31:32.803: E/AndroidRuntime(1008): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-09 10:31:32.803: E/AndroidRuntime(1008): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 10:31:32.803: E/AndroidRuntime(1008): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 10:31:32.803: E/AndroidRuntime(1008): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-09 10:31:32.803: E/AndroidRuntime(1008): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-09 10:31:32.803: E/AndroidRuntime(1008): at dalvik.system.NativeStart.main(Native Method)
10-09 10:31:33.392: I/dalvikvm(1008): threadid=3: reacting to signal 3
10-09 10:31:33.402: I/dalvikvm(1008): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:32:10.452: I/dalvikvm(1055): threadid=3: reacting to signal 3
10-09 10:32:10.523: I/dalvikvm(1055): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:32:10.923: D/gralloc_goldfish(1055): Emulator without GPU emulation detected.
10-09 10:32:10.953: I/dalvikvm(1055): threadid=3: reacting to signal 3
10-09 10:32:10.973: I/dalvikvm(1055): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:35:10.863: D/AndroidRuntime(1055): Shutting down VM
10-09 10:35:10.863: W/dalvikvm(1055): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-09 10:35:10.883: E/AndroidRuntime(1055): FATAL EXCEPTION: main
10-09 10:35:10.883: E/AndroidRuntime(1055): java.lang.NullPointerException
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.os.Parcel.readException(Parcel.java:1333)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.os.Parcel.readException(Parcel.java:1281)
10-09 10:35:10.883: E/AndroidRuntime(1055): at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:413)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:87)
10-09 10:35:10.883: E/AndroidRuntime(1055): at com.example.sms.SendSMSActivity.sendSMS(SendSMSActivity.java:132)
10-09 10:35:10.883: E/AndroidRuntime(1055): at com.example.sms.SendSMSActivity.access$0(SendSMSActivity.java:72)
10-09 10:35:10.883: E/AndroidRuntime(1055): at com.example.sms.SendSMSActivity$1.onClick(SendSMSActivity.java:57)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.view.View.performClick(View.java:3511)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.view.View$PerformClick.run(View.java:14105)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.os.Handler.handleCallback(Handler.java:605)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.os.Looper.loop(Looper.java:137)
10-09 10:35:10.883: E/AndroidRuntime(1055): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-09 10:35:10.883: E/AndroidRuntime(1055): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 10:35:10.883: E/AndroidRuntime(1055): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 10:35:10.883: E/AndroidRuntime(1055): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-09 10:35:10.883: E/AndroidRuntime(1055): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-09 10:35:10.883: E/AndroidRuntime(1055): at dalvik.system.NativeStart.main(Native Method)
10-09 10:35:11.453: I/dalvikvm(1055): threadid=3: reacting to signal 3
10-09 10:35:11.473: I/dalvikvm(1055): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:35:50.673: I/dalvikvm(1104): threadid=3: reacting to signal 3
10-09 10:35:50.803: I/dalvikvm(1104): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:35:51.112: D/gralloc_goldfish(1104): Emulator without GPU emulation detected.
10-09 10:35:51.142: I/dalvikvm(1104): threadid=3: reacting to signal 3
10-09 10:35:51.182: I/dalvikvm(1104): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:37:12.383: D/AndroidRuntime(1104): Shutting down VM
10-09 10:37:12.383: W/dalvikvm(1104): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-09 10:37:12.403: E/AndroidRuntime(1104): FATAL EXCEPTION: main
10-09 10:37:12.403: E/AndroidRuntime(1104): java.lang.NullPointerException
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.os.Parcel.readException(Parcel.java:1333)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.os.Parcel.readException(Parcel.java:1281)
10-09 10:37:12.403: E/AndroidRuntime(1104): at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:413)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:87)
10-09 10:37:12.403: E/AndroidRuntime(1104): at com.example.sms.SendSMSActivity.sendSMS(SendSMSActivity.java:132)
10-09 10:37:12.403: E/AndroidRuntime(1104): at com.example.sms.SendSMSActivity.access$0(SendSMSActivity.java:72)
10-09 10:37:12.403: E/AndroidRuntime(1104): at com.example.sms.SendSMSActivity$1.onClick(SendSMSActivity.java:57)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.view.View.performClick(View.java:3511)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.view.View$PerformClick.run(View.java:14105)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.os.Handler.handleCallback(Handler.java:605)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.os.Looper.loop(Looper.java:137)
10-09 10:37:12.403: E/AndroidRuntime(1104): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-09 10:37:12.403: E/AndroidRuntime(1104): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 10:37:12.403: E/AndroidRuntime(1104): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 10:37:12.403: E/AndroidRuntime(1104): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-09 10:37:12.403: E/AndroidRuntime(1104): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-09 10:37:12.403: E/AndroidRuntime(1104): at dalvik.system.NativeStart.main(Native Method)
10-09 10:37:12.992: I/dalvikvm(1104): threadid=3: reacting to signal 3
10-09 10:37:13.012: I/dalvikvm(1104): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:37:24.783: I/dalvikvm(1169): threadid=3: reacting to signal 3
10-09 10:37:24.882: I/dalvikvm(1169): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:37:25.283: I/dalvikvm(1169): threadid=3: reacting to signal 3
10-09 10:37:25.303: I/dalvikvm(1169): Wrote stack traces to '/data/anr/traces.txt'
10-09 10:37:25.503: D/gralloc_goldfish(1169): Emulator without GPU emulation detected.
10-09 10:37:34.952: W/IInputConnectionWrapper(1169): showStatusIcon on inactive InputConnection
10-09 10:37:45.533: D/AndroidRuntime(1169): Shutting down VM
10-09 10:37:45.533: W/dalvikvm(1169): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-09 10:37:45.563: E/AndroidRuntime(1169): FATAL EXCEPTION: main
10-09 10:37:45.563: E/AndroidRuntime(1169): java.lang.NullPointerException
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.os.Parcel.readException(Parcel.java:1333)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.os.Parcel.readException(Parcel.java:1281)
10-09 10:37:45.563: E/AndroidRuntime(1169): at com.android.internal.telephony.ISms$Stub$Proxy.sendText(ISms.java:413)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.telephony.SmsManager.sendTextMessage(SmsManager.java:87)
10-09 10:37:45.563: E/AndroidRuntime(1169): at com.example.sms.SendSMSActivity.sendSMS(SendSMSActivity.java:132)
10-09 10:37:45.563: E/AndroidRuntime(1169): at com.example.sms.SendSMSActivity.access$0(SendSMSActivity.java:72)
10-09 10:37:45.563: E/AndroidRuntime(1169): at com.example.sms.SendSMSActivity$1.onClick(SendSMSActivity.java:57)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.view.View.performClick(View.java:3511)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.view.View$PerformClick.run(View.java:14105)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.os.Handler.handleCallback(Handler.java:605)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.os.Handler.dispatchMessage(Handler.java:92)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.os.Looper.loop(Looper.java:137)
10-09 10:37:45.563: E/AndroidRuntime(1169): at android.app.ActivityThread.main(ActivityThread.java:4424)
10-09 10:37:45.563: E/AndroidRuntime(1169): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 10:37:45.563: E/AndroidRuntime(1169): at java.lang.reflect.Method.invoke(Method.java:511)
10-09 10:37:45.563: E/AndroidRuntime(1169): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-09 10:37:45.563: E/AndroidRuntime(1169): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-09 10:37:45.563: E/AndroidRuntime(1169): at dalvik.system.NativeStart.main(Native Method)
10-09 10:37:46.122: I/dalvikvm(1169): threadid=3: reacting to signal 3
10-09 10:37:46.142: I/dalvikvm(1169): Wrote stack traces to '/data/anr/traces.txt'
smsactivity
public class SendSMSActivity extends Activity {
Button btnSendSMS;
EditText txtPhoneNo;
EditText txtMessage;
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btnSendSMS = (Button) findViewById(R.id.btnSendSMS);
txtPhoneNo = (EditText) findViewById(R.id.txtPhoneNo);
txtMessage = (EditText) findViewById(R.id.txtMessage);
btnSendSMS.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
String phoneNo = txtPhoneNo.getText().toString();
String message = txtMessage.getText().toString();
if (phoneNo.length() > 0 && message.length() > 0)
{
TelephonyManager telMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
int simState = telMgr.getSimState();
switch (simState) {
case TelephonyManager.SIM_STATE_ABSENT:
Toast.makeText(getBaseContext(), "No Sim Card found",
Toast.LENGTH_SHORT).show();
break;
case TelephonyManager.SIM_STATE_NETWORK_LOCKED:
// do something
break;
case TelephonyManager.SIM_STATE_PIN_REQUIRED:
// do something
break;
case TelephonyManager.SIM_STATE_PUK_REQUIRED:
// do something
break;
case TelephonyManager.SIM_STATE_READY:
sendSMS(phoneNo, message); // method to send message
break;
case TelephonyManager.SIM_STATE_UNKNOWN:
// do something
break;
}
} else
Toast.makeText(getBaseContext(),
"Please enter both phone number and message.",
Toast.LENGTH_SHORT).show();
}
private void sendSMS(String phoneNumber, String message) {
String SENT = "SMS_SENT";
String DELIVERED = "SMS_DELIVERED";
PendingIntent sentPI = PendingIntent.getBroadcast(
SendSMSActivity.this, 0, new Intent(SENT), 0);
PendingIntent deliveredPI = PendingIntent.getBroadcast(
SendSMSActivity.this, 0, new Intent(DELIVERED), 0);
// ---when the SMS has been sent---final String string =
// "deprecation";
registerReceiver(new BroadcastReceiver() {
#Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode()) {
case Activity.RESULT_OK:
Toast.makeText(SendSMSActivity.this, "SMS sent",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_GENERIC_FAILURE:
Toast.makeText(SendSMSActivity.this,
"Generic failure", Toast.LENGTH_SHORT)
.show();
break;
case SmsManager.RESULT_ERROR_NO_SERVICE:
Toast.makeText(SendSMSActivity.this, "No service",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_NULL_PDU:
Toast.makeText(SendSMSActivity.this, "Null PDU",
Toast.LENGTH_SHORT).show();
break;
case SmsManager.RESULT_ERROR_RADIO_OFF:
Toast.makeText(getBaseContext(), "Radio off",
Toast.LENGTH_SHORT).show();
break;
}
}
}, new IntentFilter(SENT));
// ---when the SMS has been delivered---
registerReceiver(new BroadcastReceiver() {
#Override
public void onReceive(Context arg0, Intent arg1) {
switch (getResultCode()) {
case Activity.RESULT_OK:
Toast.makeText(SendSMSActivity.this,
"SMS delivered", Toast.LENGTH_SHORT).show();
break;
case Activity.RESULT_CANCELED:
Toast.makeText(SendSMSActivity.this,
"SMS not delivered", Toast.LENGTH_SHORT)
.show();
break;
}
}
}, new IntentFilter(DELIVERED));
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, sentPI,
deliveredPI);
}
});
}
}

Movie not playing in Galaxy S GT-I9003?

I have a phone Galaxy S (GT-I9003) that is unable to play a video with resolution (320x480) while all the other models of Galaxy S are able to display that video.
Here are the logs
10-09 06:44:54.232: W/MediaPlayer(1907): info/warning (1, 26)
10-09 06:44:54.232: E/PlayerDriver(1278): Command PLAYER_INIT completed with an error or info PVMFFailure
10-09 06:44:54.232: E/MediaPlayer(1907): error (1, -1)
10-09 06:44:54.232: W/System.err(1907): java.io.IOException: Prepare failed.: status=0x1
10-09 06:44:54.240: W/System.err(1907): at android.media.MediaPlayer.prepare(Native Method)
10-09 06:44:54.240: W/System.err(1907): at com.MovieController.startMovie(MovieController.java:180)
10-09 06:44:54.240: W/System.err(1907): at com.MovieController.show(MovieController.java:88)
10-09 06:44:54.240: W/System.err(1907): at com.MovieController.play(MovieController.java:120)
10-09 06:44:54.240: W/System.err(1907): at com.android.sphybrid.D2CommandController.execute(D2CommandController.java:73)
10-09 06:44:54.240: W/System.err(1907): at com.android.sphybrid.WGFWebViewClient.doWithTitle(WGFWebViewClient.java:114)
10-09 06:44:54.240: W/System.err(1907): at com.android.sphybrid.WGFWebViewClient.onPageFinished(WGFWebViewClient.java:93)
10-09 06:44:54.240: W/System.err(1907): at jp.android.survivors.WebViewClient.onPageFinished(WebViewClient.java:96)
10-09 06:44:54.240: W/System.err(1907): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:281)
10-09 06:44:54.240: W/System.err(1907): at android.os.Handler.dispatchMessage(Handler.java:99)
10-09 06:44:54.240: W/System.err(1907): at android.os.Looper.loop(Looper.java:123)
10-09 06:44:54.240: W/System.err(1907): at android.app.ActivityThread.main(ActivityThread.java:4632)
10-09 06:44:54.240: W/System.err(1907): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 06:44:54.240: W/System.err(1907): at java.lang.reflect.Method.invoke(Method.java:521)
10-09 06:44:54.240: W/System.err(1907): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-09 06:44:54.240: W/System.err(1907): at dalvik.system.NativeStart.main(Native Method)
10-09 06:44:54.240: I/MovieFile(1907): Movie File: <null>
10-09 06:44:54.248: W/PlayerDriver(1278): PVMFInfoErrorHandlingComplete
10-09 06:44:54.279: I/AudioFlinger(1278): getNextBuffer() no more data for track 4096 on thread 0x34cc8
10-09 06:44:55.709: D/wpa_supplicant(1474): wpa_driver_tista_driver_cmd LINKSPEED
10-09 06:44:55.709: D/wpa_supplicant(1474): Link Speed command
10-09 06:44:55.709: D/wpa_supplicant(1474): buf LinkSpeed 54
10-09 06:44:56.287: I/AudioStreamOutALSA(1278): (virtual android::status_t android::AudioStreamOutALSA::standby()) enter
10-09 06:44:56.373: D/AudioStreamOutALSA(1278): Output standby called!!. Turn off PCM device.
10-09 06:44:56.373: I/ALSAStreamOps(1278): [ALSAStreamOps]codecOff mode = 0
10-09 06:44:56.373: D/ALSAControl(1278): ALSAControl::set index = 0
10-09 06:44:56.373: I/ALSAControl(1278): <set>id = 1079651552, info = 1079651272, name = Amp Enable
10-09 06:44:56.373: I/ALSAControl(1278): <set>mHandle Success 215600
10-09 06:44:56.420: D/BT HS/HF(1489): gsmAsuToSignal=27
10-09 06:44:56.420: D/ALSAControl(1278): ALSAControl::set index = 0
10-09 06:44:56.420: I/ALSAControl(1278): <set>id = 1079651552, info = 1079651272, name = Idle Mode
10-09 06:44:56.420: I/ALSAControl(1278): <set>mHandle Success 215600
10-09 06:44:56.490: I/AudioStreamOutALSA(1278): [AudioOutLock]Relase_wake_Lock
I just found out that the movie i was trying to play in Android 2.2.1 was in some other codec (JVT/AC) and resolution was (320 x 480). I changed the codec to MPEG-4 without changing the resolution, it started working. I suppose it is an unsupported format.

How to connect the application from the monkey talk ide?

How to connect the application from the monkey talk ide? I am trying to run the android application on monkey talk. I installed android sdk, monkey talk, eclipse, and trying to run the application as per the documentation. but I am failed to run the app, force close occurred every time in emulator . its showing some FATAL exception. please help to get rid of this ...
10-09 11:05:16.648: ERROR/AndroidRuntime(277): FATAL EXCEPTION: main
10-09 11:05:16.648: ERROR/AndroidRuntime(277): java.lang.ExceptionInInitializerError
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at java.lang.Class.newInstanceImpl(Native Method)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at java.lang.Class.newInstance(Class.java:1429)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.os.Handler.dispatchMessage(Handler.java:99)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.os.Looper.loop(Looper.java:123)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at android.app.ActivityThread.main(ActivityThread.java:4627)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at java.lang.reflect.Method.invokeNative(Native Method)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at java.lang.reflect.Method.invoke(Method.java:521)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at dalvik.system.NativeStart.main(Native Method)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): Caused by: java.lang.NoClassDefFoundError: org.aspectj.runtime.reflect.Factory
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at com.mytest.Mymonkeytest1Activity.ajc$preClinit(Mymonkeytest1Activity.java:1)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): at com.mytest.Mymonkeytest1Activity.(Mymonkeytest1Activity.java:1)
10-09 11:05:16.648: ERROR/AndroidRuntime(277): ... 15 more
10-09 11:05:16.708: WARN/ActivityManager(59): Force finishing activity com.mytest/.Mymonkeytest1Activity
10-09 11:05:17.288: WARN/ActivityManager(59): Activity pause timeout for HistoryRecord{44efd5f0 com.mytest/.Mymonkeytest1Activity}
Thanks in advance ....

Categories

Resources