Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
794cce90
Commit
794cce90
authored
Jun 08, 2012
by
Karishma Chadha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final verison
parent
8fb4fe27
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
...c/com/google/appinventor/components/common/YaVersion.java
+1
-1
appinventor/components/src/com/google/appinventor/components/runtime/AccelerometerSensor.java
...e/appinventor/components/runtime/AccelerometerSensor.java
+2
-2
appinventor/docs/learn/reference/components/sensors.html
appinventor/docs/learn/reference/components/sensors.html
+14
-0
No files found.
appinventor/components/src/com/google/appinventor/components/common/YaVersion.java
View file @
794cce90
...
...
@@ -171,7 +171,7 @@ public class YaVersion {
// For YOUNG_ANDROID_VERSION 55:
// - ACCELEROMETERSENSOR_COMPONENT_VERSION was incremented to 2.
public
static
final
int
YOUNG_ANDROID_VERSION
=
5
4
;
public
static
final
int
YOUNG_ANDROID_VERSION
=
5
5
;
// ............................... Blocks Language Version Number ...............................
...
...
appinventor/components/src/com/google/appinventor/components/runtime/AccelerometerSensor.java
View file @
794cce90
...
...
@@ -109,7 +109,7 @@ public class AccelerometerSensor extends AndroidNonvisibleComponent
sensorManager
=
(
SensorManager
)
container
.
$context
().
getSystemService
(
Context
.
SENSOR_SERVICE
);
accelerometerSensor
=
sensorManager
.
getDefaultSensor
(
Sensor
.
TYPE_ACCELEROMETER
);
startListening
();
MinimumInterval
(
3
00
);
MinimumInterval
(
4
00
);
}
/**
...
...
@@ -134,7 +134,7 @@ public class AccelerometerSensor extends AndroidNonvisibleComponent
* @param interval minimum interval in ms
*/
@DesignerProperty
(
editorType
=
PropertyTypeConstants
.
PROPERTY_TYPE_NON_NEGATIVE_INTEGER
,
defaultValue
=
"
300"
)
defaultValue
=
"
400"
)
//Default value derived by trial of 12 people on 3 different devices
@SimpleProperty
public
void
MinimumInterval
(
int
interval
)
{
MinimumInterval
=
interval
;
...
...
appinventor/docs/learn/reference/components/sensors.html
View file @
794cce90
...
...
@@ -138,6 +138,20 @@
<dd>
Acceleration in the Z-dimension.
</dd>
<dt>
<code
class=
"c2"
>
MinimumInterval
</code>
</dt>
<dd>
Minimum time interval between phone shakes.
<br/>
You may want to change the time interval depending on the activity you want to perform when the phone is shaken.
For example, you may want the phone to say "Stop shaking me" each time the user shakes the phone. At shorter time intervals, this
will produce an unwanted echo effect.
In another case, you may want a quick flick of the phone to be considered a single shake and perhaps increment a
counter each time the phone shakes. In cases such as this, a shorter time interval will be more appropriate to properly count the shakes.
</dd>
</dl>
<h3>
Events
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment