From 0acd963df6dbfa99ad668ed18011583e644e14f3 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Mon, 10 Oct 2011 12:28:10 +0100 Subject: [PATCH 1/8] Fixing library reference so it matches that of DigitalClock sample --- samples/notifications/default.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/notifications/default.properties b/samples/notifications/default.properties index 7027a19..fc667cd 100644 --- a/samples/notifications/default.properties +++ b/samples/notifications/default.properties @@ -9,4 +9,4 @@ # Project target. target=android-5 -android.library.reference.1=../cicada/cicadalib +android.library.reference.1=../../cicadalib From baab9223eceb76f6de40f879bdb7f2ed94faa660 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Mon, 10 Oct 2011 18:19:06 +0100 Subject: [PATCH 2/8] First cut of a Phone Status app/widget Just shows GSM Signal strength for now --- samples/phonestatus/.classpath | 9 ++ samples/phonestatus/.project | 45 ++++++++ samples/phonestatus/AndroidManifest.xml | 16 +++ samples/phonestatus/default.properties | 12 +++ samples/phonestatus/proguard.cfg | 40 +++++++ .../phonestatus/res/drawable-hdpi/icon.png | Bin 0 -> 4147 bytes .../phonestatus/res/drawable-ldpi/icon.png | Bin 0 -> 1723 bytes .../phonestatus/res/drawable-mdpi/icon.png | Bin 0 -> 2574 bytes samples/phonestatus/res/values/strings.xml | 4 + .../hydraproductions/cicada/PhoneStatus.java | 100 ++++++++++++++++++ 10 files changed, 226 insertions(+) create mode 100644 samples/phonestatus/.classpath create mode 100644 samples/phonestatus/.project create mode 100644 samples/phonestatus/AndroidManifest.xml create mode 100644 samples/phonestatus/default.properties create mode 100644 samples/phonestatus/proguard.cfg create mode 100644 samples/phonestatus/res/drawable-hdpi/icon.png create mode 100644 samples/phonestatus/res/drawable-ldpi/icon.png create mode 100644 samples/phonestatus/res/drawable-mdpi/icon.png create mode 100644 samples/phonestatus/res/values/strings.xml create mode 100644 samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java diff --git a/samples/phonestatus/.classpath b/samples/phonestatus/.classpath new file mode 100644 index 0000000..7011827 --- /dev/null +++ b/samples/phonestatus/.classpath @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/samples/phonestatus/.project b/samples/phonestatus/.project new file mode 100644 index 0000000..36367ee --- /dev/null +++ b/samples/phonestatus/.project @@ -0,0 +1,45 @@ + + + PhoneStatus + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + + + ApolloLib_src + 2 + _android_ApolloLib_c6286f16/src + + + CicadaLib_src + 2 + _android_CicadaLib_8981e3e4/src + + + diff --git a/samples/phonestatus/AndroidManifest.xml b/samples/phonestatus/AndroidManifest.xml new file mode 100644 index 0000000..2ef7916 --- /dev/null +++ b/samples/phonestatus/AndroidManifest.xml @@ -0,0 +1,16 @@ + + + + + + + + + + \ No newline at end of file diff --git a/samples/phonestatus/default.properties b/samples/phonestatus/default.properties new file mode 100644 index 0000000..c33f3d2 --- /dev/null +++ b/samples/phonestatus/default.properties @@ -0,0 +1,12 @@ +# 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 use, +# "build.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-8 +android.library.reference.1=../../cicadalib diff --git a/samples/phonestatus/proguard.cfg b/samples/phonestatus/proguard.cfg new file mode 100644 index 0000000..b1cdf17 --- /dev/null +++ b/samples/phonestatus/proguard.cfg @@ -0,0 +1,40 @@ +-optimizationpasses 5 +-dontusemixedcaseclassnames +-dontskipnonpubliclibraryclasses +-dontpreverify +-verbose +-optimizations !code/simplification/arithmetic,!field/*,!class/merging/* + +-keep public class * extends android.app.Activity +-keep public class * extends android.app.Application +-keep public class * extends android.app.Service +-keep public class * extends android.content.BroadcastReceiver +-keep public class * extends android.content.ContentProvider +-keep public class * extends android.app.backup.BackupAgentHelper +-keep public class * extends android.preference.Preference +-keep public class com.android.vending.licensing.ILicensingService + +-keepclasseswithmembernames class * { + native ; +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet); +} + +-keepclasseswithmembers class * { + public (android.content.Context, android.util.AttributeSet, int); +} + +-keepclassmembers class * extends android.app.Activity { + public void *(android.view.View); +} + +-keepclassmembers enum * { + public static **[] values(); + public static ** valueOf(java.lang.String); +} + +-keep class * implements android.os.Parcelable { + public static final android.os.Parcelable$Creator *; +} diff --git a/samples/phonestatus/res/drawable-hdpi/icon.png b/samples/phonestatus/res/drawable-hdpi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8074c4c571b8cd19e27f4ee5545df367420686d7 GIT binary patch literal 4147 zcmV-35X|q1P)OwvMs$Q8_8nISM!^>PxsujeDCl4&hPxrxkp%Qc^^|l zp6LqAcf3zf1H4aA1Gv-O6ha)ktct9Y+VA@N^9i;p0H%6v>ZJZYQ`zEa396z-gi{r_ zDz)D=vgRv62GCVeRjK{15j7V@v6|2nafFX6W7z2j1_T0a zLyT3pGTubf1lB5)32>bl0*BflrA!$|_(WD2)iJIfV}37=ZKAC zSe3boYtQ=;o0i>)RtBvsI#iT{0!oF1VFeW`jDjF2Q4aE?{pGCAd>o8Kg#neIh*AMY zLl{;F!vLiem7s*x0<9FKAd6LoPz3~G32P+F+cuGOJ5gcC@pU_?C2fmix7g2)SUaQO$NS07~H)#fn!Q<}KQWtX}wW`g2>cMld+`7Rxgq zChaey66SG560JhO66zA!;sK1cWa2AG$9k~VQY??6bOmJsw9@3uL*z;WWa7(Nm{^TA zilc?y#N9O3LcTo2c)6d}SQl-v-pE4^#wb=s(RxaE28f3FQW(yp$ulG9{KcQ7r>7mQ zE!HYxUYex~*7IinL+l*>HR*UaD;HkQhkL(5I@UwN%Wz504M^d!ylo>ANvKPF_TvA< zkugG5;F6x}$s~J8cnev->_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NKVZ_GoYH{la~d*1Yh$TI-TL>mI4vpNb@sU2=IZ8vL%AXUx0 zz{K0|nK(yizLHaeW#ZhRfQXoK^}1$=$#1{Yn002ovPDHLkV1n#w+^+xt literal 0 HcmV?d00001 diff --git a/samples/phonestatus/res/drawable-ldpi/icon.png b/samples/phonestatus/res/drawable-ldpi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..1095584ec21f71cd0afc9e0993aa2209671b590c GIT binary patch literal 1723 zcmV;s21NOZP)AReP91Tc8>~sHP8V>Ys(CF=aT`Sk=;|pS}XrJPb~T1dys{sdO&0YpQBSz*~us zcN*3-J_EnE1cxrXiq*F~jZje~rkAe3vf3>;eR)3?Ox=jK*jEU7Do|T`2NqP{56w(* zBAf)rvPB_7rsfeKd0^!CaR%BHUC$tsP9m8a!i@4&TxxzagzsYHJvblx4rRUu#0Jlz zclZJwdC}7S3BvwaIMTiwb!98zRf|zoya>NudJkDGgEYs=q*HmC)>GExofw=92}s;l z_YgKLUT5`<1RBwq{f)K~I%M=gRE6d)b5BP`8{u9x0-wsG%H)w^ zRU7n9FwtlfsZSjiSB(k8~Y5+O>dyoSI477Ly?|FR?m))C!ci%BtY!2Sst8Uri#|SFX&)8{_Ou2 z9r5p3Vz9_GY#%D>%huqp_>U}K45YGy__TE!HZA@bMxX~@{;>cGYRgH~Ih*vd7EgV7h6Pg$#$lH+5=^lj{W80p{{l+;{7_t5cv3xVUy zl_BY4ht1JH*EEeRS{VwTC(QFIVu8zF&P8O$gJsMgsSO35SVvBrX`Vah$Yz2-5T>-`4DJNH;N zlSSY8-mfty+|1~*;BtTwLz_w5 z+lRv)J28~G%ouyvca(@|{2->WsPii&79&nju7ITE6hMX4AQc{|KqZN#)aAvemg3IZ zCr}Y+!r}JU&^>U1C2WyZC<=47itSYQ`?$5{VH?mtFMFFExfYTsfqK%*WzH@Onc#i` zI@a|rm-WbKk{5my{mF}H>Duc$bit&yLAgFfqo2vVbm~?FeG#0F?dSP*kxSo0Ff!o@ z(C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Z35jAMRz%R%0(P!0FMv=sk>Nr8%+OzY^c-M9@+fz=G`qa@v4sF5u-2289-#$**LWnyNNDwDf1( zkUiMnw|y$tn>pQP=Vn!#|17L^5AGrjtBkN$D@v)Z7LXc5EFhLB4<;7Wehh)CMqX|W zqsiZaO^benJ_hwa&V0ub$-_HUk**?g6fm9|!@kguU6*zhK)$qn-<3*kFrYPIaqR=V zUaUvk>@F_89b@tHs8R!*QKY;INJ<2_U+K6Ca3e9Gsl2{qY0%a7J?uICWgHuLfj+MB z=GkAN1&ifT#2u}B+2S#~$5jA(Qn^;H%CCmIae4AE-Dsng|Hl*Ov!z72k3ZnJs{pp| z+pW`DDueC#mEWOf=ucJ!dTL}hzOeiS-i?m2E;`EKz4<&Lu~NnW?peqVU^@<+T3KKu z{yrI%Qy-Z%HEvLUz}n^~m?7x`xuCtNR#L2En!T>dQtIKdS#V-Hzt3RtwTeYtmQ&dR z6qXZvac*oc@BUYEH%@Ylv_1&tSjkbzzU6*h1(3^C`;1z;g_SmOtclS?KWk2VYE zM*oS<=C483XckW?GN|1jfh3Ro(h + + Phone Status + diff --git a/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java b/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java new file mode 100644 index 0000000..cf10ff5 --- /dev/null +++ b/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java @@ -0,0 +1,100 @@ +package com.hydraproductions.cicada; + +import org.cicadasong.cicadalib.CicadaApp; + +import android.content.Context; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.Typeface; + +import android.telephony.PhoneStateListener; +import android.telephony.TelephonyManager; +import android.telephony.SignalStrength; // API Level 7+ +import android.util.Log; + +public class PhoneStatus extends CicadaApp { + + public static final String TAG = PhoneStatus.class.getSimpleName(); + + private Paint paint; + + private TelephonyManager telephonyManager = null; + StatusPhoneStateListener phoneStateListener; + double signalStrengthPercentage = (double) 0; + + protected double calculateSignalStrengthPercentage(SignalStrength signalStrength) { + + // TODO add CDMA signal strength calculations + int gsmSignalStrength = signalStrength.getGsmSignalStrength(); + Log.i(TAG, String.format("GSM Signal Strength: %d", gsmSignalStrength)); + if (gsmSignalStrength == 99) { + return 0; + } + return (gsmSignalStrength * 100) / 31; + } + + protected void updateSignalStrength(SignalStrength signalStrength) { + signalStrengthPercentage = calculateSignalStrengthPercentage(signalStrength); + + if (!PhoneStatus.this.isActive()) return; + invalidate(); + } + + + private class StatusPhoneStateListener extends PhoneStateListener { + @Override + public void onSignalStrengthsChanged(SignalStrength signalStrength) { + super.onSignalStrengthsChanged(signalStrength); + updateSignalStrength(signalStrength); + } + }; + + @Override + public void onCreate() { + super.onCreate(); + Log.i(TAG, "ON CREATE"); + phoneStateListener = new StatusPhoneStateListener(); + telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); + telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS); + } + + @Override + public String getAppName() { + return getString(R.string.app_name); + } + + @Override + protected void onResume() { + + Log.i(TAG, "ON RESUME"); + paint = new Paint(); + paint.setTextAlign(Paint.Align.CENTER); + paint.setTypeface(Typeface.DEFAULT_BOLD); + paint.setAntiAlias(false); + paint.setTextSize(16); + + telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS); + + invalidate(); + } + + @Override + protected void onPause() { + Log.i(TAG, "ON PAUSE"); + telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE); + } + + @Override + protected void onDraw(Canvas canvas) { + Log.i(TAG, "ON DRAW"); + int x = canvas.getWidth() / 2; + int y = (int) (canvas.getHeight() - paint.ascent()) / 2; + String readout = String.format("%3.2f%%", signalStrengthPercentage); + canvas.drawText(readout, x, y, paint); + } + + @Override + protected void onButtonPress(WatchButton button) { + // TODO Auto-generated method stub + } +} From 710d72a82c78176dd7d4f62e95fb4bebde9eecba Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Tue, 11 Oct 2011 14:33:08 +0100 Subject: [PATCH 3/8] * Code cleanup * Bugfix where rounding was occuring --- .../hydraproductions/cicada/PhoneStatus.java | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java b/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java index cf10ff5..d2fb05b 100644 --- a/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java +++ b/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java @@ -12,31 +12,40 @@ import android.telephony.SignalStrength; // API Level 7+ import android.util.Log; +/** + * @See http://developer.android.com/reference/android/telephony/SignalStrength.html#getGsmSignalStrength%28%29 + * @See 3GPP TS 27.007 v6.3.0 (2003-06) - Section 8.5 - Signal Quality +CSQ + * @author Dominic Clifton + */ public class PhoneStatus extends CicadaApp { public static final String TAG = PhoneStatus.class.getSimpleName(); private Paint paint; + private TelephonyManager telephonyManager; + private StatusPhoneStateListener phoneStateListener; + float signalStrengthPercentage; - private TelephonyManager telephonyManager = null; - StatusPhoneStateListener phoneStateListener; - double signalStrengthPercentage = (double) 0; - - protected double calculateSignalStrengthPercentage(SignalStrength signalStrength) { - + final static short GSM_STRENGTH_MIN = 0; + final static short GSM_STRENGTH_MAX = 31; + final static short GSM_STRENGTH_UNKNOWN = 99; + + protected float calculateSignalStrengthPercentage(SignalStrength signalStrength) { // TODO add CDMA signal strength calculations int gsmSignalStrength = signalStrength.getGsmSignalStrength(); Log.i(TAG, String.format("GSM Signal Strength: %d", gsmSignalStrength)); - if (gsmSignalStrength == 99) { + if (gsmSignalStrength == GSM_STRENGTH_MAX) { return 0; } - return (gsmSignalStrength * 100) / 31; + return (float)(gsmSignalStrength * 100) / GSM_STRENGTH_UNKNOWN; } protected void updateSignalStrength(SignalStrength signalStrength) { signalStrengthPercentage = calculateSignalStrengthPercentage(signalStrength); - if (!PhoneStatus.this.isActive()) return; + if (!PhoneStatus.this.isActive()) { + return; + } invalidate(); } @@ -44,7 +53,6 @@ protected void updateSignalStrength(SignalStrength signalStrength) { private class StatusPhoneStateListener extends PhoneStateListener { @Override public void onSignalStrengthsChanged(SignalStrength signalStrength) { - super.onSignalStrengthsChanged(signalStrength); updateSignalStrength(signalStrength); } }; @@ -52,10 +60,8 @@ public void onSignalStrengthsChanged(SignalStrength signalStrength) { @Override public void onCreate() { super.onCreate(); - Log.i(TAG, "ON CREATE"); - phoneStateListener = new StatusPhoneStateListener(); + phoneStateListener = new StatusPhoneStateListener(); telephonyManager = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE); - telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_SIGNAL_STRENGTHS); } @Override @@ -65,8 +71,6 @@ public String getAppName() { @Override protected void onResume() { - - Log.i(TAG, "ON RESUME"); paint = new Paint(); paint.setTextAlign(Paint.Align.CENTER); paint.setTypeface(Typeface.DEFAULT_BOLD); @@ -80,13 +84,11 @@ protected void onResume() { @Override protected void onPause() { - Log.i(TAG, "ON PAUSE"); telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE); } @Override protected void onDraw(Canvas canvas) { - Log.i(TAG, "ON DRAW"); int x = canvas.getWidth() / 2; int y = (int) (canvas.getHeight() - paint.ascent()) / 2; String readout = String.format("%3.2f%%", signalStrengthPercentage); From e5bc0700991a7a3353c9fb3709001cb96e84a812 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 13 Oct 2011 13:24:03 +0100 Subject: [PATCH 4/8] Fixing clashing package names. Cicada wouldn't detect both apps were installed due to the way it's app database works. --- samples/phonestatus/AndroidManifest.xml | 2 +- .../hydraproductions/cicada/{ => phonestatus}/PhoneStatus.java | 2 +- samples/stopwatch/AndroidManifest.xml | 2 +- .../com/hydraproductions/cicada/{ => stopwatch}/StopWatch.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename samples/phonestatus/src/com/hydraproductions/cicada/{ => phonestatus}/PhoneStatus.java (95%) rename samples/stopwatch/src/com/hydraproductions/cicada/{ => stopwatch}/StopWatch.java (94%) diff --git a/samples/phonestatus/AndroidManifest.xml b/samples/phonestatus/AndroidManifest.xml index 2ef7916..f25421e 100644 --- a/samples/phonestatus/AndroidManifest.xml +++ b/samples/phonestatus/AndroidManifest.xml @@ -1,6 +1,6 @@ diff --git a/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java b/samples/phonestatus/src/com/hydraproductions/cicada/phonestatus/PhoneStatus.java similarity index 95% rename from samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java rename to samples/phonestatus/src/com/hydraproductions/cicada/phonestatus/PhoneStatus.java index d2fb05b..798ba9d 100644 --- a/samples/phonestatus/src/com/hydraproductions/cicada/PhoneStatus.java +++ b/samples/phonestatus/src/com/hydraproductions/cicada/phonestatus/PhoneStatus.java @@ -1,4 +1,4 @@ -package com.hydraproductions.cicada; +package com.hydraproductions.cicada.phonestatus; import org.cicadasong.cicadalib.CicadaApp; diff --git a/samples/stopwatch/AndroidManifest.xml b/samples/stopwatch/AndroidManifest.xml index bb18ddd..b054cf1 100644 --- a/samples/stopwatch/AndroidManifest.xml +++ b/samples/stopwatch/AndroidManifest.xml @@ -1,6 +1,6 @@ diff --git a/samples/stopwatch/src/com/hydraproductions/cicada/StopWatch.java b/samples/stopwatch/src/com/hydraproductions/cicada/stopwatch/StopWatch.java similarity index 94% rename from samples/stopwatch/src/com/hydraproductions/cicada/StopWatch.java rename to samples/stopwatch/src/com/hydraproductions/cicada/stopwatch/StopWatch.java index d464e99..12a984d 100644 --- a/samples/stopwatch/src/com/hydraproductions/cicada/StopWatch.java +++ b/samples/stopwatch/src/com/hydraproductions/cicada/stopwatch/StopWatch.java @@ -1,4 +1,4 @@ -package com.hydraproductions.cicada; +package com.hydraproductions.cicada.stopwatch; /** * Stopwatch example From 195571c5cca75f96568f43088258eb6efec84052 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 13 Oct 2011 13:24:28 +0100 Subject: [PATCH 5/8] Fixing the application name --- samples/stopwatch/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/stopwatch/res/values/strings.xml b/samples/stopwatch/res/values/strings.xml index 7b94ef3..9962d36 100644 --- a/samples/stopwatch/res/values/strings.xml +++ b/samples/stopwatch/res/values/strings.xml @@ -1,4 +1,4 @@ - StopWatch + Stopwatch From 11379d15d16d6bc33cedd64ce95d18e5efb89917 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 13 Oct 2011 14:37:57 +0100 Subject: [PATCH 6/8] Adding support for all london tube lines, DLR and overground The user can press up/down to change selection and middle to force a refresh of the selected line --- .../samples/tubestatus/TubeStatus.java | 102 +++++++++++++++++- 1 file changed, 97 insertions(+), 5 deletions(-) diff --git a/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java b/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java index 08ac239..d5ff944 100644 --- a/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java +++ b/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java @@ -21,6 +21,9 @@ import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; import org.cicadasong.cicadalib.CicadaApp; import org.json.JSONException; @@ -44,11 +47,75 @@ public class TubeStatus extends CicadaApp { // Update every 15 minutes so we don't barrage the server. public static final int STATUS_UPDATE_INTERVAL_MSEC = 15 * 60 * 1000; - private String line = "Victoria Line"; - private String status = "Fetching..."; + private enum TubeLine { + ALL("All lines", "all"), + TUBE("Tube only", "tube"), // excludes DLR and Overground + OVERGROUND("Overground", "overground"), + + BAKERLOO("Bakerloo", "bakerloo"), + CENTRAL("Central", "central"), + CIRCLE("Circle", "circle"), + DISTRICT("District", "district"), + DLR("DLR", "docklands"), + HAMMERSMITH_AND_CITY("Hammersmith & City", "hammersmithcity"), + JUBILEE("Jubilee", "jubilee"), + METROPOLITAN("Metropolitan", "metropolitan"), + NORTHERN("Northern", "northern"), + PICCADILLY("Piccadilly", "piccadilly"), + VICTORIA("Victoria", "victoria"), + WATERLOO_AND_CITY("Waterloo & City", "waterloocity"); + + public String name; + public String lineIdentifier; + + TubeLine(String name, String lineIdentifier) { + this.name = name; + this.lineIdentifier = lineIdentifier; + } + } + + // wildcards followed by alphabetically ordered list + private List allLines = new ArrayList(Arrays.asList( + TubeLine.ALL, + TubeLine.TUBE, + TubeLine.OVERGROUND, + TubeLine.BAKERLOO, + TubeLine.CENTRAL, + TubeLine.CIRCLE, + TubeLine.DISTRICT, + TubeLine.DLR, + TubeLine.HAMMERSMITH_AND_CITY, + TubeLine.JUBILEE, + TubeLine.METROPOLITAN, + TubeLine.NORTHERN, + TubeLine.PICCADILLY, + TubeLine.VICTORIA, + TubeLine.WATERLOO_AND_CITY + )); + + private int selectionIndex; + private TubeLine selectedLine; + private String status; private Runnable updateStatusTask; private Handler handler; + @Override + public void onCreate() { + updateSelection(0); + refreshStatus(); + } + + private void updateSelection(int index) { + if (index < 0) { + index = allLines.size() - 1; + } + if (index >= allLines.size()) { + index = 0; + } + selectionIndex = index; + selectedLine = allLines.get(selectionIndex); + } + @Override protected void onResume() { Log.v(TAG, "Tube Status activated in mode: " + getCurrentMode()); @@ -78,8 +145,33 @@ protected void onPause() { @Override protected void onButtonPress(WatchButton button) { + switch (button) { + case TOP_RIGHT: + updateSelection(selectionIndex - 1); + refreshStatus(); + break; + case MIDDLE_RIGHT: + handler.post(updateStatusTask); + refreshStatus(); + break; + case BOTTOM_RIGHT: + updateSelection(selectionIndex + 1); + refreshStatus(); + break; + } } + protected void refreshStatus() { + status = "Fetching..."; + if (!isActive()) { + return; + } + if (handler != null) { + handler.post(updateStatusTask); + } + invalidate(); + } + protected void onDraw(Canvas canvas) { Paint paint = new Paint(); paint.setTextAlign(Paint.Align.CENTER); @@ -92,7 +184,7 @@ protected void onDraw(Canvas canvas) { paint.setTypeface(Typeface.DEFAULT); paint.setTextSize(11); - canvas.drawText(line, x, y - paint.descent() - 1, paint); + canvas.drawText(selectedLine.name, x, y - paint.descent() - 1, paint); paint.setTextSize(14); canvas.drawText(status, x, y + (int)-paint.ascent() + 1, paint); @@ -122,7 +214,7 @@ private void processStatusUpdate(String newStatus) { private class GetStatusTask extends AsyncTask { private static final String TUBE_STATUS_URL = - "http://api.tubeupdates.com/?method=get.status&lines=victoria&return=status"; + "http://api.tubeupdates.com/?method=get.status&lines={lineIdentifier}&return=status"; protected void onPostExecute(String result) { processStatusUpdate(result); } @@ -131,7 +223,7 @@ protected String doInBackground(Void... params) { String result = "Network Error"; HttpURLConnection connection = null; try { - URL url = new URL(TUBE_STATUS_URL); + URL url = new URL(TUBE_STATUS_URL.replace("{lineIdentifier}", selectedLine.lineIdentifier)); connection = (HttpURLConnection) url.openConnection(); if (connection.getResponseCode() == HttpURLConnection.HTTP_OK) { String response = convertStreamToString(connection.getInputStream()); From 9fdeb47043f6e344d61395dde6221d793a738495 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 13 Oct 2011 14:45:57 +0100 Subject: [PATCH 7/8] Adding link to the TubeUpdates.com API --- .../src/org/cicadasong/samples/tubestatus/TubeStatus.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java b/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java index d5ff944..08a99ad 100644 --- a/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java +++ b/samples/tubestatus/src/org/cicadasong/samples/tubestatus/TubeStatus.java @@ -40,6 +40,9 @@ * An example app that fetches the current status of a particular London Underground line. * If this was a real app, it would also provide a phone-side setup screen to pick the train * lines to show. + * + * It uses the tubeupdates.com site to get the information which currently scrapes information from TFL. + * Api documentation is here: http://tubeupdates.com/documentation/ */ public class TubeStatus extends CicadaApp { public static final String TAG = TubeStatus.class.getSimpleName(); From 8c7c72ae53a787d48af56994982f8d8a1e1a340d Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Tue, 29 Nov 2011 14:28:25 +0000 Subject: [PATCH 8/8] Cleanup of project files for latest android SDK (r15) --- apollolib/.classpath | 14 +-- ...{default.properties => project.properties} | 4 +- cicada/.classpath | 17 ++-- cicada/.project | 12 --- cicada/default.properties | 11 --- cicada/project.properties | 12 +++ cicadalib/.classpath | 16 ++-- ...{default.properties => project.properties} | 4 +- samples/WebImagePlayer/.classpath | 17 ++-- .../project.properties} | 4 +- samples/bitly/.classpath | 19 ++-- samples/bitly/.project | 90 +++++++++---------- .../project.properties} | 4 +- samples/digitalclock/.classpath | 17 ++-- .../project.properties} | 2 +- samples/hellocicada/.classpath | 16 ++-- ...{default.properties => project.properties} | 4 +- samples/nextbuses/.classpath | 17 ++-- .../project.properties} | 4 +- samples/notificationdemo/.classpath | 17 ++-- samples/notificationdemo/default.properties | 12 --- samples/notificationdemo/project.properties | 12 +++ samples/notifications/.classpath | 17 ++-- samples/notifications/.project | 78 +++++++--------- .../project.properties} | 2 +- samples/quicktext/.classpath | 17 ++-- samples/quicktext/project.properties | 12 +++ samples/smsnotifier/.classpath | 17 ++-- samples/smsnotifier/default.properties | 12 --- samples/smsnotifier/project.properties | 12 +++ samples/stopwatch/.classpath | 17 ++-- samples/stopwatch/default.properties | 12 --- samples/stopwatch/project.properties | 12 +++ samples/tubestatus/.classpath | 17 ++-- samples/tubestatus/default.properties | 12 --- samples/tubestatus/project.properties | 12 +++ 36 files changed, 277 insertions(+), 297 deletions(-) rename apollolib/{default.properties => project.properties} (81%) create mode 100644 cicada/project.properties rename cicadalib/{default.properties => project.properties} (83%) rename samples/{nextbuses/default.properties => WebImagePlayer/project.properties} (82%) rename samples/{digitalclock/default.properties => bitly/project.properties} (82%) rename samples/{WebImagePlayer/default.properties => digitalclock/project.properties} (82%) rename samples/hellocicada/{default.properties => project.properties} (82%) rename samples/{bitly/default.properties => nextbuses/project.properties} (82%) delete mode 100644 samples/notificationdemo/default.properties create mode 100644 samples/notificationdemo/project.properties rename samples/{quicktext/default.properties => notifications/project.properties} (82%) create mode 100644 samples/quicktext/project.properties delete mode 100644 samples/smsnotifier/default.properties create mode 100644 samples/smsnotifier/project.properties delete mode 100644 samples/stopwatch/default.properties create mode 100644 samples/stopwatch/project.properties delete mode 100644 samples/tubestatus/default.properties create mode 100644 samples/tubestatus/project.properties diff --git a/apollolib/.classpath b/apollolib/.classpath index 609aa00..aff8e75 100644 --- a/apollolib/.classpath +++ b/apollolib/.classpath @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/apollolib/default.properties b/apollolib/project.properties similarity index 81% rename from apollolib/default.properties rename to apollolib/project.properties index 948be06..7662246 100644 --- a/apollolib/default.properties +++ b/apollolib/project.properties @@ -4,9 +4,9 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. +android.library=true # Project target. target=android-8 -android.library=true diff --git a/cicada/.classpath b/cicada/.classpath index ed3126c..a4f1e40 100644 --- a/cicada/.classpath +++ b/cicada/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/cicada/.project b/cicada/.project index 95b181e..dedbe81 100644 --- a/cicada/.project +++ b/cicada/.project @@ -30,16 +30,4 @@ com.android.ide.eclipse.adt.AndroidNature org.eclipse.jdt.core.javanature - - - ApolloLib_src - 2 - _android_ApolloLib_c6286f16/src - - - CicadaLib_src - 2 - _android_CicadaLib_8981e3e4/src - - diff --git a/cicada/default.properties b/cicada/default.properties index 7bfb455..32299c2 100644 --- a/cicada/default.properties +++ b/cicada/default.properties @@ -1,13 +1,2 @@ -# 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 use, -# "build.properties", and override values to adapt the script to your -# project structure. - # Project target. target=android-8 -android.library.reference.1=../apollolib -android.library.reference.2=../cicadalib diff --git a/cicada/project.properties b/cicada/project.properties new file mode 100644 index 0000000..f8792c1 --- /dev/null +++ b/cicada/project.properties @@ -0,0 +1,12 @@ +# 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 use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-8 +android.library.reference.1=../cicadalib diff --git a/cicadalib/.classpath b/cicadalib/.classpath index 729745d..a4f1e40 100644 --- a/cicadalib/.classpath +++ b/cicadalib/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/cicadalib/default.properties b/cicadalib/project.properties similarity index 83% rename from cicadalib/default.properties rename to cicadalib/project.properties index ba2ea7b..855bd29 100644 --- a/cicadalib/default.properties +++ b/cicadalib/project.properties @@ -4,10 +4,10 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. +android.library=true # Project target. target=android-8 -android.library=true android.library.reference.1=../apollolib diff --git a/samples/WebImagePlayer/.classpath b/samples/WebImagePlayer/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/WebImagePlayer/.classpath +++ b/samples/WebImagePlayer/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/nextbuses/default.properties b/samples/WebImagePlayer/project.properties similarity index 82% rename from samples/nextbuses/default.properties rename to samples/WebImagePlayer/project.properties index c33f3d2..94aab77 100644 --- a/samples/nextbuses/default.properties +++ b/samples/WebImagePlayer/project.properties @@ -4,9 +4,9 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. +android.library.reference.1=../../cicadalib # Project target. target=android-8 -android.library.reference.1=../../cicadalib diff --git a/samples/bitly/.classpath b/samples/bitly/.classpath index 1f4e4b5..5f3f0c2 100644 --- a/samples/bitly/.classpath +++ b/samples/bitly/.classpath @@ -1,9 +1,10 @@ - - - - - - - - - + + + + + + + + + + diff --git a/samples/bitly/.project b/samples/bitly/.project index 9b32b47..0cdf21f 100644 --- a/samples/bitly/.project +++ b/samples/bitly/.project @@ -1,45 +1,45 @@ - - - Bitly - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - - - ApolloLib_src - 2 - _android_ApolloLib_c6286f16/src - - - CicadaLib_src - 2 - _android_CicadaLib_8981e3e4/src - - - + + + Bitly + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + + + ApolloLib_src + 2 + _android_ApolloLib_c6286f16/src + + + CicadaLib_src + 2 + _android_CicadaLib_8981e3e4/src + + + diff --git a/samples/digitalclock/default.properties b/samples/bitly/project.properties similarity index 82% rename from samples/digitalclock/default.properties rename to samples/bitly/project.properties index c33f3d2..94aab77 100644 --- a/samples/digitalclock/default.properties +++ b/samples/bitly/project.properties @@ -4,9 +4,9 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. +android.library.reference.1=../../cicadalib # Project target. target=android-8 -android.library.reference.1=../../cicadalib diff --git a/samples/digitalclock/.classpath b/samples/digitalclock/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/digitalclock/.classpath +++ b/samples/digitalclock/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/WebImagePlayer/default.properties b/samples/digitalclock/project.properties similarity index 82% rename from samples/WebImagePlayer/default.properties rename to samples/digitalclock/project.properties index c33f3d2..2e3ebc1 100644 --- a/samples/WebImagePlayer/default.properties +++ b/samples/digitalclock/project.properties @@ -4,7 +4,7 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. # Project target. diff --git a/samples/hellocicada/.classpath b/samples/hellocicada/.classpath index 729745d..a4f1e40 100644 --- a/samples/hellocicada/.classpath +++ b/samples/hellocicada/.classpath @@ -1,8 +1,8 @@ - - - - - - - - + + + + + + + + diff --git a/samples/hellocicada/default.properties b/samples/hellocicada/project.properties similarity index 82% rename from samples/hellocicada/default.properties rename to samples/hellocicada/project.properties index 7cf937f..9be174d 100644 --- a/samples/hellocicada/default.properties +++ b/samples/hellocicada/project.properties @@ -4,9 +4,9 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. +android.library.reference.1=../../apollolib # Project target. target=android-8 -android.library.reference.1=../../apollolib diff --git a/samples/nextbuses/.classpath b/samples/nextbuses/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/nextbuses/.classpath +++ b/samples/nextbuses/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/bitly/default.properties b/samples/nextbuses/project.properties similarity index 82% rename from samples/bitly/default.properties rename to samples/nextbuses/project.properties index c33f3d2..94aab77 100644 --- a/samples/bitly/default.properties +++ b/samples/nextbuses/project.properties @@ -4,9 +4,9 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. +android.library.reference.1=../../cicadalib # Project target. target=android-8 -android.library.reference.1=../../cicadalib diff --git a/samples/notificationdemo/.classpath b/samples/notificationdemo/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/notificationdemo/.classpath +++ b/samples/notificationdemo/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/notificationdemo/default.properties b/samples/notificationdemo/default.properties deleted file mode 100644 index c33f3d2..0000000 --- a/samples/notificationdemo/default.properties +++ /dev/null @@ -1,12 +0,0 @@ -# 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 use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 -android.library.reference.1=../../cicadalib diff --git a/samples/notificationdemo/project.properties b/samples/notificationdemo/project.properties new file mode 100644 index 0000000..94aab77 --- /dev/null +++ b/samples/notificationdemo/project.properties @@ -0,0 +1,12 @@ +# 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 use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +android.library.reference.1=../../cicadalib +# Project target. +target=android-8 diff --git a/samples/notifications/.classpath b/samples/notifications/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/notifications/.classpath +++ b/samples/notifications/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/notifications/.project b/samples/notifications/.project index 1d88aec..f692310 100644 --- a/samples/notifications/.project +++ b/samples/notifications/.project @@ -1,45 +1,33 @@ - - - Notifications - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - - - ApolloLib_src - 2 - _android_ApolloLib_c6286f16/src - - - CicadaLib_src - 2 - _android_CicadaLib_8981e3e4/src - - - + + + Notifications + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + diff --git a/samples/quicktext/default.properties b/samples/notifications/project.properties similarity index 82% rename from samples/quicktext/default.properties rename to samples/notifications/project.properties index fc667cd..02e082c 100644 --- a/samples/quicktext/default.properties +++ b/samples/notifications/project.properties @@ -4,7 +4,7 @@ # This file must be checked in Version Control Systems. # # To customize properties used by the Ant build system use, -# "build.properties", and override values to adapt the script to your +# "ant.properties", and override values to adapt the script to your # project structure. # Project target. diff --git a/samples/quicktext/.classpath b/samples/quicktext/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/quicktext/.classpath +++ b/samples/quicktext/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/quicktext/project.properties b/samples/quicktext/project.properties new file mode 100644 index 0000000..cf20be6 --- /dev/null +++ b/samples/quicktext/project.properties @@ -0,0 +1,12 @@ +# 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 use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +android.library.reference.1=../../cicadalib +# Project target. +target=android-5 diff --git a/samples/smsnotifier/.classpath b/samples/smsnotifier/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/smsnotifier/.classpath +++ b/samples/smsnotifier/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/smsnotifier/default.properties b/samples/smsnotifier/default.properties deleted file mode 100644 index c33f3d2..0000000 --- a/samples/smsnotifier/default.properties +++ /dev/null @@ -1,12 +0,0 @@ -# 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 use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 -android.library.reference.1=../../cicadalib diff --git a/samples/smsnotifier/project.properties b/samples/smsnotifier/project.properties new file mode 100644 index 0000000..94aab77 --- /dev/null +++ b/samples/smsnotifier/project.properties @@ -0,0 +1,12 @@ +# 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 use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +android.library.reference.1=../../cicadalib +# Project target. +target=android-8 diff --git a/samples/stopwatch/.classpath b/samples/stopwatch/.classpath index cf5a7b1..a55e00e 100644 --- a/samples/stopwatch/.classpath +++ b/samples/stopwatch/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/stopwatch/default.properties b/samples/stopwatch/default.properties deleted file mode 100644 index c33f3d2..0000000 --- a/samples/stopwatch/default.properties +++ /dev/null @@ -1,12 +0,0 @@ -# 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 use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 -android.library.reference.1=../../cicadalib diff --git a/samples/stopwatch/project.properties b/samples/stopwatch/project.properties new file mode 100644 index 0000000..94aab77 --- /dev/null +++ b/samples/stopwatch/project.properties @@ -0,0 +1,12 @@ +# 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 use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +android.library.reference.1=../../cicadalib +# Project target. +target=android-8 diff --git a/samples/tubestatus/.classpath b/samples/tubestatus/.classpath index 1f4e4b5..a4f1e40 100644 --- a/samples/tubestatus/.classpath +++ b/samples/tubestatus/.classpath @@ -1,9 +1,8 @@ - - - - - - - - - + + + + + + + + diff --git a/samples/tubestatus/default.properties b/samples/tubestatus/default.properties deleted file mode 100644 index c33f3d2..0000000 --- a/samples/tubestatus/default.properties +++ /dev/null @@ -1,12 +0,0 @@ -# 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 use, -# "build.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 -android.library.reference.1=../../cicadalib diff --git a/samples/tubestatus/project.properties b/samples/tubestatus/project.properties new file mode 100644 index 0000000..2e3ebc1 --- /dev/null +++ b/samples/tubestatus/project.properties @@ -0,0 +1,12 @@ +# 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 use, +# "ant.properties", and override values to adapt the script to your +# project structure. + +# Project target. +target=android-8 +android.library.reference.1=../../cicadalib