diff --git a/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java b/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java index a057a6a418..6543359a46 100644 --- a/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java +++ b/app/src/main/java/org/flyve/mdm/agent/ui/StartEnrollmentActivity.java @@ -32,6 +32,7 @@ import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; +import android.os.Build; import android.os.Bundle; import android.support.v4.app.ActivityCompat; import android.support.v4.content.LocalBroadcastManager; @@ -105,6 +106,10 @@ protected void onCreate(Bundle savedInstanceState) { btnEnroll.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { + if(Build.VERSION.SDK_INT < 23) { + mPermissions = true; + } + if(mPermissions) { btnEnroll.setVisibility(View.GONE); txtMessage.setText(getResources().getString(R.string.please_wait));