Page 1 of 1

I need the reader to continue on the last page he read.

Posted: Tue Apr 15, 2014 8:32 pm
by jorgecaballero
I am developing an interactive book

Need will automatically save the progress, I do not want bookmarks,
only to continue at the same point in the story.

I put a progress in a "field" with this code

  put the number of current card into field ID 1035
save this stack


And then I do this to continue reading:

if fld ID 1035 =1 then
go to card cover

else
go to card field ID 1035
end if



This works great on Mac, but does not work in iphone or ipad,
What I have to do to make it work?

Closing the APP on iphone or ipad restarts and is not saved.

I need the reader to continue on the last page he read.


Thanks

Re: I need the reader to continue on the last page he read.

Posted: Tue Apr 15, 2014 9:30 pm
by Jellicle
On iOS the app binary cannot be changed at runtime. Write the page number out to a text file and read that file on restart.
Gerry

Re: I need the reader to continue on the last page he read.

Posted: Tue Apr 15, 2014 10:30 pm
by Simon
Hi jorgecaballero,
Here is a stack I made for writing out a "Preference file"
myPlants.zip
LC 6.5
(2.21 KiB) Downloaded 258 times
Now that is not exactly what you need but it shows you the steps required to save binary and text files to the "documents" folder (good for both mobile and desktop).

The important thing is that after you have written some text and added a photo that information is saved, when you close the app down those details will be loaded back into the app at startup.

Simon

Re: I need the reader to continue on the last page he read.

Posted: Tue Apr 15, 2014 10:49 pm
by jorgecaballero
thanks jellicy and Simon

How do I record the number of the card? and how do I bring it to continue on that card?

If you have any example code would help me a lot

Re: I need the reader to continue on the last page he read.

Posted: Tue Apr 15, 2014 11:08 pm
by Simon
Well if you check out that stack how do I record the image and text?
There is lots of example code in it.

Simon

Re: I need the reader to continue on the last page he read.

Posted: Wed Apr 16, 2014 7:49 pm
by jorgecaballero
Thanks Simon,,,, works great.