added runtime internet permission request

This commit is contained in:
Aran Zaiger 2016-07-02 20:18:19 +03:00
parent 995b098f65
commit 19bde85244
2 changed files with 3 additions and 1 deletions

View file

@ -5,7 +5,7 @@
<GradleProjectSettings> <GradleProjectSettings>
<option name="distributionType" value="LOCAL" /> <option name="distributionType" value="LOCAL" />
<option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.10" /> <option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.10" />
<option name="modules"> <option name="modules">
<set> <set>
<option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$" />

View file

@ -57,11 +57,13 @@ public class PersonalSpaceActivity extends AppCompatActivity {
setContentView(R.layout.activity_personal_space); setContentView(R.layout.activity_personal_space);
Bundle b = getIntent().getExtras(); Bundle b = getIntent().getExtras();
userId = b.getString("user_id"); userId = b.getString("user_id");
Log.d(TAG,"-------------------------USER ID: "+ userId);
this.locationPermission = true; this.locationPermission = true;
//check for permission //check for permission
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, FINE_PERM); ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, FINE_PERM);
ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.INTERNET}, FINE_PERM);
this.noteList = (ListView) findViewById(R.id.ps_list_listview); this.noteList = (ListView) findViewById(R.id.ps_list_listview);