Google Advertizer ID in Library - java

I am trying to create an SDK where I need the Google Advertiser ID. As per the instructions given in this link I attached the code in one of my .java files. Now when I tried to include the jar file into a project, it is throwing an error
java.lang.VerifyError: com/.....
Could not find method com.google.android.gms.ads.identifier.AdvertisingIdClient$Info.getId, referenced from method com/../getIdThread
Can someone help me with this?
Note: Google Play services library and jar file are added to my SDK.

As per the documentation:
The advertising ID APIs are supported in Google Play services 4.0+
So you need to first make sure that you have integrated Google Play Services support correctly in your app. Then you need to verify, at runtime, that the user has the latest/necessary Google Play Services installed on his device, prioir to using a Google Play Services feature.
Here is how to do both things, from my asnwer on a similar thread:
java.lang.NoClassDefFoundError: com.google.android.gms.ads.AdView

Related

How to configure Android App Bundles to publish apk (PWA) on Google Play?

I have created an application using TWA (com.github.GoogleChrome: custom-tabs-client).
But when publishing Google shows me an optimization error message and suggests to optimize using the Android App Bundles.
After reading a lot of information in Google, I was able to add the Dynamic Feature Module and enable minification. As a result, the apk was reduced to 700kb from 2mb, but Google still does not accept it.
Tell me please how to configure the assembly so that Google could approve the application?
When building the application, you should select the assembly through the Android App Bundles
After assembly, you need to upload aab file instead of apk in google play
solution

AOSP and access to Google Play Services

I am developing for a device that uses AOSP (https://source.android.com/). This device is a Garmin 780 (https://buy.garmin.com/en-US/US/p/569748). The custom build does not include any Google Apps.
I'm new to Android dev, so I'm a bit lacking in the ecosystem knowledge.
I was hoping that someone could explain to me how the OS would handle having an application installed which uses some of the Google Play Services API's (e.g. https://developers.google.com/android/reference/packages).
I've installed an APK that uses:
com.google.android.gms:play-services-analytics
com.google.android.gms:play-services-auth
The application runs. I would have thought that it would fail to run if the libraries were not present. Or are they bundled with the apps APK?
When using the Device File Explorer in Android Studio and checking out the folder /data/data I can confirm that no com.google.android packages are installed.
So I'm really after some confirmation, the way Google Play Services is described here: https://developers.google.com/android/guides/overview seems that Google Play Services must be installed on the device at an OS level in order to make use of them. These services cannot be installed alongside a custom application like normal dependencies right?
That is correct Google Play Services cannot simply be installed for use along with an application.
Google Play Services is a suite of APIs installed by default on most Android devices to allow for apps to easily utilize common features as well as keep the services and Google apps up to date.
Something that might interest you is Open Gapps. It is a way for devices with custom Android ROMs to utilize the Google Play Services package.

How to add in the simplest way Google service to applications [Java, libGDX]

I develop apps for Android using libGDX and I want to add Google services such as Google Games or Goodle Ads but I can't do it. I downloaded Google services with SDK Manager and read many guides but none of them have helped. When I try to add compile 'com.google.android.gms:play-services:7.3+' to build.gradle it pops up errors. Hence my question is how to simply add google service to applications. I program in Android Studio.
Your question is very broad so I can't give you an exact answer.
This is the official place to go if you want to incorporate google play services.
This is the place to go if you want to include google play ads service
Note that Intellij Idea is pretty much the same as Android Studio. Whatever works for Idea works for Android Studio in this case.

App-Engine Connected Android Project: Does Google-Eclipse Plugin generate Client Endpoints for iOS and JavaScript in addition to the android api

Old
I need to work on the iOS version of my app. The App-Engine and Android portions are completed using the Google Eclipse Plugin (GPE). In the Official Google Documentations I am told the easiest way is to use maven. Does anyone know how I might add maven to the App-Engine portion of my “connected” project?
Apparently I only need to add the following one line in the maven file
mvn appengine:endpoints_get_discovery_doc
Update
Again, I need to get the iOS client for an endpoint project that I created with the Google Eclipse Plugin as an App-engine Connected Android Project. From eclipse I simply do [Right Click] > Google > Generate Cloud Endpoint Client Library and it generates the library for android. But now I just look in my war directory and I see three files: myendpoint-1-rest.discovery, myendpoint-1-rcp.discovery, myendpoint-1-rest.api.
Now this is a wild guess, but are these the files I need for iOS and JavaScript? Or must I follow the instructions in the official docs to get the discovery files for iOS? What I mean is I have not generated the files per the instructions but I have used the GPE for creating the endpoints for android. Does GPE create the necessary clients for iOS and JavaScript as well? I cannot find any documentation on that.
Javascript client only needs to include script https://apis.google.com/js/client.js. You can load your API using
gapi.client.load('api-name', 'v1', callback, 'https://app_id.appspot.com/_ah/api');
Objective-C client needs some extra work after generating your discovery doc.

How to use Skype Java API inside android application?

I want to make one application that will monitor chat history of other IM in phone.
I couldn't find any Skype API for Android, although I found Skype4Java API from net. I wish to use this in an Android application. I have imported the .jar file of that API to my Java build path. When I run my code, I am getting errors for libskype.jnilib and libskype.so file.
I also can't delete that file also, because when I attempt to delete that I get an error. Please tell how to do that?
How can I use Skype's Java API inside an Android app?
As of the current writing of this answer, there is no Android implementation of Skype. There are numerous third-party chat APIs, although I personally can't name one since I haven't worked with any.
The reason why the Skype4Java API is throwing errors at you is because it was not designed for use with Android. To delete the .jar file, you must remove all references to it and remove it from your build path for attempting a delete.

Categories

Resources