This question is not a purpose, the way you formulate this question is the description of a remedy (a means) that excludes other creative solutionsI need to write an Android application, to read values from the screen of another application running on the same mobile device and then perform some process with the captured values.
So what you actually want to achieve (the purpose) is that you want to have an off-line price list which can be used on your cellular without an Internet connection (off-line)Thanks Andrew.
I downloaded an app in my cellular to monitor the price of a list of stocks when I am without internet access, to take actions manually if needed. But, for long periods without Internet I am going to need and app to capture the prices in my cellular, from the app downloaded and send these to my PC, where I have a windows application developped by me to manage a list of stocks
Then the following possible means can be found:How can I create an off-line price list?
I recommend that you follow Erel's advice to develop the program under B4J as a B4XPages solution that has the ability to transfer the most recent list to the cellular.from the app downloaded and send these to my PC, where I have a windows application developped by me to manage a list of stocks
Yes, the windows app get the prices from a web page by itselfJust have an app on your PC which gets the stock prices itself without going through the mobile app and performs whatever actions.
No, the mobile app get the prices from I don´t know where and shows the list at the screenThe mobile app can, when it has internet communicate with this app.
No, I want to have a list or a file that I can use to update the stocks database in my PC.So what you actually want to achieve (the purpose) is that you want to have an off-line price list which can be used on your cellular without an Internet connection (off-line)
- Parsing HTML Code: by the use of jtidy with xml2map library, or jsoup
- For simple HTML web pages you can also try Regular Expressions (RegEx)
- With additional functionality for interacting with web pages: the WebViewExtras and WebViewExtras2 Libraries to manipulate and extract data from HTML elements.
No, I don´t think that I am going to need a searchable list at this fase.Then the next question (not yet asked) is how to make the result list searchable
I recommend that you follow Erel's advice to develop the program under B4J as a B4XPages solution that has the ability to transfer the most recent list to the cellular.
I can't recommend it enough, start with a search on this forum like : "ftp webserver".Do yo have an example that I can use to study
Yes, given the list-like Yahoo web page, I recommend that you extract the desired information from the list with jsoup.a. Can I do something similar using B4A?
Google is pursuing an increasingly restrictive policy on sharing information from or to an app (without the user's consent). I think it is therefore easier to build something with jsoup than to tinker with an existing app within the current Google rules.b. If I have an app running in my cell named Yahoo Finance that shows the price of a stocks list at the screen, can I develop an app that extracts the prices from that app?
My understanding is that your pc goes without internet access for some period of time. In that period you would use a B4A app to access the Yahoo stock feed and capture that data. There is a sample B4A program by Erel that does a currency conversion by grabbing data from the web. Search for "currency converter" in the forum. You can modify that code to go to Yahoo finance. There is also a sample B4J code that actually goes out to the Yahoo finance site to grab stock quotes. Search "stock" in the forum. The example is by user rwblinn. In the B4A app write your stock quotes to a text file, you can access that from your pc via a usb connection. I have an app on my phone that does that, it saves a copy of my table so that I can access it from my pc, thus giving me a backup.Thanks MicroDrie for your interest. I really appreciate this.
I have been to much inefficient explaining my case, so I am going to present it from a different perspective.
The process that I use in windows (coded in vb.net) and that I would like to emulate in B4A has three parts:
1. I execute a call to the Yahoo Finance web page using a WebRequest object wr=WebRequest.Create("https://finance.yahoo.com/quote/" & tkt), where tkt is the code of the stock ticket, like TSLA for Tesla o V for Visa.
2. I extract the text of the WebRequest with the method
wresp = wr.GetResponse()
3. Once I have the text, I seach it looking for some fixed words inside the text and obtaine the price and other data of the stock, using String functions.
a. Can I do something similar using B4A?
Or
b. If I have an app running in my cell named Yahoo Finance that shows the price of a stocks list at the screen, can I develop an app that extracts the prices from that app?