I'm porting my android app to playbook and keep getting an error related to not supporting Google Maps, however I don't use that anywhere in my project. It's also not mentioned anywhere in my manifest.
I'm at a loss here, not sure what to do next. Any ideas?
Just to update on this: I was able to compile and run the app on the emulator w/ that warning present so - lets see if it gets past approval process, will update.
The Google Maps API for Android is unsupported on the Blackberry Playbook. See https://bdsc.webapps.blackberry.com/android/apisupport/ for a list of what can and cannot be ported.
For now, there is no way around this. If you want to create a Google Maps application for the Playbook, you will need to use the AIR SDK with the Google Maps Flash API
Related
The top answer to this question (ADK and Eclipse woes - com.android.future and USBAccessory?) solved my issue (in a specific case), but I wondered why I needed to use the Google API and not the default Android API for implementing a IOIO board via USB. Why does this feature exist in the Google API 2.3.3 and not Android API 2.3.3 (since the android operating system is capable of supporting it... did the Android API developers just not add some additional functionality that makes the IOIO plugin tick?), and why is it not required to use the Google API for 4.2? Is this likely specific to the IOIO interface code I am using (https://github.com/ytai/ioio/wiki/Downloads#client-software-and-ioio-application-firmware-images)?
I would like to further understand the reason behind this so that I can better predict if I encounter a similar issue in the future with other libraries.
I do not have an idea about the USB issue you've mentioned. I just want to clarify why you need to use Google APIs instead of normal Android API in some cases.
Android code is open-source which means anyone can have access to it and can compile the code to make their own android enabled devices. Most of the device manufacturer choose Google's proprietary licensed version of Android which includes some of the Google services inbuilt which are closed source and are not included in the android source code.
These services include Google Play Store, Google Maps, Gmail, Admob etc. So if you want to use any of the Google services/features(which are not included in the usual Android features), you have to use Google APIs, which have support for these features.
An actual device running on Android OS may or may not support these features, depending upon the availability of Google Services in the installed ROM (These can be installed later if you have root access). For example Nokia X series won't support any Play Store, Google map or Google gaming services feature.
I suppose this is true in your case too.
PS: The above info is from my own experience and is not supported by any of the articles mentioned anywhere. Feel free to add references in the comments if you know any article supporting the facts.
I am running an emulator with Google API level 18 but whenever I open my google maps based application I get the error message "This app won't run unless you update Google Play services".
How can I get google play services to run on my emulator? I have looked at other stackoverflow questions but they say to use the latest API, which I already am.
EDIT: It is worth noting i am using the support library
EDIT: Screenshot of my emulator setup:
You need to setup an emulator with the API level you need + the Google API! For every API level there are 2 version of ROM! One with Google APIs and one without! If you choose the first you will be ok to run any app that uses Google Play Services!
You should create emulator with target version Google APIs - API level 18, start it and add Google account (System settings - Add account - Google)
i had the same problem once as i tried to feed my app with dummy-locationdata via emulator.
There is still no map-support for the emulator, though you can workaround and get it running the hard way!
in my eyes, best tutorial for your purpose is THIS TUTORIAL.
On a device, you need to have Google Play Services intalled. I'm not sure if it's possible to have it installed on an emulator. You can try searching for workarounds. But I've had this problem before, I just ended up using a real device.
I want to use a google map to display a persons information only if he wishes to. Otherwise he will be on another screen doing something else but the map updates automatically even when he is not looking at the map?
And also i want the application to run on all versions of android rather than only a phone which has specific google api's . If i create an application using the third party google add-on, will it also run on a normal device with say like android 2.2 or 2.3.3 version?
The first thing sounds, like you want to update the map in the background, while your user is not on the MapActivity. To do so, you can use a Service.
When using the Google APIs, they have to be installed on the targeted device. From the documentation:
The <uses-library> reference is required, because it enables the
build tools to link your application against the Maps external
library. It also ensures that the Android system will not install
your application on a device unless the required library is
available.
We're developing an app with some map features, with
<uses-library android:name="com.google.android.maps" />
in the manifest. It runs well on a Xoom and a Galaxy Tab, as well as several phones. It also runs fine in one of the Google APIs emulators. When installing to the Kindle Fire, we get
[2011-12-20 16:25:04 - android] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2011-12-20 16:25:04 - android] Please check logcat output for more details.
[2011-12-20 16:25:04 - android] Launch canceled!
with
E/PackageManager( 1385): Package <package> requires unavailable shared library com.google.android.maps; failing!
W/PackageManager( 1385): Package <package> couldn't be installed.
D/AndroidRuntime(12606): Shutting down VM
This post: https://stackoverflow.com/a/4509787/931277 confirms what I was starting to suspect, that the required api is really missing from the device.
Is there any way to include this library with an application, rather than relying on its inclusion in the Android build on the device?
Not only is there no "way to access this api", but what you are suggesting as the alternative ("hunting down a Google Maps apk and installing that onto the Fire") is not only a copyright violation but probably will not work, since the Google Maps app will not supply the system library that other apps would use.
UPDATE based on edit:
Is there any way to include this library with an application, rather than relying on its inclusion in the Android build on the device?
No, sorry. Google licenses Google Maps (app and system library), and there are no distribution options outside of licensing it from Google for use with firmware.
You might consider OSMDroid and OpenStreetMap, or using WebView and the Web-based Google Maps.
deCarta offers a full featured Android API for mapping, geocoding, reverse geocoding, advanced driving directions, and POI search. It runs like a champ on the Kindle Fire and offers both OpenGL or Canvas based map rendering. Check it out:
http://developer.decarta.com/Apis/Android
also: if you register on the site you actually get all the source code for the entire API free. They also have HTML5 APIs that work great on the Kindle browser as well.
Have you tried this http://code.google.com/apis/maps/articles/android_v3.html
Amazon now offers a MAPS API, with two core features:
Interactive Maps. You can embed a Map View in your app for customers to pan, zoom and fling around the world. You have the option to display a user’s current location, switch between standard maps and satellite view, and more.
Custom Overlays. You can display the locations of businesses, landmarks and other points of interest with your own customized markers and pins.
check it out here https://developer.amazon.com/sdk/maps.html
Is it possible to use Google Maps Android library in my app in a way, that the app can be installed even on phones without Google Maps? On phones without Google Maps, the maps feature would be disabled.
Is it possible to use Google Maps Android library in my app in a way, that the app can be installed even on
phones without Google Maps?
There is an undocumented android:required="false" flag you can put on the <uses-library> element. I am hopeful that they will document this in a future release. With that set to false, you would need to use reflection to see if Google Maps is loaded (e.g., try to find the MapView class) -- if not, disable whatever would lead the user to a map.
If anybody else has the same problem (I do):
On this Android Developer page it says -- as far as I can tell -- that you can reference the Maps API and thus have e.g. a map activity in your app by using Google Play services:
"The Google Maps Android APIs are not included in the Android
platform, but are available on any device with the Google Play Store
running Android 2.2 or higher, through Google Play
services.
To integrate Google Maps into your app, you need to install the Google
Play services libraries for your Android SDK. For more details, read
about Google Play
services."
Apparently it is an actual app (it is installed on my phone) that updates certain Google stuff.
So it seems it is possible, but only for devices running Android 2.2 (API level 8) and above.
I find the explanation on that site a bit unclear, however, and I have not been able to test this on my own.
In my case, I guess I have to live with the fact that not all devices will be able to install my app, since I target an API < 8.