Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Now I have a serious problem with my manifest. I don't know why even after had
android.permission.USE_SIP
in manifest, this is not recognized. I use this code to detect.
if (ContextCompat.checkSelfPermission(this, Manifest.permission.USE_SIP)
== PackageManager.PERMISSION_GRANTED) {
Toast.makeText(this, "la permission est donnée", Toast.LENGTH_SHORT).show();
} else {
Toast.makeText(this, "la permission est abscente", Toast.LENGTH_SHORT).show();
And it is the clause else that is run. Please help me to debug this, thank you.
This is a part of my logcat.
Process: com.example.boris.voipapp, PID: 19509
java.lang.SecurityException: Neither user 10105 nor current process has android.permission.USE_SIP.
at android.app.ContextImpl.enforce(ContextImpl.java:1600)
at android.app.ContextImpl.enforceCallingOrSelfPermission(ContextImpl.java:1632)
/** initialisation du SIP*/
if (ContextCompat.checkSelfPermission(this, Manifest.permission.USE_SIP)
== PackageManager.PERMISSION_GRANTED){
}else{
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.USE_SIP}, 0);
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.