Page 1 of 1

Help!! rest service not working properly on device

Posted: Sun Nov 24, 2013 3:16 pm
by Michael4771079

Hi,
this is the last item I need to solve in this app.

All is working as expected in the browser but as apk or when I scan the qr code to test on iphone a "get" service which is called on page load fails on device, but works in browser

this is the page with 3 items that were called from db on page load.

Image

this is the item I am deleting

Image

when I click delete the item is deleted from array, a put service is run to update db and this code is used to reload the page

$.mobile.changePage("checkout.html", { allowSamePageTransition: true,
transition: "flip", reloadPage: true });

this is the result after item is deleted
item is deleted, db updates, page reloads, get service is called on load and the remainder item populate the page.
I can see in the console all the services run, result is perfect.

Image

when I try the same as apk or in browser on iphone this is the result after the item has been deleted and page reloads

Image

so for some reason the get service wasnt read,
however I know it has been called because if I then click menu and then click checkout page again the service populates the page with the remaining 2 items

I dont think its a logic problem as all works in the browser.
:
Can someone help solve this issue, I thought if it was possible in the browser then it should work in an app?

Thanks


Help!! rest service not working properly on device

Posted: Sun Nov 24, 2013 4:38 pm
by Igor

Hello Michael,

Please, post the steps how to reproduce your issue?


Help!! rest service not working properly on device

Posted: Sun Nov 24, 2013 4:54 pm
by Michael4771079

Thanks Igor,
app name "star pizza", app is shared,
public link
http://appery.io/app/mobile-frame?src...

Open app and login, you can use "a" as name and pass.
Click vegetarian,
select and click order btn for 2 or more items.
Click checkout, when page opens items are listed,
click delete on any item

in browser all works well,

if you scan the test qr code and try the same on a device (iphone 4s 0s7), the problem occurs, the same result with apk android 2.3.5

when page reloads on device and no items are listed, click menu and click checkout again, now the remainder of the list appears.
Hope I explained properly, if not shout!

thanks again


Help!! rest service not working properly on device

Posted: Mon Nov 25, 2013 2:02 pm
by Michael4771079

Hi,
any news?


Help!! rest service not working properly on device

Posted: Mon Nov 25, 2013 2:04 pm
by Kateryna Grynko

Hi Michael,

Sorry, still testing this. I'll update.


Help!! rest service not working properly on device

Posted: Mon Nov 25, 2013 4:15 pm
by Maryna Brodina

Hello Michael! We were testing with iPhone5/iOS7 - select Vegetarian pizza, click checkout and see the list. Delete all selected items, click Menu, again checkout - there are no deleted elements. So it behaves the same in desktop and device browser. Could you try again please? Also try to install app on device. Does it work as expected?


Help!! rest service not working properly on device

Posted: Mon Nov 25, 2013 4:29 pm
by Michael4771079

No Maryna,
sorry theres a misunderstanding,

Click vegetarian,
select and click order btn for 2 or more items.
Click checkout, when page opens items are listed,

click delete on any one item,
item is deleted, page reloads and other item or items are still in the list.

in browser all works well,

if you scan the test qr code and try the same on a device (iphone 4s 0s7), the problem occurs,
the item is deleted but when the page reloads the remaining item or items dont appear the same result with apk android 2.3.5

now if you click menu and click checkout again, now the remainder of the list appears.


Help!! rest service not working properly on device

Posted: Mon Nov 25, 2013 5:42 pm
by Maryna Brodina

It's causing by page reload: pre$.mobile.changePage("checkout.html", {
allowSamePageTransition: true,
transition: "flip",
reloadPage: true
});/pre Load and Show events won't work in this case. Delete it and instead on service staruserupdate complete event invoke STARRUSERREAD service.


Help!! rest service not working properly on device

Posted: Mon Nov 25, 2013 6:32 pm
by Michael4771079

Great Maryna,
the code was the problem. All working now as it was meant to both on iphone and as apk on android.

thanks again for your great support!