
IPIA_KU
Kuwait
Asked
— Edited
Hi I have a simple question please
when making ARC mobile app; can i connect the app with Firebase Realtime Database to read and store variables? i want to use those variables to start and stop scripts...
thank you
ARC mobile does not support plugins.
Only ARC Desktop (Windows 7+) supports plugins.
then there is no way to connect the mobile app of ARC to a database?
... but none of them are good for the cat
Using ez-script:
Code:
I assume you are storing and getting the value of the variable from a certain website, which means you are using a webpage as a database for storing and getting variables. Am i correct?
I assume if you have a web script or an web api you can get or set values using the HttpGet function.
Cool!
Is there any kind of web script or web api that you recommend?
Should i use javascript or PHP?
And for the database; can i use phpMyAdmin?
1) EZ-Script httpGet fetches the content from an url on a remote server.
2) You will need to be able to reach the remote server from ARC mobile application e.g. local or internet server.
3) Your remote script runs on the remote server, you need to parse the query string and performs the operations i.e. GET, SET and returns plain text. If is a SET operation you should return OK or something similar, if is a GET should return the variable value or empty/default value if does not exist.
4) Language and database ? You should pick whatever you are familiar with e.g. PHP/mySQL, NodeJS or ASP.NET Core are good options.
IPIA_KU:
I presume your plan is to do something like this:
Code:
thank you so much!
Code:
i wrote that code with the intention to test that I get the contents of the database but it displayed the inspection of the page instead like:
<!DOCTYPE HTML><html lang='en' dir='ltr'><head><meta charset=\"utf-8\" /><meta name=\"referrer\" content=\"no-referrer\" /><meta name=\"robots\" content=\"noindex,nofollow\" /><meta http-equiv=\"X-UA-Compatible\" content=\"IE=Edge\" /><style id=\"cfs-style\">html{display: none;}</style><link rel=\"icon\"
that's only part of what it displayed. i couldn't post it all because it is very long.
so what did I do wrong? I want to get the contents of the database from the link..
and the link I used only for local not on a remote server yet. so was that the cause maybe of what it displayed to me? I wanted to test first if it works with local then I will try to make it on remote. but unfortunately it did not even work for local ^.^;
A question I often ask when people are trying to do complex things with the mobile app. Is there a reason you need to be using the mobile app? ARC is far more extensible in Windows, and it provides two different web servers that can be used to create a nice mobile interface as long as the robot, Windows computer, and mobile device are on the same network (or can communicate with each other, there are certainly ways to do this over the internet as well).
With ARC you could much more easily create an ODBC or JDBC plugin, or use one of the many existing methods of transmitting and retrieving variables from external sources.
Alan
by "parse the data" do you mean to use toString() function?
do you mean I should only make HTML file and write text into it? but then how does this is considerd as a database? we will be reading line by line how will i know where exactly to store or which line exactly will have the data i need.. :/
our senior project is about a robot that plays with children various games written in ez-scripts. so we want to use ARC mobile on an iPad where there is a start button the child can press and then the robot will start playing the ez-scripts containing the games. but in which order the games will start? this is decided by a mobile application created with xcode where the parent will use to schedule games. the schedule of games will be stored on a database and EZ-Script must read from the database to know which game or which script(containing the game) to start first.
Someone else will have to answer. I have not done a lot of string functions in ARC, I just recognize what the issue is. Basically, you will need to use functions that extract just the answer of your query from the returned web page.
No, I am saying that your web front end to the database needs to return a simple easily parsed page when you send your query via httpget. If you are getting a lot of extraneous data, it is probably mostly stuff for displaying the return in nice human readable format, with colors and boxes and stuff (if you have a publicly accessible example, I can take a look and be more specific). What you want it an easily machine readable return because no human will be looking at it directly.
I won't quote your third answer. Good enough reason.
Alan
hello, by "mobile interface" do you mean the one we find in ARC: Project >> add control >> mobile ?
do you know if i can create my own mobile interface plugin? so i can provide it with database connections and display videos on the mobile screen? i'm currently working on making a firebase plugin; so if there is a way i can create a mobile interface out of this plugin, it would be really great and helpful!
*blush*
The object you mention creates a mobile project for ARC Mobile (either iOS or Android) but it is somewhat limited, like no plugins.