Page 1 of 2

auto rest

Posted: Fri Jul 18, 2014 9:10 am
by Michael4771079

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


auto rest

Posted: Fri Jul 18, 2014 10:56 am
by Evgene Karachevtsev

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.


auto rest

Posted: Fri Jul 18, 2014 11:10 am
by Michael4771079

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


auto rest

Posted: Fri Jul 18, 2014 2:49 pm
by Kateryna Grynko

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.


auto rest

Posted: Fri Jul 18, 2014 3:30 pm
by Michael4771079

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?


auto rest

Posted: Fri Jul 18, 2014 4:42 pm
by Kateryna Grynko

Hi Michael,

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


auto rest

Posted: Mon Jul 21, 2014 2:06 pm
by Michael4771079

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


auto rest

Posted: Mon Jul 21, 2014 6:06 pm
by Evgene Karachevtsev

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...


auto rest

Posted: Mon Jul 21, 2014 6:24 pm
by Michael4771079

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


auto rest

Posted: Mon Jul 21, 2014 8:06 pm
by Michael4771079

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.