Question

I want to browse for and upload a file to a server using phonegap.

The problem is, that on my phone (droid) once I select a file and the focus returns to my app, it reloads as if I just opened it. I'm using build.phongap.com and my build for ios works on my friends iphone 5, and the apk that fails for me is working on a friend's galexy S.

I've tried the standard html input field '' as well as

a button that calles the following function:

        jQuery('#find_file').click(function(){
            alert("prebrowse");
            this.photoDestinationType=navigator.camera.DestinationType;
            var source =  navigator.camera.PictureSourceType.PHOTOLIBRARY;
            navigator.camera.getPicture(successFn, errorFn, { quality: 50,
                    destinationType: this.photoDestinationType.FILE_URI,
                    sourceType: source,
                    mediaType: navigator.camera.MediaType.ALLMEDIA  });
            alert("postbrowse");
        });

Both with the same results. They both work on iphone and galexy S but on my droid my app reloads when focus returns to it. How can I keep this from happening? when I browse for attachments from the facebook app or gmail app it works fine.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top