diff --git a/AndroidSMS/gen/com/javatechig/droid/sms/BuildConfig.java b/AndroidSMS/gen/com/javatechig/droid/sms/BuildConfig.java deleted file mode 100644 index 3bebd7c..0000000 --- a/AndroidSMS/gen/com/javatechig/droid/sms/BuildConfig.java +++ /dev/null @@ -1,6 +0,0 @@ -/** Automatically generated file. DO NOT MODIFY */ -package com.javatechig.droid.sms; - -public final class BuildConfig { - public final static boolean DEBUG = true; -} \ No newline at end of file diff --git a/AndroidSMS/gen/com/javatechig/droid/sms/R.java b/AndroidSMS/gen/com/javatechig/droid/sms/R.java deleted file mode 100644 index 2e8df2e..0000000 --- a/AndroidSMS/gen/com/javatechig/droid/sms/R.java +++ /dev/null @@ -1,73 +0,0 @@ -/* AUTO-GENERATED FILE. DO NOT MODIFY. - * - * This class was automatically generated by the - * aapt tool from the resource data it found. It - * should not be modified by hand. - */ - -package com.javatechig.droid.sms; - -public final class R { - public static final class attr { - } - public static final class dimen { - /** Default screen margins, per the Android Design guidelines. - - Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. - - */ - public static final int activity_horizontal_margin=0x7f040000; - public static final int activity_vertical_margin=0x7f040001; - } - public static final class drawable { - public static final int ic_launcher=0x7f020000; - } - public static final class id { - public static final int action_settings=0x7f080005; - public static final int linearLayout1=0x7f080000; - public static final int mobileNumber=0x7f080001; - public static final int send=0x7f080004; - public static final int sendViaIntent=0x7f080003; - public static final int smsBody=0x7f080002; - } - public static final class layout { - public static final int activity_main=0x7f030000; - } - public static final class menu { - public static final int main=0x7f070000; - } - public static final class string { - public static final int action_settings=0x7f050001; - public static final int app_name=0x7f050000; - public static final int hello_world=0x7f050002; - } - public static final class style { - /** - Base application theme, dependent on API level. This theme is replaced - by AppBaseTheme from res/values-vXX/styles.xml on newer devices. - - - Theme customizations available in newer API levels can go in - res/values-vXX/styles.xml, while customizations related to - backward-compatibility can go here. - - - Base application theme for API 11+. This theme completely replaces - AppBaseTheme from res/values/styles.xml on API 11+ devices. - - API 11 theme customizations can go here. - - Base application theme for API 14+. This theme completely replaces - AppBaseTheme from BOTH res/values/styles.xml and - res/values-v11/styles.xml on API 14+ devices. - - API 14 theme customizations can go here. - */ - public static final int AppBaseTheme=0x7f060000; - /** Application theme. - All customizations that are NOT specific to a particular API-level can go here. - */ - public static final int AppTheme=0x7f060001; - } -} diff --git a/AndroidSMS/ic_launcher-web.png b/AndroidSMS/ic_launcher-web.png deleted file mode 100644 index a18cbb4..0000000 Binary files a/AndroidSMS/ic_launcher-web.png and /dev/null differ diff --git a/AndroidSMS/libs/android-support-v4.jar b/AndroidSMS/libs/android-support-v4.jar deleted file mode 100644 index 65ebaf8..0000000 Binary files a/AndroidSMS/libs/android-support-v4.jar and /dev/null differ diff --git a/AndroidSMS/project.properties b/AndroidSMS/project.properties deleted file mode 100644 index a3ee5ab..0000000 --- a/AndroidSMS/project.properties +++ /dev/null @@ -1,14 +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 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-17 diff --git a/AndroidSMS/res/drawable-hdpi/ic_launcher.png b/AndroidSMS/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 288b665..0000000 Binary files a/AndroidSMS/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/AndroidSMS/res/drawable-mdpi/ic_launcher.png b/AndroidSMS/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index 6ae570b..0000000 Binary files a/AndroidSMS/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/AndroidSMS/res/drawable-xhdpi/ic_launcher.png b/AndroidSMS/res/drawable-xhdpi/ic_launcher.png deleted file mode 100644 index d4fb7cd..0000000 Binary files a/AndroidSMS/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/AndroidSMS/res/drawable-xxhdpi/ic_launcher.png b/AndroidSMS/res/drawable-xxhdpi/ic_launcher.png deleted file mode 100644 index 85a6081..0000000 Binary files a/AndroidSMS/res/drawable-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/AndroidSMS/res/layout/activity_main.xml b/AndroidSMS/res/layout/activity_main.xml deleted file mode 100644 index b1a3bfe..0000000 --- a/AndroidSMS/res/layout/activity_main.xml +++ /dev/null @@ -1,57 +0,0 @@ -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/linearLayout1" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" - android:padding="5dp" > - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Phone Number : " - android:textAppearance="?android:attr/textAppearanceLarge" /> - - <EditText - android:id="@+id/mobileNumber" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:hint="Enter phone number" - android:phoneNumber="true" > - </EditText> - - <TextView - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:text="Message Body: " - android:textAppearance="?android:attr/textAppearanceLarge" /> - - <EditText - android:id="@+id/smsBody" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:gravity="top" - android:hint="Enter message body" - android:inputType="textMultiLine" - android:lines="5" /> - - <LinearLayout - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:weightSum="10" > - - <Button - android:id="@+id/sendViaIntent" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_weight="5" - android:text="SMS Intent" /> - - <Button - android:id="@+id/send" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_weight="5" - android:text="Send" /> - </LinearLayout> - -</LinearLayout> \ No newline at end of file diff --git a/AndroidSMS/res/menu/main.xml b/AndroidSMS/res/menu/main.xml deleted file mode 100644 index d227c49..0000000 --- a/AndroidSMS/res/menu/main.xml +++ /dev/null @@ -1,9 +0,0 @@ -<menu xmlns:android="http://schemas.android.com/apk/res/android" > - - <item - android:id="@+id/action_settings" - android:orderInCategory="100" - android:showAsAction="never" - android:title="@string/action_settings"/> - -</menu> \ No newline at end of file diff --git a/AndroidSMS/res/values-sw600dp/dimens.xml b/AndroidSMS/res/values-sw600dp/dimens.xml deleted file mode 100644 index 1ba777d..0000000 --- a/AndroidSMS/res/values-sw600dp/dimens.xml +++ /dev/null @@ -1,8 +0,0 @@ -<resources> - - <!-- - Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw600dp devices (e.g. 7" tablets) here. - --> - -</resources> \ No newline at end of file diff --git a/AndroidSMS/res/values-sw720dp-land/dimens.xml b/AndroidSMS/res/values-sw720dp-land/dimens.xml deleted file mode 100644 index eee741a..0000000 --- a/AndroidSMS/res/values-sw720dp-land/dimens.xml +++ /dev/null @@ -1,9 +0,0 @@ -<resources> - - <!-- - Customize dimensions originally defined in res/values/dimens.xml (such as - screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. - --> - <dimen name="activity_horizontal_margin">128dp</dimen> - -</resources> \ No newline at end of file diff --git a/AndroidSMS/res/values-v11/styles.xml b/AndroidSMS/res/values-v11/styles.xml deleted file mode 100644 index 541752f..0000000 --- a/AndroidSMS/res/values-v11/styles.xml +++ /dev/null @@ -1,11 +0,0 @@ -<resources> - - <!-- - Base application theme for API 11+. This theme completely replaces - AppBaseTheme from res/values/styles.xml on API 11+ devices. - --> - <style name="AppBaseTheme" parent="android:Theme.Holo.Light"> - <!-- API 11 theme customizations can go here. --> - </style> - -</resources> \ No newline at end of file diff --git a/AndroidSMS/res/values-v14/styles.xml b/AndroidSMS/res/values-v14/styles.xml deleted file mode 100644 index f20e015..0000000 --- a/AndroidSMS/res/values-v14/styles.xml +++ /dev/null @@ -1,12 +0,0 @@ -<resources> - - <!-- - Base application theme for API 14+. This theme completely replaces - AppBaseTheme from BOTH res/values/styles.xml and - res/values-v11/styles.xml on API 14+ devices. - --> - <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar"> - <!-- API 14 theme customizations can go here. --> - </style> - -</resources> \ No newline at end of file diff --git a/AndroidSMS/res/values/styles.xml b/AndroidSMS/res/values/styles.xml deleted file mode 100644 index 4a10ca4..0000000 --- a/AndroidSMS/res/values/styles.xml +++ /dev/null @@ -1,20 +0,0 @@ -<resources> - - <!-- - Base application theme, dependent on API level. This theme is replaced - by AppBaseTheme from res/values-vXX/styles.xml on newer devices. - --> - <style name="AppBaseTheme" parent="android:Theme.Light"> - <!-- - Theme customizations available in newer API levels can go in - res/values-vXX/styles.xml, while customizations related to - backward-compatibility can go here. - --> - </style> - - <!-- Application theme. --> - <style name="AppTheme" parent="AppBaseTheme"> - <!-- All customizations that are NOT specific to a particular API-level can go here. --> - </style> - -</resources> \ No newline at end of file diff --git a/AndroidSMS/src/com/javatechig/droid/sms/MainActivity.java b/AndroidSMS/src/com/javatechig/droid/sms/MainActivity.java deleted file mode 100644 index 22ab4df..0000000 --- a/AndroidSMS/src/com/javatechig/droid/sms/MainActivity.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.javatechig.droid.sms; - -import android.os.Bundle; -import android.app.Activity; -import android.content.Intent; -import android.telephony.SmsManager; -import android.view.Menu; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; -import android.widget.EditText; -import android.widget.Toast; - -public class MainActivity extends Activity { - - private Button shareIntent; - private Button send; - private EditText phoneNo; - private EditText messageBody; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.activity_main); - - phoneNo = (EditText) findViewById(R.id.mobileNumber); - messageBody = (EditText) findViewById(R.id.smsBody); - - send = (Button) findViewById(R.id.send); - send.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - String number = phoneNo.getText().toString(); - String sms = messageBody.getText().toString(); - - try { - SmsManager smsManager = SmsManager.getDefault(); - smsManager.sendTextMessage(number, null, sms, null, null); - Toast.makeText(getApplicationContext(), "SMS Sent!", - Toast.LENGTH_LONG).show(); - } catch (Exception e) { - Toast.makeText(getApplicationContext(), - "SMS faild, please try again later!", - Toast.LENGTH_LONG).show(); - e.printStackTrace(); - } - } - }); - - shareIntent = (Button) findViewById(R.id.sendViaIntent); - shareIntent.setOnClickListener(new OnClickListener() { - @Override - public void onClick(View v) { - try { - Intent sendIntent = new Intent(Intent.ACTION_VIEW); - sendIntent.putExtra("sms_body", messageBody.getText().toString()); - sendIntent.setType("vnd.android-dir/mms-sms"); - startActivity(sendIntent); - } catch (Exception e) { - Toast.makeText(getApplicationContext(), - "SMS faild, please try again later!", - Toast.LENGTH_LONG).show(); - e.printStackTrace(); - } - } - }); - } - - @Override - public boolean onCreateOptionsMenu(Menu menu) { - getMenuInflater().inflate(R.menu.main, menu); - return true; - } - -} diff --git a/AndroidZip/AndroidManifest.xml b/AndroidZip/AndroidManifest.xml deleted file mode 100644 index 56a1e3a..0000000 --- a/AndroidZip/AndroidManifest.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.zipp" - android:versionCode="1" - android:versionName="1.0"> - <uses-sdk android:minSdkVersion="8" /> - - <application android:icon="@drawable/ic_launcher" android:label="@string/app_name"> - <activity android:name="MainActivity" - android:label="@string/app_name"> - <intent-filter> - <action android:name="android.intent.action.MAIN" /> - <category android:name="android.intent.category.LAUNCHER" /> - </intent-filter> - </activity> - - <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" /> - <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> - </application> - - -</manifest> \ No newline at end of file diff --git a/AndroidZip/assets/diode.png b/AndroidZip/assets/diode.png deleted file mode 100644 index fb3c3b2..0000000 Binary files a/AndroidZip/assets/diode.png and /dev/null differ diff --git a/AndroidZip/assets/passive.png b/AndroidZip/assets/passive.png deleted file mode 100644 index f695e2a..0000000 Binary files a/AndroidZip/assets/passive.png and /dev/null differ diff --git a/AndroidZip/project.properties b/AndroidZip/project.properties deleted file mode 100644 index ea89160..0000000 --- a/AndroidZip/project.properties +++ /dev/null @@ -1,11 +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, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-8 diff --git a/AndroidZip/res/drawable-hdpi/ic_launcher.png b/AndroidZip/res/drawable-hdpi/ic_launcher.png deleted file mode 100644 index 8074c4c..0000000 Binary files a/AndroidZip/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/AndroidZip/res/drawable-ldpi/ic_launcher.png b/AndroidZip/res/drawable-ldpi/ic_launcher.png deleted file mode 100644 index 1095584..0000000 Binary files a/AndroidZip/res/drawable-ldpi/ic_launcher.png and /dev/null differ diff --git a/AndroidZip/res/drawable-mdpi/ic_launcher.png b/AndroidZip/res/drawable-mdpi/ic_launcher.png deleted file mode 100644 index a07c69f..0000000 Binary files a/AndroidZip/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/AndroidZip/res/layout/main.xml b/AndroidZip/res/layout/main.xml deleted file mode 100644 index 1ec9a2d..0000000 --- a/AndroidZip/res/layout/main.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent" - android:orientation="vertical" > - - <TextView - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:gravity="center_horizontal" - android:padding="10dp" - android:text="@string/instruction" - android:textAppearance="?android:attr/textAppearanceLarge" /> - - <Button - android:id="@+id/button_zip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:padding="10dp" - android:text="Create Zip" /> - - <Button - android:id="@+id/button_unzip" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:padding="10dp" - android:text="Unzip" /> - -</LinearLayout> \ No newline at end of file diff --git a/AndroidZip/res/values/strings.xml b/AndroidZip/res/values/strings.xml deleted file mode 100644 index bac7c5e..0000000 --- a/AndroidZip/res/values/strings.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<resources> - <string name="instruction">Zipping and Unzipping!</string> - <string name="app_name">User Application</string> -</resources> diff --git a/AndroidZip/src/com/zipp/MainActivity.java b/AndroidZip/src/com/zipp/MainActivity.java deleted file mode 100644 index 247eebb..0000000 --- a/AndroidZip/src/com/zipp/MainActivity.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.zipp; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.OutputStream; -import android.app.Activity; -import android.os.Bundle; -import android.os.Environment; -import android.util.Log; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; - -public class MainActivity extends Activity { - - String inputPath = Environment.getExternalStorageDirectory().getPath()+ "/ZipDemo/"; - String inputFile = "Apply.zip"; - String outputPath = Environment.getExternalStorageDirectory().getPath()+ "/UnZipDemo/"; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.main); - - ((Button) findViewById(R.id.button_zip)) - .setOnClickListener(new OnClickListener() { - - @Override - public void onClick(View view) { - // declare an array for storing the files i.e the path - // of your source files - String[] s = new String[2]; - - // Type the path of the files in here - s[0] = inputPath + "/image.jpg"; - s[1] = inputPath + "/textfile.txt"; // /sdcard/ZipDemo/textfile.txt - - // first parameter is d files second parameter is zip - // file name - ZipManager zipManager = new ZipManager(); - - // calling the zip function - zipManager.zip(s, inputPath + inputFile); - } - }); - - ((Button) findViewById(R.id.button_unzip)) - .setOnClickListener(new OnClickListener() { - - @Override - public void onClick(View view) { - ZipManager zipManager = new ZipManager(); - zipManager.unzip(inputPath + inputFile, outputPath); - } - }); - - //moveFile(inputPath, inputFile, outputPath); - - } - - private void moveFile(String inputPath, String inputFile, String outputPath) { - - InputStream in = null; - OutputStream out = null; - try { - // create output directory if it doesn't exist - File dir = new File(outputPath); - if (!dir.exists()) { - dir.mkdirs(); - } - - in = new FileInputStream(inputPath + inputFile); - out = new FileOutputStream(outputPath + inputFile); - - byte[] buffer = new byte[1024]; - int read; - while ((read = in.read(buffer)) != -1) { - out.write(buffer, 0, read); - } - in.close(); - in = null; - - // write the output file - out.flush(); - out.close(); - out = null; - - // delete the original file - new File(inputPath + inputFile).delete(); - } - - catch (FileNotFoundException fnfe1) { - Log.e("tag", fnfe1.getMessage()); - } catch (Exception e) { - Log.e("tag", e.getMessage()); - } - } -} \ No newline at end of file diff --git a/AndroidZip/src/com/zipp/ZipManager.java b/AndroidZip/src/com/zipp/ZipManager.java deleted file mode 100644 index 4fa30c3..0000000 --- a/AndroidZip/src/com/zipp/ZipManager.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.zipp; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.util.zip.ZipEntry; -import java.util.zip.ZipInputStream; -import java.util.zip.ZipOutputStream; -import android.util.Log; - -public class ZipManager { - private static final int BUFFER = 80000; - - public void zip(String[] _files, String zipFileName) { - try { - BufferedInputStream origin = null; - FileOutputStream dest = new FileOutputStream(zipFileName); - ZipOutputStream out = new ZipOutputStream(new BufferedOutputStream( - dest)); - byte data[] = new byte[BUFFER]; - - for (int i = 0; i < _files.length; i++) { - Log.v("Compress", "Adding: " + _files[i]); - FileInputStream fi = new FileInputStream(_files[i]); - origin = new BufferedInputStream(fi, BUFFER); - - ZipEntry entry = new ZipEntry(_files[i].substring(_files[i].lastIndexOf("/") + 1)); - out.putNextEntry(entry); - int count; - - while ((count = origin.read(data, 0, BUFFER)) != -1) { - out.write(data, 0, count); - } - origin.close(); - } - - out.close(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - public void unzip(String _zipFile, String _targetLocation) { - - //create target location folder if not exist - dirChecker(_targetLocation); - - try { - FileInputStream fin = new FileInputStream(_zipFile); - ZipInputStream zin = new ZipInputStream(fin); - ZipEntry ze = null; - while ((ze = zin.getNextEntry()) != null) { - - //create dir if required while unzipping - if (ze.isDirectory()) { - dirChecker(ze.getName()); - } else { - FileOutputStream fout = new FileOutputStream(_targetLocation + ze.getName()); - for (int c = zin.read(); c != -1; c = zin.read()) { - fout.write(c); - } - - zin.closeEntry(); - fout.close(); - } - - } - zin.close(); - } catch (Exception e) { - System.out.println(e); - } - } - - private void dirChecker(String dir) { - File f = new File(dir); - if (!f.isDirectory()) { - f.mkdirs(); - } - } - -} \ No newline at end of file diff --git a/FloatingText b/FloatingText new file mode 160000 index 0000000..c151e5e --- /dev/null +++ b/FloatingText @@ -0,0 +1 @@ +Subproject commit c151e5ecf1a98b133062d6fc75c0030aa0266e2b diff --git a/Snackbar b/Snackbar new file mode 160000 index 0000000..190d979 --- /dev/null +++ b/Snackbar @@ -0,0 +1 @@ +Subproject commit 190d979f03c1e026ecb8159eafeebe9222a37dcb diff --git a/TalkToMe-master/.gitignore b/TalkToMe-master/.gitignore new file mode 100644 index 0000000..9c4de58 --- /dev/null +++ b/TalkToMe-master/.gitignore @@ -0,0 +1,7 @@ +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/TalkToMe-master/.idea/.name b/TalkToMe-master/.idea/.name new file mode 100644 index 0000000..c95eb3a --- /dev/null +++ b/TalkToMe-master/.idea/.name @@ -0,0 +1 @@ +Speech \ No newline at end of file diff --git a/TalkToMe-master/.idea/compiler.xml b/TalkToMe-master/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/TalkToMe-master/.idea/compiler.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <resourceExtensions /> + <wildcardResourcePatterns> + <entry name="!?*.java" /> + <entry name="!?*.form" /> + <entry name="!?*.class" /> + <entry name="!?*.groovy" /> + <entry name="!?*.scala" /> + <entry name="!?*.flex" /> + <entry name="!?*.kt" /> + <entry name="!?*.clj" /> + <entry name="!?*.aj" /> + </wildcardResourcePatterns> + <annotationProcessing> + <profile default="true" name="Default" enabled="false"> + <processorPath useClasspath="true" /> + </profile> + </annotationProcessing> + </component> +</project> \ No newline at end of file diff --git a/TalkToMe-master/.idea/copyright/profiles_settings.xml b/TalkToMe-master/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/TalkToMe-master/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ +<component name="CopyrightManager"> + <settings default="" /> +</component> \ No newline at end of file diff --git a/TalkToMe-master/.idea/encodings.xml b/TalkToMe-master/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/TalkToMe-master/.idea/encodings.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="Encoding"> + <file url="PROJECT" charset="UTF-8" /> + </component> +</project> \ No newline at end of file diff --git a/TalkToMe-master/.idea/gradle.xml b/TalkToMe-master/.idea/gradle.xml new file mode 100644 index 0000000..7d80135 --- /dev/null +++ b/TalkToMe-master/.idea/gradle.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="distributionType" value="LOCAL" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.4" /> + <option name="gradleJvm" value="1.7" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/TalkToMe-master/.idea/misc.xml b/TalkToMe-master/.idea/misc.xml new file mode 100644 index 0000000..1a3eaff --- /dev/null +++ b/TalkToMe-master/.idea/misc.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="EntryPointsManager"> + <entry_points version="2.0" /> + </component> + <component name="NullableNotNullManager"> + <option name="myDefaultNullable" value="android.support.annotation.Nullable" /> + <option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> + <option name="myNullables"> + <value> + <list size="4"> + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> + </list> + </value> + </option> + <option name="myNotNulls"> + <value> + <list size="4"> + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> + </list> + </value> + </option> + </component> + <component name="ProjectLevelVcsManager" settingsEditedManually="false"> + <OptionsSetting value="true" id="Add" /> + <OptionsSetting value="true" id="Remove" /> + <OptionsSetting value="true" id="Checkout" /> + <OptionsSetting value="true" id="Update" /> + <OptionsSetting value="true" id="Status" /> + <OptionsSetting value="true" id="Edit" /> + <ConfirmationsSetting value="0" id="Add" /> + <ConfirmationsSetting value="0" id="Remove" /> + </component> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/TalkToMe-master/.idea/modules.xml b/TalkToMe-master/.idea/modules.xml new file mode 100644 index 0000000..d716c50 --- /dev/null +++ b/TalkToMe-master/.idea/modules.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/Speech.iml" filepath="$PROJECT_DIR$/Speech.iml" /> + <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/TalkToMe-master/.idea/runConfigurations.xml b/TalkToMe-master/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/TalkToMe-master/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RunConfigurationProducerService"> + <option name="ignoredProducers"> + <set> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" /> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" /> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" /> + </set> + </option> + </component> +</project> \ No newline at end of file diff --git a/TalkToMe-master/.idea/vcs.xml b/TalkToMe-master/.idea/vcs.xml new file mode 100644 index 0000000..6564d52 --- /dev/null +++ b/TalkToMe-master/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="" /> + </component> +</project> \ No newline at end of file diff --git a/TalkToMe-master/Speech.iml b/TalkToMe-master/Speech.iml new file mode 100644 index 0000000..9cd1c23 --- /dev/null +++ b/TalkToMe-master/Speech.iml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id="Speech" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="java-gradle" name="Java-Gradle"> + <configuration> + <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" /> + <option name="BUILDABLE" value="false" /> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <excludeFolder url="file://$MODULE_DIR$/.gradle" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/TalkToMe-master/app/.gitignore b/TalkToMe-master/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/TalkToMe-master/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/TalkToMe-master/app/app.iml b/TalkToMe-master/app/app.iml new file mode 100644 index 0000000..5e1406a --- /dev/null +++ b/TalkToMe-master/app/app.iml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Speech" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="android-gradle" name="Android-Gradle"> + <configuration> + <option name="GRADLE_PROJECT_PATH" value=":app" /> + </configuration> + </facet> + <facet type="android" name="Android"> + <configuration> + <option name="SELECTED_BUILD_VARIANT" value="debug" /> + <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> + <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> + <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> + <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" /> + <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" /> + <afterSyncTasks> + <task>generateDebugAndroidTestSources</task> + <task>generateDebugSources</task> + </afterSyncTasks> + <option name="ALLOW_USER_CONFIGURATION" value="false" /> + <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> + <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> + <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> + <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" /> + <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> + <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> + <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> + </content> + <orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" exported="" name="appcompat-v7-23.0.1" level="project" /> + <orderEntry type="library" exported="" name="support-v4-23.0.1" level="project" /> + <orderEntry type="library" exported="" name="support-annotations-23.0.1" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/TalkToMe-master/app/build.gradle b/TalkToMe-master/app/build.gradle new file mode 100644 index 0000000..f629270 --- /dev/null +++ b/TalkToMe-master/app/build.gradle @@ -0,0 +1,25 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + applicationId "com.example.mukul.speech" + minSdkVersion 14 + targetSdkVersion 23 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:23.0.1' +} diff --git a/AndroidSMS/proguard-project.txt b/TalkToMe-master/app/proguard-rules.pro similarity index 62% rename from AndroidSMS/proguard-project.txt rename to TalkToMe-master/app/proguard-rules.pro index f2fe155..d5579da 100644 --- a/AndroidSMS/proguard-project.txt +++ b/TalkToMe-master/app/proguard-rules.pro @@ -1,11 +1,8 @@ -# 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. +# in C:\Users\mukul\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/TalkToMe-master/app/src/androidTest/java/com/example/mukul/speech/ApplicationTest.java b/TalkToMe-master/app/src/androidTest/java/com/example/mukul/speech/ApplicationTest.java new file mode 100644 index 0000000..e94eea7 --- /dev/null +++ b/TalkToMe-master/app/src/androidTest/java/com/example/mukul/speech/ApplicationTest.java @@ -0,0 +1,13 @@ +package com.example.mukul.speech; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> + */ +public class ApplicationTest extends ApplicationTestCase<Application> { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/TalkToMe-master/app/src/main/AndroidManifest.xml b/TalkToMe-master/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..fbc4667 --- /dev/null +++ b/TalkToMe-master/app/src/main/AndroidManifest.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.example.mukul.speech" > + + <application + android:allowBackup="true" + android:icon="@mipmap/ic_launcher" + android:label="@string/app_name" + android:theme="@style/AppTheme" > + <activity + android:name=".MainActivity" + android:label="@string/app_name" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + </application> + +</manifest> diff --git a/TalkToMe-master/app/src/main/java/com/example/mukul/speech/MainActivity.java b/TalkToMe-master/app/src/main/java/com/example/mukul/speech/MainActivity.java new file mode 100644 index 0000000..0454a16 --- /dev/null +++ b/TalkToMe-master/app/src/main/java/com/example/mukul/speech/MainActivity.java @@ -0,0 +1,80 @@ +package com.example.mukul.speech; + +import android.app.Activity; +import android.os.Bundle; +import android.speech.tts.TextToSpeech; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.EditText; + +import java.util.Locale; + +public class MainActivity extends Activity implements + TextToSpeech.OnInitListener { + /** Called when the activity is first created. */ + + private TextToSpeech tts; + private Button btnSpeak; + private EditText txtText; + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + tts = new TextToSpeech(this, this); + + btnSpeak = (Button) findViewById(R.id.btnSpeak); + + txtText = (EditText) findViewById(R.id.txtText); + + // button on click event + btnSpeak.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View arg0) { + speakOut(); + } + + }); + } + + @Override + public void onDestroy() { + // Don't forget to shutdown tts! + if (tts != null) { + tts.stop(); + tts.shutdown(); + } + super.onDestroy(); + } + + @Override + public void onInit(int status) { + + if (status == TextToSpeech.SUCCESS) { + + int result = tts.setLanguage(Locale.US); + + if (result == TextToSpeech.LANG_MISSING_DATA + || result == TextToSpeech.LANG_NOT_SUPPORTED) { + Log.e("TTS", "This Language is not supported"); + } else { + btnSpeak.setEnabled(true); + speakOut(); + } + + } else { + Log.e("TTS", "Initilization Failed!"); + } + + } + + private void speakOut() { + + String text = txtText.getText().toString(); + + tts.speak(text, TextToSpeech.QUEUE_FLUSH, null); + } +} \ No newline at end of file diff --git a/TalkToMe-master/app/src/main/res/layout/activity_main.xml b/TalkToMe-master/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..5e24b15 --- /dev/null +++ b/TalkToMe-master/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingLeft="20dp" + android:paddingRight="20dp" + xmlns:android="http://schemas.android.com/apk/res/android" > + + + <EditText + android:id="@+id/txtText" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="0dp" + android:layout_marginTop="16dp" + /> + + <Button + android:id="@+id/btnSpeak" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_marginTop="20dp" + android:text="click to listen" /> + +</LinearLayout> diff --git a/TalkToMe-master/app/src/main/res/menu/menu_main.xml b/TalkToMe-master/app/src/main/res/menu/menu_main.xml new file mode 100644 index 0000000..b1cb908 --- /dev/null +++ b/TalkToMe-master/app/src/main/res/menu/menu_main.xml @@ -0,0 +1,6 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity"> + <item android:id="@+id/action_settings" android:title="@string/action_settings" + android:orderInCategory="100" app:showAsAction="never" /> +</menu> diff --git a/TalkToMe-master/app/src/main/res/mipmap-hdpi/ic_launcher.png b/TalkToMe-master/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..cde69bc Binary files /dev/null and b/TalkToMe-master/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/TalkToMe-master/app/src/main/res/mipmap-mdpi/ic_launcher.png b/TalkToMe-master/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c133a0c Binary files /dev/null and b/TalkToMe-master/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/TalkToMe-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/TalkToMe-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..bfa42f0 Binary files /dev/null and b/TalkToMe-master/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/TalkToMe-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/TalkToMe-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..324e72c Binary files /dev/null and b/TalkToMe-master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/TalkToMe-master/app/src/main/res/values-w820dp/dimens.xml b/TalkToMe-master/app/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 0000000..63fc816 --- /dev/null +++ b/TalkToMe-master/app/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,6 @@ +<resources> + <!-- Example customization of dimensions originally defined in res/values/dimens.xml + (such as screen margins) for screens with more than 820dp of available width. This + would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> + <dimen name="activity_horizontal_margin">64dp</dimen> +</resources> diff --git a/AndroidSMS/res/values/dimens.xml b/TalkToMe-master/app/src/main/res/values/dimens.xml similarity index 93% rename from AndroidSMS/res/values/dimens.xml rename to TalkToMe-master/app/src/main/res/values/dimens.xml index a6dd140..47c8224 100644 --- a/AndroidSMS/res/values/dimens.xml +++ b/TalkToMe-master/app/src/main/res/values/dimens.xml @@ -1,7 +1,5 @@ <resources> - <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen> - -</resources> \ No newline at end of file +</resources> diff --git a/AndroidSMS/res/values/strings.xml b/TalkToMe-master/app/src/main/res/values/strings.xml similarity index 54% rename from AndroidSMS/res/values/strings.xml rename to TalkToMe-master/app/src/main/res/values/strings.xml index 6aba0ca..668f31d 100644 --- a/AndroidSMS/res/values/strings.xml +++ b/TalkToMe-master/app/src/main/res/values/strings.xml @@ -1,8 +1,6 @@ -<?xml version="1.0" encoding="utf-8"?> <resources> + <string name="app_name">Speech</string> - <string name="app_name">AndroidSMS</string> - <string name="action_settings">Settings</string> <string name="hello_world">Hello world!</string> - -</resources> \ No newline at end of file + <string name="action_settings">Settings</string> +</resources> diff --git a/TalkToMe-master/app/src/main/res/values/styles.xml b/TalkToMe-master/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..766ab99 --- /dev/null +++ b/TalkToMe-master/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> + <!-- Customize your theme here. --> + </style> + +</resources> diff --git a/TalkToMe-master/build.gradle b/TalkToMe-master/build.gradle new file mode 100644 index 0000000..1b7886d --- /dev/null +++ b/TalkToMe-master/build.gradle @@ -0,0 +1,19 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.3.0' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} diff --git a/TalkToMe-master/gradle.properties b/TalkToMe-master/gradle.properties new file mode 100644 index 0000000..1d3591c --- /dev/null +++ b/TalkToMe-master/gradle.properties @@ -0,0 +1,18 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true \ No newline at end of file diff --git a/TalkToMe-master/gradle/wrapper/gradle-wrapper.jar b/TalkToMe-master/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..8c0fb64 Binary files /dev/null and b/TalkToMe-master/gradle/wrapper/gradle-wrapper.jar differ diff --git a/TalkToMe-master/gradle/wrapper/gradle-wrapper.properties b/TalkToMe-master/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..348e054 --- /dev/null +++ b/TalkToMe-master/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Oct 23 00:08:33 IST 2015 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip diff --git a/TalkToMe-master/gradlew b/TalkToMe-master/gradlew new file mode 100644 index 0000000..91a7e26 --- /dev/null +++ b/TalkToMe-master/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/TalkToMe-master/gradlew.bat b/TalkToMe-master/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/TalkToMe-master/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/TalkToMe-master/settings.gradle b/TalkToMe-master/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/TalkToMe-master/settings.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/Uploading/.gitignore b/Uploading/.gitignore new file mode 100644 index 0000000..9c4de58 --- /dev/null +++ b/Uploading/.gitignore @@ -0,0 +1,7 @@ +.gradle +/local.properties +/.idea/workspace.xml +/.idea/libraries +.DS_Store +/build +/captures diff --git a/Uploading/.idea/.name b/Uploading/.idea/.name new file mode 100644 index 0000000..6cb9fdf --- /dev/null +++ b/Uploading/.idea/.name @@ -0,0 +1 @@ +Uploading \ No newline at end of file diff --git a/Uploading/.idea/compiler.xml b/Uploading/.idea/compiler.xml new file mode 100644 index 0000000..96cc43e --- /dev/null +++ b/Uploading/.idea/compiler.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <resourceExtensions /> + <wildcardResourcePatterns> + <entry name="!?*.java" /> + <entry name="!?*.form" /> + <entry name="!?*.class" /> + <entry name="!?*.groovy" /> + <entry name="!?*.scala" /> + <entry name="!?*.flex" /> + <entry name="!?*.kt" /> + <entry name="!?*.clj" /> + <entry name="!?*.aj" /> + </wildcardResourcePatterns> + <annotationProcessing> + <profile default="true" name="Default" enabled="false"> + <processorPath useClasspath="true" /> + </profile> + </annotationProcessing> + </component> +</project> \ No newline at end of file diff --git a/Uploading/.idea/copyright/profiles_settings.xml b/Uploading/.idea/copyright/profiles_settings.xml new file mode 100644 index 0000000..e7bedf3 --- /dev/null +++ b/Uploading/.idea/copyright/profiles_settings.xml @@ -0,0 +1,3 @@ +<component name="CopyrightManager"> + <settings default="" /> +</component> \ No newline at end of file diff --git a/Uploading/.idea/encodings.xml b/Uploading/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/Uploading/.idea/encodings.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="Encoding"> + <file url="PROJECT" charset="UTF-8" /> + </component> +</project> \ No newline at end of file diff --git a/Uploading/.idea/gradle.xml b/Uploading/.idea/gradle.xml new file mode 100644 index 0000000..7d80135 --- /dev/null +++ b/Uploading/.idea/gradle.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="GradleSettings"> + <option name="linkedExternalProjectsSettings"> + <GradleProjectSettings> + <option name="distributionType" value="LOCAL" /> + <option name="externalProjectPath" value="$PROJECT_DIR$" /> + <option name="gradleHome" value="C:\Program Files\Android\Android Studio\gradle\gradle-2.4" /> + <option name="gradleJvm" value="1.7" /> + <option name="modules"> + <set> + <option value="$PROJECT_DIR$" /> + <option value="$PROJECT_DIR$/app" /> + </set> + </option> + </GradleProjectSettings> + </option> + </component> +</project> \ No newline at end of file diff --git a/Uploading/.idea/misc.xml b/Uploading/.idea/misc.xml new file mode 100644 index 0000000..1a3eaff --- /dev/null +++ b/Uploading/.idea/misc.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="EntryPointsManager"> + <entry_points version="2.0" /> + </component> + <component name="NullableNotNullManager"> + <option name="myDefaultNullable" value="android.support.annotation.Nullable" /> + <option name="myDefaultNotNull" value="android.support.annotation.NonNull" /> + <option name="myNullables"> + <value> + <list size="4"> + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> + </list> + </value> + </option> + <option name="myNotNulls"> + <value> + <list size="4"> + <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> + <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> + <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> + <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> + </list> + </value> + </option> + </component> + <component name="ProjectLevelVcsManager" settingsEditedManually="false"> + <OptionsSetting value="true" id="Add" /> + <OptionsSetting value="true" id="Remove" /> + <OptionsSetting value="true" id="Checkout" /> + <OptionsSetting value="true" id="Update" /> + <OptionsSetting value="true" id="Status" /> + <OptionsSetting value="true" id="Edit" /> + <ConfirmationsSetting value="0" id="Add" /> + <ConfirmationsSetting value="0" id="Remove" /> + </component> + <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.7" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/build/classes" /> + </component> + <component name="ProjectType"> + <option name="id" value="Android" /> + </component> +</project> \ No newline at end of file diff --git a/Uploading/.idea/modules.xml b/Uploading/.idea/modules.xml new file mode 100644 index 0000000..ee2dcb5 --- /dev/null +++ b/Uploading/.idea/modules.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/Uploading.iml" filepath="$PROJECT_DIR$/Uploading.iml" /> + <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/Uploading/.idea/runConfigurations.xml b/Uploading/.idea/runConfigurations.xml new file mode 100644 index 0000000..7f68460 --- /dev/null +++ b/Uploading/.idea/runConfigurations.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="RunConfigurationProducerService"> + <option name="ignoredProducers"> + <set> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" /> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" /> + <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" /> + </set> + </option> + </component> +</project> \ No newline at end of file diff --git a/Uploading/.idea/vcs.xml b/Uploading/.idea/vcs.xml new file mode 100644 index 0000000..6564d52 --- /dev/null +++ b/Uploading/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="" /> + </component> +</project> \ No newline at end of file diff --git a/Uploading/Uploading.iml b/Uploading/Uploading.iml new file mode 100644 index 0000000..bf21098 --- /dev/null +++ b/Uploading/Uploading.iml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id="Uploading" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="java-gradle" name="Java-Gradle"> + <configuration> + <option name="BUILD_FOLDER_PATH" value="$MODULE_DIR$/build" /> + <option name="BUILDABLE" value="false" /> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <excludeFolder url="file://$MODULE_DIR$/.gradle" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + </component> +</module> \ No newline at end of file diff --git a/Uploading/app/.gitignore b/Uploading/app/.gitignore new file mode 100644 index 0000000..796b96d --- /dev/null +++ b/Uploading/app/.gitignore @@ -0,0 +1 @@ +/build diff --git a/Uploading/app/app.iml b/Uploading/app/app.iml new file mode 100644 index 0000000..7d3d179 --- /dev/null +++ b/Uploading/app/app.iml @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module external.linked.project.id=":app" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="Uploading" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> + <component name="FacetManager"> + <facet type="android-gradle" name="Android-Gradle"> + <configuration> + <option name="GRADLE_PROJECT_PATH" value=":app" /> + </configuration> + </facet> + <facet type="android" name="Android"> + <configuration> + <option name="SELECTED_BUILD_VARIANT" value="debug" /> + <option name="SELECTED_TEST_ARTIFACT" value="_android_test_" /> + <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> + <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> + <option name="ASSEMBLE_TEST_TASK_NAME" value="assembleDebugAndroidTest" /> + <option name="COMPILE_JAVA_TEST_TASK_NAME" value="compileDebugAndroidTestSources" /> + <afterSyncTasks> + <task>generateDebugAndroidTestSources</task> + <task>generateDebugSources</task> + </afterSyncTasks> + <option name="ALLOW_USER_CONFIGURATION" value="false" /> + <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> + <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> + <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" /> + <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> + </configuration> + </facet> + </component> + <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> + <output url="file://$MODULE_DIR$/build/intermediates/classes/debug" /> + <output-test url="file://$MODULE_DIR$/build/intermediates/classes/androidTest/debug" /> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/r/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/jni" isTestSource="true" /> + <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundles" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/coverage-instrumented-classes" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/dex-cache" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/com.android.support/support-v4/23.0.1/jars" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/javaResources" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/libs" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/manifests" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/ndk" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/pre-dexed" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/proguard" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" /> + <excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" /> + <excludeFolder url="file://$MODULE_DIR$/build/outputs" /> + <excludeFolder url="file://$MODULE_DIR$/build/tmp" /> + </content> + <orderEntry type="jdk" jdkName="Android API 23 Platform" jdkType="Android SDK" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="library" exported="" name="appcompat-v7-23.0.1" level="project" /> + <orderEntry type="library" exported="" name="support-v4-23.0.1" level="project" /> + <orderEntry type="library" exported="" name="support-annotations-23.0.1" level="project" /> + </component> +</module> \ No newline at end of file diff --git a/Uploading/app/build.gradle b/Uploading/app/build.gradle new file mode 100644 index 0000000..6ebd455 --- /dev/null +++ b/Uploading/app/build.gradle @@ -0,0 +1,25 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + applicationId "com.example.mukul.uploading" + minSdkVersion 10 + targetSdkVersion 23 + versionCode 1 + versionName "1.0" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.android.support:appcompat-v7:23.0.1' +} diff --git a/Uploading/app/proguard-rules.pro b/Uploading/app/proguard-rules.pro new file mode 100644 index 0000000..d5579da --- /dev/null +++ b/Uploading/app/proguard-rules.pro @@ -0,0 +1,17 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in C:\Users\mukul\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# 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 *; +#} diff --git a/Uploading/app/src/androidTest/java/com/example/mukul/uploading/ApplicationTest.java b/Uploading/app/src/androidTest/java/com/example/mukul/uploading/ApplicationTest.java new file mode 100644 index 0000000..5d0189f --- /dev/null +++ b/Uploading/app/src/androidTest/java/com/example/mukul/uploading/ApplicationTest.java @@ -0,0 +1,13 @@ +package com.example.mukul.uploading; + +import android.app.Application; +import android.test.ApplicationTestCase; + +/** + * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> + */ +public class ApplicationTest extends ApplicationTestCase<Application> { + public ApplicationTest() { + super(Application.class); + } +} \ No newline at end of file diff --git a/AndroidSMS/AndroidManifest.xml b/Uploading/app/src/main/AndroidManifest.xml similarity index 59% rename from AndroidSMS/AndroidManifest.xml rename to Uploading/app/src/main/AndroidManifest.xml index a49d675..047f90e 100644 --- a/AndroidSMS/AndroidManifest.xml +++ b/Uploading/app/src/main/AndroidManifest.xml @@ -1,22 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.javatechig.droid.sms" - android:versionCode="1" - android:versionName="1.0" > + package="com.example.mukul.uploading" > - <uses-sdk - android:minSdkVersion="8" - android:targetSdkVersion="17" /> - - <uses-permission android:name="android.permission.SEND_SMS" /> + <uses-permission android:name="android.permission.INTERNET" /> + <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> + <uses-permission android:name="android.permission.RECORD_AUDIO" /> <application android:allowBackup="true" - android:icon="@drawable/ic_launcher" + android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity - android:name="com.javatechig.droid.sms.MainActivity" + android:name=".MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> @@ -26,4 +22,4 @@ </activity> </application> -</manifest> \ No newline at end of file +</manifest> diff --git a/Uploading/app/src/main/java/com/example/mukul/uploading/AndroidMultiPartEntity.java b/Uploading/app/src/main/java/com/example/mukul/uploading/AndroidMultiPartEntity.java new file mode 100644 index 0000000..6d3270b --- /dev/null +++ b/Uploading/app/src/main/java/com/example/mukul/uploading/AndroidMultiPartEntity.java @@ -0,0 +1,72 @@ +package com.example.mukul.uploading; + +/** + * Created by mukul on 10/22/2015. + */ + +import java.io.FilterOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.Charset; + +import org.apache.http.entity.mime.HttpMultipartMode; +import org.apache.http.entity.mime.MultipartEntity; + +@SuppressWarnings("deprecation") +public class AndroidMultiPartEntity extends MultipartEntity + +{ + + private final ProgressListener listener; + + public AndroidMultiPartEntity(final ProgressListener listener) { + super(); + this.listener = listener; + } + + public AndroidMultiPartEntity(final HttpMultipartMode mode, + final ProgressListener listener) { + super(mode); + this.listener = listener; + } + + public AndroidMultiPartEntity(HttpMultipartMode mode, final String boundary, + final Charset charset, final ProgressListener listener) { + super(mode, boundary, charset); + this.listener = listener; + } + + @Override + public void writeTo(final OutputStream outstream) throws IOException { + super.writeTo(new CountingOutputStream(outstream, this.listener)); + } + + public static interface ProgressListener { + void transferred(long num); + } + + public static class CountingOutputStream extends FilterOutputStream { + + private final ProgressListener listener; + private long transferred; + + public CountingOutputStream(final OutputStream out, + final ProgressListener listener) { + super(out); + this.listener = listener; + this.transferred = 0; + } + + public void write(byte[] b, int off, int len) throws IOException { + out.write(b, off, len); + this.transferred += len; + this.listener.transferred(this.transferred); + } + + public void write(int b) throws IOException { + out.write(b); + this.transferred++; + this.listener.transferred(this.transferred); + } + } +} \ No newline at end of file diff --git a/Uploading/app/src/main/java/com/example/mukul/uploading/Config.java b/Uploading/app/src/main/java/com/example/mukul/uploading/Config.java new file mode 100644 index 0000000..3598821 --- /dev/null +++ b/Uploading/app/src/main/java/com/example/mukul/uploading/Config.java @@ -0,0 +1,13 @@ +package com.example.mukul.uploading; + +/** + * Created by mukul on 10/22/2015. + */ + +public class Config { + // File upload url (replace the ip with your server address) + public static final String FILE_UPLOAD_URL = "http://192.168.0.104/AndroidFileUpload/fileUpload.php"; + + // Directory name to store captured images and videos + public static final String IMAGE_DIRECTORY_NAME = "Android File Upload"; +} \ No newline at end of file diff --git a/Uploading/app/src/main/java/com/example/mukul/uploading/MainActivity.java b/Uploading/app/src/main/java/com/example/mukul/uploading/MainActivity.java new file mode 100644 index 0000000..4fdb1f9 --- /dev/null +++ b/Uploading/app/src/main/java/com/example/mukul/uploading/MainActivity.java @@ -0,0 +1,265 @@ +package com.example.mukul.uploading; + +import android.support.v7.app.AppCompatActivity; +import android.os.Bundle; +import android.view.Menu; +import android.view.MenuItem; + + +import java.io.File; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Locale; + +import android.app.Activity; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; +import android.net.Uri; +import android.os.Bundle; +import android.os.Environment; +import android.provider.MediaStore; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.Toast; + +public class MainActivity extends Activity { + + // LogCat tag + private static final String TAG = MainActivity.class.getSimpleName(); + + + // Camera activity request codes + private static final int CAMERA_CAPTURE_IMAGE_REQUEST_CODE = 100; + private static final int CAMERA_CAPTURE_VIDEO_REQUEST_CODE = 200; + + public static final int MEDIA_TYPE_IMAGE = 1; + public static final int MEDIA_TYPE_VIDEO = 2; + + private Uri fileUri; // file url to store image/video + + private Button btnCapturePicture, btnRecordVideo; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + // Changing action bar background color + // These two lines are not needed + getActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(getResources().getString(R.color.action_bar)))); + + btnCapturePicture = (Button) findViewById(R.id.btnCapturePicture); + btnRecordVideo = (Button) findViewById(R.id.btnRecordVideo); + + /** + * Capture image button click event + */ + btnCapturePicture.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View v) { + // capture picture + captureImage(); + } + }); + + /** + * Record video button click event + */ + btnRecordVideo.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View v) { + // record video + recordVideo(); + } + }); + + // Checking camera availability + if (!isDeviceSupportCamera()) { + Toast.makeText(getApplicationContext(), + "Sorry! Your device doesn't support camera", + Toast.LENGTH_LONG).show(); + // will close the app if the device does't have camera + finish(); + } + } + + /** + * Checking device has camera hardware or not + * */ + private boolean isDeviceSupportCamera() { + if (getApplicationContext().getPackageManager().hasSystemFeature( + PackageManager.FEATURE_CAMERA)) { + // this device has a camera + return true; + } else { + // no camera on this device + return false; + } + } + + /** + * Launching camera app to capture image + */ + private void captureImage() { + Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); + + fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE); + + intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); + + // start the image capture Intent + startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE); + } + + /** + * Launching camera app to record video + */ + private void recordVideo() { + Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); + + fileUri = getOutputMediaFileUri(MEDIA_TYPE_VIDEO); + + // set video quality + intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1); + + intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); // set the image file + // name + + // start the video capture Intent + startActivityForResult(intent, CAMERA_CAPTURE_VIDEO_REQUEST_CODE); + } + + /** + * Here we store the file url as it will be null after returning from camera + * app + */ + @Override + protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + + // save file url in bundle as it will be null on screen orientation + // changes + outState.putParcelable("file_uri", fileUri); + } + + @Override + protected void onRestoreInstanceState(Bundle savedInstanceState) { + super.onRestoreInstanceState(savedInstanceState); + + // get the file url + fileUri = savedInstanceState.getParcelable("file_uri"); + } + + + + /** + * Receiving activity result method will be called after closing the camera + * */ + @Override + protected void onActivityResult(int requestCode, int resultCode, Intent data) { + // if the result is capturing Image + if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) { + if (resultCode == RESULT_OK) { + + // successfully captured the image + // launching upload activity + launchUploadActivity(true); + + + } else if (resultCode == RESULT_CANCELED) { + + // user cancelled Image capture + Toast.makeText(getApplicationContext(), + "User cancelled image capture", Toast.LENGTH_SHORT) + .show(); + + } else { + // failed to capture image + Toast.makeText(getApplicationContext(), + "Sorry! Failed to capture image", Toast.LENGTH_SHORT) + .show(); + } + + } else if (requestCode == CAMERA_CAPTURE_VIDEO_REQUEST_CODE) { + if (resultCode == RESULT_OK) { + + // video successfully recorded + // launching upload activity + launchUploadActivity(false); + + } else if (resultCode == RESULT_CANCELED) { + + // user cancelled recording + Toast.makeText(getApplicationContext(), + "User cancelled video recording", Toast.LENGTH_SHORT) + .show(); + + } else { + // failed to record video + Toast.makeText(getApplicationContext(), + "Sorry! Failed to record video", Toast.LENGTH_SHORT) + .show(); + } + } + } + + private void launchUploadActivity(boolean isImage){ + Intent i = new Intent(MainActivity.this, UploadActivity.class); + i.putExtra("filePath", fileUri.getPath()); + i.putExtra("isImage", isImage); + startActivity(i); + } + + /** + * ------------ Helper Methods ---------------------- + * */ + + /** + * Creating file uri to store image/video + */ + public Uri getOutputMediaFileUri(int type) { + return Uri.fromFile(getOutputMediaFile(type)); + } + + /** + * returning image / video + */ + private static File getOutputMediaFile(int type) { + + // External sdcard location + File mediaStorageDir = new File( + Environment + .getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), + Config.IMAGE_DIRECTORY_NAME); + + // Create the storage directory if it does not exist + if (!mediaStorageDir.exists()) { + if (!mediaStorageDir.mkdirs()) { + Log.d(TAG, "Oops! Failed create " + + Config.IMAGE_DIRECTORY_NAME + " directory"); + return null; + } + } + + // Create a media file name + String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss", + Locale.getDefault()).format(new Date()); + File mediaFile; + if (type == MEDIA_TYPE_IMAGE) { + mediaFile = new File(mediaStorageDir.getPath() + File.separator + + "IMG_" + timeStamp + ".jpg"); + } else if (type == MEDIA_TYPE_VIDEO) { + mediaFile = new File(mediaStorageDir.getPath() + File.separator + + "VID_" + timeStamp + ".mp4"); + } else { + return null; + } + + return mediaFile; + } +} \ No newline at end of file diff --git a/Uploading/app/src/main/java/com/example/mukul/uploading/UploadActivity.java b/Uploading/app/src/main/java/com/example/mukul/uploading/UploadActivity.java new file mode 100644 index 0000000..c4f6759 --- /dev/null +++ b/Uploading/app/src/main/java/com/example/mukul/uploading/UploadActivity.java @@ -0,0 +1,233 @@ +package com.example.mukul.uploading; + +/** + * Created by mukul on 10/22/2015. + */ + +//import info.androidhive.camerafileupload.AndroidMultiPartEntity.ProgressListener; +import android.app.Activity; +import android.app.AlertDialog; +import android.content.DialogInterface; +import android.content.Intent; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.graphics.Color; +import android.graphics.drawable.ColorDrawable; +import android.os.AsyncTask; +import android.os.Bundle; +import android.util.Log; +import android.view.View; +import android.widget.Button; +import android.widget.ImageView; +import android.widget.ProgressBar; +import android.widget.TextView; +import android.widget.Toast; +import android.widget.VideoView; + +import com.example.mukul.uploading.AndroidMultiPartEntity.ProgressListener; + +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.ClientProtocolException; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.mime.content.FileBody; +import org.apache.http.entity.mime.content.StringBody; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.util.EntityUtils; + +import java.io.File; +import java.io.IOException; + +public class UploadActivity extends Activity { + // LogCat tag + private static final String TAG = MainActivity.class.getSimpleName(); + + private ProgressBar progressBar; + private String filePath = null; + private TextView txtPercentage; + private ImageView imgPreview; + private VideoView vidPreview; + private Button btnUpload; + long totalSize = 0; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_upload); + txtPercentage = (TextView) findViewById(R.id.txtPercentage); + btnUpload = (Button) findViewById(R.id.btnUpload); + progressBar = (ProgressBar) findViewById(R.id.progressBar); + imgPreview = (ImageView) findViewById(R.id.imgPreview); + vidPreview = (VideoView) findViewById(R.id.videoPreview); + + // Changing action bar background color + getActionBar().setBackgroundDrawable( + new ColorDrawable(Color.parseColor(getResources().getString( + R.color.action_bar)))); + + // Receiving the data from previous activity + Intent i = getIntent(); + + // image or video path that is captured in previous activity + filePath = i.getStringExtra("filePath"); + + // boolean flag to identify the media type, image or video + boolean isImage = i.getBooleanExtra("isImage", true); + + if (filePath != null) { + // Displaying the image or video on the screen + previewMedia(isImage); + } else { + Toast.makeText(getApplicationContext(), + "Sorry, file path is missing!", Toast.LENGTH_LONG).show(); + } + + btnUpload.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View v) { + // uploading the file to server + new UploadFileToServer().execute(); + } + }); + + } + + /** + * Displaying captured image/video on the screen + * */ + private void previewMedia(boolean isImage) { + // Checking whether captured media is image or video + if (isImage) { + imgPreview.setVisibility(View.VISIBLE); + vidPreview.setVisibility(View.GONE); + // bimatp factory + BitmapFactory.Options options = new BitmapFactory.Options(); + + // down sizing image as it throws OutOfMemory Exception for larger + // images + options.inSampleSize = 8; + + final Bitmap bitmap = BitmapFactory.decodeFile(filePath, options); + + imgPreview.setImageBitmap(bitmap); + } else { + imgPreview.setVisibility(View.GONE); + vidPreview.setVisibility(View.VISIBLE); + vidPreview.setVideoPath(filePath); + // start playing + vidPreview.start(); + } + } + + /** + * Uploading the file to server + * */ + private class UploadFileToServer extends AsyncTask<Void, Integer, String> { + @Override + protected void onPreExecute() { + // setting progress bar to zero + progressBar.setProgress(0); + super.onPreExecute(); + } + + @Override + protected void onProgressUpdate(Integer... progress) { + // Making progress bar visible + progressBar.setVisibility(View.VISIBLE); + + // updating progress bar value + progressBar.setProgress(progress[0]); + + // updating percentage value + txtPercentage.setText(String.valueOf(progress[0]) + "%"); + } + + @Override + protected String doInBackground(Void... params) { + return uploadFile(); + } + + @SuppressWarnings("deprecation") + private String uploadFile() { + String responseString = null; + + HttpClient httpclient = new DefaultHttpClient(); + HttpPost httppost = new HttpPost(Config.FILE_UPLOAD_URL); + + try { + AndroidMultiPartEntity entity = new AndroidMultiPartEntity( + new ProgressListener() { + + + public void transferred(long num) { + publishProgress((int) ((num / (float) totalSize) * 100)); + } + }); + + File sourceFile = new File(filePath); + + // Adding file data to http body + entity.addPart("image", new FileBody(sourceFile)); + + // Extra parameters if you want to pass to server + entity.addPart("website", + new StringBody("www.androidhive.info")); + entity.addPart("email", new StringBody("abc@gmail.com")); + + totalSize = entity.getContentLength(); + httppost.setEntity(entity); + + // Making server call + HttpResponse response = httpclient.execute(httppost); + HttpEntity r_entity = response.getEntity(); + + int statusCode = response.getStatusLine().getStatusCode(); + if (statusCode == 200) { + // Server response + responseString = EntityUtils.toString(r_entity); + } else { + responseString = "Error occurred! Http Status Code: " + + statusCode; + } + + } catch (ClientProtocolException e) { + responseString = e.toString(); + } catch (IOException e) { + responseString = e.toString(); + } + + return responseString; + + } + + @Override + protected void onPostExecute(String result) { + Log.e(TAG, "Response from server: " + result); + + // showing the server response in an alert dialog + showAlert(result); + + super.onPostExecute(result); + } + + } + + /** + * Method to show alert dialog + * */ + private void showAlert(String message) { + AlertDialog.Builder builder = new AlertDialog.Builder(this); + builder.setMessage(message).setTitle("Response from Servers") + .setCancelable(false) + .setPositiveButton("OK", new DialogInterface.OnClickListener() { + public void onClick(DialogInterface dialog, int id) { + // do nothing + } + }); + AlertDialog alert = builder.create(); + alert.show(); + } + +} diff --git a/Uploading/app/src/main/res/layout/activity_main.xml b/Uploading/app/src/main/res/layout/activity_main.xml new file mode 100644 index 0000000..7066dac --- /dev/null +++ b/Uploading/app/src/main/res/layout/activity_main.xml @@ -0,0 +1,51 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@color/view_background" + android:baselineAligned="false" + android:orientation="vertical" > + + <LinearLayout + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:gravity="center" + android:orientation="vertical" > + + <!-- Capture picture button --> + + <Button + android:id="@+id/btnCapturePicture" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="20dp" + android:background="@color/btn_bg" + android:paddingLeft="20dp" + android:paddingRight="20dp" + android:text="@string/btnTakePicture" + android:textColor="@color/white" /> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="20dp" + android:gravity="center_horizontal" + android:text="@string/or" + android:textColor="@color/txt_font" /> + + <!-- Record video button --> + + <Button + android:id="@+id/btnRecordVideo" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@color/btn_bg" + android:paddingLeft="20dp" + android:paddingRight="20dp" + android:text="@string/btnRecordVideo" + android:textColor="@color/white" /> + </LinearLayout> + +</RelativeLayout> \ No newline at end of file diff --git a/Uploading/app/src/main/res/layout/activity_upload.xml b/Uploading/app/src/main/res/layout/activity_upload.xml new file mode 100644 index 0000000..6ac2202 --- /dev/null +++ b/Uploading/app/src/main/res/layout/activity_upload.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:layout_width="fill_parent" + android:layout_height="fill_parent" + android:background="@color/view_background" + android:orientation="vertical" + android:padding="10dp" > + + + + <!-- To display picture taken --> + + <ImageView + android:id="@+id/imgPreview" + android:layout_width="fill_parent" + android:layout_height="200dp" + android:visibility="gone" + android:layout_marginTop="15dp"/> + + <!-- Videoview to preview recorded video --> + + <VideoView + android:id="@+id/videoPreview" + android:layout_width="fill_parent" + android:layout_height="400dp" + android:visibility="gone" + android:layout_marginTop="15dp"/> + + <TextView + android:id="@+id/txtPercentage" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginBottom="15dp" + android:layout_marginTop="15dp" + android:textColor="@color/txt_font" + android:textSize="30dp" /> + + <ProgressBar + android:id="@+id/progressBar" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="fill_parent" + android:layout_height="20dp" + android:layout_marginBottom="35dp" + android:visibility="gone"/> + + <Button + android:id="@+id/btnUpload" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:background="@color/btn_bg" + android:paddingLeft="20dp" + android:paddingRight="20dp" + android:text="@string/btnUploadToServer" + android:textColor="@color/white" + android:layout_marginBottom="20dp"/> + +</LinearLayout> \ No newline at end of file diff --git a/Uploading/app/src/main/res/menu/menu_main.xml b/Uploading/app/src/main/res/menu/menu_main.xml new file mode 100644 index 0000000..b1cb908 --- /dev/null +++ b/Uploading/app/src/main/res/menu/menu_main.xml @@ -0,0 +1,6 @@ +<menu xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:app="http://schemas.android.com/apk/res-auto" + xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity"> + <item android:id="@+id/action_settings" android:title="@string/action_settings" + android:orderInCategory="100" app:showAsAction="never" /> +</menu> diff --git a/Uploading/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Uploading/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..cde69bc Binary files /dev/null and b/Uploading/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/Uploading/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Uploading/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..c133a0c Binary files /dev/null and b/Uploading/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/Uploading/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Uploading/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..bfa42f0 Binary files /dev/null and b/Uploading/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/Uploading/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Uploading/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..324e72c Binary files /dev/null and b/Uploading/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/Uploading/app/src/main/res/values-w820dp/dimens.xml b/Uploading/app/src/main/res/values-w820dp/dimens.xml new file mode 100644 index 0000000..63fc816 --- /dev/null +++ b/Uploading/app/src/main/res/values-w820dp/dimens.xml @@ -0,0 +1,6 @@ +<resources> + <!-- Example customization of dimensions originally defined in res/values/dimens.xml + (such as screen margins) for screens with more than 820dp of available width. This + would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> + <dimen name="activity_horizontal_margin">64dp</dimen> +</resources> diff --git a/Uploading/app/src/main/res/values/colors.xml b/Uploading/app/src/main/res/values/colors.xml new file mode 100644 index 0000000..d6290f2 --- /dev/null +++ b/Uploading/app/src/main/res/values/colors.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <color name="view_background">#e8ecfa</color> + <color name="btn_bg">#277bec</color> + <color name="white">#ffffff</color> + <color name="txt_font">#4e5572</color> + <color name="action_bar">#1f2649</color> + +</resources> \ No newline at end of file diff --git a/Uploading/app/src/main/res/values/dimens.xml b/Uploading/app/src/main/res/values/dimens.xml new file mode 100644 index 0000000..47c8224 --- /dev/null +++ b/Uploading/app/src/main/res/values/dimens.xml @@ -0,0 +1,5 @@ +<resources> + <!-- Default screen margins, per the Android Design guidelines. --> + <dimen name="activity_horizontal_margin">16dp</dimen> + <dimen name="activity_vertical_margin">16dp</dimen> +</resources> diff --git a/Uploading/app/src/main/res/values/strings.xml b/Uploading/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..402523f --- /dev/null +++ b/Uploading/app/src/main/res/values/strings.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="app_name">Camera File Upload</string> + <string name="btnTakePicture">Capture Image</string> + <string name="btnRecordVideo">Record Video</string> + <string name="or">(or)</string> + <string name="btnUploadToServer">Upload to Server</string> + <string name="action_settings" /> + +</resources> \ No newline at end of file diff --git a/Uploading/app/src/main/res/values/styles.xml b/Uploading/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..766ab99 --- /dev/null +++ b/Uploading/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ +<resources> + + <!-- Base application theme. --> + <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> + <!-- Customize your theme here. --> + </style> + +</resources> diff --git a/Uploading/build.gradle b/Uploading/build.gradle new file mode 100644 index 0000000..1b7886d --- /dev/null +++ b/Uploading/build.gradle @@ -0,0 +1,19 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.3.0' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + jcenter() + } +} diff --git a/Uploading/gradle.properties b/Uploading/gradle.properties new file mode 100644 index 0000000..1d3591c --- /dev/null +++ b/Uploading/gradle.properties @@ -0,0 +1,18 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true \ No newline at end of file diff --git a/Uploading/gradle/wrapper/gradle-wrapper.jar b/Uploading/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..8c0fb64 Binary files /dev/null and b/Uploading/gradle/wrapper/gradle-wrapper.jar differ diff --git a/Uploading/gradle/wrapper/gradle-wrapper.properties b/Uploading/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..4932170 --- /dev/null +++ b/Uploading/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Oct 22 14:47:06 IST 2015 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip diff --git a/Uploading/gradlew b/Uploading/gradlew new file mode 100644 index 0000000..91a7e26 --- /dev/null +++ b/Uploading/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/Uploading/gradlew.bat b/Uploading/gradlew.bat new file mode 100644 index 0000000..8a0b282 --- /dev/null +++ b/Uploading/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/Uploading/httpclient-4.0-beta1.jar b/Uploading/httpclient-4.0-beta1.jar new file mode 100644 index 0000000..8ea4099 Binary files /dev/null and b/Uploading/httpclient-4.0-beta1.jar differ diff --git a/Uploading/httpcore-4.0-alpha5.jar b/Uploading/httpcore-4.0-alpha5.jar new file mode 100644 index 0000000..85bab47 Binary files /dev/null and b/Uploading/httpcore-4.0-alpha5.jar differ diff --git a/Uploading/httpmime-4.0-alpha3.jar b/Uploading/httpmime-4.0-alpha3.jar new file mode 100644 index 0000000..9bca86a Binary files /dev/null and b/Uploading/httpmime-4.0-alpha3.jar differ diff --git a/Uploading/settings.gradle b/Uploading/settings.gradle new file mode 100644 index 0000000..e7b4def --- /dev/null +++ b/Uploading/settings.gradle @@ -0,0 +1 @@ +include ':app' diff --git a/android-1 b/android-1 new file mode 160000 index 0000000..c47b0ab --- /dev/null +++ b/android-1 @@ -0,0 +1 @@ +Subproject commit c47b0ab77ac00c001eb649141c0c3a24587164ba