From 01de4ad619a07d6c0b4346bf02344831cef49a44 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sun, 24 Jan 2016 18:14:33 +0300 Subject: [PATCH] Live updates inapp in progress --- OsmAnd/res/layout/live_updates_header.xml | 214 ++-- OsmAnd/res/layout/subscription_fragment.xml | 108 ++ .../vending/billing/IInAppBillingService.aidl | 144 +++ .../net/osmand/plus/OsmandApplication.java | 8 + .../src/net/osmand/plus/OsmandSettings.java | 4 +- .../net/osmand/plus/inapp/InAppHelper.java | 435 ++++++++ .../net/osmand/plus/inapp/util/Base64.java | 570 ++++++++++ .../inapp/util/Base64DecoderException.java | 32 + .../osmand/plus/inapp/util/IabException.java | 43 + .../net/osmand/plus/inapp/util/IabHelper.java | 991 ++++++++++++++++++ .../net/osmand/plus/inapp/util/IabResult.java | 45 + .../net/osmand/plus/inapp/util/Inventory.java | 91 ++ .../net/osmand/plus/inapp/util/Purchase.java | 63 ++ .../net/osmand/plus/inapp/util/Security.java | 123 +++ .../osmand/plus/inapp/util/SkuDetails.java | 58 + .../plus/liveupdates/LiveUpdatesFragment.java | 36 + .../plus/liveupdates/OsmLiveActivity.java | 18 + .../liveupdates/SubscriptionFragment.java | 112 ++ 18 files changed, 3015 insertions(+), 80 deletions(-) create mode 100644 OsmAnd/res/layout/subscription_fragment.xml create mode 100644 OsmAnd/src/com/android/vending/billing/IInAppBillingService.aidl create mode 100644 OsmAnd/src/net/osmand/plus/inapp/InAppHelper.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/Base64.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/Base64DecoderException.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/IabException.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/IabHelper.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/IabResult.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/Inventory.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/Purchase.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/Security.java create mode 100644 OsmAnd/src/net/osmand/plus/inapp/util/SkuDetails.java create mode 100644 OsmAnd/src/net/osmand/plus/liveupdates/SubscriptionFragment.java diff --git a/OsmAnd/res/layout/live_updates_header.xml b/OsmAnd/res/layout/live_updates_header.xml index a72faaad0c..b58ae607d5 100644 --- a/OsmAnd/res/layout/live_updates_header.xml +++ b/OsmAnd/res/layout/live_updates_header.xml @@ -4,111 +4,167 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="14dp" - android:layout_marginRight="14dp" - android:layout_marginTop="14dp" - android:background="?attr/bg_card" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:paddingTop="8dp" android:orientation="vertical"> + android:background="@color/osmand_orange" + android:orientation="vertical" + android:paddingBottom="8dp" + android:paddingLeft="24dp" + android:paddingRight="8dp" + android:paddingTop="16dp"> + + - - - - - - - - - + android:layout_gravity="bottom|right" + android:layout_marginTop="32dp" + android:textColor="@color/color_white" + android:background="@drawable/btn_round_transparent" + android:text="Subscribe"/> - - + android:background="?attr/bg_card" + android:orientation="vertical" + android:visibility="visible"> - - - - + android:gravity="center" + android:minHeight="44dp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OsmAnd/res/layout/subscription_fragment.xml b/OsmAnd/res/layout/subscription_fragment.xml new file mode 100644 index 0000000000..c31f856783 --- /dev/null +++ b/OsmAnd/res/layout/subscription_fragment.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +