Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
fix(enroll): get permission on android api lower than 23
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelje authored and ajsb85 committed Jan 26, 2018
1 parent 49193c3 commit 121133a
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 121133a

Please sign in to comment.