Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to receive Intents [enhancement request] #211

Open
Botster opened this issue Apr 12, 2016 · 19 comments
Open

Ability to receive Intents [enhancement request] #211

Botster opened this issue Apr 12, 2016 · 19 comments

Comments

@Botster
Copy link

Botster commented Apr 12, 2016

RFO-BASIC appears to be really impressive. There is one thing, though, that keeps me from adopting it. The inability to receive Intents as a content handler.

I didn't find any roadmap, so I don't know if that's in the works or not. Just thought I'd toss my wish out there for whomever it may concern.

@olimaticer
Copy link
Contributor

About starting intents we discussed in winter 2013/2014.
Marc added App.start, but this command do not receive results.
Most hints and examples you get for starting intents from you own app are Java code.
So I think it is user friendly to have a small Java like interface.

I named it App.SAR for Start And Receive.
The parsing and starting process I placed in an extra intent named StartIntent.java. In future we do not need to touch the main Run.java to maintain this command.
The communication to Run.java is guaranteed of the public values intentBundle, intentToDo and StartIntendDone. For debugging I set PrintShow() to public.

Until now Basic! supports only strings and numbers. So I designed a vice versa interface from all types to the public intentBundle in Run.java. After a break and a lot off coffee cups later I saw, that the most work to extend the Bundle commands was done. So I updated and extended the command group. The interface code shrunk to 3%.

App.installed and App.load are the consequences for a succeeded installation.

In this process I stumbled about intents for email apps. The result is an email command update.

In soon future we need an app or intent template for testing and a basis for extensions.
In my opinion we should use android conform bundels for the data transfer.
If someone interested in he should know, that the array variables have in the Basic! Java code only one dimension. At runtime the arrays are divided like the assigned integer dimension arrays. In the bundles I implement the hidden key “\ufff”. This key stored the integer dimension arrays from the array definitions in a bundle. Its keys are the array variable keys.

This attached version is in alpha stadium based on BASIC! V 1.90.
To test you have to uninstall your current version and to install OliBasicII.apk.

Have fun!
/Gregor

Attachments
AppSAR.zip

@olimaticer
Copy link
Contributor

Now Run.java is based on RFO-Basic 1.90.01
I added the type Bitmap to the bundles, too.
Do we have an opportunity to call bundle.put.bundle instead of bundle.pb ?
Now I am working on a PortDuff example calling per intent.

/Gregor

Attachments
AppSARII.zip

@olimaticer
Copy link
Contributor

Added to:

