Commit 2605ea09 authored by Nastuzzi Samy's avatar Nastuzzi Samy
Browse files

Merge branch 'release/v0.10.2'

parents 5babb645 6f48f9b9
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.utc.simde.jessy"
android:versionCode="31"
android:versionName="0.10.1">
android:versionCode="32"
android:versionName="0.10.2">
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<application
......@@ -46,5 +47,4 @@
android:configChanges="orientation"
android:screenOrientation="portrait" />
</application>
</manifest>
\ No newline at end of file
......@@ -66,8 +66,10 @@ public abstract class BaseActivity extends InternetActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT >= 24) {
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
}
this.dialog = new Dialog(this);
}
......@@ -531,6 +533,13 @@ public abstract class BaseActivity extends InternetActivity {
});
}
protected void startQRCodeReaderActivity(final Activity activity) {
if (haveCameraPermission())
startActivity(new Intent(activity, QRCodeReaderActivity.class));
else
dialog.errorDialog(BaseActivity.this, getString(R.string.qrcode), getString(R.string.need_camera_permission));
}
protected void delKey() {
SharedPreferences.Editor edit = sharedPreferences.edit();
edit.remove("key");
......@@ -680,13 +689,6 @@ public abstract class BaseActivity extends InternetActivity {
}.start();
}
protected void startQRCodeReaderActivity(final Activity activity) {
if (haveCameraPermission())
startActivity(new Intent(activity, QRCodeReaderActivity.class));
else
dialog.errorDialog(BaseActivity.this, getString(R.string.qrcode), getString(R.string.need_camera_permission));
}
protected boolean update(final String version) {
final String destination = this.downloadLocation + getString(R.string.app_name) + " " + version + ".apk";
final String url = this.gitUrl + getString(R.string.app_name) + " " + version + ".apk";
......@@ -707,8 +709,8 @@ public abstract class BaseActivity extends InternetActivity {
BroadcastReceiver onComplete = new BroadcastReceiver() {
public void onReceive(Context ctx, Intent intent) {
Intent install = new Intent(Intent.ACTION_VIEW);
install.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
install.setDataAndType(uri, "application/vnd.android.package-archive");
install.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(install);
unregisterReceiver(this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment