Software Archive
Read-only legacy content
17061 Discussions

Iframe doesn't show on intel xdk Android APP

lucas_b_
Beginner
529 Views

Hello, i have an app made with xdk that has many menus and many pages and buttons,when you click on a button it leads you to a specific page.

i wanted to use an iframe web page link in one of those page and when i try it on the app it doesn't show .But when i tried the same iframe on a new app that i made with xdk just to test it and it worked,so what's the problem here exactly .

you may tell me use inappbrowser,but i don't know what is it or how to use it,plus my app it's not a website,it works offline but i wanted to put a web page in a specific page and that's it .If any one has a solution ,please Help . thanks.

 

Also i tried to iframe other web page as a test on my App and they worked but the specific page that i want , it's iframe doesn't show on the app that i want to use it on ,but when i use that web page on a new app it works .

0 Kudos
6 Replies
PaulF_IntelCorp
Employee
529 Views

I'm assuming when you say "it doesn't work" that you mean "it doesn't work in a built app" but does work in the Simulate tab. Is that correct or incorrect?

If appA is failing as a built app on a real device, but appB is working as a built app on the same real device, then I would suggest there is something in your app that is causing the problem. Are the whitelist and CSP rule settings for appA identical to appB? Are the build settings identical? If the build settings are identical, and you're using the same technique, then I suggest you try using remote CDT to debug the issue in the built app, on device. See this doc page > https://software.intel.com/en-us/xdk/docs/using-remote-chrome-devtools-to-debug-android-cordova-apps < for some help with that process.

0 Kudos
lucas_b_
Beginner
529 Views

i made it harder to understand i guess,i'll try to make it easier . i have App1 which is the one i need Iframe1 to run on it,i made new App2 to run iframe1 on it for testing and it worked (it does not show in emulator but when i try it on my smartphone it shows the web page of iframe1 on App2 which run on my smartphone) . The problem is when i run iframe1 on my App1  the iframe1 doesn't work or shows the web page neither on my smartphone or the emulator .

 

ps: the web page on app2 isn't even whitelisted and it works within the iframe, and in app1 it is white listed and everything and it doesn't work,white listed or not i tried both .

and yes build settings are identical i usually use the same for all,except the build version of course and name but the rest all the same .

0 Kudos
lucas_b_
Beginner
529 Views

12.PNG

So i set debug to true,and did all the steps and found 5 errors ,and i have no idea how they happened or why , they must be old and not from the iframe it self because it works fine on the fresh new app 

 

0 Kudos
PaulF_IntelCorp
Employee
529 Views

Based on the final error, my suspicion is your app has hung with the "initAdMob is not defined" error. That's probably the main reason your iframe is not showing, is because your app is probably "dead" at that point of execution.

Regarding the other error messages, other than the missing font file, those could be due to insufficient whitelist or CSP rules; regardless, you should not rely on being able to load a network resource as part of your app's startup. What happens if the network is either slow or disabled when your app starts and you're trying to retrieve something from the network? Unlike a web page, you have no guarantee that there is an Internet connection. For the optimum user experience, you should insure that the "main screen" of your app can be reached without any reliance on network resources, so you can then handle events that require network access in a way that provides feedback to the user.

0 Kudos
lucas_b_
Beginner
529 Views

My app works fine offline Paul , it's just one page in like 40 pages that need internet connection,which is a page when i wanted to put a chat room iframe .

0 Kudos
lucas_b_
Beginner
529 Views

i guess this thing that i'm trying to add it's not meant to happen ,i'll keep my work as usual and will get my users an external button link if they want to chat with each others

0 Kudos
Reply