get the value from Intent of android -
thanks in advance. when print log.d("me",getintent().tostring());
i getting:
intent { act=android.intent.action.call_privileged dat=tel:888 flg=0x13800000 cmp=com.ninetology.freecall.two/.callfinalactivity }
i trying fetch value associated "dat" getting nullpointer exception.
//the code using getintent().getstringextra("dat"); // no use //i tried getintent().getextras("dat").tostring(); // nullpointer exception i tried "tel" key in above code still no use.
it seems you're doing wrong.
the
getextras()function returns bundle can extract data , not function returns specific string.datnot string value can see data printed. it'suri,
try parsing should , i'm sure you'll able data.
public void oncreate(bundle b) { //mistyped super.oncreate(b); uri data = getintent().getdata(); // or use string data = getintent().getdatastring(); // stuff }
Comments
Post a Comment