Commit Graph

350 Commits

Author SHA1 Message Date
Rafa Lecina
2868e7204b Added support for subscriptions and full server to server validation to OnlinePurchaseGooglePlay.
Full server validation is enabled by setting ``bDisableLocalAcknowledgeAndConsume`` in ``OnlineSubsystemGooglePlay.Store`` section on the ini files. This way consume and acknowledge should be called after server validation through server to server calls to GooglePlay services and all product types allowed by GooglePlay store can be handled

Subscriptions are identified using a unique product id on GooglePlay like any other regular in app products. The main difference with a regular product is that the same subscription can be purchased by many different ways depending on the GooglePlay app configuration.
A subscription may have different base plans which are identified by a string id. Each base plan defines a base price, whetrer the plan is autorenewable or not, the length before expiration. For instance, a subscription may have a base plan with a price for a 1 month subscription and another plan with a different price for a 1 year subscription
Each base plan may have several offers which are identified by a string id. Those may be triggered on purchase by GooglePlay or by the developer. Those offers may configure several phases on a subscription depending on the number of times it has been renewed. For instance, an offer could set a Free period, then a discount on the first 3 renewals and then following renewals would be at the base plan price
Subscription product ids seen from the engine side have a special format starting with "s-" prefix (``-`` is not allowed in product ids in the GooglePlay store, so there would be no broken id on the licensees side) . In order to request product information (QueryOffersById) the product id can be requested with or without that prefix, but all the product ids reported to the engine will contain the prefix in case the product is a subscription
In order to identify base plans, offers and its price phases ``QueryOffersById`` will store a ``FOnlineStoreOffer``instance for each allowed combination
The product id format for those will be s-<store product id>:<base plan id>:<offer id>:<price phase index>
An instance for each base plan will be created without the offer id and price phase index. Also, an instance for each offer will be created without the price index part and containing the final price point(the last price point. This was explicitly requested) in addition to all the price steps
For example, this could be the list of ``FOnlineStoreOffer`` instances created by ``QueryOffersById`` requesting ``s-test_subscription_1``(which in the store would be identified as just ``test_subscription_1``). That would be a subscription with 2 plans, one of the with 2 offers. First offer would contain 3 phases and second just 2 phases
``s-test_subscription_1:base-plan1``
``s-test_subscription_1:base-plan1:offer-1``
``s-test_subscription_1:base-plan1:offer-1:0``
``s-test_subscription_1:base-plan1:offer-1:1``
``s-test_subscription_1:base-plan1:offer-1:2``
``s-test_subscription_1:base-plan1:offer-2``
``s-test_subscription_1:base-plan1:offer-2:0``
``s-test_subscription_1:base-plan1:offer-2:1``
``s-test_subscription_1:base-plan2``

To ``CheckOut`` a product any of those identifiers could be used. The price index would be discarded since a subscription offer must be started from the initial step (GooglePlay already keeps track if the user already used the Free trial period and removes it). If the identifier contains an offer id the subscription will be purchased using that offer

