Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LSIR/gsn
Browse files Browse the repository at this point in the history
  • Loading branch information
ebiiii committed Jul 1, 2014
2 parents 940e57a + 82f2728 commit b2c6581
Show file tree
Hide file tree
Showing 250 changed files with 20,529 additions and 0 deletions.
121 changes: 121 additions & 0 deletions gsn-tiny/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tinygsn.gui.android"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />

<application
android:name="TinyGSN"
android:debuggable="true"
android:icon="@drawable/gsn_mark"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<service android:name=".GCMIntentService" />

<activity
android:name="tinygsn.gui.android.ActivityAndroidViewer"
android:label="@string/title_activity_tinygsn_main" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivityViewDataNew"
android:label="@string/view_data" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivityVSConfig"
android:label="@string/config"
android:theme="@style/Theme.Styled" >
</activity>
<activity android:name="org.achartengine.GraphicalActivity" />
<activity
android:name="tinygsn.gui.android.ActivityDateTimePicker"
android:label="@string/title_activity_tinygsn_main" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivityListVS"
android:label="@string/title_activity_tinygsn_main" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivityListVSNew"
android:label="@string/list_vs"
android:uiOptions="splitActionBarWhenNarrow" >
</activity>
<!-- android:theme="@style/Theme.AndroidDevelopers" -->
<activity
android:name="tinygsn.gui.android.ActivityListSubscription"
android:label="Subscribed data" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivitySubscribe"
android:label="" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivityHome"
android:label="@string/title_activity_tinygsn_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="tinygsn.gui.android.ActivityPublishData"
android:label="@string/publish_activity" >
</activity>
<activity
android:name="tinygsn.gui.android.gcm.DemoActivity"
android:label="@string/title_activity_tinygsn_main" >

</activity>
<activity
android:name="tinygsn.gui.android.ActivityHelp"
android:label="@string/help" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivityAboutUs"
android:label="@string/about_us" >
</activity>
<activity
android:name="tinygsn.gui.android.ActivityPullData"
android:label="@string/pull"
android:theme="@style/Theme.Styled" >
</activity>

<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />

<category android:name="tinygsn.gui.android" />
</intent-filter>
</receiver>


</application>

<!-- GPS -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<!-- GCM -->
<permission
android:name="tinygsn.gui.android.permission.C2D_MESSAGE"
android:protectionLevel="signature" />

<uses-permission android:name="tinygsn.gui.android.permission.C2D_MESSAGE" />

<!-- App receives GCM messages. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- GCM connects to Google Services. -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- GCM requires a Google account. -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<!-- Keeps the processor from sleeping when a message is received. -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

</manifest>
33 changes: 33 additions & 0 deletions gsn-tiny/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# TinyGSN (part of Global Sensor Networks)

TinyGSN is a lighter version of the software middleware GSN developped for android.

## Online Documentation

