FileChooser object not working on mobile devices?

Just started using Construct 2? Post your questions here

Post » Mon Feb 01, 2016 7:01 pm

FileChooser object is working when i'm testing my app inside Chrome browser of my Android phone, but when i build this app inside Intel XDK and then when i run apk, FileChooser is not working. I am selecting file, but that file is not loaded inside my app (i am using "Load image from URL to load selected image to the sprite).
I guess i'm doing something wrong while exporting app. Can someone help me?
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Mon Feb 01, 2016 7:15 pm

Found this somewhere on the forum:

nikosurfing wrote:If you have same problem, follow these steps carefully:
1. Export your project to cordova, don't forget to select "Uses Camera" and "Uses Media" under permissions window
2. Open latest build Intel XDK, and import your project. Use cordova plugins: YES
3. Click PROJECTS button on the top left window in the intel XDK project window.
4. In the CORDOVA HYBRID MOBILE APP SETTINGS tab, select plugins:
- Camera
- File
- Media
5. In the Build settings you can use crosswalk version 12 or anything else, it's up to you
6. Now in the Build tab, Build your project in the Crosswalk for android.
7. Done

If you following these steps carefully, then you'll not get any error when opening file chooser in the android device. You can open and select image from gallery, uses front or rear device camera, uses dropbox and anything else.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Feb 01, 2016 7:55 pm

Not working - again.

Plugin list:
Image


EDIT: BTW where did you select crosswalk version? You said that i have to select 12, but i don't see it anywhere. There is "Crosswalk routine" and it's set to version 15.

EDIT2: I added text object inside my app to show url and filename of selected photo. That's working nice, but for some reason it can't load image inside sprite. Also i can't download Canvas Snapshot to my phone.
ALL THIS FUNCTIONS WORK INSIDE CHROME IN PREVIEW MODE, BUT NOT WHEN I BUILD THIS APP
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Mon Feb 01, 2016 9:38 pm

ButcherZV wrote:Not working - again.

Plugin list:
Image


EDIT: BTW where did you select crosswalk version? You said that i have to select 12, but i don't see it anywhere. There is "Crosswalk routine" and it's set to version 15.

EDIT2: I added text object inside my app to show url and filename of selected photo. That's working nice, but for some reason it can't load image inside sprite. Also i can't download Canvas Snapshot to my phone.
ALL THIS FUNCTIONS WORK INSIDE CHROME IN PREVIEW MODE, BUT NOT WHEN I BUILD THIS APP


I only found this on the forum, didn't write it myself..
Only thing I can imagine is that if the url is showing correctly, there's something wrong with the permission..
A bit like cross-domain requests in Ajax, but if your permissions are set correctly, I'm not sure..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Feb 02, 2016 10:08 am

Experiencing the same sort of problem:
https://www.scirra.com/forum/viewtopic.php?f=147&t=167809

I believe this is an XDK issue, so I posted it to the Intel XDK forum here:
https://software.intel.com/en-us/forums/intel-xdk/topic/607934

Someone else has similar problems at:
https://software.intel.com/en-us/forums/intel-xdk/topic/607931

Maybe worth posting over their (if you haven't already)

Will let you know if I get an answer.

Rob
B
9
S
3
Posts: 146
Reputation: 1,150

Post » Tue Feb 02, 2016 1:46 pm

frozenpeas wrote:Experiencing the same sort of problem:
https://www.scirra.com/forum/viewtopic.php?f=147&t=167809

I believe this is an XDK issue, so I posted it to the Intel XDK forum here:
https://software.intel.com/en-us/forums/intel-xdk/topic/607934

Someone else has similar problems at:
https://software.intel.com/en-us/forums/intel-xdk/topic/607931

Maybe worth posting over their (if you haven't already)

Will let you know if I get an answer.

Rob


That someone else on Intel XDK forums is me :D hahahahaha
I am 100% sure that this is XDK issue, because app is working fine on my phone when i am previewing over WiFi, but when i build apk, then FileChooser is not working.
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Thu Feb 04, 2016 10:06 pm

I just want to tell everybody that problem is with Intel XDK, i tried building app with Phonegap and File Chooser plugin worked!
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Tue Apr 05, 2016 5:41 am

I just test it using latest C2 (r226) and Intel XDK (3088) my idea of my game is using customizable character with the face can be loaded from user gallery or camera device. And the result is perfect, no issues or error. I tested on galaxy mega (jellybean), when user click face on the game then it'll open dialog box contains gallery, front camera and rear camera (awesome), dropbox, etc. So yes, the image will loaded into my sprite.

So far no issues, if you want to know about my game, please PM me. My game still under development and i don't want to share to public yet.
B
36
S
13
G
1
Posts: 88
Reputation: 3,096


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests