question

VasanthakumarM-3635 avatar image
0 Votes"
VasanthakumarM-3635 asked RobCaplan edited

Deploy app min 5.0 to 10.0 AndroidApp

Hi techie,
I need to generate an one apk that will install android version 5.0 to 10.0. How to generate apk with disturbing any designs

Anyone have idea of this . Kindly reply me

dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JessieZhang-2116 avatar image
0 Votes"
JessieZhang-2116 answered JessieZhang-2116 commented

Hello,


Welcome to our Microsoft Q&A platform!

For this, you can check documemt Preparing an Application for Release.

Use the following steps to build the app for release:

  • Specify the Application Icon – Each Xamarin.Android application should have an application icon specified. Although not technically necessary, some markets, such as Google Play, require it.

  • Version the Application – This step involves initializing or updating the versioning information. This is important for future application updates and to ensure that the users are aware of which version of the application they have installed.

  • Shrink the APK – The size of the final APK can be substantially reduced by using the Xamarin.Android linker on the managed code and ProGuard on the Java bytecode.

  • Protect the Application – Prevent users or attackers from debugging, tampering, or reverse engineering the application by disabling debugging, obfuscating the managed code, adding anti-debug and anti-tamper, and using native compilation.

  • Set Packaging Properties – Packaging properties control the creation of the Android application package (APK). This step optimizes the APK, protects its assets, and modularizes the packaging as needed. Additionally, you can provide your users with an Android App Bundle that's optimized for their devices.

  • Compile – This step compiles the code and assets to verify that it builds in Release mode.

  • Archive for Publishing – This step builds the app and places it in an archive for signing and publishing.


    I need to generate an one apk that will install android version 5.0 to 10.0.

You just need to set the minimum Android version to android 5.0 and Target Android version to android 10.

83035-image.png


Update

Yes exactly true . For Android 9 I’m using Samsung J7 pro, For Android 11 Samsung Galaxy F62 , For Android 10 Samsung Galaxy M31
Layout been deformed and button too

For this, you can provide alternate layouts for different screen sizes.

Alternate layouts make it possible to customize a view for a specifc screen size, changing the positioning or size of the component UI elements.
For example, in the image below, there are alternate resources for the four different screen sizes:

83485-image.png

For more details, you can check: https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/resources-in-android/resources-for-varying-screens?tabs=windows

Best Regards,

Jessie Zhang


If the response is helpful, please click "Accept Answer" and upvote it.


Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



image.png (25.0 KiB)
image.png (6.6 KiB)
· 15
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@JessieZhang-2116 I tried that option when i work on Emulator actual design im getting. When i create the Single APK, In Android 9.0 Design good.When i install in Android 10.0 Design was collapse .

Why like this . Any idea ?


0 Votes 0 ·

Is there any error logs?

0 Votes 0 ·

When i install in Android 10.0 Design was collapse .

What do you mean by words Design was collapse?



0 Votes 0 ·

Do you mean the layout been deformed when you installed in android 10? What device(android 10) did you used?

0 Votes 0 ·

Yes exactly true . For Android 9 I’m using Samsung J7 pro, For Android 11 Samsung Galaxy F62 , For Android 10 Samsung Galaxy M31
Layout been deformed and button too

0 Votes 0 ·
Show more comments