Giter Site home page Giter Site logo

qqmusic_innovation_qplay_aidl_openid_demo's Introduction

注意事项

请使用Gradle 5.1.1及其更高版本

生成RSA公私钥

QQ音乐使用的RSA密钥位数为1024位,密钥格式使用PKCS#8,有两种生成方式:

一、使用OpenSSL来生成:

  1. 命令生成原始 RSA私钥文件 rsa_private_key.pem

$ openssl genrsa -out rsa_private_key.pem 1024

  1. 命令将原始 RSA私钥转换为 pkcs8格式,得私钥文件到private_key.pem

$ openssl pkcs8 -topk8 -inform PEM -in rsa_private_key.pem -outform PEM -nocrypt -out private_key.pem

  1. 生成RSA公钥文件 rsa_public_key.pem

$ openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem

二、使用Demo中的RSAUtils.genKeyPair生成:

val keyPair = RSAUtils.genKeyPair()
val publicKey = RSAUtils.getPublicKey(keyPair)
val privateKey = RSAUtils.getPrivateKey(keyPair)

生成的RSA公钥需要发给QQ音乐,而私钥需要自行妥善保管

申请AppId

按照以下格式发邮件:

title	OpenID申请-XXXXX公司
send	[email protected]
cc	[email protected]

正文信息:
1、组织名称	XX公司
2、应用名称	
3、联系人名	(接口人即可)
4、联系电话	(接口人即可)
5、联系邮件	(接受账号开通信息)
6、应用包名	(如果有多个包名就用;分割)
7、应用图标	( 文件:1K-1M)
8、业务公钥	申请人自己生成的RSA公钥,参见《生成RSA公私钥》小节

运行Demo

请在编译之前,务必修改业务参数,在Config.java中修改如下常量:

public class Config {
    public static final String OPENID_APPID = "";
    public static final String OPENID_APP_PRIVATE_KEY = "";
    public static final String BIND_PLATFORM = "";
}

这三个值都要配置,不可以留空

请一定注意:上述三个数值(除BIND_PLATFORM)一定来自OpenID业务,不要与OpenAPI业务混淆

如何运行

执行如下命令,得到APK文件

$ gradle :demo:assembleDebug

如何安装

执行如下命令,安装示例Demo

$ adb install ./demo/build/outputs/apk/debug/demo-debug.apk

qqmusic_innovation_qplay_aidl_openid_demo's People

Contributors

clydeazhang-tme avatar harveyxu-tme avatar kirkyao-tme avatar liebli avatar qitianliu-tme avatar stevenji-tme avatar tylertan-tme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

qqmusic_innovation_qplay_aidl_openid_demo's Issues

请问是否有计划实现QPLAY到音箱的相关功能?

你好! 我们是音箱开发商,已经申请好OPEN ID了.

我们想通过本SDK实现向音箱播放音乐的功能,也就是QQ MUSIC里面的:QPlay到音箱功能.但发现现有的AIDL功能中并没有相关API.因此想问下以下两个接口是否有计划集成呢?
1.获取当前局域网的QPLAY音箱列表.
2.切换音源到选择的音箱.

或者是否有其它方法实现向音箱播放音乐的功能?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.