Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dave Griffiths
mongoose-2000
Commits
32b75b45
Commit
32b75b45
authored
Dec 09, 2013
by
Dave Griffiths
Browse files
gps working + rotate screen fix
parent
ec2170fb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
20 deletions
+24
-20
android/AndroidManifest.xml
android/AndroidManifest.xml
+13
-12
android/assets/lib.scm
android/assets/lib.scm
+2
-1
android/assets/starwisp.scm
android/assets/starwisp.scm
+6
-4
android/src/foam/mongoose/DorisLocationListener.java
android/src/foam/mongoose/DorisLocationListener.java
+3
-3
No files found.
android/AndroidManifest.xml
View file @
32b75b45
...
@@ -10,26 +10,27 @@
...
@@ -10,26 +10,27 @@
>
>
<activity
android:name=
"starwisp"
<activity
android:name=
"starwisp"
android:configChanges=
"orientation"
android:label=
"@string/app_name"
>
android:label=
"@string/app_name"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</intent-filter>
</activity>
</activity>
<activity
android:name=
"ObservationsActivity"
></activity>
<activity
android:name=
"ObservationsActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"GroupCompositionActivity"
android:
noHistory=
"true
"
></activity>
<activity
android:name=
"GroupCompositionActivity"
android:
configChanges=
"orientation
"
></activity>
<activity
android:name=
"PupFocalStartActivity"
android:
noHistory=
"true
"
></activity>
<activity
android:name=
"PupFocalStartActivity"
android:
configChanges=
"orientation
"
></activity>
<activity
android:name=
"PupFocalActivity"
android:
noHistory=
"true
"
></activity>
<activity
android:name=
"PupFocalActivity"
android:
configChanges=
"orientation
"
></activity>
<activity
android:name=
"GroupEventsActivity"
android:
noHistory=
"true
"
></activity>
<activity
android:name=
"GroupEventsActivity"
android:
configChanges=
"orientation
"
></activity>
<activity
android:name=
"ManagePacksActivity"
></activity>
<activity
android:name=
"ManagePacksActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"NewPackActivity"
></activity>
<activity
android:name=
"NewPackActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"ManageIndividualActivity"
></activity>
<activity
android:name=
"ManageIndividualActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"NewIndividualActivity"
></activity>
<activity
android:name=
"NewIndividualActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"UpdateIndividualActivity"
></activity>
<activity
android:name=
"UpdateIndividualActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"TagLocationActivity"
></activity>
<activity
android:name=
"TagLocationActivity"
android:configChanges=
"orientation"
></activity>
<activity
android:name=
"SyncActivity"
></activity>
<activity
android:name=
"SyncActivity"
android:configChanges=
"orientation"
></activity>
</application>
</application>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
...
...
android/assets/lib.scm
View file @
32b75b45
...
@@ -761,7 +761,8 @@
...
@@ -761,7 +761,8 @@
(
equal?
(
list-ref
event
0
)
"list-files"
)
(
equal?
(
list-ref
event
0
)
"list-files"
)
(
equal?
(
list-ref
event
0
)
"http-request"
)
(
equal?
(
list-ref
event
0
)
"http-request"
)
(
equal?
(
list-ref
event
0
)
"network-connect"
)
(
equal?
(
list-ref
event
0
)
"network-connect"
)
(
equal?
(
list-ref
event
0
)
"delayed"
))
(
equal?
(
list-ref
event
0
)
"delayed"
)
(
equal?
(
list-ref
event
0
)
"gps-start"
))
(
add-new-dialog!
event
)))
(
add-new-dialog!
event
)))
events
)))
events
)))
...
...
android/assets/starwisp.scm
View file @
32b75b45
...
@@ -150,8 +150,8 @@
...
@@ -150,8 +150,8 @@
;; standard bits
;; standard bits
(
entity-add-value!
"user"
"varchar"
(
get-current
'user-id
"none"
))
(
entity-add-value!
"user"
"varchar"
(
get-current
'user-id
"none"
))
(
entity-add-value!
"time"
"varchar"
(
date-time->string
(
date-time
)))
(
entity-add-value!
"time"
"varchar"
(
date-time->string
(
date-time
)))
(
entity-add-value!
"lat"
"real"
0
)
(
entity-add-value!
"lat"
"real"
(
car
(
get-current
'location
'
(
0
0
)))
)
(
entity-add-value!
"lon"
"real"
0
)
(
entity-add-value!
"lon"
"real"
(
cadr
(
get-current
'location
'
(
0
0
)))
)
(
let
((
values
(
get-current
'entity-values
'
())))
(
let
((
values
(
get-current
'entity-values
'
())))
(
cond
(
cond
((
not
(
null?
values
))
((
not
(
null?
values
))
...
@@ -1333,8 +1333,10 @@
...
@@ -1333,8 +1333,10 @@
(
set-current!
'user-id
user-id
)
(
set-current!
'user-id
user-id
)
(
list
(
list
(
gps-start
"gps"
(
lambda
(
loc
)
(
gps-start
"gps"
(
lambda
(
loc
)
(
list
(
toast
(
number->string
(
car
loc
))
(
set-current!
'location
loc
)
(
number->string
(
cadr
loc
))))))
(
list
(
toast
(
string-append
(
number->string
(
car
loc
))
", "
(
number->string
(
cadr
loc
)))))))
(
update-widget
'edit-text
(
get-id
"main-id-text"
)
'text
user-id
))))
(
update-widget
'edit-text
(
get-id
"main-id-text"
)
'text
user-id
))))
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
(
lambda
(
activity
)
'
())
...
...
android/src/foam/mongoose/DorisLocationListener.java
View file @
32b75b45
...
@@ -53,7 +53,7 @@ public class DorisLocationListener implements LocationListener {
...
@@ -53,7 +53,7 @@ public class DorisLocationListener implements LocationListener {
}
}
protected
void
locationChanged
(
double
latitude
,
double
longitude
)
{
protected
void
locationChanged
(
double
latitude
,
double
longitude
)
{
m_Builder
.
DialogCallback
(
m_Context
,
m_Context
.
m_Name
,
m_CallbackName
,
String
.
valueOf
(
latitude
)+
" "
+
String
.
valueOf
(
longitude
));
m_Builder
.
DialogCallback
(
m_Context
,
m_Context
.
m_Name
,
m_CallbackName
,
"("
+
String
.
valueOf
(
latitude
)+
" "
+
String
.
valueOf
(
longitude
)
+
")"
);
}
}
protected
void
setDeviceLocation
()
{
protected
void
setDeviceLocation
()
{
...
@@ -104,11 +104,11 @@ public class DorisLocationListener implements LocationListener {
...
@@ -104,11 +104,11 @@ public class DorisLocationListener implements LocationListener {
||
(
new
Date
()).
getTime
()
-
currrentLocation
.
getTime
()
>
ONE_MINUTE
)
{
||
(
new
Date
()).
getTime
()
-
currrentLocation
.
getTime
()
>
ONE_MINUTE
)
{
if
(
netAvailable
)
{
if
(
netAvailable
)
{
locationManager
.
requestLocationUpdates
(
locationManager
.
requestLocationUpdates
(
LocationManager
.
NETWORK_PROVIDER
,
0
,
0
,
this
);
LocationManager
.
NETWORK_PROVIDER
,
3
*
60
*
100
0
,
5
,
this
);
}
}
if
(
gpsAvailable
)
{
if
(
gpsAvailable
)
{
locationManager
.
requestLocationUpdates
(
locationManager
.
requestLocationUpdates
(
LocationManager
.
GPS_PROVIDER
,
0
,
0
,
this
);
LocationManager
.
GPS_PROVIDER
,
3
*
60
*
100
0
,
5
,
this
);
}
}
}
}
}
}
...
...
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