Android Question javaobject question - deezer sdk

brampie66

Member
Licensed User
Longtime User
Hi,

I've been trying to get the deezer sdk working in B4A (some functions work ok, but no sound yet).
Can someone point me in the right direction here ? I don't know any Java.

Java (I did manage to get it working here, but doing the whole thing in Java is not what I would prefer):
String applicationID = "123456";
DeezerConnect deezerConnect = DeezerConnect.forApp(applicationID).withContext(this).build();
In java (with log), this gives, D/INFO: com.deezer.sdk.network.connect.DeezerConnect@c839d6

In b4a I tried:
CT = GetContext
dz = deezerconnect.InitializeStatic("com.deezer.sdk.network.connect.DeezerConnect").RunMethodJO("forApp",Array As Object("123456")).RunMethodJO("withContext",Array(CT)).RunMethodJO("build",Null)
This gives me (log):
(Class) class com.deezer.sdk.network.connect.DeezerConnect
I don't have the @... thing, so I'm guessing I haven't actually created a new object, (the code works for the auth but fails later on when this object needs to be passed on to the player)
it is unclear to me what the correct code would be.

https://developers.deezer.com/sdk/android

Can anyone give me some pointers or the correct way to translate this ? thx
 

inakigarm

Well-Known Member
Licensed User
Longtime User
Hi,

I've been trying to get the deezer sdk working in B4A (some functions work ok, but no sound yet).
Can someone point me in the right direction here ? I don't know any Java.

Java (I did manage to get it working here, but doing the whole thing in Java is not what I would prefer):
String applicationID = "123456";
DeezerConnect deezerConnect = DeezerConnect.forApp(applicationID).withContext(this).build();
In java (with log), this gives, D/INFO: com.deezer.sdk.network.connect.DeezerConnect@c839d6

In b4a I tried:
CT = GetContext
dz = deezerconnect.InitializeStatic("com.deezer.sdk.network.connect.DeezerConnect").RunMethodJO("forApp",Array As Object("123456")).RunMethodJO("withContext",Array(CT)).RunMethodJO("build",Null)
This gives me (log):
(Class) class com.deezer.sdk.network.connect.DeezerConnect
I don't have the @... thing, so I'm guessing I haven't actually created a new object, (the code works for the auth but fails later on when this object needs to be passed on to the player)
it is unclear to me what the correct code would be.

https://developers.deezer.com/sdk/android

Can anyone give me some pointers or the correct way to translate this ? thx
There's an API accessible via http requests https://developers.deezer.com/api (I've used two years ago or so)
 
Upvote 0
Top