diff options
31 files changed, 237 insertions, 8 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 3b467a6..58d6c60 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -4,6 +4,14 @@ android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> + + <activity android:name=".HomeScreen" + 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=".FileBrowser" android:label="@string/app_name"> <intent-filter> @@ -18,6 +26,8 @@ </activity> + + <activity android:name=".SoundRecorder" android:label="@string/app_name"> <intent-filter> diff --git a/bin/blauploader.apk b/bin/blauploader.apk Binary files differindex 9e7f350..4d11658 100644 --- a/bin/blauploader.apk +++ b/bin/blauploader.apk diff --git a/bin/classes.dex b/bin/classes.dex Binary files differindex 0f343ee..3900f28 100644 --- a/bin/classes.dex +++ b/bin/classes.dex diff --git a/bin/com/lc8n/blauploader/FileBrowser$1.class b/bin/com/lc8n/blauploader/FileBrowser$1.class Binary files differindex c71886e..76b9015 100644 --- a/bin/com/lc8n/blauploader/FileBrowser$1.class +++ b/bin/com/lc8n/blauploader/FileBrowser$1.class diff --git a/bin/com/lc8n/blauploader/FileBrowser.class b/bin/com/lc8n/blauploader/FileBrowser.class Binary files differindex c182641..e4ba7f8 100644 --- a/bin/com/lc8n/blauploader/FileBrowser.class +++ b/bin/com/lc8n/blauploader/FileBrowser.class diff --git a/bin/com/lc8n/blauploader/HomeScreen$1.class b/bin/com/lc8n/blauploader/HomeScreen$1.class Binary files differnew file mode 100644 index 0000000..3d386ac --- /dev/null +++ b/bin/com/lc8n/blauploader/HomeScreen$1.class diff --git a/bin/com/lc8n/blauploader/HomeScreen$2.class b/bin/com/lc8n/blauploader/HomeScreen$2.class Binary files differnew file mode 100644 index 0000000..d7fa6f9 --- /dev/null +++ b/bin/com/lc8n/blauploader/HomeScreen$2.class diff --git a/bin/com/lc8n/blauploader/HomeScreen$3.class b/bin/com/lc8n/blauploader/HomeScreen$3.class Binary files differnew file mode 100644 index 0000000..2118eae --- /dev/null +++ b/bin/com/lc8n/blauploader/HomeScreen$3.class diff --git a/bin/com/lc8n/blauploader/HomeScreen.class b/bin/com/lc8n/blauploader/HomeScreen.class Binary files differnew file mode 100644 index 0000000..3c29b11 --- /dev/null +++ b/bin/com/lc8n/blauploader/HomeScreen.class diff --git a/bin/com/lc8n/blauploader/R$id.class b/bin/com/lc8n/blauploader/R$id.class Binary files differindex 0ec2db5..be7fa1b 100644 --- a/bin/com/lc8n/blauploader/R$id.class +++ b/bin/com/lc8n/blauploader/R$id.class diff --git a/bin/com/lc8n/blauploader/R$layout.class b/bin/com/lc8n/blauploader/R$layout.class Binary files differindex dc584df..696fcb7 100644 --- a/bin/com/lc8n/blauploader/R$layout.class +++ b/bin/com/lc8n/blauploader/R$layout.class diff --git a/bin/com/lc8n/blauploader/R$menu.class b/bin/com/lc8n/blauploader/R$menu.class Binary files differnew file mode 100644 index 0000000..56e1859 --- /dev/null +++ b/bin/com/lc8n/blauploader/R$menu.class diff --git a/bin/com/lc8n/blauploader/R$string.class b/bin/com/lc8n/blauploader/R$string.class Binary files differindex db984b9..527b01a 100644 --- a/bin/com/lc8n/blauploader/R$string.class +++ b/bin/com/lc8n/blauploader/R$string.class diff --git a/bin/com/lc8n/blauploader/R.class b/bin/com/lc8n/blauploader/R.class Binary files differindex 32da83a..72da9ab 100644 --- a/bin/com/lc8n/blauploader/R.class +++ b/bin/com/lc8n/blauploader/R.class diff --git a/bin/com/lc8n/blauploader/SoundRecorder$1.class b/bin/com/lc8n/blauploader/SoundRecorder$1.class Binary files differindex 94326f0..a5440c0 100644 --- a/bin/com/lc8n/blauploader/SoundRecorder$1.class +++ b/bin/com/lc8n/blauploader/SoundRecorder$1.class diff --git a/bin/com/lc8n/blauploader/SoundRecorder$2.class b/bin/com/lc8n/blauploader/SoundRecorder$2.class Binary files differindex f83f153..1edcefc 100644 --- a/bin/com/lc8n/blauploader/SoundRecorder$2.class +++ b/bin/com/lc8n/blauploader/SoundRecorder$2.class diff --git a/bin/com/lc8n/blauploader/SoundRecorder$3.class b/bin/com/lc8n/blauploader/SoundRecorder$3.class Binary files differindex 21f3509..b1b926f 100644 --- a/bin/com/lc8n/blauploader/SoundRecorder$3.class +++ b/bin/com/lc8n/blauploader/SoundRecorder$3.class diff --git a/bin/com/lc8n/blauploader/SoundRecorder.class b/bin/com/lc8n/blauploader/SoundRecorder.class Binary files differindex dbcd67e..74aaca6 100644 --- a/bin/com/lc8n/blauploader/SoundRecorder.class +++ b/bin/com/lc8n/blauploader/SoundRecorder.class diff --git a/bin/com/lc8n/blauploader/UploadLocation$1.class b/bin/com/lc8n/blauploader/UploadLocation$1.class Binary files differindex 5810389..7885eb5 100644 --- a/bin/com/lc8n/blauploader/UploadLocation$1.class +++ b/bin/com/lc8n/blauploader/UploadLocation$1.class diff --git a/bin/com/lc8n/blauploader/UploadLocation$2.class b/bin/com/lc8n/blauploader/UploadLocation$2.class Binary files differindex 669890a..13f8942 100644 --- a/bin/com/lc8n/blauploader/UploadLocation$2.class +++ b/bin/com/lc8n/blauploader/UploadLocation$2.class diff --git a/bin/com/lc8n/blauploader/UploadLocation$MyLocationListener.class b/bin/com/lc8n/blauploader/UploadLocation$MyLocationListener.class Binary files differindex 3d01c59..e7b2a3c 100644 --- a/bin/com/lc8n/blauploader/UploadLocation$MyLocationListener.class +++ b/bin/com/lc8n/blauploader/UploadLocation$MyLocationListener.class diff --git a/bin/com/lc8n/blauploader/UploadLocation.class b/bin/com/lc8n/blauploader/UploadLocation.class Binary files differindex 402817b..04af09b 100644 --- a/bin/com/lc8n/blauploader/UploadLocation.class +++ b/bin/com/lc8n/blauploader/UploadLocation.class diff --git a/bin/resources.ap_ b/bin/resources.ap_ Binary files differindex 074ec1f..079ef08 100644 --- a/bin/resources.ap_ +++ b/bin/resources.ap_ diff --git a/gen/com/lc8n/blauploader/R.java b/gen/com/lc8n/blauploader/R.java index c0edd12..ea04b00 100644 --- a/gen/com/lc8n/blauploader/R.java +++ b/gen/com/lc8n/blauploader/R.java @@ -14,18 +14,29 @@ public final class R { public static final int icon=0x7f020000; } public static final class id { - public static final int ProgressBar01=0x7f050000; - public static final int Record=0x7f050001; - public static final int Stop=0x7f050002; - public static final int getlocation=0x7f050004; - public static final int location=0x7f050003; - public static final int uploadlocation=0x7f050005; + public static final int ProgressBar01=0x7f060005; + public static final int Record=0x7f060003; + public static final int Stop=0x7f060004; + public static final int audio=0x7f060001; + public static final int browse=0x7f060000; + public static final int getlocation=0x7f060007; + public static final int locate=0x7f060002; + public static final int location=0x7f060006; + public static final int menuBrowse=0x7f060009; + public static final int menuExit=0x7f06000c; + public static final int menuLocate=0x7f06000b; + public static final int menuRecord=0x7f06000a; + public static final int uploadlocation=0x7f060008; } public static final class layout { public static final int filerow=0x7f030000; - public static final int main=0x7f030001; + public static final int home=0x7f030001; public static final int soundrecorder=0x7f030002; - public static final int uploadlocation=0x7f030003; + public static final int upload=0x7f030003; + public static final int uploadlocation=0x7f030004; + } + public static final class menu { + public static final int menu=0x7f050000; } public static final class string { public static final int app_name=0x7f040001; diff --git a/res/layout/home.xml b/res/layout/home.xml new file mode 100644 index 0000000..c17cf47 --- /dev/null +++ b/res/layout/home.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" + android:layout_width="fill_parent" + android:layout_height="fill_parent"> + <Button + android:id="@+id/browse" + android:layout_height="fill_parent" + android:layout_width="fill_parent" + android:layout_weight="1" + android:text="Upload File" + /> + <Button + android:id="@+id/audio" + android:layout_height="fill_parent" + android:layout_width="fill_parent" + android:layout_weight="1" + android:text="Record Audio" + /> + <Button + android:id="@+id/locate" + android:layout_height="fill_parent" + android:layout_width="fill_parent" + android:layout_weight="1" + android:text="Find Location" + /> + +</LinearLayout> diff --git a/res/layout/main.xml b/res/layout/upload.xml index 13a38b7..13a38b7 100644 --- a/res/layout/main.xml +++ b/res/layout/upload.xml diff --git a/res/menu/menu.xml b/res/menu/menu.xml new file mode 100644 index 0000000..ffc9eca --- /dev/null +++ b/res/menu/menu.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu + xmlns:android="http://schemas.android.com/apk/res/android"> +<item android:id="@+id/menuBrowse" + android:icon="@android:drawable/ic_menu_upload" + android:title="Upload Files"></item> +<item android:id="@+id/menuRecord" + android:icon="@android:drawable/ic_btn_speak_now" + android:title="Record Audio"></item> +<item android:id="@+id/menuLocate" + android:icon="@android:drawable/ic_menu_compass" + android:title="Send Location"></item> +<item android:id="@+id/menuExit" + android:icon="@android:drawable/ic_menu_close_clear_cancel" + android:title="Exit"></item> +</menu> diff --git a/src/com/lc8n/blauploader/FileBrowser.java b/src/com/lc8n/blauploader/FileBrowser.java index 722613b..18d2214 100644 --- a/src/com/lc8n/blauploader/FileBrowser.java +++ b/src/com/lc8n/blauploader/FileBrowser.java @@ -25,10 +25,14 @@ import java.util.List; import android.app.ListActivity; import android.app.ProgressDialog; +import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.telephony.SmsManager; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; import android.view.View; import android.widget.ArrayAdapter; import android.widget.ListView; @@ -196,6 +200,40 @@ public class FileBrowser extends ListActivity { } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.menu, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle item selection + switch (item.getItemId()) { + case R.id.menuBrowse: +// Intent browse = new Intent(this, FileBrowser.class); +// startActivityForResult(browse, 0);; + return true; + case R.id.menuRecord: + Intent record = new Intent(this, SoundRecorder.class); + startActivityForResult(record, 0); + return true; + case R.id.menuLocate: + Intent locate = new Intent(this, UploadLocation.class); + startActivityForResult(locate, 0);; + return true; + case R.id.menuExit: + this.finish(); + break; + default: + return super.onOptionsItemSelected(item); + + } + return true; + + } + }
\ No newline at end of file diff --git a/src/com/lc8n/blauploader/HomeScreen.java b/src/com/lc8n/blauploader/HomeScreen.java new file mode 100644 index 0000000..98de7f8 --- /dev/null +++ b/src/com/lc8n/blauploader/HomeScreen.java @@ -0,0 +1,49 @@ +package com.lc8n.blauploader; + +import android.app.Activity; +import android.content.Intent; +import android.os.Bundle; +import android.view.View; +import android.widget.Button; + +public class HomeScreen extends Activity{ + + + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.home); + + final Button browse = (Button) findViewById(R.id.browse); + browse.setOnClickListener(new View.OnClickListener() { + + public void onClick(View v) { + Intent myIntent = new Intent(v.getContext(), FileBrowser.class); + startActivityForResult(myIntent, 0); + + + } + }); + + final Button audio = (Button) findViewById(R.id.audio); + audio.setOnClickListener(new View.OnClickListener() { + + public void onClick(View v) { + Intent myIntent = new Intent(v.getContext(), SoundRecorder.class); + startActivityForResult(myIntent, 0); + + } + }); + + final Button locate = (Button) findViewById(R.id.locate); + locate .setOnClickListener(new View.OnClickListener() { + + public void onClick(View v) { + Intent myIntent = new Intent(v.getContext(), UploadLocation.class); + startActivityForResult(myIntent, 0); + + } + }); + + + } +} diff --git a/src/com/lc8n/blauploader/SoundRecorder.java b/src/com/lc8n/blauploader/SoundRecorder.java index c465171..8e6e7bd 100644 --- a/src/com/lc8n/blauploader/SoundRecorder.java +++ b/src/com/lc8n/blauploader/SoundRecorder.java @@ -5,12 +5,16 @@ import java.io.File; import android.app.Activity; import android.app.ProgressDialog; import android.content.ContentValues; +import android.content.Intent; import android.media.MediaRecorder; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.provider.MediaStore; import android.telephony.SmsManager; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.Toast; @@ -122,4 +126,38 @@ public class SoundRecorder extends Activity{ sms.sendTextMessage("07927278978", null, "wjoe blauploaded a recording: http://www.blaupload.co.uk/"+recordedSound.getName(), null, null); } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.menu, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle item selection + switch (item.getItemId()) { + case R.id.menuBrowse: + Intent browse = new Intent(this, FileBrowser.class); + startActivityForResult(browse, 0); + return true; + case R.id.menuRecord: +// Intent record = new Intent(this, SoundRecorder.class); +// startActivityForResult(record, 0); + return true; + case R.id.menuLocate: + Intent locate = new Intent(this, UploadLocation.class); + startActivityForResult(locate, 0); + return true; + case R.id.menuExit: + this.finish(); + break; + default: + return super.onOptionsItemSelected(item); + + } + return true; + + } + } diff --git a/src/com/lc8n/blauploader/UploadLocation.java b/src/com/lc8n/blauploader/UploadLocation.java index fc8757c..99f1a08 100644 --- a/src/com/lc8n/blauploader/UploadLocation.java +++ b/src/com/lc8n/blauploader/UploadLocation.java @@ -2,12 +2,16 @@ package com.lc8n.blauploader; import android.app.Activity; import android.content.Context; +import android.content.Intent; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.telephony.SmsManager; +import android.view.Menu; +import android.view.MenuInflater; +import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.TextView; @@ -88,5 +92,39 @@ public class UploadLocation extends Activity { } } + @Override + public boolean onCreateOptionsMenu(Menu menu) { + MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.menu, menu); + return true; + } + + @Override + public boolean onOptionsItemSelected(MenuItem item) { + // Handle item selection + switch (item.getItemId()) { + case R.id.menuBrowse: + Intent browse = new Intent(this, FileBrowser.class); + startActivityForResult(browse, 0);; + return true; + case R.id.menuRecord: + Intent record = new Intent(this, SoundRecorder.class); + startActivityForResult(record, 0); + return true; + case R.id.menuLocate: +// Intent locate = new Intent(this, UploadLocation.class); +// startActivityForResult(locate, 0);; + return true; + case R.id.menuExit: + this.finish(); + break; + default: + return super.onOptionsItemSelected(item); + + } + return true; + + } + } |