working on PCB v1.5

parent 1505c9e2
Showing with 246 additions and 73 deletions
...@@ -7,10 +7,10 @@ android { ...@@ -7,10 +7,10 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 21 targetSdkVersion 21
versionCode 1 versionCode 3
versionName "1.4" versionName "1.5"
resValue "string", "db_name", "PCB.db" resValue "string", "db_name", "PCB.db"
resValue "integer", "db_version", "10" resValue "integer", "db_version", "11"
//resValue "string", "app_version", "1.1" //resValue "string", "app_version", "1.1"
resValue "string", "core_vocabulary", "core_vocabulary" resValue "string", "core_vocabulary", "core_vocabulary"
resValue "string", "apk", "to_be_set_in_subproject" resValue "string", "apk", "to_be_set_in_subproject"
......
...@@ -34,8 +34,8 @@ name TEXT(40) NOT NULL, ...@@ -34,8 +34,8 @@ name TEXT(40) NOT NULL,
surname TEXT(60) NOT NULL, surname TEXT(60) NOT NULL,
id_scene INTEGER NOT NULL REFERENCES scene, id_scene INTEGER NOT NULL REFERENCES scene,
url_img VARCHAR(250) NOT NULL, url_img VARCHAR(250) NOT NULL,
gender TEXT(1) NOT NULL CHECK (gender IN ('M','F')), gender TEXT(1) DEFAULT 'M',
lang TEXT(5) NOT NULL CHECK (lang in ('en-gb','en-us','es-es')), lang TEXT(5) CHECK (lang in ('en-gb','en-us','es-es')) DEFAULT 'es-es',
attributes TEXT(1024) NULL attributes TEXT(1024) NULL
) )
;-- ;--
...@@ -49,8 +49,8 @@ pwd TEXT(40) NOT NULL, ...@@ -49,8 +49,8 @@ pwd TEXT(40) NOT NULL,
name TEXT(40) NOT NULL, name TEXT(40) NOT NULL,
surname TEXT(60) NOT NULL, surname TEXT(60) NOT NULL,
url_img VARCHAR(250) NOT NULL, url_img VARCHAR(250) NOT NULL,
gender TEXT(1) NULL CHECK (gender IN (NULL, 'M','F')), gender TEXT(1) NULL CHECK (gender IN (NULL, 'M','F')) DEFAULT 'M',
lang TEXT(5) NOT NULL CHECK (lang in ('en-gb','en-us','es-es')), lang TEXT(5) NOT NULL CHECK (lang in ('en-gb','en-us','es-es')) DEFAULT 'es-es',
tts_engine TEXT(100) NULL, tts_engine TEXT(100) NULL,
office TEXT(140) NULL office TEXT(140) NULL
) )
......
include ':supervisor_tablet', ':yotta_tablet', ':commonlibrary', ':watch', ':tabletlibrary' include ':supervisor', ':yotta_tablet', ':commonlibrary', ':watch', ':tabletlibrary'
...@@ -16,8 +16,8 @@ android { ...@@ -16,8 +16,8 @@ android {
applicationId "com.yottacode.supervisor_tablet" applicationId "com.yottacode.supervisor_tablet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 22 targetSdkVersion 22
versionCode 1 versionCode 3
versionName "1.0" versionName "1.5"
resValue "bool","NotifyAllwaysVisible","false" resValue "bool","NotifyAllwaysVisible","false"
resValue "string", "VersionManagerClass", "com.yottacode.pictogram.supervisor_tablet.net.VersionManager" resValue "string", "VersionManagerClass", "com.yottacode.pictogram.supervisor_tablet.net.VersionManager"
resValue "string","apk","pictograms.apk" resValue "string","apk","pictograms.apk"
......
package com.yottacode.pictogram.supervisor_tablet.net;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.view.KeyEvent;
import android.widget.TextView;
import com.yottacode.pictogram.dao.DeviceHelper;
import com.yottacode.pictogram.net.iVersionManager;
import com.yottacode.pictogram.supervisor_tablet.R;
import com.yottacode.pictogram.tools.PCBcontext;
import static android.app.Activity.RESULT_OK;
/**
* Created by Fernando on 10/03/2017.
*/
public class VersionManager implements iVersionManager {
static final String LOG_TAG=VersionManager.class.getCanonicalName();
public void newVersionAlert(final float version, final Context context, final float vnew) {
final SpannableString s = new SpannableString(context.getResources().getString(R.string.google_play_supervisor_apk));
final TextView tx1 = new TextView(context);
tx1.setText("\t"+context.getResources().getString(R.string.new_version_detail) +
"\n\t\t"+ s);
tx1.setTextSize(16);
tx1.setAutoLinkMask(RESULT_OK);
tx1.setMovementMethod(LinkMovementMethod.getInstance());
Linkify.addLinks(s, Linkify.WEB_URLS);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(context.getResources().getString(R.string.app_name)+": "+context.getResources().getString(R.string.new_version_title)+" v"+vnew)
.setCancelable(false)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
DeviceHelper.setAppVersion(vnew);
}
})
.setView(tx1).setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
return false;
}
}).show();
PCBcontext.setActivityContext(null);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":supervisor" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":supervisor" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="DevFlavorDebug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDevFlavorDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDevFlavorDebugSources" />
<afterSyncTasks>
<task>generateDevFlavorDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/intermediates/classes/DevFlavor/debug" />
<output-test url="file://$MODULE_DIR$/build/intermediates/classes/test/DevFlavor/debug" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/DevFlavor/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/DevFlavor/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/DevFlavor/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/DevFlavor/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/DevFlavor/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/DevFlavor/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/DevFlavor/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavorDebug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavorDebug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavorDebug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavorDebug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavorDebug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavorDebug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavorDebug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/DevFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/DevFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/DevFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/DevFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/DevFlavor/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/DevFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/DevFlavor/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavorDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavorDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavorDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavorDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavorDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavorDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavorDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavor/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavor/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavor/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavor/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavor/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavor/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/DevFlavor/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDevFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDevFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDevFlavor/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDevFlavor/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDevFlavor/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDevFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDevFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavor/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavor/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavor/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavor/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavor/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavor/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDevFlavor/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental-safeguard" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/reports" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 24 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="support-v4-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-compat-24.2.1" level="project" />
<orderEntry type="library" exported="" name="animated-vector-drawable-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-fragment-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-base-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-clearcut-9.2.1" level="project" />
<orderEntry type="library" exported="" name="android-gif-drawable-1.1.7" level="project" />
<orderEntry type="library" exported="" name="support-v4-23.0.0" level="project" />
<orderEntry type="library" exported="" name="support-media-compat-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-gcm-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-auth-base-9.2.1" level="project" />
<orderEntry type="library" exported="" name="support-core-ui-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-gass-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-iid-9.2.1" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-vector-drawable-24.2.1" level="project" />
<orderEntry type="library" exported="" name="support-core-utils-24.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-basement-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-tasks-9.2.1" level="project" />
<orderEntry type="library" exported="" name="support-annotations-24.2.1" level="project" />
<orderEntry type="library" exported="" name="androidasync-2.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-auth-9.2.1" level="project" />
<orderEntry type="library" exported="" name="ion-2.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-9.2.1" level="project" />
<orderEntry type="library" exported="" name="play-services-ads-lite-9.2.1" level="project" />
<orderEntry type="module" module-name="commonlibrary" exported="" />
<orderEntry type="module" module-name="tabletlibrary" exported="" />
<orderEntry type="library" exported="" name="android-android-24" level="project" />
<orderEntry type="library" exported="" name="okhttp-ws-2.3.0" level="project" />
<orderEntry type="library" exported="" name="socket.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="okhttp-2.3.0" level="project" />
<orderEntry type="library" exported="" name="support-annotations-23.0.0" level="project" />
<orderEntry type="library" exported="" name="okio-1.3.0" level="project" />
<orderEntry type="library" exported="" name="gson-2.3" level="project" />
<orderEntry type="library" exported="" name="engine.io-client-0.5.0" level="project" />
<orderEntry type="library" exported="" name="appcompat-v7-21.0.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="hamcrest-core-1.3" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="junit-4.12" level="project" />
<orderEntry type="library" exported="" scope="TEST" name="json-20090211" level="project" />
</component>
</module>
\ No newline at end of file
package com.yottacode.pictogram.supervisor_tablet.net;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.util.Linkify;
import android.view.KeyEvent;
import android.widget.TextView;
import com.yottacode.pictogram.dao.DeviceHelper;
import com.yottacode.pictogram.net.iVersionManager;
import com.yottacode.pictogram.supervisor_tablet.R;
import com.yottacode.pictogram.tools.PCBcontext;
import static android.app.Activity.RESULT_OK;
/**
* Created by Fernando on 10/03/2017.
*/
public class VersionManager implements iVersionManager {
static final String LOG_TAG=VersionManager.class.getCanonicalName();
public void newVersionAlert(final float version, final Context context, final float vnew) {
final SpannableString s = new SpannableString(context.getResources().getString(R.string.google_play_supervisor_apk));
final TextView tx1 = new TextView(context);
tx1.setText("\t"+context.getResources().getString(R.string.new_version_detail) +
"\n\t\t"+ s);
tx1.setTextSize(16);
tx1.setAutoLinkMask(RESULT_OK);
tx1.setMovementMethod(LinkMovementMethod.getInstance());
Linkify.addLinks(s, Linkify.WEB_URLS);
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setTitle(context.getResources().getString(R.string.app_name)+": "+context.getResources().getString(R.string.new_version_title)+" v"+vnew)
.setCancelable(false)
.setPositiveButton("OK",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog,
int id) {
DeviceHelper.setAppVersion(vnew);
}
})
.setView(tx1).setOnKeyListener(new DialogInterface.OnKeyListener() {
@Override
public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
return false;
}
}).show();
PCBcontext.setActivityContext(null);
}
}
...@@ -16,8 +16,8 @@ android { ...@@ -16,8 +16,8 @@ android {
applicationId "com.yottacode.pictogram.yotta_tablet" applicationId "com.yottacode.pictogram.yotta_tablet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 22 targetSdkVersion 22
versionCode 1 versionCode 3
versionName "1.0" versionName "1.5"
resValue "bool","NotifyAllwaysVisible","true" resValue "bool","NotifyAllwaysVisible","true"
resValue "string","apk","pictogram.apk" resValue "string","apk","pictogram.apk"
resValue "string", "VersionManagerClass", "com.yottacode.pictogram.yotta_tablet.net.com.yottacode.pictogram.yotta_tablet.net.VersionManager" resValue "string", "VersionManagerClass", "com.yottacode.pictogram.yotta_tablet.net.com.yottacode.pictogram.yotta_tablet.net.VersionManager"
......
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 sign in to comment