java - Fetch contact from contact list in Android 4.1.2 -


i developing application in android.

in app, on button click open list of contacts saved in phone. on selecting contact return our application , number shown on textview. working great till 2.3.6 version in 4.1.2 version number not fetched , shows null pointer exception. code used opening contact list given below

intent intent= new intent(intent.action_pick,  contacts.content_uri); startactivityforresult(intent, 1); 

kindly give suggestion. in advance

stack of exception:

04-18 12:42:03.828: e/debug_tag(23826): failed number 04-18 12:42:03.828: e/debug_tag(23826): java.lang.nullpointerexception 04-18 12:42:03.828: e/debug_tag(23826):     @ com.smscollection.activity.sms_send_screen.onactivityresult(sms_send_screen.java:116) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.support.v4.app.fragmentactivity.onactivityresult(fragmentactivity.java:161) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.app.activity.dispatchactivityresult(activity.java:5390) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.app.activitythread.deliverresults(activitythread.java:3201) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.app.activitythread.handlesendresult(activitythread.java:3248) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.app.activitythread.access$1200(activitythread.java:140) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.app.activitythread$h.handlemessage(activitythread.java:1285) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.os.handler.dispatchmessage(handler.java:99) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.os.looper.loop(looper.java:137) 04-18 12:42:03.828: e/debug_tag(23826):     @ android.app.activitythread.main(activitythread.java:4935) 04-18 12:42:03.828: e/debug_tag(23826):     @ java.lang.reflect.method.invokenative(native method) 04-18 12:42:03.828: e/debug_tag(23826):     @ java.lang.reflect.method.invoke(method.java:511) 04-18 12:42:03.828: e/debug_tag(23826):     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:1038) 04-18 12:42:03.828: e/debug_tag(23826):     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:805) 04-18 12:42:03.828: e/debug_tag(23826):     @ dalvik.system.nativestart.main(native method) 


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -