Table of Contents |
---|
What is Play Feature Delivery
You want to partition your Android app into a part that includes the Anyline SDK (on-demand module) and a part that doesn’t (base App)?
...
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
If you’re interested in partitioning your Android app into two distinct parts - a base app and an on-demand module that includes the Anyline SDK - this article is for you. We’ll delve into Play Feature Delivery (PFD), discuss the challenges associated with integrating PFD and the Anyline SDK, and provide a workaround to make PFD work, albeit with some limitations. |
Table of Contents |
---|
...
What is Play Feature Delivery?
PFD, or Play Feature Delivery (also known as Dynamic Feature Delivery), allows certain features of your app to be delivered conditionally or downloaded on demand.
This means , that the 120MB the Anyline SDK needs will only be downloaded by a user who specifically requests the Anyline Scanning functionality.
...
...
What is the issue?
Separating While separating the Anyline SDK out into an on-demand module works, but upon actually running is effective, an issue arises when executing the functionality a problem occurs because due to a collision between two factors collide:.
Play Feature Delivery has a known limitation:
It isn't possible to use Android WebView in an activity that accesses resources or assets from an optional module.The Anyline SDK uses
WebView
with local resources in several cases (examples are the Visual Feedback implementation and theWaterMarkImage
).
In other words: Because the Anyline SDK implementation uses what is a known limitation with Play Feature Delivery, problems occur.
...
PLEASE NOTE:
Further to the issue described above, there’s a crash when using PFD
...
due to the Anyline dependency MLKit. However,
...
this issue can be
...
resolved by following a specific answer on StackOverflow.
...
The workaround, including the limitations
Until While Anyline fixes works to fix this issue on the SDK-side, a workaround for the aforementioned limitation consists of a combination of three measures:
1 | The customer needs to be using a |
...
License Key without a Watermark, as a License Key containing a Watermark accesses local assets with the |
...
. | |
2 | “Live Preview” ( |
...
the blue overlayed rectangles drawn over recognized characters, during a scan) would have to be lost. In this case the integrator needs to switch their |
...
( PLEASE NOTE: Additional changes to the |
...
> |
...
> |
...
, while the style |
...
. | |
3 | The integrator fixes the MLKit Crash with their implementation (relevant Stackoverflow answer). |