mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Android: Replaced deprecated AIDL in-app billing code with Google Play Billing library
This commit is contained in:
parent
bad6500424
commit
027e12e3a6
10 changed files with 651 additions and 763 deletions
|
|
@ -140,9 +140,9 @@ public:
|
|||
androidKeyStorePass (settings, Ids::androidKeyStorePass, getUndoManager(), "android"),
|
||||
androidKeyAlias (settings, Ids::androidKeyAlias, getUndoManager(), "androiddebugkey"),
|
||||
androidKeyAliasPass (settings, Ids::androidKeyAliasPass, getUndoManager(), "android"),
|
||||
gradleVersion (settings, Ids::gradleVersion, getUndoManager(), "4.10"),
|
||||
gradleVersion (settings, Ids::gradleVersion, getUndoManager(), "5.4.1"),
|
||||
gradleToolchain (settings, Ids::gradleToolchain, getUndoManager(), "clang"),
|
||||
androidPluginVersion (settings, Ids::androidPluginVersion, getUndoManager(), "3.2.1"),
|
||||
androidPluginVersion (settings, Ids::androidPluginVersion, getUndoManager(), "3.5.3"),
|
||||
AndroidExecutable (getAppSettings().getStoredPath (Ids::androidStudioExePath, TargetOS::getThisOS()).get().toString())
|
||||
{
|
||||
name = getName();
|
||||
|
|
@ -840,6 +840,9 @@ private:
|
|||
for (auto& d : StringArray::fromLines (androidJavaLibs.get().toString()))
|
||||
mo << " implementation files('libs/" << File (d).getFileName() << "')" << newLine;
|
||||
|
||||
if (isInAppBillingEnabled())
|
||||
mo << " implementation 'com.android.billingclient:billing:2.1.0'" << newLine;
|
||||
|
||||
if (areRemoteNotificationsEnabled())
|
||||
{
|
||||
mo << " implementation 'com.google.firebase:firebase-core:16.0.1'" << newLine;
|
||||
|
|
@ -1215,6 +1218,8 @@ private:
|
|||
bool arePushNotificationsEnabled() const { return androidPushNotifications.get(); }
|
||||
bool areRemoteNotificationsEnabled() const { return arePushNotificationsEnabled() && androidEnableRemoteNotifications.get(); }
|
||||
|
||||
bool isInAppBillingEnabled() const { return androidInAppBillingPermission.get(); }
|
||||
|
||||
String getJNIActivityClassName() const
|
||||
{
|
||||
return getActivityClassString().replaceCharacter ('.', '/');
|
||||
|
|
@ -1436,7 +1441,7 @@ private:
|
|||
defines.set ("JUCE_PUSH_NOTIFICATIONS_ACTIVITY", getJNIActivityClassName().quoted());
|
||||
}
|
||||
|
||||
if (androidInAppBillingPermission.get())
|
||||
if (isInAppBillingEnabled())
|
||||
defines.set ("JUCE_IN_APP_PURCHASES", "1");
|
||||
|
||||
if (supportsGLv3())
|
||||
|
|
@ -1820,7 +1825,7 @@ private:
|
|||
if (androidExternalWritePermission.get())
|
||||
s.add ("android.permission.WRITE_EXTERNAL_STORAGE");
|
||||
|
||||
if (androidInAppBillingPermission.get())
|
||||
if (isInAppBillingEnabled())
|
||||
s.add ("com.android.vending.BILLING");
|
||||
|
||||
if (androidVibratePermission.get())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue