android - Calling contact WITHOUT any permissions -


i'm using following function call number:

private static void startcall(context context, string phonenumber) {     intent callintent = new intent(intent.action_call);     callintent.addflags(intent.flag_activity_new_task);     callintent.setdata(uri.parse("tel:" + phonenumber));     context.startactivity(callintent); } 

android studio tells me may fail because of missing permissions. thought, way possible on device without permissions...

so how make above solution work on android 6 well? want app open installed phone app, don't want app directly call somebody

i thought, way possible on device without permissions

no.

i want app open installed phone app, don't want app directly call somebody

then action_call wrong solution in first place. action_dial can used without permissions, , launches device dialer app, supplied phone number filled in.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

json - Gson().fromJson(jsonResult, Myobject.class) return values in 0's -