Open Forum > What's New

ScriptBasic for Android

<< < (6/15) > >>

Support:
The million dollar question is what is the IP to use in scriba?

Support:
Get the latest development release, 5x18.

http://code.google.com/p/android-scripting/wiki/Unofficial

This will show the IP and not ::1%1.

The server hangs on the OPEN from scriba on Ubuntu using the IP:PORT given. (public server)

kryton9:
John, I will get the updates, but I know my ip is correct from my router.
After having success with the python tutorial, I tried to mimic it with sb.

I have my tablet hooked via usb and setup a private server just as in python.
I wrote a cmd file(running in windows7) to make it easier to make changes.
It is in the attachment. You can make changes as needed for your system.

The sb2d.cmd I put in my E:\android-sdk-windows\platform-tools

The 2 sb scripts are in my E:\ScriptBasic\4d  
this is also where my sciba is located.
UPDATE:
WOOHOO! after getting the latest sl4a you linked too, it is all working now. I made no changes to the attached files. Just make sure you are on the home screen so you can see the output. When you are looking at the server info, the message doesn't show up.


Update2: it now works also without the usb cable attached :)

Update 3: I did a restart on my pc and skipped all the adb stuff (usb cable not used), I didn't do any of the set AP_ commands and just ran scriba hello2v2.sb  and it worked over the internet and wireless!!

Update 4:  Did a full shutdown of the public server and my tablet. Did a full shutdown on my PC. After powering both up and starting a new public server via sl4a it worked just fine with scriba hello2v2.sb command line issued!

Support:
Under Ubuntu Linux running the Android emulator provided with the SDK, it just hangs on the OPEN for both private (with port forwarding) and public connections.

I have a message out on the Android Scripting list asking Robbie what's up.

Support:
Finally!

I ran into a post on some forum and it said that the RPC server only listens on the loopback (127.0.0.1) port under Linux. That was the hint that got me pointed in the right direction. I still had to do the adb port forwarding. I have the default sever port set to be 9999. (pref.) I issue the following adb command in my Ubuntu terminal.

jrs@laptop:~$ adb forward tcp:9999 tcp:9999

This way I don't have to touch a thing if I'm running remote or on the sdcard.


--- Code: ---OPEN "localhost:9999" FOR SOCKET AS #1
PRINT #1,"""{"id":1,"method":"getPhoneType","params":[]}\n"""
LINE INPUT #1, r
PRINT r

--- End code ---

jrs@laptop:~/sb/test$ scriba phonetype.sb
{"error":null,"id":1,"result":"gsm"}
jrs@laptop:~/sb/test$


I can see an advantage of running a SB script on a desktop that accesses a MySQL or ODBC database and updates an Android phone or pad with new contacts or even SQLite DBs on the device. The concept of write once, run anywhere is leaning toward using scripting language solutions. Python is in the lead but has a size and dependency downside. I hope the simplistic nature of traditional Basic and the versatility to run anywhere will give ScriptBasic a purpose on a mass scale.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version