When receipts are queried using ``QueryReceipts`` we will receive receipts for any non consumed product, any pending product (user still needs to pay using an external method) and for any non expired subscriptions
GoogleBilling Library do not notify on device for expired/canceled/paused subscriptions. Real time notifications can be configured on servers to notify validation/authority servers about those changes and act accordingly, so no additional checks should be done from the client
Only notifications received are when a new product is purchased/becomes pending or a subscriptions is activated or resumed. In order to check for receipts status on device the only way should be to call ``QueryReceipts```again and note that there is no receipt for the given subscription. This should be done only in case validations are done locally on device (which is not secure, but there are many serverless games around in mobile)

#jira UE-176438
#review @Bertrand.Carre, @Michael.Kirzinger, @Chris.Varnsverry, @Dashan.Yue, @Chris.Babcock
#preflight 641c4bdb76461c460b9ceaf3

[CL 25037177 by Rafa Lecina in ue5-main branch]
2023-04-14 03:30:00 -04:00
chris babcock
23bd4315be Add Overflow 3 and 4 for Android OBB files
OverflowOBBFileLimit project setting to set number allowed (up to 4, default 2)

#android
[REVIEW] [at]Peter.Sauerbrei
#rb Peter.Sauerbrei

[CL 25035555 by chris babcock in ue5-main branch]
2023-04-13 20:29:30 -04:00
allan bentham
c68538bc05 Broaden android mkdir permissions on !shipping builds to enable adb shell to modify the dir and its contents.
#rb jack.porter
#preflight 6422d6a0a86ae7cbcc9e1ddc

[CL 24817609 by allan bentham in ue5-main branch]
2023-03-28 09:19:59 -04:00
devin doucette
dfac826723 Added PlatformManualResetEvent
This private abstraction is used to signal a single waiting thread to wake.
This first implementation is only specialized for Microsoft platforms. Other platforms will be specialized later.

#preflight 6418bc6a5d3e25354f1a2a5b
#rb Andriy.Tylychko, Zousar.Shaker
#rnx

[CL 24783341 by devin doucette in ue5-main branch]
2023-03-24 14:04:56 -04:00
bob tellez
c248e6e469 [Backout] - CLs 24735827, 24746530, 24750104, 24751543, 24752787, 24753773
[FYI] Devin.Doucette
Original CL Desc
-----------------------------------------------------------------
Added PlatformManualResetEvent

This private abstraction is used to signal a single waiting thread to wake.
This first implementation is only specialized for Microsoft platforms. Other platforms will be specialized later.

#preflight 6418bc6a5d3e25354f1a2a5b
#rb Andriy.Tylychko, Zousar.Shaker

[CL 24773885 by bob tellez in ue5-main branch]
2023-03-23 23:28:45 -04:00
dmytro vovk
55e3616f35 Added FORCE_ANSI_ALLOCATOR=1 to Android ASan builds
#rb Allan.Bentham

[CL 24748695 by dmytro vovk in ue5-main branch]
2023-03-22 11:42:42 -04:00
devin doucette
65761e0543 Added PlatformManualResetEvent
This private abstraction is used to signal a single waiting thread to wake.
This first implementation is only specialized for Microsoft platforms. Other platforms will be specialized later.

#preflight 6418bc6a5d3e25354f1a2a5b
#rb Andriy.Tylychko, Zousar.Shaker

[CL 24739039 by devin doucette in ue5-main branch]
2023-03-21 16:38:00 -04:00
Matt Peters
0027082473 RequestExit Feedback: Add Callsite argument to FPlatformMisc::RequestExit
Add the argument to many but not all callsites.
#jira FORT-578919
#rnx
#rb Devin.Doucette
#preflight 6414ca9d691c5ebc15b30410

[CL 24696053 by Matt Peters in ue5-main branch]
2023-03-17 16:46:34 -04:00
Wojciech Krywult
188673fa32 Engine: Memory: Unified the behavior of FPlatformMemory::BaseAlllocator() between platforms. This function is allowed to be called multiple times now. It caches the created allocator the first time it's called and returns it in subsequent runs.
#preflight https://horde.devtools.epicgames.com/job/63ffedb4e96fa926fb76fe64
#rb David.Harvey
#rnx

[CL 24660068 by Wojciech Krywult in ue5-main branch]
2023-03-15 15:06:50 -04:00
jeannoe morissette
9f6179543c VulkanRHI: Move Android (and engine) minimum core version to Vulkan 1.1. Remove need to check for VK_KHR_get_physical_device_properties2.
#rb Carl.Lloyd
#preflight 6411cc03924023147d94cc4e

[CL 24653948 by jeannoe morissette in ue5-main branch]
2023-03-15 10:09:14 -04:00
dmytro vovk
5d8d977ee6 Added MemAdvice CVar change callback
#jira UE-160510
#rb Allan.Bentham

[CL 24215618 by dmytro vovk in ue5-main branch]
2023-02-14 13:03:07 -05:00
dmytro vovk
b2a8dac081 Enhance memory pressure enum on Android to support 3 stages - OK, low, critical
#rb Allan.Bentham

[CL 24136534 by dmytro vovk in ue5-main branch]
2023-02-11 12:26:20 -05:00
dmytro vovk
d3a6a6c1f7 Added MemAdvice static C lib to Android
#rb Allan.Bentham

[CL 24119001 by dmytro vovk in ue5-main branch]
2023-02-10 10:15:21 -05:00
chris babcock
a2e6292e96 Update force feedback support on Android
- Use VibrationEffect for intensity control
- Forward feedback to controller(s) if Android.UseControllerFeedback non-zero (defaults to 1)
- Fix issue with fingerprint scanner false detection as controller
- Does not continue feedback when backgrounded

#jira UE-168579
#android
[REVIEW] [at]Jack.Porter
#rb Jack.Porter

#preflight https://horde.devtools.epicgames.com/job/63e2ff10c11233cdcab34b6e

[CL 24068849 by chris babcock in ue5-main branch]
2023-02-08 01:41:47 -05:00
Rafa Lecina
724827847d Allow purchasing multiple products in one transaction on GooglePlay Android
#jira UE-161334
#review @Bertrand.Carre, @Chris.Varnsverry, @Chris.Babcock, @Jack.Porter
#preflight 63d3ac375c69f453c10f6321

[CL 23987744 by Rafa Lecina in ue5-main branch]
2023-02-03 03:56:51 -05:00
dmytro vovk
905cd0b687 Bring back Android XOM check as it apparently crashes on some devices
#rb Allan.Bentham

[CL 23890382 by dmytro vovk in ue5-main branch]
2023-01-27 15:16:27 -05:00
dmytro vovk
1bd42cd481 Removed XOM check from Android stack walking as new libunwind no longer triggers this issue
#rb Allan.Bentham

[CL 23677905 by dmytro vovk in ue5-main branch]
2023-01-13 10:50:10 -05:00
allan bentham
b8d598ec6a Add Android memory mapped file support
#rb chris.babcock
#preflight 63bff97d6e6e8d46626be2e2

[CL 23661852 by allan bentham in ue5-main branch]
2023-01-12 09:01:45 -05:00
chris babcock
30999dc550 Prevent crash if GetStatData called with a directory on Android
#jira UE-173781
#android
[REVIEW] [at]Rolando.Caloca
#rb Rolando.Caloca

#preflight https://horde.devtools.epicgames.com/job/63bdff750b7fcef8b01e793d

[CL 23651669 by chris babcock in ue5-main branch]
2023-01-11 14:45:36 -05:00
Josh Adams
5615b1a14d - Fixed Android warnings found with some upcoming toolchain changes
- Allow GoogleARSDK for x64 architecture
#rb chris.babcock
#preflight 638a5343976b1644cb6d9c01

[CL 23377164 by Josh Adams in ue5-main branch]
2022-12-02 14:45:19 -05:00
Matt Peters
40185c7e66 WindowsPlatformMemory: Change the behavior of FGenericPlatformMemoryStats::GetMemoryPressureStatus on Windows; it now uses QueryMemoryResourceNotification instead of the generic implementation.
Cooker: In MPCook Collect garbage based on the Operating System's MemoryPressure event, so that Standby memory does not cause spurious garbage collection.
In all cook modes, tweak the output during garbage collection to have less duplicate information.
In all cook modes, add a cooldown for GC when garbage collection is not impactful.
#rn Minor, Core
#rb Zousar.Shaker, Danny.Couture
#preflight 636d69761c14fe4505163289

[CL 23088442 by Matt Peters in ue5-main branch]
2022-11-10 17:17:20 -05:00
henrik karlsson
432c3ce257 Fixed non-unity/pch errors
#rb none
#jira none
#preflight skipped

[CL 22991080 by henrik karlsson in ue5-main branch]
2022-11-04 13:55:45 -04:00
Rafa Lecina
aabf447830 Update Facebook SDK on Android to 15.0.1
Included some fixes after testing login both with and without the Facebook app installed

#jira UE-162597
#review @Bertrand.Carre, @Chris.Varnsverry, @Chris.Babcock
#preflight 634e6e905f008d633ff59feb

[CL 22686247 by Rafa Lecina in ue5-main branch]
2022-10-21 04:51:39 -04:00
sarah noonan
1a993b9ada *Remove per-frame caching of stats from FPlaformMemory::GetStats and move caching into helper function.
*Update common callers of FPlaformMemory::GetStats to use the helper.
[REVIEW] [at]matt.peters

[CL 22596606 by sarah noonan in ue5-main branch]
2022-10-18 07:22:43 -04:00
evgenii babinets
528585a552 Merging with resolved conflicts on behalf of sarah.noonan. Original CL description:
*Make FPlatformMemory::GetStats cache memory stats per frame to prevent multiple costly platform calls per frame ( by default, has option to request non-cached values ).
*Update some calls to FPlatformMemory::GetStats to specifically request non-cached values.
[REVIEW] [at]evgenii.babinets [at]andrew.ladenberger


#preflight 634a04c0907f4749392d75d0

[CL 22545788 by evgenii babinets in ue5-main branch]
2022-10-14 21:13:08 -04:00