Android Target Framework in .NET MAUI app - maui

I have a .NET MAUI app targeting .NET 7 and this is what I see in the project file:
<TargetFrameworks>net7.0-android;net7.0-ios;net7.0-maccatalyst</TargetFrameworks>
When I open up the properties for my project, I see that the minimum target for Android is set but I don't see anything selected for target API -- see below:
With these settings, what version of Android API is my app targeting?
I recently received an email from Google Play that has the following statement.
Now, apps that target API level 29 or below will start experiencing
reduced distribution starting Jan 31, 2023...
With that said, what API level does my app target if it's targeting net7.0-android?

If not specified, (presumably - not verified) it will automatically use the highest installed one.
Click the dropdown triangle. First one is highest. I see Android 13.0 (API Level 33).
Leaving this blank allows it to update to latest, when VS updates.

The google's official document said:
Starting in January 2023, app updates must target Android 12 or higher and adjust for behavioral changes in Android 12; except for Wear OS apps, which must target Android 11 or higher.
So I suggest you set your project's Android Target Framework as Android 12.0(Api 31). It meets google's requirement and needn't to do the job about fitting the android 13.0.
For more information, you can check the official document about Meeting Google Play's target API level requirement.

Related

Can't run app on Huawei lite wearable (GT2 PRO): API error when installing on device

I am trying to write an app for my GT2 Pro but when I try to install my app with Huawei DevEco Assistant, it gives me the following error:
Installation failed: 47. Invalid value entered for app.apiVersion
Here is the steps I did:
I created a [Lite] JS project.
I signed the app without any changes on project.
I built a signed hap and copied it to the haps directory on the phone.
I tried to install app via DevEco Assistant.
DevEco Studio details:
DevEco Studio 2.1.0.501 with api 4-5
DevEco Studio 3.1.0.100 with api 4-7
I assume you followed the process for debugging your app on GT2 Pro at https://developer.huawei.com/consumer/en/doc/distribution/app/agc-help-harmonyos-debugapp-manual-0000001177608893, especially on Sports watches section.
What's the software version in the GT2 Pro? If it has been upgraded to the latest version, you need to check the build.gradle file and ensure the SDK version is correct. For the lite-wearable device, the compatible API 4 and target API 5 are recommended. You may set API 4 for both or API 3 and API 4, depending on HarmonyOS version in your device. You also need to make sure the API configuration is consistent in the config.json file if the "apiVersion" is configured. In addition, you should use the official released DevEco Studio such as version 3.0 or version 2.1 for your app development and debugging.

Generate HarmonyOS (Huawei) build from Flutter project

I am working on one Flutter project. In which, We want to generate builds of Android, iOS, and HarmonyOS (Huawei). But I am not sure does Flutter supports this OS or not. I went through some of the stuff on the internet but was unable to figure out how to generate and what kind of commands were needed. Here, Anyone has previously generated HarmonyOS compatible build from the Flutter project. Please share your thoughts.
For now it is not possible directly from Flutter. Because of the change in architecture brought by Huawei with HarmonyOS it is not anymore an "Android device" and it doesn't run "Android applications".
Now what you can call "native HarmonyOS applications" are *.app files (not *.apk or *.aab)
Most recent answer on Quora to:
Will Harmony OS run Android apps?
Gives the following response:
Answered Jun 4, 2021 by Mahdi Parastech, Software Engineer
Nope, because:
The structure of the APIs are different.
Hongmeng (HarmonyOS) apps are in *.app, Android apps are *.apk
The structure of pages (activities) are different, Hongmeng uses some additional json files and puts pages inside *.har files.
Hongmeng uses Javascript too, and that's the only option in Wearable Hongmeng devices, but Android apps are just written in Java.
source
Apparently you should be able to migrate your native android application to HarmonyOS by using their IDE but the thing is that Flutter was not build for this architecture.
Except if the Flutter team decides for some reason to support HarmonyOS I don't think it will be possible to develop HarmonyOS applications by using Flutter.

How do I build my JavaFX Gluon app for iOS now that RoboVM is not available?

