intel xdk not work on android

99封情书 提交于 2019-12-11 08:08:43

问题


new in Intel-XDK .... build small app using camera and cache objects

  • app worked at Emulator ... but when i tried test it on android mobile .. app started but i cannt use it ... buttons donnot show any effect which should do it !!! note : app on android do all effects which do not use intel.xdk what is the problem .... thanks a lot

 document.addEventListener
             ("intel.xdk.camera.picture.add",picOk);
            
            function takePic(){
                intel.xdk.camera.takePicture(100,false,"jpg");
            }
            function importpic(){
                intel.xdk.camera.importPicture();
            }
            function picOk(pic){
                if(pic.success==true)
               {
                    var imgSrc=intel.xdk.camera.getPictureURL(pic.filename);
                
                    $('#content').append("<img src='"+imgSrc+"' />");
                }
                else{
                    if(pic.message!=undefined) alert(pic.message);
                    else alert("error to toake picture");
              } 
            }

回答1:


So the problem is we didn't add the "Camera" plugin. This step isn't specified in any tutorial and may be a new part of Intel XDK (currently using build 1494).

To fix this go to Projects (link at top left) and click on your project. Under the "Cordovia 3.X Hybrid Mobile App Settings" section there is a section called "included Plugins". In this section there is a Camera plugin under "Standard Cordova Plugins" and again on the right under "Featured & Custom Cordova Plugins / Intel XDK Plugins". Check both of these and then restart Intel XDK. This fixed it for me.



来源:https://stackoverflow.com/questions/26380531/intel-xdk-not-work-on-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!