Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
b950a979
Commit
b950a979
authored
10 years ago
by
Maxime Graulich
Browse files
Options
Downloads
Patches
Plain Diff
replace models when a new version of the app is detected
parent
b3af77a7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
contrib/mobile/Android/src/org/geuz/onelab/ParameterNumber.java
+0
-6
0 additions, 6 deletions
...b/mobile/Android/src/org/geuz/onelab/ParameterNumber.java
contrib/mobile/Android/src/org/geuz/onelab/SplashScreen.java
+16
-1
16 additions, 1 deletion
contrib/mobile/Android/src/org/geuz/onelab/SplashScreen.java
with
16 additions
and
7 deletions
contrib/mobile/Android/src/org/geuz/onelab/ParameterNumber.java
+
0
−
6
View file @
b950a979
...
...
@@ -17,18 +17,12 @@ import android.widget.EditText;
import
android.widget.LinearLayout
;
import
android.widget.SeekBar
;
import
android.widget.Spinner
;
import
android.util.Log
;
import
android.app.Dialog
;
import
android.app.AlertDialog
;
import
android.app.DialogFragment
;
import
android.content.DialogInterface
;
import
android.widget.LinearLayout
;
import
android.widget.TextView
;
import
android.widget.EditText
;
import
android.text.TextWatcher
;
import
android.text.Editable
;
public
class
ParameterNumber
extends
Parameter
{
private
double
_value
,
_tmpValue
,
_min
,
_max
,
_step
;
...
...
This diff is collapsed.
Click to expand it.
contrib/mobile/Android/src/org/geuz/onelab/SplashScreen.java
+
16
−
1
View file @
b950a979
...
...
@@ -10,8 +10,10 @@ import java.util.zip.ZipInputStream;
import
android.app.Activity
;
import
android.content.Context
;
import
android.content.Intent
;
import
android.content.SharedPreferences
;
import
android.os.Handler
;
import
android.os.Message
;
import
android.util.Log
;
public
class
SplashScreen
extends
Activity
{
private
static
final
int
SPLASHTIME
=
1000
;
// duration for the splash screen in milliseconds
...
...
@@ -49,7 +51,20 @@ public class SplashScreen extends Activity{
}
else
newIntent
=
new
Intent
(
SplashScreen
.
this
,
ModelList
.
class
);
loadNative
();
SharedPreferences
sharedPref
=
getSharedPreferences
(
getPackageName
(),
Context
.
MODE_PRIVATE
);
int
codev
=
0
;
try
{
codev
=
getPackageManager
().
getPackageInfo
(
getPackageName
(),
0
).
versionCode
;
}
catch
(
android
.
content
.
pm
.
PackageManager
.
NameNotFoundException
e
)
{}
int
modelsv
=
sharedPref
.
getInt
(
"OnelabModelsVersion"
,
0
);
if
(
modelsv
==
0
||
modelsv
!=
codev
)
{
Log
.
d
(
"Models"
,
"Updating models to version "
+
codev
);
SharedPreferences
.
Editor
editor
=
sharedPref
.
edit
();
editor
.
putInt
(
"OnelabModelsVersion"
,
codev
);
editor
.
commit
();
loadNative
();
}
else
Log
.
d
(
"Models"
,
"Leaving models as-is (version "
+
modelsv
+
")"
);
final
Message
msg
=
new
Message
();
msg
.
what
=
STOPSPLASH
;
handler
.
sendMessageDelayed
(
msg
,
SPLASHTIME
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment