Skip to content

Commit

Permalink
Merge pull request #3 from Sleepsleep/master
Browse files Browse the repository at this point in the history
JUMA BLE Toolbox
  • Loading branch information
gilbertjuly committed Jan 23, 2016
2 parents 86d6273 + 05aae57 commit 1cd2358
Show file tree
Hide file tree
Showing 62 changed files with 3,458 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.source=1.6
53 changes: 53 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.juma.cannontoolbox"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.juma.cannontoolbox.CannonToolboxActivity"
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="com.juma.cannontoolbox.MagnetometerActivity"
android:label="@string/title_activity_magnetometer" >
</activity>
<activity
android:name="com.juma.cannontoolbox.BarometerActivity"
android:label="@string/title_activity_barometer" >
</activity>
<activity
android:name="com.juma.cannontoolbox.CubeActivity"
android:label="@string/title_activity_cube_activitty" >
</activity>
<activity
android:name="com.juma.cannontoolbox.OTAActivity"
android:label="@string/title_activity_car" >
</activity>
<activity
android:name="com.juma.cannontoolbox.RBGActivity"
android:label="@string/title_activity_rbg" >
</activity>
<activity
android:name="com.juma.cannontoolbox.TRHActivity"
android:label="@string/title_activity_trh" >
</activity>
</application>

</manifest>
Binary file added ic_launcher-web.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 libs/android-support-v4.jar
Binary file not shown.
Binary file added libs/juma-sdk.jar
Binary file not shown.
20 changes: 20 additions & 0 deletions proguard-project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
14 changes: 14 additions & 0 deletions project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# 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-19
Binary file added res/drawable-hdpi/back.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 res/drawable-hdpi/back_1.jpg
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 res/drawable-hdpi/back_2.jpg
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 res/drawable-hdpi/back_3.jpg
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 res/drawable-hdpi/back_4.jpg
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 res/drawable-hdpi/barometer.jpg
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 res/drawable-hdpi/compass1.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 res/drawable-hdpi/compass2.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 res/drawable-hdpi/compass_image.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 res/drawable-hdpi/cool.jpg
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 res/drawable-hdpi/cube.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 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 res/drawable-hdpi/juma1.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 res/drawable-hdpi/magnetometer.png.jpg
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 res/drawable-hdpi/ota.jpg
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 res/drawable-hdpi/rgb.jpg
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 res/drawable-hdpi/trh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions res/drawable-ldpi/bt_click.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:drawable="@drawable/clr_normal" android:state_pressed="false"/>
<item android:drawable="@drawable/clr_pressed" android:state_pressed="true"/>

</selector>
Binary file added res/drawable-mdpi/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 res/drawable-xhdpi/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 res/drawable-xxhdpi/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.
98 changes: 98 additions & 0 deletions res/layout/activity_barometer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MagnetometerActivity"
android:background="#ffffff"
android:orientation="vertical"
>
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/back" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="back"
android:gravity="center"
android:textSize="25dp"/>
</TableRow>

<TableRow
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Barometer"
android:textSize="40dp" />
</TableRow>
<Spinner
android:id="@+id/spinner1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="reference:" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="http://wenku.baidu.com/link?url=u93sG0t89nukfgEV5QtwIk9Fv-83lQU9b4c383e-Q-ZV3AZbQW3XuKU05cVCduJvPqDNrZ5Ayt-OtboCYwHwTTvINhE6oSItb-NTJPc9TPG"
android:autoLink="all"/>

</TableRow>
<GridLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnCount="1" >

<TextView
android:id="@+id/tp"
android:layout_column="0"
android:layout_gravity="center_horizontal|top"
android:layout_row="0"
android:text="hPa"
android:layout_marginTop="20dp"/>

<TextView
android:id="@+id/tc"
android:layout_column="0"
android:layout_gravity="center"
android:layout_row="0"
android:text="" />

<TextView
android:id="@+id/tm"
android:layout_column="0"
android:layout_gravity="center_horizontal|bottom"
android:layout_row="0"
android:text="m"
android:layout_marginBottom="20dp" />

<TextView
android:layout_column="0"
android:layout_gravity="left|bottom"
android:layout_row="0"
android:text="0m at 1027hPa" />

</GridLayout>

</LinearLayout>
96 changes: 96 additions & 0 deletions res/layout/activity_magnetometer.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MagnetometerActivity"
android:background="#ffffff"
android:orientation="vertical"
>
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/back" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="back"
android:gravity="center"
android:textSize="25dp"/>
</TableRow>

<TableRow
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="E-compass"
android:textSize="40dp" />
</TableRow>
<Spinner
android:id="@+id/spinner1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />

<TableRow
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="reference:" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="http://www.stmcu.org/article/id-261634"
android:autoLink="all"/>

</TableRow>

<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" >

<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/compass_image" />

</TableRow>

<TableRow
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" >

<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/compass2" />

</TableRow>

</FrameLayout>

</LinearLayout>
72 changes: 72 additions & 0 deletions res/layout/activity_ota.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MagnetometerActivity"
android:background="#ffffff"
android:orientation="vertical"
>
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<ImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:src="@drawable/back" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="back"
android:gravity="center"
android:textSize="25dp"/>
</TableRow>

<TableRow
android:gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="OTA"
android:textSize="40dp" />
</TableRow>
<Spinner
android:id="@+id/spinner1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />




<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical" >
<EditText
android:id="@+id/editText1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:ems="10"
android:text="http://192.168.2.110/app.bin">

<requestFocus />
</EditText>

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Fill in the address code" />
</LinearLayout>


</LinearLayout>
Loading

0 comments on commit 1cd2358

Please sign in to comment.