PhoneGap Camera issue

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Markfre1
Posts: 221
Joined: Sun Mar 11, 2012 10:15 pm
Location: United States

PhoneGap Camera issue

Post by Markfre1 »

If I build a PhoneGap app, when wanting to upload and image the Camera option does not pop up. Only the file options. If I use the URL on the Phone, like a web app then the phone, video, etc options pop up.

I'm assuming the camera plugin is included automatically but I have no expertise outside of AIM and Magic.

Any advice on how to get the Camera option to display in PhoneGap is appreciated.

Mark F
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: PhoneGap Camera issue

Post by aware_support »

If you are using a standard Document attribute on a form with Upload Files button, then Camera support is not guaranteed - you have to use MOBILE SNAP INTO action to have guaranteed support of camera in the native mobile app. Please check out the corresponding documentation.
Aware IM Support Team
Markfre1
Posts: 221
Joined: Sun Mar 11, 2012 10:15 pm
Location: United States

Re: PhoneGap Camera issue

Post by Markfre1 »

I am not using the document type but the picutre type. The AIM documentations says this:

One approach is to define an attribute of the Picture type for one of your forms. Aware IM will automatically generate controls to upload the image from a camera or photo library. This approach will work in both browser-based mobile applications and native mobile applications

This does seem to be true. the mobile browser works but the phonegap native does not pop up the camera, only the file options.

And if I make it a document type, there is a problem that when you log in natively as guest, when it goes to the user it changes to the mobile browser. Once the user is created and you come back in, it remains native. So I have a catch 22. If I use the snap-in, it won't work when someone creates an account initally. And if I use the picture type it does work natively.

If the snap-in works, then I need to figure out how to log in from guest to user without it switching to mobile browser.

Any feedback appreciate and in the meantime, I will test it but it will be a problem because of the mobile browser.

Mark F.
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: PhoneGap Camera issue

Post by aware_support »

Code: Select all

This does seem to be true. the mobile browser works but the phonegap native does not pop up the camera, only the file options.
Yes, it depends on the phone. Some phones support camera others don't. That's why you have to use MOBILE SNAP INTO action - this should work on all phones.
I don't understand what you are talking about in the rest of your message.
Aware IM Support Team
Markfre1
Posts: 221
Joined: Sun Mar 11, 2012 10:15 pm
Location: United States

Re: PhoneGap Camera issue

Post by Markfre1 »

To clarify.

When a user comes into the mobile index.html the screen has a Register button and a login button.

Each button reacts differently. The Login stays in the native mode.

The register button switches into the mobile browser and once registered the user is still in the mobile browser. If the user logs out and comes back in, then it stays native. So the problem is new users who are registering and trying the app, it will not work because the docs say does not work in mobile browser.

If I can get the Register to stay native, then problem solved.

That's really the biggest problem and its a flaw. If I running natively, it should not switch to the mobile browser when registering and not sure if there is a way for that not to happen. Maybe some javascript or something.

Mark F
Markfre1
Posts: 221
Joined: Sun Mar 11, 2012 10:15 pm
Location: United States

Re: PhoneGap Camera issue

Post by Markfre1 »

May have resolve mobile login.

Guest stays mobile after registering whereas before it brought up the mobile browser.
User Login stayed mobile always.

But since need mobile snap-in for camera, can't have two different ways (mobile browser, and native) and of course, you want native.

Will be doing final testing later and will post under tips and tricks if works.

Mark F
Post Reply