"已登录"回调永远不会被libspotify在Android [英] "Logged in" callback never called by libspotify on Android

查看:101
本文介绍了"已登录"回调永远不会被libspotify在Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 libspotify 的Andr​​oid上写NDK包装器。但 sp_session_callbacks :: LOGGED_IN 回调不会被调用。

I'm writing a NDK wrapper around libspotify on Android. But sp_session_callbacks:: logged_in callback never called.

这是跟踪文件的内容:

libspotify trace from 12.1.51.g86c92b43 Release Android-arm 

< sp_session_create() = 0
> sp_session_login(0x240ea8 'moodstream1@gmail.com' '<hidden>' 0) on 0x400fc4c8

这是一个日志接收 sp_session_callbacks :: log_message 回调。

This is a log received with sp_session_callbacks:: log_message callback.

13:30:07.361 I [offline_authorizer.cpp:297] Unable to login offline: no such user
13:30:07.372 I [ap:1752] Connecting to AP ap.spotify.com:4070
13:30:07.382 I [network.cpp:438] Connecting to 193.182.8.10:4070
13:30:07.526 I [ap:1226] Connected to AP: 193.182.8.10:4070

正如你所看到的会话是正确创建。

我的真机和模拟器测试。的结果是相同的。任何想法?

I've tested on real devices and emulator. The result is the same. Any ideas?

推荐答案

这个问题可能是,他们没有驾驶libspotify正常。这是人们具有共同的问题之一。

The problem could be that they are not driving libspotify properly. This is one of the common problems that people have.

具体地听notify_main_thread回调是重要的。这表明libspotify需要从GUI主线程处理的一些数据。

Specifically it is important to listen to the notify_main_thread callback. This indicates that libspotify needs to process some data from the GUI main thread.

sp_session_process_events然后应该叫从GUI主线程。 sp_session_process_events还必须基于所述next_timeout值定期调用返回

sp_session_process_events should then be called from the GUI main thread. sp_session_process_events must also be called periodically based on the next_timeout value returned

常见问题涵盖了本<一个href="https://developer.spotify.com/technologies/libspotify/faq/">https://developer.spotify.com/technologies/libspotify/faq/和sp_shell例子用作说明

The faq covers this https://developer.spotify.com/technologies/libspotify/faq/ and the sp_shell examples serves as an illustration.

这篇关于&QUOT;已登录&QUOT;回调永远不会被libspotify在Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