spotify

Control playback of the Spotify app from another Android app?

倾然丶 夕夏残阳落幕 提交于 2020-01-01 05:59:06
问题 Is it possible to control playback of the Spotify app from within another Android app? I'm only looking for track skipping functionality (forward and backward). I'm aware of the Spotify Android SDK, but it seems to only allow skipping of tracks played by the SDK: com.spotify.sdk.android.playback.NativeSpotifyException: Failed SpPlaybackSkipToPrev with error code 14 (The operation is not supported if the device is not the active playback device) To clarify, both the actual Spotify app, and my

Get current song playing in Spotify on iPhone

淺唱寂寞╮ 提交于 2020-01-01 04:24:05
问题 Accessing the MPMusicPlayerController.systemMusicPlayer() (code below) works for getting track info for what's playing in the Apple Music app, but is there a way we can access information of the current song playing in the Spotify app? This code posted in this answer I need to know how to get information about which player is currently streaming (player, spotify, napster...) uses MPNowPlayingInfoCenter which is nil whether using Apple Music or Spotify etc. let player = MPMusicPlayerController

What method(s) can I use for geolocation through a Spotify app?

Deadly 提交于 2019-12-31 04:14:24
问题 The Spotify Apps API doesn't allow HTML5 geolocation and apparently the documented Location api call doesn't work and is being removed from the documentation. What are some methods that I can use to geolocate a user? 回答1: Solutions for finding website visitor's geolocation and its suggestion of http://freegeoip.net/ seems like your best option here. You'd just have to add http://freegeoip.net/ to your manifest for access from your app. 来源: https://stackoverflow.com/questions/20196869/what

Accessing Spotify Metadata API from within a Spotify app?

无人久伴 提交于 2019-12-30 11:12:08
问题 I want to run Spotify searches from within a Spotify app (to find tracks for an artist, for which I do not have a Spotify URI, only the name). I have not found functionality in the App API to run searches. An alternative is to talk to ws.spotify.com to get to Spotify's search, but these web services do not support jsonp which is required for their use in a Spotify app. What are my options? 回答1: This is not the finest way to solve your problem. There is a direct API for searching within your

Unable to access response object data outside the function in node js

六月ゝ 毕业季﹏ 提交于 2019-12-25 19:01:46
问题 I am using node js and making a call to spotify API and receive the response in body object, as shown in below code: var options = { url: 'https://api.spotify.com/v1/me', headers: { 'Authorization': 'Bearer ' + access_token }, json: true }; request.get(options, function(error, res, body) { console.log(body) }); This gives me output: But now when I try to access the body object outside the function I get undefined. I think the problem is that I am making an asynchronous call and so before the

Unable to access response object data outside the function in node js

点点圈 提交于 2019-12-25 19:01:03
问题 I am using node js and making a call to spotify API and receive the response in body object, as shown in below code: var options = { url: 'https://api.spotify.com/v1/me', headers: { 'Authorization': 'Bearer ' + access_token }, json: true }; request.get(options, function(error, res, body) { console.log(body) }); This gives me output: But now when I try to access the body object outside the function I get undefined. I think the problem is that I am making an asynchronous call and so before the

Property 'albums' does not exist on type 'Object' on Angular [duplicate]

百般思念 提交于 2019-12-25 18:17:04
问题 This question already has answers here : Angular 4 - Http to HttpClient - property 'someproperty' does not exist on type Object (6 answers) Closed 4 months ago . I'm using spotify api and I0m using the returning json this way on the component: import { Component, OnInit } from '@angular/core'; import { SpotifyService } from "../../services/spotify.service"; @Component({ selector: 'app-home', templateUrl: './home.component.html', styles: [] }) export class HomeComponent implements OnInit {

Can't authorize with spotify using javascript AJAX request [ CORS ] [duplicate]

[亡魂溺海] 提交于 2019-12-25 17:46:12
问题 This question already has answers here : Access-Control-Allow-Origin denied spotify api [duplicate] (1 answer) Allowing frontend JavaScript POST requests to https://accounts.spotify.com/api/token endpoint (1 answer) Spotify Auth + frontend JavaScript + Client Credential Flow (1 answer) Getting Spotify API access token from frontend JavaScript code (1 answer) Closed 5 days ago . I'm trying to authorize with spotify by making an AJAX get request in javascript. Right now I have this function get

Client Credentials Flow works with curl but not in browser

半腔热情 提交于 2019-12-25 09:30:12
问题 I am developing a Spotify application and I want to get the token. I am following Client Credentials Flow and using curl everything works fine: $ curl -H "Authorization: Basic YjU4Y...llYTQ=" \ -d grant_type=client_credentials \ https://accounts.spotify.com/api/token # Response: # { # "access_token":"BQD3u...W4iJA", # "token_type":"Bearer", # "expires_in":3600 # } And here, there is the Javascript code of my HTML file where I try to get the same result: var url = "https://accounts.spotify.com

CocoaLibSpotify resets offline available tracks to SP_TRACK_OFFLINE_WAITING during log in

主宰稳场 提交于 2019-12-25 08:49:21
问题 I'm having a problem with CocoaLibSpotify when trying to save my playlists for offline use. So I install my app, log in for the first time, select a playlist and set it for offline use, immediately its offlineStatus changes to SP_PLAYLIST_OFFLINE_STATUS_DOWNLOADING, all the tracks in the playlist have their offlineStatus changed to SP_TRACK_OFFLINE_WAITING, they start downloading one at a time and eventually their offlineStatus changes to SP_TRACK_OFFLINE_DONE. I turn off my wifi and I can