mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-02-18 00:17:40 +01:00
purchasing the app on Android is now finally possible
This commit is contained in:
@@ -6,6 +6,7 @@ Your device can now act as Bluetooth keyboard, allowing you to send keyboard sho
|
||||
- added new keyboard shortcuts for Rouvy (Kudos, Pause workout)
|
||||
|
||||
**Fixes**:
|
||||
- you can now finally buy the full version on Android :)
|
||||
- save "Enable Media Key detection" setting across app restarts
|
||||
- UI adjustments and fixes in the controller configuration screen
|
||||
- iOS: Remote pairing now works again
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:bike_control/bluetooth/messages/notification.dart';
|
||||
import 'package:bike_control/gen/l10n.dart';
|
||||
import 'package:bike_control/main.dart';
|
||||
import 'package:bike_control/utils/core.dart';
|
||||
import 'package:bike_control/widgets/ui/toast.dart';
|
||||
@@ -34,7 +33,6 @@ class RevenueCatService {
|
||||
final int Function() getDailyCommandLimit;
|
||||
final void Function(int limit) setDailyCommandLimit;
|
||||
|
||||
static const _isAndroidWorking = false;
|
||||
bool _isInitialized = false;
|
||||
String? _trialStartDate;
|
||||
String? _lastCommandDate;
|
||||
@@ -119,9 +117,7 @@ class RevenueCatService {
|
||||
|
||||
_isInitialized = true;
|
||||
|
||||
if (Platform.isAndroid && !isPurchasedNotifier.value && !_isAndroidWorking) {
|
||||
setDailyCommandLimit(10000);
|
||||
} else if (!isTrialExpired && Platform.isAndroid) {
|
||||
if (!isTrialExpired && Platform.isAndroid) {
|
||||
setDailyCommandLimit(80);
|
||||
}
|
||||
} catch (e, s) {
|
||||
@@ -240,16 +236,7 @@ class RevenueCatService {
|
||||
/// Purchase the full version (use paywall instead)
|
||||
Future<void> purchaseFullVersion(BuildContext context) async {
|
||||
// Direct the user to the paywall for a better experience
|
||||
if (Platform.isAndroid && !_isAndroidWorking) {
|
||||
_trialStartDate = null;
|
||||
await startTrial();
|
||||
buildToast(
|
||||
navigatorKey.currentContext!,
|
||||
title: AppLocalizations.of(context).unlockingNotPossible,
|
||||
duration: Duration(seconds: 5),
|
||||
);
|
||||
setDailyCommandLimit(10000);
|
||||
} else if (Platform.isMacOS) {
|
||||
if (Platform.isMacOS) {
|
||||
try {
|
||||
final offerings = await Purchases.getOfferings();
|
||||
final purchaseParams = PurchaseParams.package(offerings.current!.availablePackages.first);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: bike_control
|
||||
description: "BikeControl - Control your virtual riding"
|
||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
version: 4.7.0+94
|
||||
version: 4.7.0+95
|
||||
|
||||
environment:
|
||||
sdk: ^3.9.0
|
||||
|
||||
Reference in New Issue
Block a user