Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Generating multiple APKs.
Post Body

Hey guys, newbie Android Dev here.

Currently I'm working on wrapping a game in WebView. So far it's amazing, I'm not using Cordova but more like doing things on my own. Right now I'm stuck with one really annoying cycle. As far as I know WebViews are introduced in Android 5.0( API 21). But I wanted to target more users so I end up using Crosswalk. The problem was that Crosswalk is kinda huge, when comes to the output apk's size. So I used Android's productFlavor feature. So right now I can build 2 apks - one for Android 5.0 (without Crosswalk, so apk size is way smaller) and one with Crosswalk so I can target (17-21API level). But whenever I want to build separate apks I have to go to gradle's and manually set the minSdkVersion and targetSdkVersion values.

Then I have to submit these two generated apks to Google Play Console. The whole process feels kinda...meh.

I have read about the new App Bundle feature and split apks, but not sure is this going to be useful.

To generalise the situation and my actual question. How to build two different apks as one(bundle maybe?), that acts different on different devices?

By 'acts different' I mean different classes and activities.

By 'different devices' I mean different Android versions.

Is there any good trick I can use ? Any suggestions?

Author
Account Strength
100%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
86,224
Link Karma
17,961
Comment Karma
68,034
Profile updated: 5 days ago
Posts updated: 8 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 years ago