Open Forum > What's New

ScriptBasic for Android

<< < (4/15) > >>

kryton9:
John, I got it working now, thanks.  I also got the
--- Quote ---OPEN "localhost:56098" FOR SOCKET AS #1
PRINT #1,"{id:1,method:makeToast,params:[\"ScriptBasic\"]}"
--- End quote ---
working with the port assigned from my emulator.

kryton9:
John, I am just trying to wrap my mind around the overview of how things are working.
scriba is native code that bring scriptbasic to android, but it doesn't interface to the android api and that is what you are trying to do with Facades?

Here is a point of confusion for me: http://code.google.com/p/android-scripting/wiki/InterpreterDeveloperGuide
Lists 3 ways of bringing a language in, I don't see where Facades fit in?

Thanks in advance for any clarification.




--- Quote from: support on May 13, 2012, 12:11:22 PM ---The following Facade's are available for ownership. Please let us know which Facade you will be working on. I will be doing random functions to help with areas that aren't well documented.

Android SL4A API

[*]ActivityResultFacade
[*]AndroidFacade
[*]ApplicationManagerFacade
[*]BatteryManagerFacade
[*]BluetoothFacade
[*]CameraFacade
[*]CommonIntentsFacade
[*]ContactsFacade
[*]EventFacade
[*]LocationFacade
[*]MediaPlayerFacade
[*]MediaRecorderFacade
[*]PhoneFacade
[*]PreferencesFacade
[*]SensorManagerFacade
[*]SettingsFacade
[*]SignalStrengthFacade
[*]SmsFacade
[*]SpeechRecognitionFacade
[*]TextToSpeechFacade
[*]ToneGeneratorFacade
[*]UiFacade
[*]WakeLockFacade
[*]WebCamFacade
[*]WifiFacade
[/list]



--- End quote ---

kryton9:
Here is another little test. This sends a notification to the android device.
The "localhost:xxxxx" needs the x'es replaced with your RPC server port number.

--- Code: ---OPEN "localhost:xxxxx" FOR SOCKET AS #1
PRINT #1,"{id:1,method:notify,params:[\"ScriptBasic\",\"The message for the notification\"]}"
--- End code ---

Support:
Glad to see you talking to the Droid.  :D

It might be easier and more readable if you change this code ...

--- Code: ---PRINT #1,"{id:1,method:notify,params:[\"ScriptBasic\",\"The message for the notification\"]}"

--- End code ---

to something like this. This follows the JSON string declaration more closely. (even though it doesn't seem to matter)

--- Code: ---PRINT #1,"""{"id":1,"method":"notify","params":["ScriptBasic","The message for the notification"]}\n"""

--- End code ---

Hint: Don't forget the \n at the end of your JSON messages to the server. The response contains a linefeed so you will want to use CHOMP() to remove it before passing it to JSON2SB().

kryton9:
John, are we going to develop these facades and then you will put them into 1 module?

I will try the webcam facade tonight and send you what I come up with based on your user functions code.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version