How do I request permission in game?

  • I dont know request permission on Android 6, it need a plugin? Please help me...

  • Hey tuzke!

    Are you talking about Facebook permissions? If that is the case, you include them in the Login action as seem on the picture below:

    For a comprehensive list of Facebook permissions ceck this page: https://developers.facebook.com/docs/fa ... rmissions/

    Hope this helps. Cheers!

  • Hey tuzke!

    Are you talking about Facebook permissions? If that is the case, you include them in the Login action as seem on the picture below:

    For a comprehensive list of Facebook permissions ceck this page: developers.facebook.com/docs/fa ... rmissions/

    Hope this helps. Cheers!

    thank u, but not login facebook permission <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad" />

    Since Android 6.0, the Android permissions checking mechanism has been changed. In the past, the permissions were granted by users when they decide to install the app. Now, the permissions should be granted by a user when he/she is using the app.

    link: github.com/NeoLSN/cordova-plugin-android-permissions

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Can someone help me create a request permission in game plugin for android 6.0+...

  • upppppppppppppppppppppppppppppppp

  • I dont know request permission on Android 6, it need a plugin? Please help me...

    Connect to the project these JS functions in any convenient way. (at least in INDEX.html or through plugins).

    Code:

    function PremmError() {
    	//alert('NO');
    }
    
    function PremmSuccess( status ) {
    	if( !status.hasPermission ) PremmError();
    }
    
    function Premm() {
    	var permissions = cordova.plugins.permissions;
    	permissions.hasPermission(permissions.CAMERA, function( status ){
    		if ( status.hasPermission ) {
    			//alert('YES');
    		}
    		else {
    			//alert('NO');
    			permissions.requestPermission(permissions.CAMERA, PremmSuccess, PremmError);
    		}
    	});
    }
    

    And we call this code for example through the plugin Browser -

    Browser - execute JS ("Premm").

    How to build a project

    - We export as Cordova.

    cordova create Test test.test.test

    cd Test

    // Delete old www content

    // We throw our exported files www and configs in Test

    cordova platform add android

    // Add camera right to manifest

    //C:\Users\..\Test\platforms\android\app\src\main\AndroidManifest.xml

    //<uses-permission android:name="android.permission.CAMERA" />

    cordova plugin add cordova-plugin-android-permissions

    cordova build android

    A bit of theory:

    npmjs.com/package/cordova-plugin-android-permissions

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)