Create JS WebAudioPlugin doesn't fallback to HTMLAudioPlugin Facebook Browser Android 4.4 - web-audio-api

I am currently using the CreateJS suite for audio and various purposes and I am getting an error on the Facebook Browser on Android 4.4 It seems that the WebAudioPlugin isn't supported however it doesn't fallback to HTMLAudio as specified in the CreateJS docs:
"This plugin is the second priority plugin installed by default, after the WebAudioPlugin."
This is currently how I'm registering plugins when they break.
createjs.Sound.registerPlugins([createjs.WebAudioPlugin, createjs.HTMLAudioPlugin]);
However if I change the order it works.
createjs.Sound.registerPlugins([createjs.HTMLAudioPlugin, createjs.WebAudioPlugin]);
I am not entirely sure what impact this has and I'd like to prioritize WebAudio over HTMLAudio so I'm not sure if there are implications like that for changing the order. Is WebAudio still prioritized if I register the plugins in this order? or if not is there a way to ensure that WebAudio falls back to HTMLAudio?

Resolved this by adding my own conditional for Facebook to BrowserDetect as I saw that Createjs doesn't have a check for this in it's isSupported function only standard IOS, Android etc.
BrowserDetect.isFacebookBrowser = (/FBAN/i.test(agent) || /FBAV/i.test(agent) || /FB_IAB/i.test(agent));
By combining this with the Android check you can create a fallback for Facebook on Android.

Related

Plugin nativescript-mapbox is not included in preview app on device

Plugin nativescript-mapbox is not included in preview app on device
tns plugin add nativescript-mapbox
anyone experiencing this?
It means exactly what it says. The Nativescript Preview app only has a limited number of libraries installed, making it usable only for basic, simple apps.
The Preview app comes with a predefined set of NativeScript plugins. If your app > utilizes a plugin that is not present in the Preview app, you will see a warning > message and your app might not work as expected.
tns preview documentation
The best solution while developing your app is to use emulators.
As a side note, from my experience, I've found that the iOS Preview app has more plugins and generally works better.

Media queries in email and Android 5.1+

I'm trying to use a very simple media query, but looks like I'm missing something. My code seems to work in most clients, but when testing in litmus, from and above Android 5.1 I see that my media query is ignored.
I tried to make the most basic example, which can be found here: https://litmus.com/builder/b46c315
Any idea what I might be doing wrong, or how else to achieve to target these android devices with specific styles?
Android stopped supporting media queries after version 4.4.
If you are testing in litmus you will notice that media queries dont work in android 5.1 and 6.0
This caused all kinds of problems for me and I have now switched to a Hybrid template base for html emails that react responsively without the use of media queries.
The Android device on Android (not 4.4) is gmail app. Google has stopped shipping Android with its own email client and made Gmail App as the default app.
To test on Android you can use Outlook.com app but i has limited functionality compared to Android's original app or iOS.

detect if the current browser supports Unity 3D webplayer

I'm looking for a script that will detect if the current browser supports Unity3D's WebPlayer?
I've tried using progress.pluginStatus to detect the state "unsupported" but it never returns anything, it doesn't work. Any ideas?
Unity WebPlayer depends on NPAPI to run on Web Browsers. Chrome has removed NPAPI few years ago.
Firefox will remove NPAPI by the end of 2016. This will decrease your audience by more than 70 percent.
To make it worse, WebPlayer is now removed from Unity 5.4 and above.
Use WebGL. Unity supports build for WebGL and it runs on most used Browsers.
Now, to answer your question, there is no API to detect if NPAPI is enabled or not. The trick to do this is to check the version of the Web Browser. This you can use to determine if that version of browser supports NPAPI or not.
So, you have to do a reserach yourself and find out which web broswer version for each web browser disabled NPAPI.

Android Facebook login dialog opens without any styling

I am using the Cordova official Facebook plugin and run into a weird issue...
The login process, which previously worked just fine for me, is now open in some native Android "black-screen" view without any styling.
The functionality works just fine - the authentication process succeeds, so there is a consistent connection with Facebook. The thing is, I am expecting a Facebook view instead of only the text content without any styling. Here is an example with Facebook native Hackbook app:
Tried running on two different devices - the issue remains.
Tried with cordova 2.2.0, then started a fresh project with 2.5.0 - the issue remains.
Please advice.
UPDATE:
Well, I have spent too much time on this issue, and it seems like this is the new Facebook SDK for Android.
I really wish I am wrong here, but here are examples from Facebook's flow for Android:
https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/
Also - when checking the other sample apps in the SDK, all of them behave the same. The only one that shows a Facebook page is the Hackbook, and by it might be because this app is implemented with the old API (version 2):
https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/
Hackbook: another sample app demonstrating a selection of Graph API calls. Note that this sample is untouched from v2.0 of the SDK, and demonsrates the SDK's backward-compatibility.
UPDATE 2:
Ok, digging a bit more into it, it seems that there is no iframe involved here, the screen can be changed as you wish with a regular android activity theme added to the activity.
Here is an example of adding one of Androids default themes to the androidMenifest.xml (you can of course create your own Faceboke like theme ):
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:label="#string/facebook_login" />

Detect which version of an app is installed in iOS?

I understand it's possible to Detecting programmatically whether an app is installed on iPhone . I'm wondering if it's possible to detect what version of the other app is installed?
My app has a dependency on the Facebook native client, but behaves pretty badly if the phone has an older version of the Facebook app installed. So I'd like to be able to detect that and warn users.
-- UPDATE --
It's being implied in the comments that I can prevent users from installing my app in the first place if the appropriate version of the dependent app is not present. That would be a great solution too. If you know how I can specify a dependency on another app's version number, please explain that.
Unfortunately, you can not read your iOS device settings programmatically to get the native app Facebook version (i.e. via Settings, Facebook, Version).
Nevertheless, you might try to experiment with the custom URL schemes for Facebook as you noted in your own question.
It seems the different versions of the native Facebook application either support/does not support its own custom URL schemes.
As noted here from version 3.4, you can:
fb://places
From version 4.0, as noted here, you can:
fb://place/(fbid)
etc.

Categories