Linking Google Maps Api Target with Android 2.1 Target - android

I have developed two separate applications 1) android 2.1 that takes user input / registers , shared pref and stuff and 2) Google Maps GPS on target Google APIs 7 .
Now, I would like to embed the second project in first . That is, after the user registers it will bring up Maps and suggestions and stuff. How can I use both the targets (Apis ) together in a single App?

You just have to use the Google APIs 7 target as it will also include the 2.1 one. The only difference is that it provides the Google Maps API library.
If you want to join both project together you will have to do it manually. I mean, copy the sources and resouces of the first project and cppy them into the project that has Google APIs 7 as target and copy. Then fix manually what you have to fix. In conclusion: in order to join them, you will have to do some stuff manually.
There's another option, though. You can export your the first project as an JAR library and then include it into the second project's built path. The problem with this is that you will not be able to modify the source code of the 'library' one.

Related

how to make a third party library as api in android

I am new in android programming.I have created an application (in eclipse using android).it has many features and one of them is tess-two.some of them increases my application size.(like tess-two that increase about 15 MB).so I want to make it as api and if user needs it , download it.tess-two is a project that improrted to eclipse and used ndk and checked islibrary (properties -> android) and used in my main project(so in my project it is in bin folder).
I am sorry that my question is complicated or I asked it badly.
A recommended option is to put tess-two in a separate app. This new app has no user interface. When installed, it exposes an API you (or potentially other apps) can use. This API could be, depending on your needs, a ContentProvider or a service\activity that handles an intent you create.
When the user of your main app asks for a feature that uses tess-two you will check if your API is available (i.e the intent is resolved or the content provider is available) and if not, direct the user to the play store.
An alternative option is to dynamically download code into a new classloader. It's both complicated and forbidden by Play Store policy.

Do I need to register my android app in API console to use Geofences?

I've tried setting up both my app and an Android sample app to use Google Play Services SDK, and I get NoClassDefFoundErrors when I run the apps on a device. I've done and re-done the proper steps to add the SDK as a library. The only thing my Googling can't answer is whether I need to get an API key through the API console to use Geofences.
Do I need an API key to use Geofences in the Google Play Services SDK?
The answer is no.
The reason I was getting NoClassDefFoundError is because of the order of export was incorrect. I had to have Android Private Libraries above my src folder in the Build Path, Order and Export.
It's stuff like this that makes me hate Android with the power of 1000 suns.

Alternate entry on Play Store

I'm doing a promotion for one of my apps with Deutsch Telekom, and they want me to put my app on a discount for their carrier exclusively. They have told me to achieve this by uploading a second version of my app to the Google Play Store, with the reduced price, and make it available only in that region on that carrier.
Is there a way I can duplicate my project in Eclipse without having to recopy all the files every time I update the original, but give the copy a different package name so it can be uploaded separately to the Play Store? Making my project a Library seems reasonable, except you can't export a Library Project, so that would hinder my development of the original app.
Thanks
I'm doing a promotion for one of my apps with Deutsch Telekom, and they want me to put my app on a discount for their carrier exclusively. They have told me to achieve this by uploading a second version of my app to the Google Play Store, with the reduced price, and make it available only in that region on that carrier.
Congratulations!
(assuming they're not forcing you at gunpoint to do this)
Making my project a Library seems reasonable, except you can't export a Library Project, so that would hinder my development of the original app.
Here's what I would try:
Step #1: Make your existing app project a library project.
Step #2: Make a standard app project, referencing the library project. Copy the manifest from the library project to this project. This should then build your original app as it was.
Step #3: Make another app standard project, referencing the library project, cloning the other standard project's manifest, but then updating its package to whatever you want the DT edition to be.

How to implement the API Samples? (VoiceRecognition)

I am very new to Android development and I am trying to create a very basic app that makes use of the VoiceRecognition facility.
The resource site here says to just paste the sample code into the project:
http://developer.android.com/resources/articles/speech-input.html
However eclipse doesn't seem to find/like the line "import com.example.android.apis.R", what it underlines is the com.example part of it, and as a result all the "R." methods give errors (e.g. findViewById(R.id.list))....
Is there something that I am not doing? Am I supposed to set up the project in a particular way in order to use these code samples?
Thank you very much
Check that you have the Google APIs installed in your environment.
For each SDK version you target, you can choose to use the one with the Google APIs or not. Speech input utilises the Google APIs so you must have them installed and target them in your app and Eclipse.
EDIT:
Detailed instructions for using the Google APIs in Eclipse can be found on the Google Maps Overview page.
You'll need to pay particular attention to the Set up a new Android project section (which also covers reconfiguring an existing project) and Set up an Android Virtual Device. You may or may not need to reference the speech library in a similar way to the Add a uses-library element section.

Supporting Multiple Android Versions using the Google APIs Add On

I am just about complete building an application. I've tested it on 1.6-2.3 android versions. My concern is how to distribute it. Does each phone already have the google apis installed? In particular one portion of my application is using the com.google.android.maps.* features. When developing I have to use a separate google apis library for each android version. Do I need to bundle the library for each version with my application?
Thanks in advance for any insight into this matter.
Does each phone already have the google apis installed?
No. However, I have not encountered any device that has the Android Market and does not have Google Maps. Hence, AFAIK, if you are only distributing via Android Market, most if not all of your users will have Google Maps.
When developing I have to use a separate google apis library for each android version.
No, you don't.
The target you choose in your build process (e.g., the target option in Eclipse) needs to be one with Google Maps, so your references to MapActivity and such resolve. Beyond that, set your target to match the highest API you are trying to use.
Do I need to bundle the library for each version with my application?
You are never bundling the library. The library is on the device.

Categories

Resources