private boolean executeGRABURL() {
...
//vv 2016-09-02 gt
boolean textFlag = true; // Default: // Text: keep full two-byte encoding, assumes input is UTF-8
if (isNext(',')) { // Optional fourth parm
if (!evalNumericExpression()) return false;
textFlag = (EvalNumericExpressionValue != 0.0); // is the text flag: unicode if non-zero
}
//^^ 2016-09-02 gt
...
if (bis != null) { result = grabStream(bis, textFlag); } // gt 2016-09-02 (textFlag instead of true) Read as encoded text stream, not byte stream
...
return true;

GrabUrl Sinput$, source${{, 0}, 0} the last new one also for Binary stuff

/Gregor

Attachments
OliBasicIII.zip

@olimaticer
Copy link
Contributor

Added

BUNDLE.SAVE varPointer, "myBundle.bun"

BUNDLE.LOAD newVarPointer, "myBundle.bun"

It is only recommended for temporary use, because the internal coding is os version depended.
Bitmaps in bundles are also not supported.
Maybe there is a size limitation. Not tested yet.

/Gregor

Attachments
OliBasicIV.zip

@olimaticer
Copy link
Contributor

Fixed BUNDLE.CLEAR with added hidden bundle.

/Gregor

Attachments
OliBasicV.zip

@olimaticer
Copy link
Contributor

olimaticer commented Nov 21, 2016

Added

GR.SET.DASHPATHEFFECT

GR.PATH with the system values "_MoveTo", "_LineTo", "_QuadTo" %Quadratic Bezier Curve
"_CubicTo" %Cubic Bezier Curve, "_ArcTo", "_Close" and "_End"

Radius to GR.RECT

/Gregor

Attachments

OliBasicVI.zip

@olimaticer
Copy link
Contributor

Changed the package id and the main icon.

/Gregor

Attachment
OliBasicVII.zip

@olimaticer
Copy link
Contributor

Added the audio stream enhancements from Nicolas #222.

/Gregor

Attachment

OliBasicVIII.zip

@olimaticer
Copy link
Contributor

Added the audio.record.start and a audio.record.peak enhancements.

/Gregor

Attachment
OliBasicIX.zip

@olimaticer
Copy link
Contributor

Added following enhancements:
KEYDOWN.ON % and the opposite KEYDOWN.OFF
ONKEYDOWN: %A Key Is Down interrupt
KEYDOWN.RESUME %Resumes execution at the point BASIC! program where
!the OnKeyDown: interrupt occured.
INKEY$ mKey$, mKeyEvent$ %The second new parameter from type String returns the KeyEvent values
TTS.KILL Stops the TTS process without waiting for finish.
HTML.SCREEN %Takes a screenshot

/Gregor

Attachment
OliBasicX.zip

@olimaticer
Copy link
Contributor

Added following enhancements:
BROADCAST.INIT action$ | actions$[] % Init a Broadcast Receiver
BROADCAST.BUNDLE action3$, "Bundle", b1 % Broadcasts a Bundle
BROADCAST.STRING action3$, "String", "Message " % Broadcasts a String
ONBROADCAST: % An incoming Broadcast interrupt
BROADCAST.IN retAction$, retData$, retBundleIndex % Returns incoming Broadcast data
BROADCAST.RESUME % Resumes execution at the point BASIC! program where
BROADCAST.CLOSE % Close the Broadcast Receiver

/Gregor

Attachment
OliBasicXI.zip

@olimaticer
Copy link
Contributor

olimaticer commented Feb 13, 2017

Added following enhancements:
LOCALS.ON % Now the variables in functions are definitely LOCAL
LOCALS.OFF % Now the variables in functions are only LOCAL if the BASIC!s interrupt stack is empty.

/Gregor

Attachment
OliBasicXII.zip
OliBasicXII for Quick APK.zip
OliBasicXIISouces.zip
oli-keywordsXII.zip

@olimaticer
Copy link
Contributor

olimaticer commented Feb 28, 2017

Added following enhancements:
GLOBALS.ALL
GLOBALS.NONE
BUNDLEIN
AUDIO.INFO
...
An appendix to the manual
/Gregor

Attachment
BasicTest_Source_Project.zip
OliBasicXIV.zip

@olimaticer
Copy link
Contributor

Added following enhancements:
Added changes from new 1.91

/Gregor

Attachment
BasicTest_Source_Project.zip
OliBasicXV.zip

@olimaticer
Copy link
Contributor

olimaticer commented Mar 20, 2017

Added following enhancements:
Added FILE.LASTMODIFIED
Some fixes

/Gregor

Attachment
BasicTest_Source_Project XVI.zip
OliBasicXVI.zip
Restart.zip

@olimaticer
Copy link
Contributor

Added following enhancements:

Some fixes and BUNDLE command enhancements

/Gregor

Attachment
BasicTest_Source_Project XVII.zip
OliBasicXVII.zip

NetworkBroadcasts.zip

@olimaticer
Copy link
Contributor

olimaticer commented May 10, 2017

Unfortunately Nicolas has left BASIC!, but the show must go on!

Added following enhancements:

BigDecimal implemented
ROUND() rounding option "Legacy int()"
Some fixes

/Gregor

Attachment:
OliBasicXVIII.zip
OliBasicXVIIISouces.zip

For benchmark against X11Basic
fancy-digits X11.zip
fanci_digits Oli.zip

X11Basic:
screenshot_20170510-235723
OliBasic:
screenshot_20170510-235830

@olimaticer
Copy link
Contributor

olimaticer commented Jun 13, 2017

Added following enhancements:

Byte.copy append switch added
Socket.client.read.byte, Socket.server.read.byte implemented

Some SOCKET fixes

/Gregor

Attachment:
OliBasicXIX.zip
OliBasicXIXSouces.zip

@olimaticer
Copy link
Contributor

olimaticer commented Aug 12, 2017

processcircle

  1. Scheduler commands implemented
  2. Dialog.message, Dialog.select and Select can now finished at a given time interval
  3. At launching with a given program path and an Intent Extra with a key named “_BASIC!” and a String expression “_Editor” the program starts in the Editor mode.
  4. BUNDLE.OUT is new.
  5. On Runtime Error a Broadcast is send.
  6. Editor improvement: Switching automatic word completions or -corrections to off.
    Some fixes

/Gregor

Attachment:
OliBasicXX.zip
OliBasicXXSouces.zip
OliBasicXXExamples.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants