how to show showBusyIndicator into xdk html5 hybrid application? - intel-xdk

i added the cordova-notification plugin into intel-xdk appication, when try to show the indicator i get this error:
Uncaught TypeError: Cannot read property 'showBusyIndicator' of undefined
this is the code:
$(document).on("change","#sel_produttori", function(evt)
{
intel.xdk.notification.showBusyIndicator();
});
maybe it is strange the plugin is listed in the first window but not in the second one.

Many of the 'intel.xdk' plugins have been or are being deprecated in favor of their standard core Cordova counterparts. I would recommend using that instead.
The problem you're running into appears to be that you've included the standard Cordova notification plugin, but you're trying to access the intel.xdk notification plugin, which is not included and therefore doesn't exist in your app.
It looks like the corresponding method on the standard Cordova Notification plugin was deprecated some time back and isn't there anymore. You might want to try a plugin like this:
https://github.com/filfat-Studios-AB/cordova-plugin-spinnerdialog
It seems to work for me but, as always, use at your own risk.

Related

$(...).datetimepicker is not a function when use converse.js

I want to implement XMPP chat functionality in my system using converse.js for client side chat interface. but when i use converse.js in my layout page, browser showing me error like
$(...).datetimepicker is not a function
$(...).dataTable is not a function.
I have used bootstrap datetimepicker and datatables. It seems like jquery conflictions.
I have tried to resolve conflictions by changing place of some jquery files. but i didn't get success. So how can i remove conflictions?
EDIT: As of version 3.0.1 this shouldn't be an issue anymore. In previous builds the $.noConflict call wasn't being made. This is now fixed in 3.0.1. If you're using an older version, then the text below is still relevant.
Converse.js comes bundled with jQuery. It uses jQuery's noConflict method to relinquish control of the $ variable and therefore to avoid conflicts with other versions of jQuery, but apparently this doesn't always work reliably.
There are a few things you can try:
Load converse.js before all your other JS libraries.
Alternatively, drop your own jQuery and instead use the one included in converse.js. You can access it via converse.env.jQuery.
Or alternatively use the converse.js bundle that doesn't include jQuery: https://cdn.conversejs.org/dist/converse-no-jquery.min.js

Getting error trying to use UnityEngine.Security.LoadAndVerifyAssembly()

I'm using Unity version 5.5.0f3 and getting an error during development. It's showing an error on this line of code:
var assembly = Security.LoadAndVerifyAssembly(www.bytes);
The error message I'm getting:
UnityEngine.Security.LoadAndVerifyAssembly(byte[])' is obsolete:This was an internal method which is no longer used'
As per the documentation, this method is used by the Web Player. However:
Note that web player is not supported from 5.4.0, so this function no longer serves a purpose and will be deprecated.
If you really want to continue using this method, you can try downloading a prior version of Unity from the Download Archive - though I would recommend against working on Web Player projects since they will become even more difficult to maintain going forward without official support.

My Ionic app throws a "has no method 'startInit'" error when using OneSignal

In my Ionic smart phone app, I'm using OneSignal to handle push notifications. According to some OneSignal docs, I need to initialize their plugin like this:
window.plugins.OneSignal.init(
"b2f7f966-d8cc-11e4-bed1-df8f05be55ba",
{googleProjectNumber: "703322744261"},
notificationOpenedCallback
);
This works for me. But other documentation says I should do this:
window.plugins.OneSignal
.startInit("YOUR_APPID", "YOUR_GOOGLE_PROJECT_NUMBER_IF_ANDROID")
.handleNotificationReceived(function(jsonData) {
alert("Notification received:\n" + JSON.stringify(jsonData));
console.log('Did I receive a notification: ' + JSON.stringify(jsonData));
})
.endInit();
This is what I would prefer to do, since I really want that "handleNotificationReceived" option, not just the "notificationOpenedCallback" option. But it's not working for me. I get a Javascript error saying the method "startInit" doesn't exist in the "window.plugins.OneSignal" object. It's right. There is no method "startInit", so how can I use the code that calls it?
So what am I doing wrong? Am I not using the latest version of OneSignal? I just ran "ionic plugin add onesignal-cordova-plugin --save", so I should be using their latest version. (It installs version ~1.13.2, according to my config.xml).
How can I fix this?
The newer 2.+ version of the SDK is not out yet. You should refer to the old docs for this here
EDIT
The new version of the SDK is now out and you can get it here. Also new docs are here.
Was getting the same issue. You could try reinstalling the plugins or add the platform again android/ios. That worked for me.

Facebook page is not loading properly in mx:html (Adobe AIR) outside IDE

Adobe AIR application which was working perfectly earlier; is not working now. No idea whether it is due to any recent change in Facebook or Adobe AIR.
I have added the component mx:HTML to display http://facebook.com content. In the development environment (Flash Builder 4.5) after logging in facebook successfully; I can see the TimeLine contents and updates properly. But after build when executed outside the IDE; I am able to login facebook but the timeline or updates are not being displayed properly.
Anybody facing similar issue and has a fix; please provide the solution.
uncaughtScriptException gives following two errors...
TypeError: Result of expression 'bigPipe' [undefined] is not an object.
ReferenceError: Can't find variable: console
I have similar issue, if you catch the javascript errors you will notice that facebook is using some library that fails in AIR, then if you google that exact error you will find similar issues. My solution was to use the FB API and reimplement the functionality(in my case share) , other alternatives is to fix that library or FB code to make it work. I don't remember the details but I fixed it a week ago.
Check the docs for catching the JS errors uncaughtScriptException
I am wondering if that library has code for each browser that it supports and on AIR it fails, maybe changing useragent will help, you need to check the javascript code to see where it fails

The method FB.JSON.parse is not officially supported by Facebook and access to it will soon be removed.

I got this warning message on Chrome whith My facebook application.
The method FB.JSON.parse is not officially supported by Facebook and access to it will soon be removed.
and
The method FB.JSON.stringify is not officially supported by Facebook and access to it will soon be removed.
When this flash is loaded this message appears.
I'm using Facebook Flash AS3 API 1.8.1, SWFObject 2.2.
What does it mean ?
Test here (facebook test): https://apps.facebook.com/vuvuzelagame/
Thanks.
I have the same error on my application.
As you probably know, the Facebook AS3 API calls JavaScript functions to communicate with FB, and, as Baris says, this error is a warning that one of those JS functions that it calls is deprecated and will soon be removed.
You can safely ignore it for the present. Hopefully the API will be updated before the function is actually deprecated, otherwise we may get a breaking bug rather than just a warning. I'm going to keep an eye out for updates to the API and upgrade my code as soon as one is released.
Or, if you're feeling really brave, you can go digging in the API source and fix the issue yourself :)
A few days ago, many flash apps suddenly stopped working, if you have this problem follow this steps:
If you are using GraphAPI_Web_1_8_1.swc delete it
Download the modified graph API from here
Paste those folders on your library, if you had the facebook folder overwrite it
Publish your project
This problem started when facebook changed its file http://connect.facebook.net/en_US/all.js in a way that all the calls made from the AS3 file FacebookJSBridge.as must be changed from FB.JSON to just JSON.
(Source)
FB.JSON.stringify is that a javascript function or actionscript function?
In flash if you are targetting flash player 11 and up you can just use JSON.parse and JSON.stringify, or you can use the JSON class in the com.adobe.serialization package.
If that is a javascript method, just get a json library from the web.
The error just means facebook is no longer supporting/updating that function and they will remove it. It will stop working soon so you should replace your usages of it with something else.