Skip to content

Commit

Permalink
Weird Android Stuido Error Fixed itself. A couple picture changes and…
Browse files Browse the repository at this point in the history
… now shows finished checkmark for when upload is complete.
  • Loading branch information
w9jds committed Dec 30, 2013
1 parent dad71cc commit 74c8c17
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 595 deletions.
Binary file modified .DS_Store
Binary file not shown.
700 changes: 129 additions & 571 deletions .idea/workspace.xml

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions GlassShare/GlassShare-GlassShare.iml
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@
<orderEntry type="library" exported="" name="google-http-client-1.17.0-rc" level="project" />
<orderEntry type="library" exported="" name="google-http-client-android-1.17.0-rc" level="project" />
<orderEntry type="library" exported="" name="jackson-core-2.1.3" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.2" level="project" />
<orderEntry type="library" exported="" name="google-api-client-android-1.17.0-rc" level="project" />
<orderEntry type="library" exported="" name="gson-2.2.2" level="project" />
<orderEntry type="library" exported="" name="mobileservices-1.1.0" level="project" />
<orderEntry type="library" exported="" name="android-agent-3.239.0" level="project" />
<orderEntry type="library" exported="" name="jackson-core-asl-1.9.11" level="project" />
<orderEntry type="library" exported="" name="google-api-services-drive-v2-rev108-1.17.0-rc" level="project" />
<orderEntry type="library" exported="" name="google-http-client-gson-1.17.0-rc" level="project" />
Expand Down
9 changes: 4 additions & 5 deletions GlassShare/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
classpath 'com.newrelic.agent.android:agent-gradle-plugin:3.239.0'
}
}

apply plugin: 'android'
apply plugin: 'newrelic'

repositories {
mavenCentral()
Expand All @@ -19,7 +18,8 @@ android {
compileSdkVersion 'Google Inc.:Glass Development Kit Sneak Peek:15'
buildToolsVersion '17.0.0'

defaultConfig {
defaultConfig
{
minSdkVersion 15
targetSdkVersion 15
}
Expand All @@ -37,7 +37,6 @@ android {

dependencies
{
compile 'com.newrelic.agent.android:android-agent:3.239.0'
compile 'com.google.api-client:google-api-client:1.17.0-rc@jar'
compile 'com.google.api-client:google-api-client-android:1.17.0-rc@jar'
compile 'com.google.http-client:google-http-client:1.17.0-rc@jar'
Expand All @@ -52,4 +51,4 @@ dependencies
compile files('libs/google-play-services.jar')
compile files('libs/gson-2.2.2.jar')
compile files('libs/mobileservices-1.1.0.jar')
}
}
6 changes: 2 additions & 4 deletions GlassShare/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.w9jds.glassshare"
android:versionCode="10"
android:versionName="0.10-alpha" >
android:versionCode="12"
android:versionName="0.12-alpha" >

<uses-sdk
android:minSdkVersion="15"
Expand All @@ -21,8 +21,6 @@
android:label="@string/app_name"
android:name="com.w9jds.glassshare.Classes.StorageApplication">



<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public StorageService(Context context)
mContext = context;
try
{

mClient = new MobileServiceClient("https://glassshare.azure-mobile.net/", "hGZSWGJntAFbXLmYRitDivIhrClsgA21", mContext);
mTableContainers = mClient.getTable("blobcontainers");
mTableBlobs = mClient.getTable("blobs");
}
Expand Down
37 changes: 26 additions & 11 deletions GlassShare/src/main/java/com/w9jds/glassshare/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.provider.MediaStore;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ProgressBar;
import android.widget.TextView;

import com.google.android.glass.media.Sounds;
Expand Down Expand Up @@ -222,7 +224,17 @@ public boolean onOptionsItemSelected(android.view.MenuItem iItem)
{
case R.id.delete_menu_item:
//set the text as deleting
iItem.setTitle(R.string.deleting_label);
setContentView(R.layout.menu_layout);
((ImageView)findViewById(R.id.icon)).setImageResource(R.drawable.ic_delete_50);
((TextView)findViewById(R.id.label)).setText("Deleting");
ProgressBar pbProgress = (ProgressBar)findViewById(R.id.progress);

pbProgress.setIndeterminate(false);

for (int i = 0; i <= 100; i++)
{
pbProgress.setProgress(i);
}

//pull the file from the path of the selected item
java.io.File fPic = new java.io.File(mlsPaths.get(miPosition));
Expand All @@ -236,6 +248,7 @@ public boolean onOptionsItemSelected(android.view.MenuItem iItem)
mcvAdapter.notifyDataSetChanged();
//handled

maManager.playSoundEffect(Sounds.SUCCESS);
return true;
// case R.id.upload_menu_item:
//
Expand Down Expand Up @@ -268,10 +281,6 @@ public boolean onOptionsItemSelected(android.view.MenuItem iItem)
((ImageView)findViewById(R.id.icon)).setImageResource(R.drawable.ic_mobile_phone_50);
((TextView)findViewById(R.id.label)).setText("Uploading");

// final PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
// this.mWakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
// this.mWakeLock.acquire();

String sContainer = "";
String[] saImage = mlsPaths.get(miPosition).split("/|\\.");

Expand Down Expand Up @@ -385,18 +394,24 @@ protected void onPostExecute(Boolean uploaded)
{
if (uploaded)
{
// setContentView(R.layout.menu_layout);
// ((ImageView)findViewById(R.id.icon)).setImageResource(R.drawable.ic_bike_50);
// ((TextView)findViewById(R.id.label)).setText("Uploaded");
// findViewById(R.id.progress).setVisibility(View.GONE);

setContentView(R.layout.menu_layout);
((ImageView)findViewById(R.id.icon)).setImageResource(R.drawable.ic_done_50);
((TextView)findViewById(R.id.label)).setText("Uploaded");
findViewById(R.id.progress).setVisibility(View.GONE);

maManager.playSoundEffect(Sounds.SUCCESS);
// mWakeLock.release();


}

CreatePictureView();
new Handler().postDelayed(new Runnable()
{
public void run()
{
CreatePictureView();
}
}, 1000);
}
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
android:drawable="@drawable/progress_secondary_holo_dark"
android:scaleWidth="100%" />
</item>

<item
android:id="@id/progress">
<scale
Expand Down
4 changes: 3 additions & 1 deletion GlassShare/src/main/res/layout/menu_layout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@
android:id="@id/progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminateOnly="false"
android:progressDrawable="@drawable/progress_horizontal_holo_dark"
android:indeterminateDrawable="@drawable/progress_indeterminate_horizontal_holo"
android:max="100"
android:indeterminate="true"
android:layout_marginTop="-13dp"/>


</LinearLayout>

0 comments on commit 74c8c17

Please sign in to comment.