What is the best approach for remote data fetching?

Get help using Construct 2

Post » Wed Mar 18, 2015 7:28 am

Hello,

I am trying to build small app that would require to load data (immages and titles) from my own server.
it shud be done auto during the night time or (if app is turned off) upon starting the app.

Can more expirienced in this matter point me to the right direction?
Maybe some plugins that might help?

thanx! :)
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Wed Mar 18, 2015 3:44 pm

From what your saying, you expect the application to update some content, during the night ?
You realize that the app has to be active and running to perform actions etc ?
It will not start automatically.

I would use some ajax to update content.


If its game updates you want to apply, and have it in the google play store ... then simply updating your package in the google play store will initiate the updating automatically when users are connected to the internet.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,542

Post » Wed Mar 18, 2015 4:07 pm

@lennaert
Thank you for answering...
So if app is open but minimized (not turned off) it wont be able to run scheduled task?
How then, for instance, facebook gets new posts even its minimized?
when i open it, it allready has all new posts...
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Wed Mar 18, 2015 4:18 pm

I thought that the construct 2 applications halted/paused when minimized.

The facebook apps are different from construct 2, those apps are written in native code.
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,542

Post » Wed Mar 18, 2015 6:40 pm

@Ashley

Sorry to bother you but, is that correct? ...App written i C2 can't run some task in background while minimised?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Wed Mar 18, 2015 6:54 pm

It's by design - I can't think of many reasons you'd need to update in the background and couldn't do that upon waking up, especially given C2 is mainly a game engine. Also if you do too much work in the background you'll drain the device battery and annoy users.
Scirra Founder
B
386
S
229
G
87
Posts: 24,207
Reputation: 191,742

Post » Wed Mar 18, 2015 8:08 pm

oh, thats bad news... :(
theres a situation where it might get like hundred of new images and updating and downloading might take some time... so i thought that it would be great for update to be done during night time and that user gets notification in morning and can just open app and imidiatly take a look at it.
...i guess that i must live with this limitation... :(

Anyway, back to the topic at hand, does anyone has any pointers for me? ...what approach might be the best or any good plugins to recommend?

thanx!
B
26
S
11
G
2
Posts: 669
Reputation: 5,038


Return to How do I....?

Who is online

Users browsing this forum: istero, joliemoc, sizcoz, XMatrix and 10 guests