parent
b58d06f290
commit
067422823e
4 changed files with 140 additions and 3 deletions
27
OsmAnd/AndroidManifest-amazon.xml
Normal file
27
OsmAnd/AndroidManifest-amazon.xml
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:icon="@mipmap/icon_free"
|
||||
android:label="@string/app_name"
|
||||
tools:replace="android:icon, android:label">
|
||||
|
||||
<activity
|
||||
android:name="net.osmand.plus.activities.MapActivity"
|
||||
android:theme="@style/FirstSplashScreenFree"
|
||||
tools:replace="android:theme" />
|
||||
|
||||
<service
|
||||
android:name="net.osmand.plus.NavigationService"
|
||||
android:process="net.osmand"
|
||||
tools:replace="android:process" />
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="net.osmand.fileprovider"
|
||||
tools:replace="android:authorities" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
|
@ -84,11 +84,11 @@ android {
|
|||
manifest.srcFile "AndroidManifest-nightlyFree.xml"
|
||||
}
|
||||
amazonFree {
|
||||
java.srcDirs = ["src-nogms", "src-google"]
|
||||
manifest.srcFile "AndroidManifest-gplayFree.xml"
|
||||
java.srcDirs = ["src-nogms", "src-amazon"]
|
||||
manifest.srcFile "AndroidManifest-amazon.xml"
|
||||
}
|
||||
amazonFull {
|
||||
java.srcDirs = ["src-nogms", "src-google"]
|
||||
java.srcDirs = ["src-nogms", "src-amazon"]
|
||||
}
|
||||
huawei {
|
||||
java.srcDirs = ["src-nogms", "src-huawei"]
|
||||
|
|
|
@ -0,0 +1,69 @@
|
|||
package net.osmand.plus.inapp;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
public class InAppPurchaseHelperImpl extends InAppPurchaseHelper {
|
||||
|
||||
public InAppPurchaseHelperImpl(OsmandApplication ctx) {
|
||||
super(ctx);
|
||||
purchases = new InAppPurchasesImpl(ctx);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void isInAppPurchaseSupported(@NonNull Activity activity, @Nullable InAppPurchaseInitCallback callback) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void execImpl(@NonNull InAppPurchaseTaskType taskType, @NonNull InAppCommand command) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void purchaseFullVersion(@NonNull Activity activity) throws UnsupportedOperationException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void purchaseDepthContours(@NonNull Activity activity) throws UnsupportedOperationException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void purchaseContourLines(@NonNull Activity activity) throws UnsupportedOperationException {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void manageSubscription(@NonNull Context ctx, @Nullable String sku) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InAppCommand getPurchaseLiveUpdatesCommand(WeakReference<Activity> activity, String sku, String userInfo) throws UnsupportedOperationException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InAppCommand getRequestInventoryCommand() throws UnsupportedOperationException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isBillingManagerExists() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void destroyBillingManager() {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package net.osmand.plus.inapp;
|
||||
|
||||
import net.osmand.plus.OsmandApplication;
|
||||
|
||||
public class InAppPurchasesImpl extends InAppPurchases {
|
||||
|
||||
private static final InAppSubscription[] LIVE_UPDATES_FREE = new InAppSubscription[] {};
|
||||
|
||||
public InAppPurchasesImpl(OsmandApplication ctx) {
|
||||
super(ctx);
|
||||
inAppPurchases = new InAppPurchase[] {};
|
||||
liveUpdates = new LiveUpdatesInAppPurchasesFree();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullVersion(String sku) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDepthContours(String sku) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isContourLines(String sku) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLiveUpdates(String sku) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private static class LiveUpdatesInAppPurchasesFree extends InAppSubscriptionList {
|
||||
|
||||
public LiveUpdatesInAppPurchasesFree() {
|
||||
super(LIVE_UPDATES_FREE);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue