Connect with another service/app (simulate food order/delivery)

Hi!
I just started using MIT yesterday for a school group proyect. My teacher told me that if there was a way to connect my app to a delivery app from my country like Rappy, Glovo, UberEats, it would be great. Becase the problem that she has is that she wants to ask food at 6am but the app doesnt let you to do that at that time.
So, what I want to know is if there is a way to make a service/server in which I can store the data that then could be delivered to an emulator or something to be inserted in the app or service (UberEats).
PLEASE if you didnt understand something just ask.
Thanks in advance to everyone!!!

Unlikely Patrick; you have to create an app that will

  • accept an order at 6 am
  • save the order information
  • log into the food order service web page and make the order at a specific time
  • allow payment to the order service (search for monetize using the forum search for possible mechanisms)
  • provide error control and confirmation the order is received.

the problems and challenges include:

  • your app needs to be able to log into the Web page that allows people to order. This article might help How to fill out a form of a webpage and click a button using some JavaScript . Will the method allow you to start an order immediately. If it can actually start an order on one of these food services it would demonstrate the log in and order part could be part of your app. If you try and cannot instantiate an order; it probably means you cannot do what you want to do.

  • your app needs to store the request at 6.am and then schedule a log in to the order service. App Inventor 2 apps cannot run in the background (they cannot ordinarily send the order at a scheduled time unless the app is not sleeping). The actual order might be stored in a TinyDB or in the Cloud (Google spreadsheet, FirebaseDB, CloudDB etc.) but the issue is how to create the part that stores the order to actually send the order at a specific time.

Not with App Inventor; whatever you use to make an order at a specific time has to be running 24/7 . Is this impossible? I don't know. You could try to get separate parts of the app to work and if they do, put them together.

A huge issue is scheduling the app to send the order at the correct time. Since App Inventor can not run as a Service (in the background) it would mean that your teacher's device would have to run constantly to be able to send the order at 11 or 12 or whenever (see options for keeping the device from going to sleep ... search for StayAwake routines).

This is my opinion. Try and if you are a moderately competent App Inventor programmer, you might find a solution. Others certainly will have other ideas. I expect you won't be able to use your app to actually make the order on the food service web pages. These services want you to use their web pages.

Regards,
Steve

1 Like

Thanks!!! Sad :frowning:

What should I do then? She, my teacher, told me that I can just "simulate" it, like just modeling it. Should I do a shortcut to the actual app or something like that?
Thanks for your response! <3

Only your instructor knows what she means by simulate. I would ask her or better yet, you tell her what you propose to do. Make sure you can do it, then do it. :slight_smile:

  • you can create an 'order page' where you select from a pretend menu. Perhaps use Buttons with images of the food to order which automatically creates the 'order' Include a time to 'post' the food order (let the user select a time using a TimePicker) to 'release' the order to the web page.
    -store the order in a TinyDB or on a Google spreadsheet (see link below for an example)
  • show the linked food service page at a simulated time You can link to the food provider web page using the Web component to display their Web page... but you cannot transmit the data to the actual server so a better solution would be to create a Pizza Party type simulation...see below
  • provide a Notification saying the order was made and will be executed at 11:30 or whatever.
    -etc.

Use your imagination.

Here is a version of the old MIT Pizza Party app using Google Sheets that simulates ordering from a pizza restaurant Built In Google Sheets Component for App Inventor by Tim . You can use that for ideas about how to simulate UberEats web page.

1 Like

Okok. Thanks Steve for your well explained answers. She, my school tutor was just telling her ideas. She doesnt know anything about coding, that's probably why my question was probably a little absurd. Me..well, Im learning...
I'll try the pizza thing, thanks!

Other thing Steve, I was trying to make a calendar. Do you think its ok if I follow this guide?


I want to be able to write stuff and then be reminded.

There is a link to the aia highlighted in the calendar example you referenced in the MIT Gallery. Try it. If it works for you be :slight_smile: . You can modify it any way you want. This is just a Calendar. It is not a note taker. You would have to modify it to provide that function.

Be aware, there are other ways to make a calendar https://community.appinventor.mit.edu/search?q=calendar . There is no magic way to make a calendar. What you probably really want is a diary https://community.appinventor.mit.edu/search?q=diary

1 Like

Thanks a million for your time SteveJG!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.