Software Archive
Read-only legacy content
17061 Discussions

App not working on Real Device

Soman__Manoj
Beginner
508 Views
Hi, I am facing strange issue.. When I build my app and deploy it to real Android device it doesn't work in terms of using cordova APIs like using camera, getting device details etc. But when I use same in Intel XDK emulator it works fine at least I could get device details. So when I use app with App preview, I get following message... Alert "Your built app behaviour may differ compared to what is displayed in Intel App Preview. Your project includes Cordova plugins that are not included in App Preview. These plugins are not supported by App Preview. cordova-plugin-legacy-whitelist" What's going wrong?
0 Kudos
1 Solution
PaulF_IntelCorp
Employee
508 Views

Manoj -- the sample app you are using is utilizing obsolete plugins that you should not use. You need to rewrite it to use core Cordova plugins. Everything that references "intel.xdk" is deprecated or retired. These need to be replaced. Unfortunately, the Emulate tab continues to support some of these, it has not been updated properly to eliminate support for those APIs.

The App Preview warning is normal, there's nothing wrong with your app regarding that warning. Please see these doc pages for an introduction to what a plugin is:

View solution in original post

0 Kudos
5 Replies
Amrita_C_Intel
Employee
508 Views

Hello,

First of all app preview doesn't support third party libraries. Which all Cordova api's you are using other than above stated ones?

What error is it giving you when you are running on real device? Which device are you running? For which platform you are building?

0 Kudos
Soman__Manoj
Beginner
508 Views

Hi,

I am running Intel XDK IDE on Windows 7 Ultimate and testing APK on Android device (Mobile phone: Lenovo P770)

Please find screen shots as well as sample of code attached

I am not using any 3rd party APIs.. just using javascript libraries like Jquery, jquery menu and few others for form validation etc.

 

0 Kudos
PaulF_IntelCorp
Employee
509 Views

Manoj -- the sample app you are using is utilizing obsolete plugins that you should not use. You need to rewrite it to use core Cordova plugins. Everything that references "intel.xdk" is deprecated or retired. These need to be replaced. Unfortunately, the Emulate tab continues to support some of these, it has not been updated properly to eliminate support for those APIs.

The App Preview warning is normal, there's nothing wrong with your app regarding that warning. Please see these doc pages for an introduction to what a plugin is:

0 Kudos
Soman__Manoj
Beginner
508 Views

Thanks a lot..

It worked...

Just last piece though... doesn't device object provide property for fetching mobile / cell number of device?

How do i get that?

0 Kudos
PaulF_IntelCorp
Employee
508 Views

I recall there is a third-party Cordova plugin that can help you get that piece of information. You may find that information difficult or impossible to get on some platforms, since it is user-sensitive data. Search for "cordova plugin local phone number" to find some plugin options.

0 Kudos
Reply