Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

auto rest

HI,
looking for some guidance on the the best way to approach the following.

we have a pizza ordering app which uses sendgrid to send the order to the pizza shop, the client now wants to receive the order on a tablet app.
Sendgrid service is getting the order from localstorage
I have created a collection and now the order is put into this collection.

the tablet app is part of the retail app, an extra screen is to be added with access to the app owner only

I could have the tablet app run a read service at regular intervals or is there a better way to ensure the tablet app is automatically updated with only the last order received in the collection.

thanks

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

auto rest

Hello Michael,

You may do this way. You may create the Update button, which user will push to get the update. You may add push notification and do the update when it comes to a certain push. Or you may imagine something different.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

auto rest

Thanks Evgene,
the problem is I dont want all orders in collection, some would have already been cooked and delivered,
I only want the new orders that have not been read yet, for this reason Im looking for a way to do this automatically for every order that arrives in the db,
I would intend to run a delete service from tablet app after the order has been received and processed.
Sorry if I didnt explain clearly.

cheers

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

auto rest

Hi Michael,

As an option, you can use server code script that adds a new Database record and sends Push Notification, so you could handle it in your app and call method to read from Database.

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

auto rest

Thanks Katya,
just trying to figure out best option, do you mean send push to tablet and then user clicks a button to invoke?
Or do you mean I can execute the service with push?

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

auto rest

Hi Michael,

You can handle Push notification event: http://devcenter.appery.io/documentat...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

auto rest

Hi,
im looking to find an example of a server script to invoke a service call with push,
I have service running from collection, cant find anything on this.

thx

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

auto rest

Hello Michael,

Here is the documentation about the server code api for DB:
http://devcenter.appery.io/documentat...
And this is about push send: http://devcenter.appery.io/documentat...

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

auto rest

Evgene,
i had read all of those docs and others in the forum,
I found nothing about invoking a service from a device as soon as a new entry has been made to a collection and using push to invoke,
this app is live, and this is an additional upgrade to the apps ability, can I please see an example of a server script the is based on this logic.

cheers

Michael4771079
Posts: 0
Joined: Sat Jul 21, 2012 2:03 pm

auto rest

Hi Evgene,
any sign of this sample code, cant really wait to much longer, I am not asking you to solve an issue yet, just really need to get started on this, for an example script a whole day wait doesn't make much sense, I am not being rude, just direct.

Return to “Issues”