I am trying to integrate spotify with my android application. I am using their Android SDK with Android Studio. I followed the tutorial on their official developer guide. I can import and use the authentication api (import com.spotify.sdk.android.authentication;) but cant import the player api (import com.spotify.sdk.android.player;)
Anybody faced this problem or any leads?
EDIT:
I added these dependencies in build.gradle file:
// This library handles authentication and authorization
compile 'com.spotify.sdk:spotify-auth:1.0.0-beta10#aar'
// This library handles music playback
compile 'com.spotify.sdk:spotify-player:1.0.0-beta10#aar'
Now I tried to try out the demo code mentioned in the link above. But I am getting error in these imports.
import com.spotify.sdk.android.player.Spotify;
import com.spotify.sdk.android.player.ConnectionStateCallback;
import com.spotify.sdk.android.player.Player;
import com.spotify.sdk.android.player.PlayerNotificationCallback;
import com.spotify.sdk.android.player.PlayerState;
However I can import the authentication related imports.
import com.spotify.sdk.android.authentication.*;
Either the player library is not getting imported properly or the import definitions have changed in 'com.spotify.sdk:spotify-player:1.0.0-beta10#aar' version, since the demo code that has been given is for 'com.spotify.sdk:spotify-player:1.0.0-beta9#aar' version.
Related
For printing in printer purpose, I am using native code for Android in the android folder of flutter app. So I wanna create MethodChannel but in android activity, all these imports are not found. (showing error)
import io.flutter.app.FlutterActivity;
import io.flutter.plugin.common.BasicMessageChannel
import io.flutter.plugin.common.StringCodec
import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import io.flutter.plugin.common.MethodChannel
It is happening to me as well and I am still wondering why...
To solve it I open the project from the root, so not only the android libs are loaded but also dart and flutter libs:
I try adding the libs into graddle conf, but still not working... I hope this is useful for you
I am trying to import the latest Facebook SDK (4.17.0 at the moment) but i noticed that the zip file is built differently than the formers Facebook SDK.
And when i'm trying to import it into android studio by going : File>> New>> Import Module, it gives me an eror message for the lastest fbk sdk : "Specify location of the Gradle.
Screenshot : import error
I'm still new to android programmation, so i'm asking for your help to import the lastest Facebook sdk.
Thank you by advance guys.
Screenshots of the zip comp :root
I up this question.
And i add some other question to it : on every example of Facebook sdk import i found, its mentioned that we need to create a new project in order to import fbk sdk. Is it just for the example? do we really need to create a new project to import the sdk, or can we just import it in an existing project ?
I'm trying to add some YouTube OAuth2.0 authorization for an Android project I'm working on using Android Studio. I got some sample code from here http://bit.ly/1SI805S. I'm pretty sure I linked to it from a Google developers site. I'm trying to add some libraries to take care of the dependencies but it isn't recognizing them. Here are the dependencies:
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets;
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.util.store.DataStoreFactory;
import com.google.api.client.util.store.FileDataStoreFactory;
import com.google.api.services.oauth2.Oauth2;
import com.google.api.services.oauth2.model.Tokeninfo;
import com.google.api.services.oauth2.model.Userinfoplus;
I downloaded a .jar for the com.google.api.services dependencies and that is working fine. I found the file on the Google developers site and it's google-api-services-oauth2-v2-rev103-1.21.0.jar. However, all of the api.client jars I've found are not working. I put them in the libs folder and add compile files to the build.gradle but it won't recognize the imports.
The jars I've used thus far are
google-api-client-util-1.2.3-alpha.jar
google-api-client-extensions-1.6.0-beta.jar
google-api-client-auth-1.2.3-alpha.jar
Is there anything I'm missing? I've found these files in different parts of the net. I've looked through maven repositories and I just found a site, http://www.java2s.com/Code/Jar/g/Downloadgoogleapiclientutil121alphajar.htm, but I don't know that it's helpful. There's some api.client stuff I downloaded from the Google Developers site but that doesn't look like anything I need and it doesn't resolve the dependencies.
Please follow the third apprach in my link, since your library is available online (remotely) as you see in the picture below. Android studio will recognize your dependencies if you add them in their standard ways. In general, there are three standard ways. Please read this link https://stackoverflow.com/a/35369267/5475941. In this post I explained how to import your JAR files in Android studio and I explained all possible ways step by step with screenshots. I hope it helps.
Also, check your build.gradle (Moducle: app) and make sure your remote libraries are compatible with your current SDK. For example my SDK is 23.1.0:
Google HTTP Client Library for Java. Functionality that works on all supported Java platforms, including Java 5 (or higher) desktop (SE) and web (EE), Android, and Google App Engine.
https://github.com/google/google-http-java-client
Project metadata download:http://repo1.maven.org/maven2/com/google/http-client/google-http-client/1.16.0-rc/google-http-client-1.16.0-rc.pom
Binary download:http://repo1.maven.org/maven2/com/google/http-client/google-http-client/1.16.0-rc/google-http-client-1.16.0-rc.jar
Source download: http://repo1.maven.org/maven2/com/google/http-client/google-http-client/1.16.0-rc/google-http-client-1.16.0-rc-sources.jar
The classes that you are searching for are here:
I was integrating Authorized.Net in my android application I followed https://developer.authorize.net/integration/fifteenminutes/android/ this link of Authorized.Net but when I pasted code in my eclipse it shows me errors on imports and net.autorize.android package is not included in SDK.
import net.authorize.android.AuthNet;
import net.authorize.android.AuthNetActivityBase;
import net.authorize.android.SimpleActivity;
import net.authorize.android.button.AuthNetButton;
Can anyone help me to know how to import licensed project, while trying... the following classes cannot be imported.
import com.android.vending.licensing.LicenseChecker;
import com.android.vending.licensing.LicenseCheckerCallback;
import com.android.vending.licensing.ServerManagedPolicy;
import com.android.vending.licensing.AESObfuscator;
Any help will really be appreciated. Thanks
The latest version of the LVL seems to require
import com.google.android.vending.licensing.LicenseChecker;
import com.google.android.vending.licensing.LicenseCheckerCallback;
import com.google.android.vending.licensing.ServerManagedPolicy;
import com.google.android.vending.licensing.AESObfuscator;
instead of
import com.android.vending.licensing.LicenseChecker;
...
(as the current document tells me to do)
It took me a half day to figure this out.. haha
LVL library can be downloaded using the SDK Manager
Link
The License Verification Library (LVL) is a collection of helper classes that greatly simplify the work that you need to do to add licensing to your application. In all cases, we recommend that you download the LVL and use it as the basis for the licensing implementation in your application.
The LVL is available as a downloadable component of the Android SDK. The component includes:
The LVL sources, stored inside an Android library project.
An example application called "sample" that depends on the LVL library project. The example illustrates how an application uses the library helper classes to check and enforce licensing.
To download the LVL component into your development environment, use the Android SDK and AVD Manager. Launch the Android SDK and AVD Manager and then select the "Market Licensing" component, as shown in the figure below. Accept the terms and click Install Selected to begin the download.