Commit f1ca714d authored by Rahadi Jalu's avatar Rahadi Jalu

Merge branch 'vsenp' into 'master'

Vsenp

See merge request capi-susenas/capi-stis!1
parents 7616b8b9 896f7c87
...@@ -2,13 +2,14 @@ apply plugin: 'com.android.application' ...@@ -2,13 +2,14 @@ apply plugin: 'com.android.application'
apply from: '../config/quality.gradle' apply from: '../config/quality.gradle'
import com.android.ddmlib.DdmPreferences import com.android.ddmlib.DdmPreferences
DdmPreferences.setTimeOut(60000) DdmPreferences.setTimeOut(60000)
ant.condition(property: 'os', value: 'windows') { ant.condition(property: 'os', value: 'windows') {
os(family: 'windows') os(family: 'windows')
} }
ant.condition(property: 'os', value: 'unix') { ant.condition(property: 'os', value: 'unix') {
os(family: 'unix') os(family: 'unix')
} }
// Build numbers were manually set until 1067 // Build numbers were manually set until 1067
...@@ -62,13 +63,13 @@ if (secretsFile.exists()) { ...@@ -62,13 +63,13 @@ if (secretsFile.exists()) {
} }
android { android {
compileSdkVersion(25) compileSdkVersion(26)
buildToolsVersion('26.0.2') buildToolsVersion('26.0.2')
defaultConfig { defaultConfig {
applicationId('org.odk.collect.android') applicationId('org.odk.collect.android')
minSdkVersion(16) minSdkVersion(16)
targetSdkVersion(25) targetSdkVersion(26)
versionCode LEGACY_BUILD_NUMBER_OFFSET + getMasterCommitCount() versionCode LEGACY_BUILD_NUMBER_OFFSET + getMasterCommitCount()
versionName getVersionName() versionName getVersionName()
testInstrumentationRunner('android.support.test.runner.AndroidJUnitRunner') testInstrumentationRunner('android.support.test.runner.AndroidJUnitRunner')
...@@ -143,15 +144,15 @@ allprojects { ...@@ -143,15 +144,15 @@ allprojects {
dependencies { dependencies {
compile fileTree(dir: 'libs', include: '*.jar') compile fileTree(dir: 'libs', include: '*.jar')
compile group: 'com.android.support', name: 'appcompat-v7', version: '25.3.1' compile group: 'com.android.support', name: 'appcompat-v7', version: '26.1.0'
compile group: 'com.android.support', name: 'design', version: '25.3.1' compile group: 'com.android.support', name: 'design', version: '26.1.0'
compile group: 'com.android.support', name: 'cardview-v7', version: '25.3.1' compile group: 'com.android.support', name: 'cardview-v7', version: '26.1.0'
compile group: 'com.android.support', name: 'multidex', version: '1.0.1' compile group: 'com.android.support', name: 'multidex', version: '1.0.1'
compile group: 'com.google.android.gms', name: 'play-services-analytics', version: '10.0.1' compile group: 'com.google.android.gms', name: 'play-services-analytics', version: '10.0.1'
compile group: 'com.google.android.gms', name: 'play-services-auth', version: '10.0.1' compile group: 'com.google.android.gms', name: 'play-services-auth', version: '10.0.1'
compile group: 'com.google.android.gms', name: 'play-services-maps', version: '10.0.1' compile group: 'com.google.android.gms', name: 'play-services-maps', version: '10.0.1'
compile group: 'com.google.android.gms', name: 'play-services-location', version: '10.0.1' compile group: 'com.google.android.gms', name: 'play-services-location', version: '10.0.1'
compile (group: 'com.google.code.gson', name: 'gson', version: '2.6.2' ){ compile(group: 'com.google.code.gson', name: 'gson', version: '2.6.2') {
exclude group: 'org.apache.httpcomponents' exclude group: 'org.apache.httpcomponents'
} }
compile group: 'com.google.firebase', name: 'firebase-core', version: '10.0.1' compile group: 'com.google.firebase', name: 'firebase-core', version: '10.0.1'
...@@ -166,18 +167,24 @@ dependencies { ...@@ -166,18 +167,24 @@ dependencies {
compile group: 'commons-io', name: 'commons-io', version: '2.4' compile group: 'commons-io', name: 'commons-io', version: '2.4'
compile group: 'net.sf.kxml', name: 'kxml2', version: '2.3.0' compile group: 'net.sf.kxml', name: 'kxml2', version: '2.3.0'
compile group: 'net.sf.opencsv', name: 'opencsv', version: '2.3' compile group: 'net.sf.opencsv', name: 'opencsv', version: '2.3'
compile (group: 'org.opendatakit', name: 'opendatakit-javarosa', version: '2.6.1') { compile(group: 'org.opendatakit', name: 'opendatakit-javarosa', version: '2.6.1') {
exclude module: 'joda-time' exclude module: 'joda-time'
} }
compile group: 'org.osmdroid', name: 'osmdroid-android', version: '5.6.4' compile group: 'org.osmdroid', name: 'osmdroid-android', version: '5.6.4'
compile group: 'org.slf4j', name: 'slf4j-android', version: '1.6.1-RC1' compile group: 'org.slf4j', name: 'slf4j-android', version: '1.6.1-RC1'
compile group: 'pub.devrel', name: 'easypermissions', version: '0.2.1' compile group: 'pub.devrel', name: 'easypermissions', version: '0.2.1'
compile(group: 'com.google.api-client', name: 'google-api-client-android', version: '1.22.0') { exclude group: 'org.apache.httpcomponents' } compile(group: 'com.google.api-client', name: 'google-api-client-android', version: '1.22.0') {
compile(group: 'com.google.apis', name: 'google-api-services-drive', version: 'v3-rev64-1.22.0') { exclude group: 'org.apache.httpcomponents' } exclude group: 'org.apache.httpcomponents'
compile(group: 'com.google.apis', name: 'google-api-services-sheets', version: 'v4-rev463-1.22.0') { exclude group: 'org.apache.httpcomponents' } }
compile(group: 'com.google.apis', name: 'google-api-services-drive', version: 'v3-rev64-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile(group: 'com.google.apis', name: 'google-api-services-sheets', version: 'v4-rev463-1.22.0') {
exclude group: 'org.apache.httpcomponents'
}
compile group: 'com.jakewharton.timber', name: 'timber', version: '4.5.1' compile group: 'com.jakewharton.timber', name: 'timber', version: '4.5.1'
compile group: 'com.android.support', name: 'customtabs', version: '25.3.1' compile group: 'com.android.support', name: 'customtabs', version: '26.1.0'
compile group: 'com.android.support', name: 'support-v13', version: '25.3.1' compile group: 'com.android.support', name: 'support-v13', version: '26.1.0'
compile group: 'com.google.zxing', name: 'core', version: '3.2.0' compile group: 'com.google.zxing', name: 'core', version: '3.2.0'
compile group: 'com.journeyapps', name: 'zxing-android-embedded', version: '3.5.0' compile group: 'com.journeyapps', name: 'zxing-android-embedded', version: '3.5.0'
compile group: 'net.danlew', name: 'android.joda', version: '2.9.9' compile group: 'net.danlew', name: 'android.joda', version: '2.9.9'
...@@ -202,7 +209,7 @@ dependencies { ...@@ -202,7 +209,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.code.findbugs', module: 'jsr305' exclude group: 'com.google.code.findbugs', module: 'jsr305'
} }
androidTestCompile(group: 'com.android.support.test.espresso', name: 'espresso-intents', version: '3.0.1') { androidTestCompile(group: 'com.android.support.test.espresso', name: 'espresso-intents', version: '3.0.1') {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.code.findbugs', module: 'jsr305' exclude group: 'com.google.code.findbugs', module: 'jsr305'
} }
...@@ -218,10 +225,11 @@ dependencies { ...@@ -218,10 +225,11 @@ dependencies {
transitive = true transitive = true
} }
compile project(':slidingmenu') compile project(':slidingmenu')
compile project(':vsen_p')
compile 'org.apache.commons:commons-lang3:3.6' compile 'org.apache.commons:commons-lang3:3.6'
compile 'com.getbase:floatingactionbutton:1.10.1' compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.android.support:support-v4:25.3.1' compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:recyclerview-v7:25.3.1' compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0' compile 'com.android.volley:volley:1.0.0'
compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.2' compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.2'
......
...@@ -40,14 +40,16 @@ the specific language governing permissions and limitations under the License. ...@@ -40,14 +40,16 @@ the specific language governing permissions and limitations under the License.
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /> <uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<!-- Get permission for reliable local dispatching on non-Google Play devices. --> <!-- Get permission for reliable local dispatching on non-Google Play devices. -->
<uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CAMERA" />
<uses-feature <uses-feature
android:name="android.hardware.camera" android:name="android.hardware.camera"
android:required="false" /> android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" <uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" /> android:required="false" />
<uses-feature android:name="android.hardware.screen.portrait" <uses-feature
android:name="android.hardware.screen.portrait"
android:required="false" /> android:required="false" />
<uses-feature <uses-feature
...@@ -124,8 +126,8 @@ the specific language governing permissions and limitations under the License. ...@@ -124,8 +126,8 @@ the specific language governing permissions and limitations under the License.
android:taskAffinity="" /> android:taskAffinity="" />
<activity <activity
android:name=".activities.DrawActivity" android:name=".activities.DrawActivity"
android:screenOrientation="landscape" android:label="@string/app_name"
android:label="@string/app_name" /> android:screenOrientation="landscape" />
<activity <activity
android:name=".activities.OpenSourceLicensesActivity" android:name=".activities.OpenSourceLicensesActivity"
android:label="@string/all_open_source_licenses" /> android:label="@string/all_open_source_licenses" />
...@@ -137,7 +139,7 @@ the specific language governing permissions and limitations under the License. ...@@ -137,7 +139,7 @@ the specific language governing permissions and limitations under the License.
<activity <activity
android:name=".activities.InstanceChooserList" android:name=".activities.InstanceChooserList"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme.WithActionBar" > android:theme="@style/AppTheme.WithActionBar">
<intent-filter android:scheme="http"> <intent-filter android:scheme="http">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.EDIT" /> <action android:name="android.intent.action.EDIT" />
...@@ -253,6 +255,7 @@ the specific language governing permissions and limitations under the License. ...@@ -253,6 +255,7 @@ the specific language governing permissions and limitations under the License.
</activity> </activity>
<activity android:name=".activities.CaptureSelfieActivity" /> <activity android:name=".activities.CaptureSelfieActivity" />
<activity android:name=".activities.CaptureSelfieActivityNewApi" /> <activity android:name=".activities.CaptureSelfieActivityNewApi" />
<receiver <receiver
android:name=".receivers.NetworkReceiver" android:name=".receivers.NetworkReceiver"
android:enabled="true"> android:enabled="true">
...@@ -293,21 +296,23 @@ the specific language governing permissions and limitations under the License. ...@@ -293,21 +296,23 @@ the specific language governing permissions and limitations under the License.
android:required="false" /> android:required="false" />
<activity android:name=".activities.PermissionActivity" /> <activity android:name=".activities.PermissionActivity" />
<!-- tambahan untuk CAPI-STIS --> <!-- tambahan untuk CAPI-STIS -->
<provider <provider
android:authorities="org.odk.collect.android.capi.CapiFileProvider"
android:name=".capi.CapiFileProvider" android:name=".capi.CapiFileProvider"
android:authorities="org.odk.collect.android.capi.CapiFileProvider"
android:exported="false" android:exported="false"
android:grantUriPermissions="true"> android:grantUriPermissions="true">
<meta-data <meta-data
android:name="android.support.FILE_PROVIDER_PATHS" android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/capi_file_paths" /> android:resource="@xml/capi_file_paths" />
</provider> </provider>
<activity android:name=".capi.activity.CapiLoginActivity" /> <activity android:name=".capi.activity.CapiLoginActivity" />
<activity android:name=".capi.activity.CapiMainActivity" <activity
android:launchMode="singleTop"/> android:name=".capi.activity.CapiMainActivity"
android:launchMode="singleTop" />
<activity android:name=".capi.activity.CapiInstanceActivity"> <activity android:name=".capi.activity.CapiInstanceActivity">
<meta-data <meta-data
android:name="android.app.searchable" android:name="android.app.searchable"
...@@ -322,43 +327,55 @@ the specific language governing permissions and limitations under the License. ...@@ -322,43 +327,55 @@ the specific language governing permissions and limitations under the License.
<activity <activity
android:name=".petawbdigital.activities.SettingTampilan" android:name=".petawbdigital.activities.SettingTampilan"
android:label="Pengaturan Tampilan" android:label="Pengaturan Tampilan"
android:theme="@style/AppTheme"/> android:theme="@style/VsenAppTheme" />
<activity <activity
android:name=".petawbdigital.activities.PanduanActivity" android:name=".petawbdigital.activities.PanduanActivity"
android:label="Penjelasan Fitur" android:label="Penjelasan Fitur"
android:theme="@style/AppTheme"/> android:theme="@style/VsenAppTheme" />
<activity <activity
android:name=".petawbdigital.activities.ItemPanduanActivity" android:name=".petawbdigital.activities.ItemPanduanActivity"
android:label="Penjelasan Detail" android:label="Penjelasan Detail"
android:theme="@style/AppTheme"/> android:theme="@style/VsenAppTheme" />
<activity <activity
android:name=".petawbdigital.activities.KonfigurasiPeta" android:name=".petawbdigital.activities.KonfigurasiPeta"
android:label="Konfigurasi Peta" android:label="Konfigurasi Peta"
android:theme="@style/AppTheme"/> android:theme="@style/VsenAppTheme" />
<activity <activity
android:name=".activities.GeoPointMapboxActivity" android:name=".activities.GeoPointMapboxActivity"
android:label="Get Location" android:label="Get Location"
android:theme="@style/AppTheme.WithCompatActionBar"/> android:theme="@style/AppTheme.WithCompatActionBar" />
<provider <provider
android:name=".revalidasi.custom.NotifDataProvider" android:name=".revalidasi.custom.NotifDataProvider"
android:authorities="org.odk.collect.android.provider.odk.notifdata" android:authorities="org.odk.collect.android.provider.odk.notifdata"
android:exported="false" /> android:exported="false" />
<service
android:name=".revalidasi.notifikasi.MyFirebaseMessagingService"> <service android:name=".revalidasi.notifikasi.MyFirebaseMessagingService">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" /> <action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter> </intent-filter>
</service> </service>
<service <service android:name=".revalidasi.notifikasi.MyFirebaseInstanceIDService">
android:name=".revalidasi.notifikasi.MyFirebaseInstanceIDService">
<intent-filter> <intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter> </intent-filter>
</service> </service>
<activity android:name=".revalidasi.activities.DataDownloadActivity"
<activity
android:name=".revalidasi.activities.DataDownloadActivity"
android:label="Unduh Isian" android:label="Unduh Isian"
android:parentActivityName=".capi.activity.CapiMainActivity"/> android:parentActivityName=".capi.activity.CapiMainActivity" />
<activity
android:name=".pemutakhiran.activities.BSActivity"
android:theme="@style/VsenAppTheme" />
<activity
android:name=".pemutakhiran.activities.RutaActivity"
android:theme="@style/VsenAppTheme" />
<activity
android:name=".pemutakhiran.activities.DsrtActivity"
android:theme="@style/VsenAppTheme" />
</application> </application>
......
...@@ -26,7 +26,6 @@ import android.os.Bundle; ...@@ -26,7 +26,6 @@ import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.os.Message; import android.os.Message;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.view.ViewConfigurationCompat;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.text.InputType; import android.text.InputType;
...@@ -35,7 +34,6 @@ import android.view.Menu; ...@@ -35,7 +34,6 @@ import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.ViewConfiguration;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.Button; import android.widget.Button;
import android.widget.CheckBox; import android.widget.CheckBox;
......
...@@ -16,54 +16,28 @@ package org.odk.collect.android.activities; ...@@ -16,54 +16,28 @@ package org.odk.collect.android.activities;
import android.Manifest; import android.Manifest;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler; import android.os.Handler;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat; import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat; import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.telephony.TelephonyManager;
import android.util.Log; import android.util.Log;
import android.view.Window; import android.view.Window;
import android.widget.Toast;
import org.javarosa.core.services.IPropertyManager;
import org.javarosa.core.services.properties.IPropertyRules;
import org.odk.collect.android.BuildConfig; import org.odk.collect.android.BuildConfig;
import org.odk.collect.android.R; import org.odk.collect.android.R;
import org.odk.collect.android.application.Collect; import org.odk.collect.android.application.Collect;
import org.odk.collect.android.capi.preferences.Constants;
import org.odk.collect.android.capi.preferences.CapiInstancePreferences;
import org.odk.collect.android.capi.activity.CapiMainActivity;
import org.odk.collect.android.capi.activity.CapiLoginActivity; import org.odk.collect.android.capi.activity.CapiLoginActivity;
import org.odk.collect.android.database.ActivityLogger; import org.odk.collect.android.capi.activity.CapiMainActivity;
import org.odk.collect.android.logic.FormController; import org.odk.collect.android.capi.preferences.CapiInstancePreferences;
import org.odk.collect.android.logic.PropertyManager;
import org.odk.collect.android.preferences.GeneralSharedPreferences; import org.odk.collect.android.preferences.GeneralSharedPreferences;
import org.odk.collect.android.preferences.PreferenceKeys; import org.odk.collect.android.preferences.PreferenceKeys;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import timber.log.Timber;
import static org.odk.collect.android.preferences.PreferenceKeys.KEY_METADATA_EMAIL;
import static org.odk.collect.android.preferences.PreferenceKeys.KEY_METADATA_PHONENUMBER;
import static org.odk.collect.android.preferences.PreferenceKeys.KEY_METADATA_USERGROUP;
import static org.odk.collect.android.preferences.PreferenceKeys.KEY_METADATA_USERNAME;
/** /**
* edit Muhammad Tohir * edit Muhammad Tohir
* edit Mahendri Dwicahyo * edit Mahendri Dwicahyo
...@@ -104,6 +78,7 @@ public class SplashScreenActivity extends AppCompatActivity { ...@@ -104,6 +78,7 @@ public class SplashScreenActivity extends AppCompatActivity {
if (preferences.getBoolean(PreferenceKeys.KEY_LOGIN_STATUS, false)) { if (preferences.getBoolean(PreferenceKeys.KEY_LOGIN_STATUS, false)) {
startActivity(new Intent(this, CapiMainActivity.class)); startActivity(new Intent(this, CapiMainActivity.class));
// startActivity(new Intent(this, BSActivity.class));
} else { } else {
startActivity(new Intent(this, CapiLoginActivity.class)); startActivity(new Intent(this, CapiLoginActivity.class));
} }
...@@ -112,14 +87,14 @@ public class SplashScreenActivity extends AppCompatActivity { ...@@ -112,14 +87,14 @@ public class SplashScreenActivity extends AppCompatActivity {
@Override @Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
switch (requestCode){ switch (requestCode) {
case 1: case 1:
boolean allGranted = true; boolean allGranted = true;
for (int grantResult : grantResults) { for (int grantResult : grantResults) {
if (grantResult != PackageManager.PERMISSION_GRANTED) allGranted = false; if (grantResult != PackageManager.PERMISSION_GRANTED) allGranted = false;
} }
if(allGranted){ if (allGranted) {
endSplashScreen(); endSplashScreen();
} else { } else {
AlertDialog dialog = new AlertDialog.Builder(this) AlertDialog dialog = new AlertDialog.Builder(this)
...@@ -135,7 +110,7 @@ public class SplashScreenActivity extends AppCompatActivity { ...@@ -135,7 +110,7 @@ public class SplashScreenActivity extends AppCompatActivity {
} }
private void requestPermission() { private void requestPermission() {
Log.d("DEBUGCOLL","request permission"); Log.d("DEBUGCOLL", "request permission");
ActivityCompat.requestPermissions(this, ActivityCompat.requestPermissions(this,
new String[]{ new String[]{
Manifest.permission.READ_PHONE_STATE, Manifest.permission.READ_PHONE_STATE,
...@@ -145,10 +120,10 @@ public class SplashScreenActivity extends AppCompatActivity { ...@@ -145,10 +120,10 @@ public class SplashScreenActivity extends AppCompatActivity {
Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.CAMERA Manifest.permission.CAMERA
},1); }, 1);
} }
private boolean isAllPermissionGranted(){ private boolean isAllPermissionGranted() {
return !(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED || return !(ContextCompat.checkSelfPermission(this, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED ||
ContextCompat.checkSelfPermission(this, Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this, Manifest.permission.GET_ACCOUNTS) != PackageManager.PERMISSION_GRANTED ||
ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED || ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED ||
...@@ -163,10 +138,10 @@ public class SplashScreenActivity extends AppCompatActivity { ...@@ -163,10 +138,10 @@ public class SplashScreenActivity extends AppCompatActivity {
new Handler().postDelayed(new Runnable() { new Handler().postDelayed(new Runnable() {
@Override @Override
public void run() { public void run() {
if(isAllPermissionGranted()) endSplashScreen(); if (isAllPermissionGranted()) endSplashScreen();
else requestPermission(); else requestPermission();
} }
},1000); }, 1000);
} }
private void createErrorDialog(String errorMsg, final boolean shouldExit) { private void createErrorDialog(String errorMsg, final boolean shouldExit) {
......
package org.odk.collect.android.capi.activity; package org.odk.collect.android.capi.activity;
import android.app.ProgressDialog; import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color; import android.graphics.Color;
import android.net.Uri;
import android.os.AsyncTask; import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity; import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.TextUtils; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.widget.Button; import android.widget.Button;
...@@ -17,20 +14,23 @@ import android.widget.EditText; ...@@ -17,20 +14,23 @@ import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import com.google.gson.GsonBuilder;
import com.rahadi.vsen.contexts.Vsen;
import com.rahadi.vsen.listeners.OnSynchronizationCompletedListener;
import com.rahadi.vsen.models.UserModel;
import com.rahadi.vsen.tasks.BSSynchronizationTask;
import com.rahadi.vsen.tasks.GetGenerateTask;
import com.rahadi.vsen.tasks.UserRegisterTask;
import org.json.JSONArray;
import org.json.JSONObject;
import org.odk.collect.android.R; import org.odk.collect.android.R;
import org.odk.collect.android.application.Collect;
import org.odk.collect.android.capi.preferences.CapiInstancePreferences;
import org.odk.collect.android.capi.Helper;
import org.odk.collect.android.capi.ModelResponse;
import org.odk.collect.android.capi.preferences.Constants;
import org.odk.collect.android.preferences.GeneralSharedPreferences; import org.odk.collect.android.preferences.GeneralSharedPreferences;
import org.odk.collect.android.preferences.PreferenceKeys; import org.odk.collect.android.preferences.PreferenceKeys;
import org.odk.collect.android.preferences.PreferencesActivity; import org.odk.collect.android.preferences.PreferencesActivity;
import org.odk.collect.android.revalidasi.notifikasi.ConfigKey;
import org.odk.collect.android.revalidasi.notifikasi.GetUuidTask; import org.odk.collect.android.revalidasi.notifikasi.GetUuidTask;
import org.odk.collect.android.utilities.WebUtils;
import java.util.Map;