Google maps app works on Android 9.0 but not lower - android

I recently started programming with cordova (using eclipse) for a Google map multiplatform app.
Currently, I am only working on android builds.
The app works well on Android with API 28, it shows a yellow flash screen with blue words then the google maps, makes a call to retrieve some data from my data base and shows it on the map. There is also a lateral black menu bar (working on that content).
But, if I try to execute this app on an Android 7.0 (API 24) or basically any other API lower than 28. The flash screen is completely white with blue words instead of yellow and the Google maps doesn't load (the side black menu does).
I have done some debugging to that and the app still does the call to my data base and retrieves the information. It doesn't show any error (it showed some but I corrected them and didn't solve this issue).
Does anyone have any idea what the problem might be?
Thanks a lot to all of you.
EDIT:
Here is the code and some new logs i got after trying to solve the problem.
https://www.dropbox.com/s/lm8fbsk6v97frq3/www.rar?dl=0
in the map API inicialization i had to take out the our API key since i am not allowed to share it.
Thanks for your interest with my problem. Ask me anything.

I just ran your app on a Nexus S Android 7.0 (API 24) emulator and indeed, your map did not show up at all.
I changed its height from 100% to a fixed size such as height:400px and then it loaded without issues. Switching back to height:100% and then adding position:absolute also worked, and so did wrapping the map in a containing <div> with a given height.
The thing is, a Google map needs to have an explicit height set in order to be displayed at all, but your map and body both do have a height, so upon further code inspection I noticed you're using jquery mobile which has its own CSS. I removed both your jquery mobile's JS and CSS scripts and voila! The map's right there. :)

Check the google play version of your emulator to see if its compatible. On my emulator, and old version of the google maps API would not register or load unless I had fully updated the play store. This could be fixed by downgrading the version of the google maps API you are currently using to a previous version.

Related

Why `onComputeColors` is being ignored on Android P beta (DP2)?

Background
I have a live wallpaper that uses the relatively new API (from Android 8.1 - API 26) to request the OS to use customized colors:
https://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine.html#notifyColorsChanged()
https://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine#onComputeColors()
The problem
On Android 8.1 and even on Android P DP1, all worked fine with these functions, as they did what normal wallpaper do with the colors, affecting the notification drawer if the color that was chosen is dark enough. Here's a comparison between choosing a non-dark color and choosing a dark color background:
Thing is, on Android P beta (DP2), even though this function get called, it doesn't do anything, ever.
To test it on your own, you can try the full project I've published here.
What I've found
I thought that maybe the API has changed, so I've tried to find which functions are available, but I couldn't see anything that's new.
I've tried to use various ways to return the customized colors:
a. WallpaperColors(Color.valueOf(0xff000000.toInt()), Color.valueOf(0xff000000.toInt()), Color.valueOf(0xff000000.toInt()))
b. WallpaperColors.fromDrawable(ColorDrawable(0xff000000.toInt()))
c. WallpaperColors.fromDrawable(BitmapDrawable(completelyBlackBitmap))
d. WallpaperColors.fromBitmap(completelyBlackBitmap)
Sadly none worked (fromBitmap is the one that works well on Android 8.1).
Seeing this, I've re-checked that my code is ok, and noticed that the built in live wallpaper works fine, and that selecting a solid black wallpaper (instead of live wallpaper) also affected the UI of the OS.
Seeing that it works with built in apps, I've reported to Google about this issue, only to find out that they don't understand what I'm talking about, and each time I've tried to tell them they've misunderstood it differently:
https://issuetracker.google.com/issues/79404938
https://issuetracker.google.com/issues/79665215
https://issuetracker.google.com/issues/80029770
I wanted to make sure it's not an issue with just my app, but with others too, so I've tested Muzei live wallpaper app, which is actually made by one of Google's own developers. The issue indeed occurs there too, while working fine on Android 8.1.
I was just curious, and wanted to check if the issue could occur if I've moved Muzei to be a system app, but after doing so, I've seen the issue still exists.
The questions
How come it doesn't work anymore?
Is there a workaround/fix for this?
Why does it work fine for built in apps and for normal wallpapers, but not for third party apps? I don't think their code is any difference.
OK, Google confirmed it's a bug, which will be fixed on later version:
The development team has fixed the issue that you have reported and it
will be available in a future build.
And, it works fine now on DP4 (beta 3) of Android P.

Videojs-chromecast plugin fails to launch on Android platform (but works on PC platform)

I've built an html5-video webpage that uses video-js and its chromecast-plugin. When I use the resulting cast button on video-js player's control-bar, when running on Chrome-browser on Android, it fails to completely transfer over to the TV's screen. The failing symptom is that only a large blue cast-icon is visible in the center of the TV screen. It fails on Android, each and every time I try it. (My Android is version 7.1.1, on a Google Nexus-9 tablet.)
And when it fails to completely cast over to the TV, the cast-icon-button on the video-js control-bar turns red, which I assume means that the chromecast-plugin 'knows' that it failed. (The videojs-chromecast-plugin is version 2.0.8)
My chromecast device is a 2nd-generation chromecast-dongle from Google.
[ From a PC-platform, the video-js chromecast-plugin's cast-button works perfectly every time. That PC-platform is Windows-10, using the newest version of Chrome browser (Version 63.0.3239.132 (Official Build) (64-bit)) ]
So, could someone with Android and a chromecast device please test my
webpage and report whether it works or whether they too fail with a large
blue cast-icon image in center of their TV-screen.
(Note: I've googled for symptom of the blue cast-icon in center of TV, and
find various reports of this exact symptom, on various platforms. But
none of those problem posts ever end with a solution, so I've concluded
that this is a known open issue.)
My webpage that is failing is located here:
https://weasel.firmfriends.us/HTMLVideoFromCloud/
[ You can see the page's html and javascript via "view page source"
in the browser (right-click anywhere on the page, outside of the
video-js viewer) ]
(EDIT#1) Ok, some extra clarification: The problem casting from Android happens ONLY when I use the cast-button at right-end of videojs-viewer's control bar.
But, I have found an alternative cast-button on Android, that CAN successfully cast my page to the TV. I don't recall exactly what I did to get this extra button to start appearing, but it will appear for a few seconds in the upper-left client-area of the video-js player window rendering my webpage. This 'workaround' doesn't completely solve my issue, because the goal is to get videojs-chromecast-plugin's cast-button to work. Also, other people viewing the page from Android may not know how to get that alternate cast-button.
(EDIT#2) I've tested now from two different tablets...both fail.
(1) Android version 7.1.1, on a Google Nexus-9 tablet
(2) Android version 5.1.1, on a Google Nexus-10 tablet
TIA...

Google map api it’s not work in API27 emulator

I can’t use google map with android emulator in API27.
When I open the app, it show nothing ,just google logo show at left-down corner.
But it work in API26 and lower version emulator with the same code.
I know many people have the same problem too.
But there is no solution to fix this problem.
I hope there is any one had fixed it and tell me what’s going on....
Thanks
https://upload.cc/i/4C65rs.png
E/Google Maps Android API: Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above

Google map not showing on Android 2.3 device

I recently learn how to implements a Google map in my app. It works very well on Android 4.** devices, but then, I try on a 2.3 device and the map now looks like this.
No map, but the UI looks fine, and the distance between the two points sounds good.
I would like to know what's wrong, and I assume it's not a Google API key problem since my app works on more recent devices.
Thanks in advance.
Try Hardware acceleration when you set the view.
http://developer.android.com/guide/topics/graphics/hardware-accel.html
EDIT : Apparently the link I pointed to is says HW Acceleration is only for 3.0+
Thanks #WarrenFaith
Since you see the grid, this is not an API key related issue. When the key is wrong, you can see only gray background and zoom buttons.
This is a connectivity issue. Make sure your device can reach internet and download tiles.
You have to check that the device has OpenGL v2 support:
Specify requirement for OpenGL ES version 2
The Google Maps Android API uses OpenGL ES version 2 to render the
map. If OpenGL ES version 2 is not installed, your map will not
appear. We recommend that you add the following element
as a child of the element in AndroidManifest.xml:
This notifies external services of the requirement. In particular, it has the effect of preventing Google
Play Store from displaying your app on devices that don't support
OpenGL ES version 2.
Here you have the link: https://developers.google.com/maps/documentation/android/start?hl=es#specify_requirement_for_opengl_es_version_2

Map overlay - Google streetmap not displaying

Complete beginner here so forgive me.
Porting an iOS App over to Android. We have custom image tiles laid over google maps. On iOS the streetmap displays as usual outside of our custom image tiles however on the Android version it is only showing a blank grid and we can't figure it out. The location works however it's just not showing the map.
We've tried a couple of different devices and the issue is the same across the board.
Any suggestions? If there is more info that I can provide that might help narrow the issue down, just ask.
EDIT: The device we are testing it on is a HTC. Apparently it works on a Nexus. Known compatibility issue?
If your MapView is not loading standard map tiles, either:
you do not have the INTERNET permission, or
you do not have an Internet connection, or
you are not using the right Maps API key for the signing key

Categories

Resources