Java Question Progress

NFOBoy

Active Member
Licensed User
Longtime User
Erel,

so I have the PlayerWrapper and GameClientWrapper coming along. Am now implementing the different listeners(holy carpe diem) for GameClient within the wrapper.

A few questions:

Many of the load"inserttype here" return a DataBuffer, with different things contained... I'm pretty sure that means I need to build a function in the listener that breaks up the DataBuffer into component parts, and return those parts in some way to a ba.raiseEvent. If it is a multiple item DataBuffer, what is preferred method for me to return it?

e.g. For each Achievement item returned in onAchievementsLoaded there exists:
(any hints on how to handle the Uri would be appreciated)


Next: My app will connect to the Google Servers in Release and Debug mode. So now I think I know that the Debug mode actually gets our release key tied to it (I always thought the debug went on when we debugged, and only at release was the release key integrated). Just want to confirm that is correct? (for when I write how to get the OAuth setup)


Next^2: The RealTimeSocket: This may be above me to wrap right now, but if I see it correctly, two of the big things incorporated are the InputStream and OutputStream, if these are identical to the ones in B4A, then is it as easy as I think it might be? If so, has ParcelFileDescriptor been wrapped previously that I can use in some way? (this was discussed as being important by one of the other members, so if I can get it, I'm sure more than a few will be happy)


More I'm sure as I move along, but I have Leaderboards, Achievements, incrementAchievements, Player stuff and more all working right now... so it is coming along, and I'm learning (painfully sometimes) a lot about proper syntax of Java.


Ross
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
If it is a multiple item DataBuffer, what is preferred method for me to return it?
Seems like you will need to wrap the DataBuffer. This is a good place to use AbsObjectWrapper. It will allow you to wrap DataBuffer and use it with subclasses of DataBuffer.

B4A InputStream and OutputStream are wrappers for any valid Java InputStream / OutputStream.

If so, has ParcelFileDescriptor been wrapped previously that I can use in some way?
There is no need to completely wrap this object. You can just provide a method that opens a file stream.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…