As of April 17th, RoboVM licenses are no longer available. Is there an official production-ready replacement for RoboVM? I have not seen any changes in the documentation on Gluon's web site for handling iOS. If there's no replacement from Gluon, is there a clear solution to this issue?
Gluon Mobile and the underlying JavaFXPorts project never relied on a commercial license of RoboVM. On the contrary, both relied on the latest open source release: 1.8.0, which you can find here.
Obviously, it is not maintained anymore, and new changes in the iOS SDK are not taken care of.
Based on this release, there are several forks, some of which are trying to include the latest iOS changes and keep it up to the date.
Actually, JavaFXPorts depends on one of those forks: Mobidevelop, source code, and now uses its 2.3.0 version.
So you shouldn't have any issues of building an iOS solution with Gluon Mobile.

Android Application Version - Min SDK Version

I have looked at http://developer.android.com/resources/dashboard/platform-versions.html
2.1 : 27.2%
2.2 : 63.9%
2.3 : 0.8%
2.3.3 : 1.7%
3.0 : 0.2%
I am pretty sure I will use Android 2.1 as my version, covering almost 94% of current users. When I go to set up an android application in eclipse, I see this screen
The documentation says
Min SDK Version
This value specifies
the minimum API Level required by your
application.
What does that mean? Does that mean I can pick 2.3 for my build target, but select 7 as the min sdk version and have all devices running 2.1 supported?
I found a similar post ( Android Min SDK Version vs. Target SDK Version ). Here's part of the answer:
android:minSdkVersion
An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attribute.
android:targetSdkVersion
An integer designating the API Level that the application is targetting.
You're correct. The application simply won't install on devices with lower API level. And won't be visible in Android Market for such devices.
Here are listed all API levels:
http://developer.android.com/guide/appendix/api-levels.html
It is my understanding that the "Min SDK Version" controls whether or not your users receive the "This application is not supported" message box. For example, if they were running 1.6 (API 4) and you inserted a 7 in that box.... they'll receive the message regardless of whether or not you've checked the 1.6 box.
I never quite understood why it appears that this can be arbitrarily set. I think it's set up that way to allow the developer to build against multiple targets and features without being forced to have compatibility with only one SDK version.
min-sdk=7 (Android 2.1) means your app cannot be installed in device with API level 6 (android 2.0.1) or below (1.5 or 1.6). Of course you can install your app in device with API level 7 or above ( > 2.1).

Android LicenseChecker from Emulator

I have been trying to run the Emulator (Android 2.2 - Level 8) with Google APIs level 9 to test my License Checker implementation to no avail. This is as recommended at: http://developer.android.com/guide/publishing/licensing.html#test-env
It runs fine on the device, but not on the emulator.
On my AVD emulator, I don't have the Market installed. So I am not sure if the documentation is wrong because the architecture does show the dependency on the Market.
Has anyone had any luck running the LVL code on the emulator?
Thanks.
Sounds like you are trying to run Emulator with a target of "Android 2.2 - API Level 8". In order to get the LicenseChecker to run, the target for your Virtual Device needs to actually be "Google APIs (Google Inc.) - API Level 8". This will still open up the emulator for 2.2, but will have the Google APIs ready to use.
From the Licensing page:
To set up an emulator for adding licensing to an application, follow these steps:
Launch the Android SDK and AVD Manager.
In the Available Packages panel, select and download the SDK component "Google APIs (Google Inc.) - API Level 8" (or higher) from the SDK repository, as shown in the figure above.
When the download is complete, use the Android SDK and AVD Manager to create a new AVD based on that component, described next.
In the Virtual Devices panel of the Android SDK and AVD Manager, click New and set the configuration details for the new AVD.
In the dialog that appears, assign a descriptive name to the AVD and then use the "Target" menu to choose the "Google APIs (Google Inc.) - API Level 8" as the system image to run on the new AVD. Set the other configuration details as needed and then click Create AVD to finish. The SDK tools create the new AVD configuration, which then appears in the list of available Android Virtual Devices.