Forum Activity for @amartins

amartins
@amartins
05/10/16 01:23:21AM
48 posts

Proxima, mp3 streaming,


Proxima

brian:
This is a "rookie" mistake on my part and I will get it fixed.. sorry about that!

No problem at all! We're here to be helped, but also to help.
Thanks for everything.
amartins
@amartins
05/09/16 04:39:23PM
48 posts

Proxima, mp3 streaming,


Proxima

Brian, I made some debug on jrProximaBridge code:
$_conf['jrProximaBridge_active_modules']
gives me this:
"jrAudio,jrBlog,jrFollower,jrGallery,jrPage,jrPlaylist,xxPromotion,xxShoutcast, jrAction,jrYouTube"

jrAudio is the audio module that we need, correct?

For some reason, with this string, the
if(strpos(',' . $_conf['jrProximaBridge_active_modules'] . ',', ",{$mod},"))···
returns false when $mod="jrAudio".

This doesn't make sense!
Ah! Once jrAudio is the first match returned value is 0, because strpos returns the index of first occurrence so PHP will interpret as false, so maybe changing this to:
if(strpos(',' . $_conf['jrProximaBridge_active_modules'] . ',', ",{$mod},") >= 0)···
When strpos doesn't find any occurrence it will return FALSE but may return other values which evaluates to false and per the Php Manual (Warning)
updated by @amartins: 05/09/16 05:31:49PM
amartins
@amartins
05/09/16 03:48:07PM
48 posts

Proxima, mp3 streaming,


Proxima

brian:
Yep - you can do that using the Proxima Bridge module - i.e.
GET http://yoursite.com/api/bridge/audio/5
See my response above - the same thing applies here.
Let me know if that helps.

The Audio module is enabled on Proxima Bridge but here's what I get when I try to get audio items or list:
{
"code": 400
"text": "Bad Request"
"note": "module is not enabled in Proxima Bridge"
}

Any idea what's going on? Other modules checked are working fine, except this one.
updated by @amartins: 05/09/16 03:49:03PM
amartins
@amartins
05/09/16 03:20:23PM
48 posts

Proxima, mp3 streaming,


Proxima

The app we're building is bit more complicated. We want to interface with Jamroom system. Meaning that we'd like to make available in the app samples or new songs from artists so we can promote them. Those items are uploaded by the artist, through his account. What we wanted is to have access to those files knowing, for instance, the song id.
updated by @amartins: 05/09/16 03:37:35PM
amartins
@amartins
05/05/16 03:26:21PM
48 posts

Proxima, mp3 streaming,


Proxima

I noticed that New release of Proxima included a module called "Proxima File", but I just don't know how to use it. Seems very helpful to stream music or get images. Am I correct?
amartins
@amartins
03/09/16 04:07:53AM
48 posts

Proxima User details after loging issue.


Proxima

Nice to hear that. I've find out the issue. Is that app_id is loaded to $_rt['_app_id'], and since there was sessions of previously delete apps in cache ($_conf.jrProximaCore_active_cache_system) the value was the first found in database with id 1, but current was 4 so not match. I deleted cache data and logged in again, now everything's working fine.

Look forward to get version 2 ;)

Thanks.
updated by @amartins: 03/09/16 04:08:46AM
amartins
@amartins
03/08/16 12:28:23PM
48 posts

Proxima User details after loging issue.


Proxima

I found out what happening, but need help to solve this: it fails when verifying the app_id, line 393 of "jrProximaUser-release-1.0.6/include.php", this is the code:
// Make sure we have the right app
if (!isset($_rt['_app_id']) || $_rt['_app_id'] != jrProximaCore_get_active_app_id()) {
return jrProximaCore_http_response(401, 'invalid user session - appId: ' . $appId);
}

Any idea why appd_id verification fails? (return app_id from jrProximaCore_get_active_app_id() is 4 - which is correct, is the active app)
amartins
@amartins
03/07/16 03:10:08PM
48 posts

Proxima User details after loging issue.


Proxima

I tried with other user (11) and I get the same result. Meaning this is not a normal behavior, because expected behavior is to get own user info using client_key:session_id in header and url in the form http://my.jamroom.site.com/api/user/x, where x = logged in user id.
That is not happening...
amartins
@amartins
03/07/16 11:51:51AM
48 posts

Proxima User details after loging issue.


Proxima

Is there a way to check if user session_id is still valid?
amartins
@amartins
03/04/16 09:25:57AM
48 posts

Proxima User details after loging issue.


Proxima

Hello! I am developing an Android app targeting Jamroom Framework, so I am using Proxima Module to interface with server side.

I am traying to read user accounta data to verify if user still have a valid user session. I can login with no problem, I can get the user session_id to store in app preferences. But test fails when I try to use session_id to get user account, keep getting the next response:
{
"code": 401
"text": "Unauthorized"
"note": "invalid user session"
}

I am using the header Authorisation = "Basic " + Base64.encodeToString("client_key:session_id");

and the url, as logged in user id is 1, like this:
GET http://my.jamroom.site.com/api/user/1.

Is this a normal behavior of Proxima module?

If I change user id to 2, I get this response from server:
{
"code": 401
"text": "Unauthorized"
"note": "invalid item owner (0)"
}

Which is correct, as that way I'll be trying to reach someone else's account info.

If I change user id to 0 (zero), I get this:
{
"code": 400
"text": "Bad Request"
"note": "invalid user id"
}

Which is also correct, once there is no user id 0.

Is there a way to debug this? Or Am I doing something wrong?

Thanks for your time and attention.

updated by @amartins: 06/10/16 06:41:25AM
  4