Hi Doug - Thanks for the reply. Have you tried my APK to see if it's your
device or if it's the approach you took?

Please share if you create anything on android with picolisp. I would be
interested in hearing about use cases for it.

Thanks
Joe

On Sat, Feb 25, 2012 at 5:38 PM, Doug Snead <semaphore_2...@yahoo.com>wrote:

> Joe,
>
> Ha ... very interesting the way you download busybox to download picolisp!
>   I'm still wondering why I cannot connect to my picolisp server on android
> ... but it looks like you have that issue licked.
>
> Ok, so now this means we can package some picolisp client/server
> applications as android apps, using the android browser.  (I think.) I like
> that approach because it works with the android browser and app packaging
> scheme - and at the same time you're getting picolisp in all its glory and
> efficiency.
>
> Cheers,
>
> Doug
>
>
>
> --- On Fri, 2/24/12, Joe Bogner <joebog...@gmail.com> wrote:
>
> > From: Joe Bogner <joebog...@gmail.com>
> > Subject: Android Demo
> > To: picolisp@software-lab.de
> > Date: Friday, February 24, 2012, 8:30 AM
> > I was able to successfully embed a
> > picoLisp web app into a java
> > Android app. It's just a form that outputs what's in the
> > textbox. I've
> > also been able to prove that database access calls work but
> > I haven't
> > integrated it into this example.
> >
> > I also recorded a terrible video of it :).
> >
> https://picasaweb.google.com/lh/photo/FLO3jIBS99dNPOeb9gC78s8zJy1Iv3Dkn7PZ5E-PSQc?feat=directlink
> .
> > I ran out of time to redo. I've added a sleep to help ensure
> > that
> > picoLisp is running before the web page is rendered:
> >
> >
> > I've tried it on both my android (DroidX) phone and my
> > kindle fire.
> >
> > The core java code is quite simple. The toasts don't appear
> > for some
> > reason while it's downloading the required files but it does
> > appear
> > when it's starting.
> >
> > @Override
> > public void onCreate(Bundle icicle) {
> >     super.onCreate(icicle);
> >     // ToDo add your GUI initialization code here
> >     setContentView(R.layout.main);
> >
> >     Context context = getApplicationContext();
> >
> >     String localPath =
> > "/data/data/org.me.androiddemo/";
> >     String local = localPath +
> > "arm-picoLisp.tar.gz";
> >
> >     if (!new File(localPath + "busybox").exists())
> > {
> >       Toast.makeText(context, "Downloading
> > busybox", Toast.LENGTH_SHORT).show();
> >       download("http://dl.dropbox.com/u/20783971/busybox";, localPath +
> > "busybox");
> >       exec("/system/bin/chmod 744 " +
> > localPath + "busybox");
> >     }
> >
> >     if (!new File(local).exists()) {
> >       Toast.makeText(context, "Downloading
> > picoLisp",
> > Toast.LENGTH_SHORT).show();
> >       download("http://dl.dropbox.com/u/20783971/arm-picoLisp.tar.gz";,
> > local);
> >       exec(localPath + "busybox tar -zxvf " +
> > local + " -C " + localPath);
> >     }
> >
> >     exec(localPath + "busybox killall -9
> > picolisp");
> >
> >
> >
> >     Toast.makeText(context, "Starting App",
> > Toast.LENGTH_SHORT).show();
> >
> >     execAsync(localPath + "arm-picoLisp/pil
> > @lib/http.l @lib/xhtml.l "
> > + localPath + "arm-picoLisp/s.l", localPath +
> > "arm-picoLisp");
> >
> >     try {
> >         Thread.sleep(1000);
> >     }  catch (InterruptedException e) {
> >     }
> >     WebView mWebView;
> >
> >     mWebView = (WebView)
> > findViewById(R.id.webview);
> >
> > mWebView.getSettings().setJavaScriptEnabled(true);
> >     mWebView.setWebViewClient(new WebViewClient()
> > {
> >       @Override
> >       public boolean
> > shouldOverrideUrlLoading(WebView view, String url) {
> >
> >         view.loadUrl(url);
> >
> >         return true;
> >
> >       }
> >     });
> >     mWebView.loadUrl("http://127.0.0.1:8001/";);
> > }
> >
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>

Reply via email to