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

Help!! rest service not working properly on device

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

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Help!! rest service not working properly on device

Hello Michael,

Please, post the steps how to reproduce your issue?

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

Help!! rest service not working properly on device

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

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

Help!! rest service not working properly on device

Hi Michael,

Sorry, still testing this. I'll update.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Help!! rest service not working properly on device

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?

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

Help!! rest service not working properly on device

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.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Help!! rest service not working properly on device

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.

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

Help!! rest service not working properly on device

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!

Return to “Issues”