This object is in archive! 
Null return from getAvailableVersions() under Android 11
Solved
Recently a user of my application, which uses the Locus Map API to send route information to Locus Map, attempted to run my application on a Pixel with Android 11. My app appears to function properly but it is unable to send data to Locus Map.
Using a Pixel Android 11 AVD under Android Studio I captured the following messages from my application:
I/System.out: LocusUtils - getAvailableVersions(com.ride2lm.ExportRouteToLPActivity@ce349da), e: android.content.pm.PackageManager$NameNotFoundException: menion.android.locus I/System.out: LocusUtils - getAvailableVersions(com.ride2lm.ExportRouteToLPActivity@ce349da), e: android.content.pm.PackageManager$NameNotFoundException: menion.android.locus.free.amazon LocusUtils - getAvailableVersions(com.ride2lm.ExportRouteToLPActivity@ce349da), e: android.content.pm.PackageManager$NameNotFoundException: menion.android.locus.free.samsung I/System.out: LocusUtils - getAvailableVersions(com.ride2lm.ExportRouteToLPActivity@ce349da), e: android.content.pm.PackageManager$NameNotFoundException: menion.android.locus.pro LocusUtils - getAvailableVersions(com.ride2lm.ExportRouteToLPActivity@ce349da), e: android.content.pm.PackageManager$NameNotFoundException: menion.android.locus.pro.amazon LocusUtils - getAvailableVersions(com.ride2lm.ExportRouteToLPActivity@ce349da), e: android.content.pm.PackageManager$NameNotFoundException: menion.android.locus.pro.asamm LocusUtils - getAvailableVersions(com.ride2lm.ExportRouteToLPActivity@ce349da), e: android.content.pm.PackageManager$NameNotFoundException: menion.android.locus.pro.computerBild W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String locus.api.android.objects.LocusVersion.getVersionName()' on a null object reference
I was using version 0.9.32 of the API but have upgraded to 0.9.35 and still have the same issue.
While my application is not handling the null properly, I do not believe that the API should return a null since I have installed Locus Map 4.1.1.
My application is working as expected with Android 9.
Hello,
does the same happens also with the latest new Locus API version?
Hello,
does the same happens also with the latest new Locus API version?
With the new 0.9.36 API I am getting the Locus Map version information (4.1.1 1014) as expected.
Thanks Menion.
With the new 0.9.36 API I am getting the Locus Map version information (4.1.1 1014) as expected.
Thanks Menion.
Replies have been locked on this page!