Forcing permission in marshmallow devices codenameone
I have created a NativeTest.java 1.code: import com.codename1.system.NativeInterface; public interface NativeTest extends NativeInterface{ public void dispatchTakePictureIntent(); } generated the native interfaces inside native\android\pathToNativeiImpl NativeTestImpl.java code: public class NativeTestImpl { static final int REQUEST_IMAGE_CAPTURE = 1; public void dispatchTakePictureIntent() { if(!com.codename1.impl.android.AndroidNativeUtil.checkForPermission(Manifest.permission.READ_PHONE_STATE, "App requires camera permission for scanner")){ // you didn't get the permission, you might want