You can find the latest GSN documentation, including a deployment, installation, and programming
guide, on the project [wiki](https://github.com/LSIR/gsn/wiki).
This README file only contains some information about the Android app.

## Description

This scaled-down version of GSN, which will be called tinyGSN, will open the door to radically new applications not possible with current server-based setup. These applications will be built through a combination of small software bricks following the GSN philosophy of little-or-zero-programming. One can imagine using his own smartphone during his morning jogging and have tinyGSN record his path using the internal GPS and his steps using a connected Pedometer. This data can later be visualized on the smartphone screen with statistics, progress, number of steps, distance, etc. We can also envision healthcare applications, where a blood pressure meter can be connected to a digital tablet and vital parameters recorded and sent regularly to Hospital. We can even easily send alerts in case of abnormal measurements. Another interesting application will come from pushing data to a regular GSN server. In this case, data from multiple devices can be aggregated for more complex applications like “crowd-sensing”. In a social sensing project, we can, imagine a community of citizens who participate in a collective effort for monitoring air pollution in a city for example.

Demo: http://youtu.be/YdQL2FmwEIM

## Building

First download the code from the main GSN git repository and create an Android project from the ./gsn-tiny folder:

git clone git@github.com:LSIR/gsn.git

TinyGSN requires the following for building:

* Android API 4.0.3 or higher.
* http://actionbarsherlock.com/ setup as a dependent library project (in eclipse)

## Download Package

We will provide a compiled package for installing directly on Android devices with each GSN release, starting from version 1.1.5.

The installer binaries for the latest realease can be found at:
<https://github.com/LSIR/gsn/releases>
17 changes: 17 additions & 0 deletions gsn-tiny/assets/wrapper_list.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
accelerometer=tinygsn.model.wrappers.AndroidAccelerometerWrapper
light=tinygsn.model.wrappers.AndroidLightWrapper
orientation=tinygsn.model.wrappers.AndroidOrientationWrapper
magnetic=tinygsn.model.wrappers.AndroidMagneticFieldWrapper
proximity=tinygsn.model.wrappers.AndroidProximityWrapper
gravity=tinygsn.model.wrappers.AndroidGravityWrapper
gyroscope=tinygsn.model.wrappers.AndroidGyroscopeWrapper
gps=tinygsn.model.wrappers.AndroidGPSWrapper
fakeGPS=tinygsn.model.wrappers.AndroidFakeGPSWrapper
fakeTemperature=tinygsn.model.wrappers.AndroidFakeTemperatureWrapper
linearAcceleration=tinygsn.model.wrappers.AndroidLinearAccelerationWrapper
rotationvector=tinygsn.model.wrappers.AndroidRotationVectorWrapper
USBplugO3Wrapper=tinygsn.model.wrappers.USBplugO3Wrapper
#TYPE_AMBIENT_TEMPERATURE
#TYPE_PRESSURE
#TYPE_RELATIVE_HUMIDITY
#TYPE_TEMPERATURE
Binary file added gsn-tiny/libs/achartengine-1.0.0.jar
Binary file not shown.
Binary file added gsn-tiny/libs/android-active-record.jar
Binary file not shown.
Binary file added gsn-tiny/libs/android-support-v4.jar
Binary file not shown.
Binary file added gsn-tiny/libs/android-viewbadger.jar
Binary file not shown.
Binary file added gsn-tiny/libs/gcm-src.jar
Binary file not shown.
Binary file added gsn-tiny/libs/gcm.jar
Binary file not shown.
Binary file added gsn-tiny/libs/xstream-1.3.1.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions gsn-tiny/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
</lint>
15 changes: 15 additions & 0 deletions gsn-tiny/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-15
android.library.reference.1=../../externals/actionbarsherlock
Binary file added gsn-tiny/res/drawable-hdpi-v11/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi-v9/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi/delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi/ic_stat_android.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-hdpi/views_gear.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-ldpi-v11/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-ldpi-v9/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-ldpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-ldpi/ic_stat_android.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-ldpi/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-ldpi/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-mdpi-v11/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-mdpi-v9/ic_stat_gcm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-mdpi/ad_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added gsn-tiny/res/drawable-mdpi/ic_launcher.png
Binary file added gsn-tiny/res/drawable-mdpi/ic_stat_android.png
Binary file added gsn-tiny/res/drawable-mdpi/ic_stat_gcm.png
Binary file added gsn-tiny/res/drawable-mdpi/icon.png
Binary file added gsn-tiny/res/drawable-xhdpi-v11/ic_stat_gcm.png
Binary file added gsn-tiny/res/drawable-xhdpi-v9/ic_stat_gcm.png
Binary file added gsn-tiny/res/drawable-xhdpi/ic_launcher.png
Binary file added gsn-tiny/res/drawable-xhdpi/ic_stat_gcm.png
Binary file added gsn-tiny/res/drawable-xhdpi/icon.png
Binary file added gsn-tiny/res/drawable/about.png
Binary file added gsn-tiny/res/drawable/about2.png
Binary file added gsn-tiny/res/drawable/about2b.png
Binary file added gsn-tiny/res/drawable/about3.png
Binary file added gsn-tiny/res/drawable/about4.png
24 changes: 24 additions & 0 deletions gsn-tiny/res/drawable/actionbar_tab_bg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:state_focused="false" android:state_selected="false" android:state_pressed="false" android:drawable="@drawable/ad_tab_unselected_holo" />
<item android:state_focused="false" android:state_selected="true" android:state_pressed="false" android:drawable="@drawable/ad_tab_selected_holo" />
<item android:state_selected="false" android:state_pressed="true" android:drawable="@drawable/ad_tab_selected_pressed_holo" />
<item android:state_selected="true" android:state_pressed="true" android:drawable="@drawable/ad_tab_selected_pressed_holo" />

</selector>
23 changes: 23 additions & 0 deletions gsn-tiny/res/drawable/ad_action_bar_gradient_bak.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<gradient
android:startColor="@color/honeycombish_blue"
android:endColor="@color/background"
android:type="linear"
android:angle="270" />
</shape>
66 changes: 66 additions & 0 deletions gsn-tiny/res/drawable/ad_btn_check_holo_light.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Enabled states -->
<item android:state_checked="true" android:state_window_focused="false"
android:state_enabled="true" android:drawable="@drawable/btn_check_on_holo_light" />

<item android:state_checked="false" android:state_window_focused="false"
android:state_enabled="true" android:drawable="@drawable/btn_check_off_holo_light" />

<item android:state_checked="true" android:state_pressed="true"
android:state_enabled="true" android:drawable="@drawable/ad_btn_check_on_pressed_holo_light" />

<item android:state_checked="false" android:state_pressed="true"
android:state_enabled="true" android:drawable="@drawable/ad_btn_check_off_pressed_holo_light" />

<!-- ignoring focused states for brevity
<item android:state_checked="true" android:state_focused="true"
android:state_enabled="true" android:drawable="@drawable/btn_check_on_focused_holo_light" />
<item android:state_checked="false" android:state_focused="true"
android:state_enabled="true" android:drawable="@drawable/btn_check_off_focused_holo_light" />
-->

<item android:state_checked="false" android:state_enabled="true"
android:drawable="@drawable/btn_check_off_holo_light" />

<item android:state_checked="true" android:state_enabled="true"
android:drawable="@drawable/btn_check_on_holo_light" />

<!-- ignoring disabled states for brevity
<item android:state_checked="true" android:state_window_focused="false"
android:drawable="@drawable/btn_check_on_disabled_holo_light" />
<item android:state_checked="false" android:state_window_focused="false"
android:drawable="@drawable/btn_check_off_disabled_holo_light" />
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/btn_check_on_disabled_focused_holo_light" />
<item android:state_checked="false" android:state_focused="true"
android:drawable="@drawable/btn_check_off_disabled_focused_holo_light" />
<item android:state_checked="false"
android:drawable="@drawable/btn_check_off_disabled_holo_light" />
<item android:state_checked="true"
android:drawable="@drawable/btn_check_on_disabled_holo_light" />
-->

</selector>
66 changes: 66 additions & 0 deletions gsn-tiny/res/drawable/ad_btn_radio_holo_light.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">

<!-- Enabled states -->
<item android:state_checked="true" android:state_window_focused="false"
android:state_enabled="true" android:drawable="@drawable/btn_radio_on_holo_light" />

<item android:state_checked="false" android:state_window_focused="false"
android:state_enabled="true" android:drawable="@drawable/btn_radio_off_holo_light" />

<item android:state_checked="true" android:state_pressed="true"
android:state_enabled="true" android:drawable="@drawable/ad_btn_radio_on_pressed_holo_light" />

<item android:state_checked="false" android:state_pressed="true"
android:state_enabled="true" android:drawable="@drawable/ad_btn_radio_off_pressed_holo_light" />

<!-- ignoring focused states for brevity
<item android:state_checked="true" android:state_focused="true"
android:state_enabled="true" android:drawable="@drawable/btn_radio_on_focused_holo_light" />
<item android:state_checked="false" android:state_focused="true"
android:state_enabled="true" android:drawable="@drawable/btn_radio_off_focused_holo_light" />
-->

<item android:state_checked="false" android:state_enabled="true"
android:drawable="@drawable/btn_radio_off_holo_light" />

<item android:state_checked="true" android:state_enabled="true"
android:drawable="@drawable/btn_radio_on_holo_light" />

<!-- ignoring disabled states for brevity
<item android:state_checked="true" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_on_disabled_holo_light" />
<item android:state_checked="false" android:state_window_focused="false"
android:drawable="@drawable/btn_radio_off_disabled_holo_light" />
<item android:state_checked="true" android:state_focused="true"
android:drawable="@drawable/btn_radio_on_disabled_focused_holo_light" />
<item android:state_checked="false" android:state_focused="true"
android:drawable="@drawable/btn_radio_off_disabled_focused_holo_light" />
<item android:state_checked="false"
android:drawable="@drawable/btn_radio_off_disabled_holo_light" />
<item android:state_checked="true"
android:drawable="@drawable/btn_radio_on_disabled_holo_light" />
-->

</selector>
Loading

0 comments on commit b2c6581

Please sign in to comment.