Commit a684965f authored by Dave Griffiths's avatar Dave Griffiths

massive activity action, most added

parent a584cee2
......@@ -3,49 +3,50 @@
package="foam.symbai"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name"
android:icon="@drawable/logo"
android:theme="@style/StarwispTheme"
android:hardwareAccelerated="true"
>
<application android:label="@string/app_name"
android:icon="@drawable/logo"
android:theme="@style/StarwispTheme"
android:hardwareAccelerated="true"
>
<activity android:name="foam.symbai.starwisp"
android:configChanges="orientation"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="foam.symbai.VillageActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.HouseholdListActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.HouseholdActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IndividualActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.DetailsActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.FamilyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.MigrationActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IncomeActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.GeneaologyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.SocialActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.AgreementActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IndividualChooserActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.starwisp"
android:configChanges="orientation"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="foam.symbai.VillageActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.HouseholdListActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.HouseholdActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IndividualActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.DetailsActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.FamilyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.MigrationActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IncomeActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.GeneaologyActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.SocialActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.AgreementActivity" android:configChanges="orientation"></activity>
<activity android:name="foam.symbai.IndividualChooserActivity" android:configChanges="orientation"></activity>
</application>
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COURSE_LOCATION" />
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COURSE_LOCATION" />
<uses-sdk android:minSdkVersion="8" />
<uses-feature android:name="android.hardware.camera" android:required="true" />
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
</manifest>
......@@ -166,6 +166,7 @@
((equal? (car v) "no change")
(debug! (string-append "No change for " (car (car e)))))
((equal? (car v) "updated")
;; send new files hereish
(update-entity-clean db table (cadr v))
(debug! (string-append "Updated changed " (car (car e)))))
(else
......@@ -187,6 +188,7 @@
;; check "sync-insert" in sync.ss raspberry pi-side for the contents of 'entity'
(let ((entity (list-ref data 0))
(ktvlist (list-ref data 1)))
;; request updated files hereish
(if (not exists)
(insert-entity-wholesale
db table
......
......@@ -34,7 +34,8 @@
(db-exec db (string-append "create table " table "_attribute ( id integer primary key autoincrement, attribute_id varchar(256), entity_type varchar(256), attribute_type varchar(256))"))
(db-exec db (string-append "create table " table "_value_varchar ( id integer primary key autoincrement, entity_id integer, attribute_id varchar(255), value varchar(4096), dirty integer)"))
(db-exec db (string-append "create table " table "_value_int ( id integer primary key autoincrement, entity_id integer, attribute_id varchar(255), value integer, dirty integer)"))
(db-exec db (string-append "create table " table "_value_real ( id integer primary key autoincrement, entity_id integer, attribute_id varchar(255), value real, dirty integer)")))
(db-exec db (string-append "create table " table "_value_real ( id integer primary key autoincrement, entity_id integer, attribute_id varchar(255), value real, dirty integer)"))
(db-exec db (string-append "create table " table "_value_file ( id integer primary key autoincrement, entity_id integer, attribute_id varchar(255), value varchar(4096), dirty integer)")))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
......
......@@ -474,6 +474,7 @@
(define (http-request name url fn) (list "http-request" 0 "http-request" name fn url))
(define (http-download name url filename) (list "http-download" 0 "http-download" name filename url))
(define (send-mail to subject body attachments) (list "send-mail" 0 "send-mail" to subject body attachments))
(define (take-photo filename code) (list "take-photo" 0 "take-photo" filename code))
(define (walk-draggable name id fn) (list "walk-draggable" 0 "walk-draggable" name fn id))
(define (dialog-fragment id layout fragment-name fn)
......
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<gradient android:endColor="#ffff8256"
android:startColor="#ffefa276" android:angle="270" />
<!-- <stroke android:width="2dp" android:color="#000000" /> -->
<corners android:radius="10dp" />
<padding android:left="4dp" android:top="4dp"
android:right="4dp" android:bottom="4dp" />
</shape>
</item>
</selector>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="bg">#aaaaaa</color>
<color name="text">#000000</color>
<color name="buttonbg">#ffffff</color>
<style name="StarwispButton" parent="android:style/Widget.Button">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">50sp</item>
<item name="android:layout_margin">10dip</item>
<item name="android:background">@drawable/swarmbutton</item>
<item name="android:layout_marginBottom">5dp</item>
</style>
<style name="StarwispFancyToggleButton" parent="android:style/Widget.Button">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">50sp</item>
<item name="android:layout_margin">10dip</item>
<item name="android:drawableTop">@drawable/swarmtoggledrawable</item>
<item name="android:background">@drawable/swarmtoggle</item>
<item name="android:layout_marginBottom">0dp</item>
</style>
<style name="StarwispYesToggleButton" parent="android:style/Widget.Button">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">50sp</item>
<item name="android:layout_margin">10dip</item>
<item name="android:background">@drawable/swarmtoggledrawable_yes</item>
<item name="android:layout_marginBottom">5dp</item>
</style>
<style name="StarwispMaybeToggleButton" parent="android:style/Widget.Button">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">50sp</item>
<item name="android:layout_margin">10dip</item>
<item name="android:background">@drawable/swarmtoggledrawable_maybe</item>
<item name="android:layout_marginBottom">5dp</item>
</style>
<style name="StarwispNoToggleButton" parent="android:style/Widget.Button">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">50sp</item>
<item name="android:layout_margin">10dip</item>
<item name="android:background">@drawable/swarmtoggledrawable_no</item>
<item name="android:layout_marginBottom">5dp</item>
</style>
<style name="StarwispSpinnerItem" parent="android:Widget.TextView.SpinnerItem">
<!-- <item name="android:textAppearance">@style/StarwispTextAppearanceSpinnerItem</item> -->
<item name="android:background">@drawable/swarmspinner</item>
</style>
<style name="StarwispTextAppearanceSpinnerItem" parent="android:TextAppearance.Widget.TextView.SpinnerItem">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">50sp</item>
</style>
<style name="StarwispSpinner" parent="android:style/Widget.Spinner">
<item name="android:textColor">@color/text</item>
<item name="android:textSize">50sp</item>
<item name="android:background">@drawable/swarmspinner</item>
</style>
<style name="StarwispSeekBar" parent="android:style/Widget.SeekBar">
<item name="android:progressDrawable">@drawable/seekprogress</item>
<item name="android:thumb">@drawable/seekthumb</item>
</style>
<style name="StarwispTheme" parent="android:Theme.Light">
<item name="android:textColor">@color/text</item>
<item name="android:textColorLink">#005500</item>
<item name="android:windowBackground">@drawable/bg_style</item>
<item name="android:colorBackground">@color/bg</item>
<item name="android:buttonStyle">@style/StarwispButton</item>
<item name="android:buttonStyleToggle">@style/StarwispButton</item>
<item name="android:seekBarStyle">@style/StarwispSeekBar</item>
<item name="android:spinnerItemStyle">@style/StarwispSpinnerItem</item>
<item name="android:spinnerStyle">@style/StarwispSpinner</item>
</style>
</resources>
......@@ -82,11 +82,14 @@ public class starwisp extends StarwispActivity
{
setContentView(R.layout.main);
String dirname = "starwisp/";
String dirname = "symbai/";
m_AppDir = "/sdcard/"+dirname;
File appdir = new File(m_AppDir);
appdir.mkdirs();
File filesdir = new File(m_AppDir+"/files/");
filesdir.mkdirs();
// build static things
m_Scheme = new Scheme(this);
m_Builder = new StarwispBuilder(m_Scheme);
......
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