Android Location Documentation provides links to location-samples in GitHub but these samples do not run with SdkVersion 29 - service

Documentation provided by Google/Android for their location services is sketchy and does not allow me to write a program. Android provides links to code samples in GitHub but these samples do not run with SdkVersion 29. My understanding is that Android only accepts SdkVersion 29 or higher. Clearly, some Android designers have code that actually works on their current systems. How can I get access to an actual code sample for location that works with the latest (or ver 29) Android?

Related

Android Target Framework in .NET MAUI app

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.

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.

What is Android mini_emulator image?

When building Android,
lunch
possible images are:
...
5. aosp_x86-eng
6. aosp_x86_64-eng
...
16. mini_emulator_x86-userdebug
17. mini_emulator_x86_64-userdebug
...
What is exactly mini_emulator? What is the difference between mini_emulator and aosp_x86?
You can find the configurations here:
build/make/target/product/aosp_x86.mk
build/make/target/product/aosp_x86_64.mk
device/generic/mini-emulator-x86/mini_emulator_x86.mk
device/generic/mini-emulator-x86/mini_emulator_x86_64.mk
The names of these configurations mean:
aosp means a full-featured Android. Sometimes also refered to as Generic System Images.
mini means a reduced Android.
emulator means that this Android is meant to be run in the qemu-emulator.
x86 and x86_64 describe the architecture.
eng means
Development configuration with additional debugging tools
userdebug means
Like user but with root access and debug capability; preferred for debugging

Samsung SmartTV PNACL SDK 5.1 Works in Emulator not on TV

Re gard my topic problem I have some basic questions about PNACL
Does PNACL is supported by all samsung SmartTV?
2.If I use pepper 31 will my application work on older TV's?
And now the main problem
I've compiled application in C (basic helloworld from SDK 5.1 + some additional code of mine), for x86 architecture and it works both in emulator and chrome.
Then I recompiled it for Samsung Smart TV (arm) (I have 2013 series).
Aplication starts on TV, but PNACL module dont dispalay any result, the js onload callback of div containing module is called but nothing else.
Does my tv support PNACL?
2013 and 2014 models support PNACL.
2013 models: only support up to pepper29
2014 models: only support up to pepper33.
I hope this information help you.
As you have the 2013 series, you will need an older version of the pepper SDK (31 wont work).
In this link you can download the pepper 25 SDK
(for windows). Otherwise, you will have to get the SDK source code from Git and rebuild it. The native_client_sdk is part of the chromium project and can be found here.
You can get the older releases of nacl here http://gsdview.appspot.com/nativeclient-mirror/nacl/nacl_sdk/.

Admob and API version 8

I develop on an.. let's say: not ultramodern computer, and were doing fine so far developing with the emulator for API version 8. Now I try to use Admob (after meddling with "Adsense for Mobile Apps" which never displayed any ads for some reason), but it turns out that I need an API target of 13 to use it.
Is there any way to get it to run with 8?
In my Manifest file, I have defined
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
already. After my investigations and the tips I have read so far, I tried the 'reduced' set for the Android Manifest,
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation" />
but running it on the v8 emulator produces a number of exceptions basically complaining that the required configChanges are not set.
I have read about a 'trick' of using an older Admob SDK, but also the warning of Google that from end of 2011, they won't display ads anymore and the new version must be used.
The worst thing is that I can't even run my own app on my connected mobile phone (HTC Legend, v2.3.7 / API 10) if I want to use Admob?!
Or maybe I am missing something, am quite frustrated right now.
There is a way. Check out this blog post, which applies to AdMob SDK 6.0 as well.
The TL;DR:
Set target in project.properties to android-13 or higher. You need the full set of configurations:
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
As long as minSdkVersion is 8, you can still run on Android 2.2.