Problem with AJAX type button on a PHP page and making it work in the Webviewer

60 views
Skip to first unread message

Jamie Cropley

unread,
Mar 10, 2016, 7:36:26 PM3/10/16
to mitappinv...@googlegroups.com
Hi,

So first off some details:

- The site can be switched to english via a small link at the bottom

- I am using a WebViewer component in AI2 to load in the site as default: http://elimi.es

- The specific page I am having trouble with is located at: http://elimi.es/index.php?page=item&action=item_add     (You will need to use my test account: b169...@trbvn.com for the email and 123456 is the password.)

- When I click in the built version of the app the button titled: 'click or drop for upload images' it does not work, but when I view in chrome on android the button works perfect. Here is the code for the button:

                        <?php if( osc_images_enabled_at_items() ) {
                        echo '<br />';
                        echo '<br />';
                        echo '<br />';
                            ItemForm::ajax_photos();
                            echo '<br />';
                            echo '<br />';
                            echo '<br />';
                         } ?>


- As you can see I added <br> element as I thought it was a style overlap issue.

- Now I have ruled out any problems with the site itself, I am trying to figure out why the android app I have created does not bring up camera or photo selection menu on android when I click the button as mentioned above on my page.

- Also I am using php script called OSclass, my original post although probably not relevant was here: http://forums.osclass.org/general-help/click-or-drop-for-upload-images-change-php-elements-in-the-file-for-this-button/new/?topicseen#new


- Overall my question is, is it anything I am doing wrong in the setup of my app, literally all I have is the webviewer component pointing to my site so in my opinion surely it should work like chrome? Would I have to set certain settings for the web viewer component in AI2 to make it work better?



Many thanks.


Taifun

unread,
Mar 10, 2016, 8:29:52 PM3/10/16
to MIT App Inventor Forum
the webviewer is no full browser, to upload images, you have to use the web component
Taifun

For questions about App Inventor, please use the App Inventor forum. Thank you.


Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 

Jamie Cropley

unread,
Mar 10, 2016, 8:39:33 PM3/10/16
to MIT App Inventor Forum
But why is it not working in this component? Something must be blocking the open image part of the android OS? In which case is there a way around this?

Taifun

unread,
Mar 11, 2016, 9:33:58 AM3/11/16
to MIT App Inventor Forum
I don't know why...
you might want to experiment and try a few things
for example to adjust the target sdk version?

see how Boban managed to play youtube videos in the webviewer:
To be able to play Youtube videos in the webviewer, you have to edit the manifest and add android:targetSdkVersion="14" or higher. Thank you Boban!

let us know, what you find out...

Taifun
Reply all
Reply to author
Forward
0 new messages