Software Archive
Read-only legacy content
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

don't run with IOS

Detlef_F_
初学者
981 次查看

Hi ,

the below script run with IOS. Only with Android. Also the Emulate have no problems.

/*jslint browser:true, devel:true, white:true, vars:true */
/*global $:false, intel:false */

(function () {
    "use strict";
    /*
      hook up event handlers
    */
    function register_event_handlers() {

        intel.xdk.notification.alert(intel.xdk.device.platform, "Platform", "Ok","close me");
        
        /* button  #btVibrieren */
        $(document).on("click", "#btVibrieren", function (evt) {
            intel.xdk.notification.vibrate();
        });

        /* button  #btBeep */
        $(document).on("click", "#btBeep", function (evt) {
            intel.xdk.notification.beep(1);
        });

        /* button  #btPlaySound */
        $(document).on("click", "#btPlaySound", function (evt) {
            intel.xdk.player.playSound("www/sounds/tiere2.wav");
        });

        /* button  #btSendSMS */
        $(document).on("click", "#btSendSMS", function (evt) {
            intel.xdk.device.sendSMS("Hallo Löwin", "017632897038");
        });

        /* button  #btSendEmail */
        $(document).on("click", "#btSendEmail", function (evt) {
            intel.xdk.device.sendEmail("An Folke", "detlef.folke@gmail.com", "wow it's a subject", true, "", "");
        });

        /* button  #btBarcodeScannen */
    $(document).on("click", "#btBarcodeScannen", function(evt)
    {
        intel.xdk.device.scanBarcode();
    });
    
    }
    document.addEventListener("app.Ready", register_event_handlers, false);
})();

Thanks for support

Detlef

 

 

0 项奖励
7 回复数
Swati_S_Intel1
981 次查看

Are you trying on device with App Preview or trying a built app?

Please send your complete project.

Swati

0 项奖励
Detlef_F_
初学者
981 次查看

Hi Swati,

attached you will find the compled project.

Thanks for your support

Detlef

0 项奖励
Detlef_F_
初学者
981 次查看

Hi Swati,

do you have review my project? What is wrong?

Best regards

Detlef

0 项奖励
Swati_S_Intel1
981 次查看

Hello Detlef,

I tried your app on iOS 8.1 with App Preview 2.3 and it works. What part of the app did not work? Did you build .ipa and is that not working? I haven't tried building .ipa but with App Preview it worked fine.

Swati.

0 项奖励
Detlef_F_
初学者
981 次查看

Hi Swati,

thank you for the answer. I try it an IOS 7.1.2 with IPHONE 4 and all part are not work.
I try it, only with the App Preview.

Greetings
Detlef

0 项奖励
Swati_S_Intel1
981 次查看

Hello Detlef,

I looked at your app, it is started as a webapp (i.e. Standard HTML5 app) and you are trying to use the intel.xdk plugins, they work in emulator and AP, but will not work in built app. All intel.xdk APIs are treated as plugins for Cordova container. So, if you want to use them you have two options.

1) Start your app with HTML5+Cordova template and transfer your code in the new app

or

2) Upgrade your app to Cordova app - on the Projects tab, under Project info there is Upgrade Project option. Click on the Cordova icon and you will be able to convert it into Cordova+HTML5 app

In both the cases make sure you check the Intel XDK device plugin, notification plugin and player plugin (on the right side) under Plugins section on the Projects page. Also, note that notification plugin is deprecated, you are encouraged to use Cordova notification plugin (on the left side of plugin section).

Swati

 

0 项奖励
Detlef_F_
初学者
981 次查看

Hi Swati,

I have built a new app, according to your instructions. And all run perfectly.
Many thanks for your support
.

Detlef

 

0 项奖励
回复