diff --git a/app/app.iml b/app/app.iml index 8360ad1..d50228e 100644 --- a/app/app.iml +++ b/app/app.iml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java b/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java index e0c4844..a93df52 100644 --- a/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java +++ b/app/src/main/java/com/mozilla/hackathon/kiboko/activities/TutorialSlideActivity.java @@ -19,6 +19,7 @@ import android.view.View; import android.view.Window; import android.widget.Button; import android.widget.TextView; +import android.widget.Toast; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; @@ -152,7 +153,28 @@ public class TutorialSlideActivity extends AppCompatActivity implements LoaderMa String recipeId = data.substring(data.lastIndexOf("/") + 1); Uri contentUri = DsoContract.Tutorials.CONTENT_URI.buildUpon() .appendPath(recipeId).build(); - //showRecipe(contentUri); + showTutorial(contentUri); + } + } + + private void showTutorial(Uri tutorialUri) { + LOGD("Recipe Uri", tutorialUri.toString()); + + String[] projection = { DsoContract.Tutorials.TUTORIAL_ID, + DsoContract.Tutorials.TUTORIAL_TAG, + DsoContract.Tutorials.TUTORIAL_HEADER, + DsoContract.Tutorials.TUTORIAL_PHOTO_URL, + DsoContract.Tutorials.TUTORIAL_STEPS}; + Cursor cursor = getContentResolver().query(tutorialUri, projection, null, null, null); + if (cursor != null && cursor.moveToFirst()) { + + // always close the cursor + cursor.close(); + } else { + Toast toast = Toast.makeText(getApplicationContext(), + "No match for deep link " + tutorialUri.toString(), + Toast.LENGTH_SHORT); + toast.show(); } } diff --git a/gradle.properties b/gradle.properties index 1afa328..6f96b35 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ ############################################################################### # If versions end in odd numbers they are development builds, even versions are release candidates. # The AndroidManifest.xml must also be updated currently. -version=0.1.1-SNAPSHOT +version=0.1.2-SNAPSHOT # Using these variables to sync dependency version numbers across sub-projects. android_support_lib_version = 23.4.0