chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
<abu[m]>
Hi z4k4ri4! Yes, sure, PilBox is also covered here.
chexum has quit [Remote host closed the connection]
chexum has joined #picolisp
seninha has joined #picolisp
<z4k4ri4>
OK here's my background I grokk lisp but have no practical experience in it and while I used to code java j2me I've no experience in android programming
<abu[m]>
ok
<z4k4ri4>
So I want to make simple android app proof of concept to:
<z4k4ri4>
1) read qr code (I can see pilbox has example for it)
<z4k4ri4>
2) read rfid via nfc API
<z4k4ri4>
3) send it to another server ideally using client side SSL cert
<z4k4ri4>
On rfid I only need the basic manufactured tag identifier so no need for custom read or write operation
<abu[m]>
OK, so (1) and (3) are easy I think. (2) I haven't tried
<abu[m]>
I thint you need something based on (setq *NfcAdapter (java "android.nfc.NfcAdapter" 'getDefaultAdapter CONTEXT))
<abu[m]>
What does work here is (msg (java *NfcAdapter 'isEnabled) " enabled")
<z4k4ri4>
I'm still reading and understanding both picolisp and nfc example java code
<abu[m]>
I have no idea about the tag identifier
<z4k4ri4>
So here's first question does the pilbox can read nfc? Do I need to custom compile the pilbox myself?
<abu[m]>
Is there an API call?
<abu[m]>
If there is an API in Android, you don't need to rebuild PilBox
<z4k4ri4>
<abu[m]> I thint you need something based on (setq *NfcAdapter (java "android.nfc.NfcAdapter" 'getDefaultAdapter CONTEXT)) <~ thanks abu I think this just enough to get me started the right way
seninha has quit [Quit: Leaving]
<abu[m]>
I just tried again, and found one point
seninha has joined #picolisp
<abu[m]>
(java T "android.nfc.NfcAdapter.ReaderCallback")
<abu[m]>
should perhaps be
<abu[m]>
(java T "android.nfc.NfcAdapter$ReaderCallback")
<abu[m]>
i.e. the "$" for a local class
<abu[m]>
This is always not clear from the Java references
<abu[m]>
Then I get the next error: java.lang.NoSuchMethodException: enableReaderMode([Ljava.lang.Class;@7160a57)
<abu[m]>
The method enableReaderMode exists, so the args must be wrong
<abu[m]>
Perhaps the last arg, the Bundle. Is it OK to be null?
<abu[m]>
Ah! Found the problem!! ☺
<abu[m]>
The 'null' must be passed as a symbol and thus needs to be quoted
<abu[m]>
Next version of PilBox will have 'null' auto-quoted
<avocadoist>
would having standard support on build (no cygwin/etc) for Windows be too much work ? just curiously wondering
<abu[m]>
The main problem is not the build, but the runtime environment. PicoLisp needs POSIX.
<abu[m]>
All non-trivial parts like multiplexed I/O, terminal and process handling, child processes, interprocess communication, file control, sgnals etc. use POSIX-mechanisms
<abu[m]>
PicoLisp is not just a language, it is a full ecosystem