Re: [PhoneGap] How to know if deviceready was fired?

234 views
Skip to first unread message

Simon MacDonald

unread,
Dec 21, 2012, 1:45:47 PM12/21/12
to phonegap
Use the flag.
Simon Mac Donald
http://hi.im/simonmacdonald


On Mon, Dec 17, 2012 at 11:37 AM, <victor....@gmail.com> wrote:
> Hi,
> I'm building a mobile app for android using phonegap and JQM.
> I have some features that I suppose will be not often accessed by users.
> For example one of the features requires file system access, so I don't want
> to load file system object onload, in order to reduce memory usage and
> increase app speed.
>
> function onDeviceReady() {
> window.requestFileSystem(LocalFileSystem.PERSISTENT, 0,
> onFileSystemSuccess, fail);
> }
>
> function onFileSystemSuccess(fileSystem) {
> fs = fileSystem);
> }
>
> Is it possible to know after the application is loaded if 'deviceReady'
> event was fired?
> Of course I can use some flag inside onDeviceReady function but I wondering
> if there some better best practice?
>
> Thanks in advance.
>
> --
> -- You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
>
> To compile in the cloud, check out build.phonegap.com
>
>

Gautam Chaudhary

unread,
Dec 24, 2012, 7:21:57 AM12/24/12
to phon...@googlegroups.com
if you want to check that in the console, add this inside your onDeviceReady function:

console.log("On device ready fired");
Reply all
Reply to author
Forward
0 new messages