Basic Stocks - Internet Stock Quotes.

Do you have a BASIC! program that you would like to share? Post it the the FTP server and tell us about it here.

Basic Stocks - Internet Stock Quotes.

Joined: November 21st, 2013, 7:00 pm

April 15th, 2017, 2:52 pm #1

Finally managed to scrape up enough weekends to finish this milestone
of mine - A way to get stock info from Yahoo using it's easy to use csv API.

It is not unlike Yahoo's official app except this one's entirely written in Basic!.

I suspect it's not bug free, as I'm rushing to finish it before my Easter holiday.
And I only tested it on two phones. So reports will be fully appreciated.

Tips:
You can tap on the bottom buttons, the column headers and the app title (top).

If you get a "No data" popup (which you inevitably will), then it's probably
the data connection, so you should try hitting the refresh button (↻) again.

Update: Since mid-2017, Yahoo has changed the api of historical data. You now need api keys.
The updated apk v2.0 can be found here.
Source:
To get to the code, rename the .apk to .zip and extract.

-enjoy!
Last edited by humpty on October 10th, 2017, 11:26 am, edited 4 times in total.
- Failure is not an option. It is bundled with the software. -
Quote
Like
Share

Mog
Joined: December 8th, 2012, 2:14 am

April 16th, 2017, 2:17 am #2

Extremely impressive humpty. I added a stock too as seen in screen-shot. I moved it up to check the GUI for bugs. I think though, it should read format wise 18.20 rather than 18.2?

Also, I have to refresh when I run the app to get a result as you have stated, but thought you might need to know. The connection is on 4G as you can see with reasonable signal strength [ASFAIK the bars may not really represent true signal strength between manafacturers], and I'm on a provider where normally connectivity is very fast.

When I exit the app thru the menu, it seems to go back to the Editor. Again attached a screen-shot.

Interesting to note on my device the notification area appears in white.

I never thought about pulling other API's/communication between other packages across into BASIC!, so you just added something else on my To-Do list...

Something is odd, after deletion of a stock and reloading. The deleted stock seems to appear until I refresh with a new one I've added...?

Mog
[Edit] Reloading = I meant restarting the app.
Screenshot_2017-04-16-09-11-56.png
Screenshot_2017-04-16-09-11-40.png
Sony Xperia L1 7.0 (Nougat).
Quote
Like
Share

Mog
Joined: December 8th, 2012, 2:14 am

April 16th, 2017, 10:31 am #3

There's something else that's weird. When I exited via the back key and the GUI 'Exit app? No Yes' it exited clean. Also again now via your air vent/hamburger icon menu it exits clean and does not go back to the Editor like it did before.

This is bizarre.

?

I cleared the data as well as the settings in the app, but cannot replicate this problem again.

?

[I don't know if you have been following posts here, but things have been behaving strangely on Marshmallow and BASIC! with regards to EXIT command.

What I have been thinking is to put down some on screen video recording app so you can see "odd Marshmallow behaviour" and uploading the video file to the forum. However, I've yet to have problems with commercial apps, that don't use BASIC!.].

Mog
Sony Xperia L1 7.0 (Nougat).
Quote
Like
Share

Joined: November 21st, 2013, 7:00 pm

April 16th, 2017, 11:44 am #4

Thanks Mog,
Yes, the auto-refresh and number format is something I will be working on the next version.
I also discovered it crashes if you delete all the stocks! :? :lol:
I didn't know about the Exit thing (I couldn't replicate it on Marshmallow 6.0).
Thanks for the reports.
- Failure is not an option. It is bundled with the software. -
Quote
Like
Share

roy
Joined: August 18th, 2014, 2:16 pm

April 17th, 2017, 1:29 am #5

Very nice humpty

Regards Roy stock.PNG
Quote
Like
Share

Joined: November 14th, 2016, 6:49 am

November 24th, 2017, 1:41 am #6

How complex would be to customize RFO Basic so it would be able to run at boot. Here is functioning standalone app, support various phone models, many Android versions.
https://play.google.com/store/apps/deta ... stay&hl=cs
Quote
Like
Share

Joined: November 14th, 2016, 6:49 am

November 25th, 2017, 4:04 am #7

Dear Humpty,
Would you help me to customize yours .bas widgets for GUI creation in grapcics mode. So visually impaired users would be able to use their finger to be informed about object name, its state and textual content? Do I have to make new .bas module, and include it like a last module inside .bas program, which will use yours widgets? Or such kind of task would be only done by complex Java source code redesign of Basic for Android? The problem is, how to include tts.speak, on which lines of yours source code to add it so when I will move his my finger across The screen with running app, so I will be able to hear object name, its state and textual content.
Because yours widgets are producing very nice GUI. And I want to allow visually impaired users to use yours widgets inside an applications. Sure, It will not be screen reader like Talkback or Shine plus. But at least exploration by touch can be used. The problem is, if it is technically possible without developing new complex Java routines to Basic. For now, I can only add tone command, so when I move with my finger, app can generate tone according to The coordinates detected. But is it too little for my screen readerin graphics mode. I. Any help will be very welcomed.
Quote
Like
Share

Joined: November 14th, 2016, 6:49 am

November 25th, 2017, 4:16 am #8

What I have tried already. Function which is being used by Basic to get touched coordinates can not work, if screen reader is turned on. Explore by touch Android service block it it is internal limitation of Android operating system, which makes logic. So I must always suspend Talkback. After suspedn it, It is possible to get coordinates and I can touch The screen. Any help while developing this screen reader for yours widgets will be very desired. My goal is to only make this support for Humptys widgets. I will even try to incorporate future algorithm for his updated widgets. But it is not easy for me to understand so complex code and I even do not know, how to make it and if it is even possible with no programming in Java. I Am aware, that I can not develop universal screen reader for graphics mode. So my goal is realistic. I would only want to allow humptys widgets to be usable for  visually impaired. I have also tried to modify some existing apps in graphics mode. Including utility for informing about battery capacity. I Am ready to help and debugging.
Quote
Like
Share

Joined: November 21st, 2013, 7:00 pm

November 25th, 2017, 10:19 am #9

Widgets in graphics mode are not really Android objects.
That's why they don't work with your Talkback.
They are (usually) just drawings/bitmaps which are kept
track by your program.

Have a look in the main.bas, there is a main loop which gets
an event (a touch) and does something depending on what was
touched. You can call your gosub or function at these points
to your voice routine before carrying on. 

The data within the widgets are stored in the widget bundles.
You can just bundle.get those.

Note that there will be a delay while your voice routine is
executing. I suppose you could deliver an intent to an outside
helper program instead, the helper program would just 'say' some
words but it would execute in parallel, thereby speeding things up.
I have no experience with speech programs, but I know there were
some examples in this forum in the past.
- Failure is not an option. It is bundled with the software. -
Quote
Like
Share

Joined: November 14th, 2016, 6:49 am

November 25th, 2017, 11:46 am #10

Oh, so I can not modify for example button.bas widget and add tts.speak variable value when my finger will be located at any button. It is really not so easy to make graphics mode apps speaking. Sure, I know, that I can add speech support, that in some cases application will speak something. But I wanted to atleast know about object on The scren. Since console based apps created by using print and other console commands will never be so attractive for sighted audience. Thank you very much for yours understanding.
Quote
Like
Share