diff --git a/app/build.gradle b/app/build.gradle index e125ad5b..ac0b59c3 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,14 +7,6 @@ apply plugin: 'kotlin-android-extensions' apply plugin: 'realm-android' apply plugin: 'io.fabric' -def getApiKey() { - def Properties properties = new Properties() - - properties.load(new FileInputStream(new File('api.properties'))) - - return properties['AMAZON_API_KEY'] -} - android { compileSdkVersion 23 buildToolsVersion '24.0.0 rc2' @@ -44,21 +36,17 @@ android { productFlavors { pro { applicationId 'com.bodyweight.fitness.pro' - versionCode 119 - versionName "1.1.9" + versionCode 120 + versionName "1.2.0" } free { applicationId 'com.bodyweight.fitness.free' - versionCode 119 - versionName "1.1.9" + versionCode 120 + versionName "1.2.0" } } buildTypes { - applicationVariants.all { variant -> - variant.buildConfigField "String", "AMAZON_API_KEY", "\"" + getApiKey() + "\"" - } - release { minifyEnabled false } @@ -121,8 +109,6 @@ dependencies { transitive = true; } - compile files('libs/amazon-mobile-associates-1.0.73.0.jar') - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" testCompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } diff --git a/app/libs/amazon-mobile-associates-1.0.73.0.jar b/app/libs/amazon-mobile-associates-1.0.73.0.jar deleted file mode 100644 index 30ac6a2b..00000000 Binary files a/app/libs/amazon-mobile-associates-1.0.73.0.jar and /dev/null differ diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 46a141db..898f12a5 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -40,16 +40,6 @@ android:value=".ui.MainActivity" /> - - - - - + android:value="5dcec45142f2b7beb83af419bcb06344e8598390" /> diff --git a/app/src/main/java/com/bodyweight/fitness/presenter/ActionPresenter.java b/app/src/main/java/com/bodyweight/fitness/presenter/ActionPresenter.java index b2ef401d..637fd8a2 100644 --- a/app/src/main/java/com/bodyweight/fitness/presenter/ActionPresenter.java +++ b/app/src/main/java/com/bodyweight/fitness/presenter/ActionPresenter.java @@ -13,7 +13,6 @@ import com.bodyweight.fitness.R; import com.bodyweight.fitness.stream.RoutineStream; -import com.bodyweight.fitness.ui.BuyEquipmentActivity; import com.bodyweight.fitness.ui.ProgressActivity; import com.bodyweight.fitness.view.dialog.ProgressDialog; @@ -82,12 +81,6 @@ public void onClickLogWorkoutButton() { mLogWorkoutDialog.show(); } - public void onClickBuyEquipment() { - getContext().startActivity( - new Intent(getContext(), BuyEquipmentActivity.class) - ); - } - public void onClickWatchOnYouTube() { String id = RoutineStream.getInstance().getExercise().getYouTubeId(); diff --git a/app/src/main/java/com/bodyweight/fitness/ui/BuyEquipmentActivity.java b/app/src/main/java/com/bodyweight/fitness/ui/BuyEquipmentActivity.java deleted file mode 100644 index 3d9b7571..00000000 --- a/app/src/main/java/com/bodyweight/fitness/ui/BuyEquipmentActivity.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.bodyweight.fitness.ui; - -import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.view.MenuItem; -import android.view.View; -import android.widget.ImageView; - -import com.amazon.device.associates.AssociatesAPI; -import com.amazon.device.associates.OpenProductPageRequest; - -import com.bumptech.glide.Glide; - -import com.crashlytics.android.answers.Answers; -import com.crashlytics.android.answers.CustomEvent; - -import java.util.List; - -import butterknife.ButterKnife; -import butterknife.InjectViews; -import butterknife.OnClick; - -import com.bodyweight.fitness.BuildConfig; -import com.bodyweight.fitness.R; - -public class BuyEquipmentActivity extends AppCompatActivity { - @InjectViews({ - R.id.product1, - R.id.product2, - R.id.product3, - R.id.product4, - R.id.product5}) - List mProducts; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - setContentView(R.layout.activity_buy_equipment); - - ButterKnife.inject(this); - - if (getSupportActionBar() != null) { - getSupportActionBar().setTitle("Buy Equipment"); - } - - AssociatesAPI.initialize( - new AssociatesAPI.Config(BuildConfig.AMAZON_API_KEY, this) - ); - - loadDrawable(R.drawable.product_bands, mProducts.get(0)); - loadDrawable(R.drawable.product_yoga, mProducts.get(1)); - loadDrawable(R.drawable.product_powertower, mProducts.get(2)); - loadDrawable(R.drawable.product_rings, mProducts.get(3)); - loadDrawable(R.drawable.product_irongym, mProducts.get(4)); - - if (!BuildConfig.DEBUG) { - Answers.getInstance().logCustom( - new CustomEvent("Buy Equipment") - ); - } - } - - @Override - public boolean onOptionsItemSelected(MenuItem item) { - switch(item.getItemId()) { - case android.R.id.home: { - this.onBackPressed(); - - return true; - } - } - - return super.onOptionsItemSelected(item); - } - - @SuppressWarnings("unused") - @OnClick({ - R.id.product1card, - R.id.product2card, - R.id.product3card, - R.id.product4card, - R.id.product5card - }) - public void onClick(View view) { - switch (view.getId()) { - case R.id.product1card: - openProductPage("B0026PMD70"); - - break; - - case R.id.product2card: - openProductPage("B004TN51EE"); - - break; - - case R.id.product3card: - openProductPage("B002Y2SUU4"); - - break; - - case R.id.product4card: - openProductPage("B0031QCS8C"); - - break; - - case R.id.product5card: - openProductPage("B001EJMS6K"); - - break; - } - } - - public void loadDrawable(int drawable, ImageView imageView) { - Glide.with(this).load(drawable).into(imageView); - } - - public void openProductPage(String productId) { - try { - AssociatesAPI.getLinkService().openRetailPage( - new OpenProductPageRequest(productId) - ); - } catch (Exception e) {} - - if (!BuildConfig.DEBUG) { - Answers.getInstance().logCustom( - new CustomEvent("Open Product Page") - .putCustomAttribute("Product Id", productId) - ); - } - } -} diff --git a/app/src/main/java/com/bodyweight/fitness/view/ActionView.java b/app/src/main/java/com/bodyweight/fitness/view/ActionView.java index a9741e23..d2840d38 100644 --- a/app/src/main/java/com/bodyweight/fitness/view/ActionView.java +++ b/app/src/main/java/com/bodyweight/fitness/view/ActionView.java @@ -175,13 +175,6 @@ public void onClickLogWorkoutButton(View view) { mPresenter.onClickLogWorkoutButton(); } - @OnClick(R.id.action_view_action_sheet_buy_equipment) - @SuppressWarnings("unused") - public void onClickBuyEquipment(View view) { - mMaterialSheet.hideSheet(); - mPresenter.onClickBuyEquipment(); - } - @OnClick(R.id.action_view_action_sheet_watch_on_youtube) @SuppressWarnings("unused") public void onClickWatchOnYouTube(View view) { diff --git a/app/src/main/res/drawable/state_shopping.xml b/app/src/main/res/drawable/state_shopping.xml deleted file mode 100644 index 514d2623..00000000 --- a/app/src/main/res/drawable/state_shopping.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/activity_buy_equipment.xml b/app/src/main/res/layout/activity_buy_equipment.xml deleted file mode 100644 index caeca1b2..00000000 --- a/app/src/main/res/layout/activity_buy_equipment.xml +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/view_action.xml b/app/src/main/res/layout/view_action.xml index d467fd81..cd6d70e2 100644 --- a/app/src/main/res/layout/view_action.xml +++ b/app/src/main/res/layout/view_action.xml @@ -58,20 +58,6 @@ android:layout_height="wrap_content" android:orientation="vertical"> - - transition:DASHBOARD Bodyweight Fitness - 1.1.8 + 1.2.0 Choose Exercise Progression About FAQ