No audio Media plugin using Phonegap Build on Android

I am building an application that includes reliable audio playback in all of our target platforms and intended to use the media for this task plugin.  I was previously using the native object Javascript Audio, that seemed to work well on some Android devices, but did not work at all on others.  I have implemented the Media plugin in my project, but this day don't have not yet to have successfully play back audio on any of my devices to test and try to identify what I am doing wrong.

My application should hopefully also run on a desktop browser, so I have a 'phonegap sniffer' in my javascript.  From there, we either start the application on the events of deviceready on mobile devices or document.ready on desktop devices, which seems to work well.

var is_phonegap = navigator.userAgent.match (/ (iPhone: iPod: iPad |)) Android | BlackBerry | (IEMobile) /); USE DATA USERAGENT TO GUESS AT IF IT IS A DESKTOP APP PHONEGAP BROWSER OR HAS

IMPLEMENT THE APPELLANTS TO THE DEVICE_READY FUNCTION: ADD EVENT LISTENER FOR PHONEGAP AND ADD DOCUMENT. READY FOR THE DESKTOP

If (is_phonegap) document.addEventListener ('deviceready', device_ready, false);

else $(document) .ready (device_ready);

function device_ready() {}

Console.log ("is phonegap? ' + (is_phonegap)? 'true': 'false'");

...

}

All the sound elements within the app are called by a function of play_sound:

function play_sound (audio_file) {}

var path = ' audio /' + audio_file;

If (is_phonegap) var audio = new Media (path, null, media_error); IF IT IS AN APPLICATION, USE THE MEDIA PROVIDED BY THE PHONEGAP PLUGIN OBJECT

else var audio = Audio new ("audio /' + audio_file"); IF IT IS ON THE DESKTOP, USE THE AUDIO OBJECT PROVIDED BY CORE JAVASCRIPT

Console.log ("audio:" + JSON.stringify (audio)); INSPECT THE AUDIO OBJECT TO SEE WHAT IT LOOKS LIKE

audio. Play(); PLAY THE SOUND

}

Since the media Builder allows an onError callback, I configure that as well:

function media_error (e) {}

Console.log ("media error:" + JSON.stringify (e)) ;// CHECK the ERROR TO SEE what IT LOOKS LIKE

}

I'm testing by running Phonegap Dev on an android device connected to Phonegap Office so that I can make use of console.log debug messages.  When I run the application and try to play a sound, I get the following output:

is phonegap? true

try to play the audio file: audio / shuffle.mp3 / / THIS FILE IS LOCATED IN THE/WWW/AUDIO/SHUFFLE PROJECT. MP3

Media error: {"code": 1} / / this IS THE output OF THE MEDIA ERROR HANDLER

I have ready in several discussions on the Media on Android plugin requirements of additional paths and believe that I have implemented the recommended solution (by Audio doesn't work for Build Android), but this does not help things.  I have changed the above to:


function play_sound (audio_file) {}

var path = platform_specific_audio_path ("audio /' + audio_file"); / / RUN PATH THROUGH PLATFORM FUNCTION

If (is_phonegap) var audio = new Media (path, null, media_error);

else var audio = Audio new ("audio /' + audio_file");

Console.log ("audio:" + JSON.stringify (audio));

audio. Play();

}

function platform_specific_audio_path (file) {}

If (typeof peripheral == "undefined") return files;

return (device.platform.toLowerCase () == 'android')? "" / android_asset/www / "+ file: file;

}

Use this version of the code displays the following:

try to play the audio file: /android_asset/www/audio/shuffle.mp3

Media error: {"code": 1}

It seems that I am getting the same result of error of one of these paths.  I guess that's a path issue but are still to confirm it somehow.  I'm not familiar with how files are built within the app.  Is there a solution for this or can anyone identify what am I doing wrong?  Thanks a lot for any assistance.

In light of your comment, you use the developer PhoneGap app in your workflow. It is the root of the problem you are experiencing. Using the Desktop App PG or 'phonegap serve' changes nothing (and it should be noted that none of these applications actually build your application.) They serve only the files using a web server.)

The PhoneGap developer App is the app that run you on your mobile device to connect to PhoneGap Desktop App or "phonegap serving." It comes prebuilt with a selection of plugins, including the Media plugin. So why you can instantiate the class of media and see the properties and methods. Verification of the existence of these properties and methods only serves to check if the plugin is installed, not if the plugin will work correctly.

In view of your code and the associated error message, you are trying to read a property grouped the app file. When your application is running in the application of the PhoneGap developer, however, no mechanism exists to physically push assets being served in assets grouped Application Developer PG. As a result, demand for game fails because the file is not found.

A temporary workaround solution just to check that you can, indeed, play a media file would be to change the path to something like this:

    http://dev-machine-IP-address:PG - use-port/www/shuffle.mp3

However, this is not what you'll want to have long-term in the production code. Instead, you must create a version of your application that you can run it directly (without using the App Developer PG or PhoneGap Serve).

To do this, you can run (with your Android device, attached and assuming you have the Android SDK installed correctly):

phonegap $ run android

This should create a version of your application, including your multimedia files in the bundle and then run it on your device. You should then be able to play multimedia files that you try now.

Otherwise, you can use the service of Cloud Computing to the PhoneGap Build to create a version of the app:

Android construction distance phonegap $

You can download the application resulting on your phone and it should work as well.

Long-story-short: the developer PhoneGap App isn't a perfect representation of the environment that will receive your built apps. Do not rely on the PG Dev App to simulate an environment perfectly. at one point, the only real criterion is to build your application and install it on a device.

Hope that helps.

Tags: PhoneGap

Similar Questions

  • Use PhoneGap Build for existing products updated iOS app

    I am not an expert in using PhoneGap and I have no experience with PhoneGap Build, but I have an existing iOS application that has been created/updated and with PhoneGap/Cordova (3.3.0) 2 years ago.

    There is a hypertext link in the application to an external site and this link should be updated as soon as possible. After changing the outdated link in index.html file, I would be able to download the contents of the existing www folder (update: 2 years ago) to PhoneGap Build without additional modification?

    I intend to make the most important updates to the application this month and want to know more about PhoneGap and the features available, but for now, I need to try to update the broken link soon-to-be as quickly as possible.

    Thanks for your help

    It should work - even if it is difficult to ensure that the application built on PhoneGap Build all the same exact behavior than the one originally responsible. We do not know which resembled the original developer environment. Having said that - give it a shot. You will need to include the config.xml file, and I would recommend affecting the PhoneGap 3.3.0 version for now:

    Make your small update and test your application on a device to ensure that always, it behaves as expected. Note, however, that I don't expect 3.3.0 to be supported on PhoneGap Build for much longer (see the supported versions here).

  • Take CC of Dreamweaver by creating Windows Phone 8 applications using Phonegap build?

    A blog entry by Adobe indicates Yes. But I can't find any confirmation of this in the menus in Dreamweaver CC or the docs.

    Thank you

    Ross

    Hi skidog64,

    Here's a similar post on the forum where the PhoneGap team responded by saying that they could support later this year (q3 or q4), but currently not supported.

    http://community.PhoneGap.com/Nitobi/topics/when_will_windows_8_be_supported_as_a_target_o n_phonegap_build

    Thank you

    Preran

  • iTunes fails to install the created PhoneGap Build .ipa file

    I used PhoneGap Build to create a .ipa file signed.   However, iTunes is not able to install it on my iPod Touch which is running iOS 9.3.4.   When I start to synchronize the device it goes through the process of installation of the application, but then the application icon disappears and no error message is displayed.   Any suggestions on how to figure out what might be wrong.   I use the latest version of PhoneGap - cli - 6.3.0 (4.2.0 / 5.2.1 / 4.4.1)   My application ID is 2214031.

    Yes.

    The distribution certificate allows you to download from the AppStore. Apps can only be downloaded and installed from there, then.

    If you want to install on your device to directly test a .ipa, there a development certificate, the devices registered (in your account of Apple developers) and a mobileprovision with these included devices.

  • PhoneGap build - where to put application icons and splashscreen files

    As build phonegap says to download only www.zip folder so I'm not able to understand where I should put the icons and the splashscreen for each platform folder. Should I put inside www?

    The reason for asking this question is that if we're supposed to keep the icons and splash inside www only so my application will become very heavy icons and useless and splash screen files will be added in my app that my application is cross-platform supported and I have included icons and splash for all platforms.

    If we are working offline (phonegap cli) then we used to keep files inside "res" outside the folder "www" and cordova build process automatically copy only specific platform icons and splash screen files, but here, it will add all the files even some of then are no longer required for the selected platform. Please let me know if one any idea on this subject.

    a. When you use Phonegap Build, your icons and splash are anywhere you want. BMP does not require a specific directory of your zip file structure. Neither requires a naming scheme.

    The best is:

    -have index.html and config.xml icon.png in the root directory of your zip

    -all the rest well organized, have you like

    -Make sure the paths in your config file are completely correct.

    For example:

    / index.html

    / config. XML

    Icon.PNG

    /myOtherPages/Page2.html

    /myOtherPages/page3.html

    /myOtherPages/page4.html

    / myOtherPages /...

    /myIcons/icon60.PNG

    /myIcons/icon90.PNG

    /myIcons/icon120.PNG

    / myIcons /...

    /mySplashes/splash320x480.PNG

    /mySplashes/splash480x320.PNG

    / mySplashes /...

    / myJavascriptfiles /...

    / myCSSfiles /...

    / myGraphics /...

    (b) make use of the file .pgbomit what is called to say a BMP to include only the directories and files that are required for each operating system.

    See the section commissioning of the BMPS documentation:

    Getting started | PhoneGap Docs

  • PhoneGap Build just for subscribers?

    Hello!

    I test DW CC 2014 and when I try to use Phonegap Build it takes me to the download page, where it says it's only for subscribers.

    I tried to download using the creative cloud, but nothing happened, error or message.

    Anyway is to test it on CC 2014?


    Thank you.

    Hi husker84,

    I confirmed with the product team that the Add On is available only to paid subscribers.

    Thank you

    Preran

  • How to use Phonegap Plugin?

    I am a new mobile developer.

    I can make mobile app but I don't use the plugin in dreamweaver. How should I use?
    Can you explain step by step?
    I couldn't find the source on this subject on the internet

    Thank you.

    Dreamweaver CS5.5 and CS6 had built-in support for PhoneGap, but this has been abandoned since Dreamweaver CC because frequent updates to PhoneGap made it impossible for Dreamweaver keep pace. If you want to use PhoneGap, you can create your mobile application in Dreamweaver, but you must download the files Adobe PhoneGap build to compile them.

  • PhoneGap Build plugin Don t work

    I m using edge Code CC on my mac. The work of Don t Phonegap Build plugin. I have can´t send files or anything like that.

    Thank you

    Alex

    Hi Alex, unfortunately it is a problem known as of now. I am hoping to update the plugin this week, so it does not work with new versions of Code of edge and consoles.

    = Ryan

    [email protected]

  • How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Hi all

    How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Thank you all

    Here is a link to the documentation specifically: http://docs.phonegap.com/en/2.6.0/guide_plugin-development_index.md.html

    We will update the things little when we adopt a more close relationship with Cordova.

  • audio media player 12 is distorted when I play *. AVI files

    audio media player 12 is distorted when I play *. AVI files - video is ok, noise is not

    Hello

    Codecs: Frequently asked questions
    http://Windows.Microsoft.com/en-us/Windows7/codecs-frequently-asked-questions

    All you need is good Codec - get these if 32-bit.

    -Free - CCCP also get free tool of insurgents
    http://CCCP-project.NET/

    FFDSHOW - free
    http://sourceforge.NET/projects/ffdshow/

    Check here:

    Plug-ins for Windows Media Player
    http://www.Microsoft.com/windows/windowsmedia/player/plugins.aspx

    ---------------------------------------

    VLC needs, of no use so usually Codec as a backup when asked to support associations of files just say no.

    VLC - free
    http://www.videolan.org/VLC/

    -------------------------------------------------------------

    If 64 bits and you need codec.

    Read this 1st and go that route, or use the one below. (Vista or Windows 7)

    http://www.Vistax64.com/sound-audio/152850-Vista-codec-pack-32bit-64bit-Media-Player-codecs.html

    --------------------------------------------------------------------

    If 64-bit - can run WMP in 32 or 64 bit mode.

    Or try these: download - SAVE - go to the place where your put them RIGHT CLICK – RUN AS ADMIN.

    For 32-bit use these - OR the 32 bit ones listed above which I prefer.

    K - Lite Codec Pack 8.0.8 (or newer)
    http://www.codecguide.com/

    Use them for 64-bit:

    K - Lite Codec Pack 5.5.0 (64-bit) (or newer)
    http://www.codecguide.com/

    -------------------------------------------------------------

    You know that you use WMP 32 or 64

    Change, modify or value 64-bit Windows Media Player 11 (WMP11) in Windows Vista x 64 as default (or WMP12 - Windows7)
    http://www.mydigitallife.info/2007/01/19/switch-change-or-set-64-bit-Windows-Media-Player-11-WMP11-in-Windows-Vista-x64-as-default/

    -------------------------------------------------------------

    And you can use it when necessary because no codex is usually required.

    VideoLAN - VLC media player
    http://www.videolan.org/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • PhoneGap build problem with Graple, Pushplugin, and Safariviewcontroller

    Hi all

    I am facing a few problems these days when I Isaiah to compile my app for Android. The following Exception exhibits after the build:

    : preDexRelease

    : dexRelease

    UNEXPECTED TOP LEVEL EXCEPTION:

    com.android.dex.DexException: multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$ AccessibilityServ iceInfoVersionImpl;

    at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591)

    at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546)

    at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528)

    at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)

    at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)

    at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)

    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)

    at com.android.dx.command.dexer.Main.run(Main.java:277)

    at com.android.dx.command.dexer.Main.main(Main.java:245)

    at com.android.dx.command.Main.main(Main.java:106)

    FAILED

    But last week, all was fine. In one of my tests, I noticed that if I remove one of these plugins below, the build works:

    < name of the ditch: plugin = "cordova-plugin-safariviewcontroller" source = "MNP" / >

    < name = "com.phonegap.plugins.pushplugin plugin" spec = "2.5.0" source = "CDP" / > "

    Some people on the internet told me that I have to remove the support for v4. Just as this topic on stackoverflow: android - multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat - battery on...

    But is it possible to exclude dependence on config.xmlv4, so I can build on the website phonegap without problems?

    Thank you for your attention.

    Wiliam.

    Source plugins bmp - they are old and obsolete. Use instead of the MUSEUM: phonegap-plugin-push

    In addition, SafariViewController should be does not interfere somehow, since it is not supported on Android (it is iOS only).

    Also, make sure to pin your app to a specific version of BMPS. See: Adobe Build PhoneGap

  • Conflict beetween cordova-plugin-facebook4 &amp; cordova-plugin-facebook4 phonegap-plugin-push

    Hello

    I've been using Phonegap to build for a couple of years and it's a great tool. It is the first time that I can't understand what is happening.

    If I add the following plugins, one at a time the construction is successful, but if I put all the build fails

    1. Cordova-plugin-facebook4
    2. PhoneGap-plugin-push

    Here is my file config.xml

    <? XML version = "1.0" encoding = "UTF-8" standalone = "yes"? >

    < widget id = "com.x.x" version = "1.0.1" xmlns =" " http://www.w3.org/ns/widgets "xmlns:gap =" " http://PhoneGap.com/ns/1.0 "versionCode ="1"> "

    < name > X < / name >

    < description >

    App Móvil del Lider for sale Electronica

    < / description >

    " < author email = ' [email protected] "href =" http://www.x.com.ar/ ">

    x

    < / author >

    " < author href = ' http://www.x.com.ar/ "email =" " [email protected] "> "

    x

    < / author >

    < src = "index.html" / content >

    < access origin = "*" / >

    < name of option = "webviewbounce" value = "false" / >

    < name of option = "UIWebViewBounce" value = "false" / >

    < name of option = "DisallowOverscroll" value = "true" / >

    < name of option = "android-minSdkVersion" value = "16" / >

    < name of option = "BackupWebStorage" value = "none" / >

    < name of option = "phonegap-version" value = "cli - 5.2.0" / >

    < name of option = value "android-build-tool" = "gradle" / >

    < src = "icon.png icon" / > "

    "< src="res/icon/android/icon-36-ldpi.png icon "gap: platform = gap: qualifier 'android' ="ldpi"/ >

    "< src="res/icon/android/icon-48-mdpi.png icon "gap: platform = gap: qualifier"android"="mdpi"/ >

    "< src="res/icon/android/icon-72-hdpi.png icon "gap: platform = gap: qualifier 'android' ="hdpi"/ >

    "< src="res/icon/android/icon-96-xhdpi.png icon "gap: platform = gap: qualifier 'android' ="xhdpi"/ >

    "< src="res/icon/ios/icon-57.png icon "gap: platform ="ios"width ="57"height ="57"/ >

    "< icon src="res/icon/ios/icon-72.png "gap: platform ="ios"width ="72"height ="72"/ >

    "< src="res/icon/ios/icon-57-2x.png icon "gap: platform ="ios"width ="114"height ="114"/ >

    "< src="res/icon/ios/icon-72-2x.png icon "gap: platform ="ios"width ="144"height ="144"/ >

    "< icon src="res/icon/ios/icon-certify-76.png "gap: platform ="ios"width ="76"height ="76"/ >

    "< src="res/icon/ios/icon-certify-120.png icon "gap: platform ="ios"width ="120"height ="120"/ >

    "< src="res/icon/ios/icon-certify-152.png icon "gap: platform ="ios"width ="152"height ="152"/ >

    < name of option = "SplashScreen" value = "none" / >

    <!-set the screen for starting application for each platform. ->

    "< src="res/screen/android/screen-ldpi-portrait.png gap: splash "gap: platform = gap: qualifier 'android' ="port-ldpi"/ >

    "< src="res/screen/android/screen-mdpi-portrait.png gap: splash "gap: platform = gap: qualifier 'android' ="port-mdpi"/ >

    "< src="res/screen/android/screen-hdpi-portrait.png gap: splash "gap: platform = gap: qualifier 'android' ="port-hdpi"/ >

    "< src="res/screen/android/screen-xhdpi-portrait.png gap: splash "gap: platform = gap: qualifier 'android' ="port-xhdpi"/ >

    "< src="res/screen/blackberry/screen-225.png gap: splash "gap: platform ="blackberry"/ >

    "< src="res/screen/ios/screen-iphone-portrait.png gap: splash "gap: platform ="ios"width ="320"height ="480"/ >

    "< src="res/screen/ios/screen-iphone-portrait-2x.png gap: splash "gap: platform ="ios"width ="640"height ="960"/ >

    "< src="res/screen/ios/screen-iphone-portrait-568h-2x.png gap: splash "gap: platform ="ios"width ="640"height ="1136"/ >

    "< src="res/screen/ios/screen-ipad-portrait.png gap: splash "gap: platform ="ios"width ="768"height ="1024"/ >

    "< src="res/screen/ios/screen-ipad-landscape.png gap: splash "gap: platform ="ios"width ="1024"height ="768"/ >

    "< src="res/screen/windows-phone/screen-portrait.jpg gap: splash "gap: platform ="winphone"/ >

    < src = "" splash.png gap: splash "/ >"

    < name of the function "Θtat bar" = >

    < param name = 'ios-package' value = 'CDVStatusBar"onload ="true"/ >

    < / fiction >

    < access origin = "*" / >

    <! - added the following intentions to support the withdrawal of the code of the white base cordova to a plugin list - >

    <!-white list configuration. Refer to -> https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html

    < name of the ditch: plugin = "cordova-plugin-whitelist" version = "1.2.2" source = "MNP" / >

    " < allow intention href = ' http://*/* "/>

    " < allow intention href = ' https://*/* "/>

    < allow intention href = "Tel: *" / >

    < allow intention href = "sms: *" / >

    < allow intention href = "mailto:*" / >

    < allow intention href = "geo: *" / >

    < platform name = "android" >

    < allow intention href = "market: *" / >

    < / platform >

    < platform name = "ios" >

    < allow intention href = "itms: *" / >

    < allow intention href = "itms-apps: *" / >

    < / platform >

    < name = "com.telerik.plugins.nativepagetransitions plugin" source = "MNP" / > "

    < name of the ditch: plugin = "cordova-plugin-x-socialsharing" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-inappbrowser" source = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-facebook4' source = 'MNP' version = "1.7.4" >

    < param name = "APP_ID" value = "X" / >

    < param name = 'APP_NAME' value = 'X' / >

    < / gap: plugin >

    < name of the ditch: plugin = 'phonegap-plugin-push' source = 'MNP' version = "1.5.3" >

    < param name = "SENDER_ID" value = "X" / >

    < / gap: plugin >

    < gap: plugin name = "org.apache.cordova.device" / > "

    < name of the ditch: plugin = "cordova-plugin-x-toast" source = "MNP" / >

    < name of the ditch: plugin = "Ionic-plugin-keyboard" version = "2.1.0" source = "MNP" / >

    < / widget >

    And the error log is the following. Can someone help me? Thanks in advance

    Construction date: 2016-10-01 18:06:18 + 0000

    --------------------------------------------------------------------------------

    OUTPUT OF THE PLUGIN

    --------------------------------------------------------------------------------

    Installation of "org.apache.cordova.device" to "0.3.0" for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    Retrieve the plugin "[email protected]" through the Museum

    Installation "cordova-plugin-whitelist" to "1.2.2" for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    This plugin is applicable for versions of cordova-android higher than 4.0. If you have an earlier version of the platform, you do * not * need this plugin because the white list will be built.

    Retrieve the "cordova-plugin-x-socialsharing" plugin via the NPM

    Installation "cordova-plugin-x-socialsharing" to "5.1.3" for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    Retrieve the "cordova-plugin-inappbrowser" plugin via the NPM

    Installation "cordova-plugin-inappbrowser" to "1.5.0" for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    Retrieve the plugin "[email protected]" through the Museum

    Installation "cordova-plugin-facebook4' to '1.7.4" for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    Retrieve the plugin "[email protected]" through the Museum

    Installation 'phonegap-plugin-push' to '1.5.3"for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    Retrieve the "cordova-plugin-x-toast" plugin through the Museum

    Installation "cordova-plugin-x-toast" to "2.5.2" for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    Retrieve the plugin "[email protected]" through the Museum

    Installation 'Ionic-plugin-keyboard""2.1.0"for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    Retrieve the plugin "com.telerik.plugins.nativepagetransitions" through the Museum

    Installation of "com.telerik.plugins.nativepagetransitions" to "0.6.5" for android

    Using this version of Cordoba with an older version of cordova-android is removed. Consider the upgrade to [email protected] or newer.

    --------------------------------------------------------------------------------

    COMPILATION OUTPUT

    --------------------------------------------------------------------------------

    Build the option-"unrecognized (ignore).

    Running: / project/gradlew cdvBuildDebug b /project/build.gradle-Dorg.gradle.daemon=true - PcdvBuildMultipleApks = false - PcdvVersionCode = 1

    Configuration on demand is a function of incubation.

    : stretch

    : compileDebugNdk

    : preDebugBuild

    : checkDebugManifest

    : preReleaseBuild

    : CordovaLib:compileLint

    : CordovaLib:copyDebugLint updated

    : CordovaLib:mergeDebugProguardFiles

    : CordovaLib:preBuild

    : CordovaLib:preDebugBuild

    : CordovaLib:checkDebugManifest

    : CordovaLib:prepareDebugDependencies

    : CordovaLib:compileDebugAidl

    : CordovaLib:compileDebugRenderscript

    : CordovaLib:generateDebugBuildConfig

    : CordovaLib:generateDebugAssets updated

    : CordovaLib:mergeDebugAssets

    : CordovaLib:generateDebugResValues

    : CordovaLib:generateDebugResources

    : CordovaLib:packageDebugResources

    : CordovaLib:processDebugManifest

    : CordovaLib:processDebugResources

    : CordovaLib:generateDebugSources

    : CordovaLib:compileDebugJavaNote: entry files use or replace an obsolete API.

    Note: Recompile with - Xlint: deprecation for more details.

    : CordovaLib:processDebugJavaRes updated

    : CordovaLib:packageDebugJar

    : CordovaLib:compileDebugNdk

    : CordovaLib:packageDebugJniLibs updated

    : CordovaLib:packageDebugLocalJar updated

    : CordovaLib:packageDebugRenderscript updated

    : CordovaLib:bundleDebug

    : CordovaLib:copyReleaseLint updated

    : CordovaLib:mergeReleaseProguardFiles

    : CordovaLib:preReleaseBuild

    : CordovaLib:checkReleaseManifest

    : CordovaLib:prepareReleaseDependencies

    : CordovaLib:compileReleaseAidl

    : CordovaLib:compileReleaseRenderscript

    : CordovaLib:generateReleaseBuildConfig

    : CordovaLib:generateReleaseAssets updated

    : CordovaLib:mergeReleaseAssets

    : CordovaLib:generateReleaseResValues

    : CordovaLib:generateReleaseResources

    : CordovaLib:packageReleaseResources

    : CordovaLib:processReleaseManifest

    : CordovaLib:processReleaseResources

    : CordovaLib:generateReleaseSources

    : CordovaLib:compileReleaseJavaNote: entry files use or replace an obsolete API.

    Note: Recompile with - Xlint: deprecation for more details.

    : CordovaLib:processReleaseJavaRes updated

    : CordovaLib:packageReleaseJar

    : CordovaLib:compileReleaseNdk

    : CordovaLib:packageReleaseJniLibs updated

    : CordovaLib:packageReleaseLocalJar updated

    : CordovaLib:packageReleaseRenderscript updated

    : CordovaLib:bundleRelease

    : prepareComAndroidSupportCardviewV72340Library

    : prepareComAndroidSupportCustomtabs2340Library

    : prepareComAndroidSupportSupportV132340Library

    : prepareComAndroidSupportSupportV42340Library

    : prepareComFacebookAndroidFacebookAndroidSdk4141Library

    : prepareComGoogleAndroidGmsPlayServicesBase940Library

    : prepareComGoogleAndroidGmsPlayServicesBasement940Library

    : prepareComGoogleAndroidGmsPlayServicesGcm940Library

    : prepareComGoogleAndroidGmsPlayServicesIid940Library

    : prepareComGoogleAndroidGmsPlayServicesTasks940Library

    : prepareProjectCordovaLibUnspecifiedDebugLibrary

    : prepareDebugDependencies

    : compileDebugAidl

    : compileDebugRenderscript

    : generateDebugBuildConfig

    : generateDebugAssets updated

    : mergeDebugAssets

    : generateDebugResValues

    : generateDebugResources

    : mergeDebugResources

    : processDebugManifest

    : processDebugResourcesWarning: AndroidManifest.xml sets already debuggable (in http://schemas.android.com/apk/res/android); with existing value in manifest.

    Failure of the generation of table of resources to do a separation "

    /Project/build/intermediates/RES/debug/values-v23/values.XML:6: error: error: no resource only for the name found (at 'cardBackgroundColor' with value '? android: attr / colorBackgroundFloating').

    FAILED

    FAILED: Build failed with an exception.

    * What went wrong:

    The execution of the task failed ': ' processDebugResources.

    > com.android.ide.common.internal.LoggedErrorException: unable to run the command:

    /Android-SDK/build-tools/24.0.1/AAPT package - f - no - crunch - I /android-sdk/platforms/android-22/android.jar - M /project/build/intermediates/manifests/full/debug/AndroidManifest.xml s/project/build/intermediates/res/debug - a/project/build/intermediates/assets/debug m-J/project/build/generated/source/r/debug f /project/build/intermediates/res/resources-debug.ap_--debug mode - custom package com.rii.test - 0 apk - output-text-symbols/project/build/intermediates/symbols/debug

    Error code:

    1

    Output:

    Warning: AndroidManifest.xml sets already debuggable (in http://schemas.android.com/apk/res/android); with existing value in manifest.

    Failure of the generation of table of resources to do a separation "

    /Project/build/intermediates/RES/debug/values-v23/values.XML:6: error: error: no resource only for the name found (at 'cardBackgroundColor' with value '? android: attr / colorBackgroundFloating').

    * Try:

    Run with the option - stacktrace to get stack trace. Run with the option - info or - debug option to get out of the newspaper.

    BUILD FAILED

    Total time: dry 7,751

    /Project/Cordova/node_modules/q/q.js:126

    throw e;

    ^

    Error code 1 for command: / project/gradlew with args: lse cdvBuildDebug,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildMultipleApks=fa,-PcdvVersionCode = 1

    After a few days, I found the solution

    I changed from BMP to use the latest version of cordova

    And added lines

  • PhoneGap Build InappBrowser - what am I doing wrong?

    I was faced with calls to plugins cordova of in my App. Basically, I use phonegap as a wrapper to load a CMS site. This issue has many sub-questions, so please excuse me if I take a wandering approach.

    I had originally planned to help Inappbrowser - but now I would like to support downloads (which it seems to me that Inappbrowser does not).

    Can I charge my external website in an Iframe? Looks like Iframes are bad because of compatibility.

    If I try to load my external site via an Iframe, I get an empty frame - what gives to think that something is wrong with my white list.

    Here's index.html file. I use inappbrowser here (with location defined or not).

    < ! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""

    " < html xmlns =" http://www.w3.org/1999/xhtml " >

    < head >

    < title > Emerald Test App < /title >

    < name meta = "apple-mobile-web-app-compatible" content = "yes" / >

    < name meta = "viewport" content = "width = device-width" / > "

    < script src = "phonegap.js" > < / script >

    < / head >

    < script type = "text/javascript" >

    iabRef = window.open ('https://my-sites-url.com/content.aspx?page_id=31"," _self"," location = no "");

    iabRef.addEventListener ('loadstart', iabLoadStart);

    iabRef.addEventListener ('loadstop', iabLoadStop);

    iabRef.addEventListener ('loaderror', iabLoadError);

    iabRef.addEventListener ("quit", iabClose);

    < /script >

    < body >

    < / body >

    < / html >

    Here is my Config

    <? XML version = "1.0" encoding = "UTF-8"? >

    < widget xmlns = " " http://www.w3.org/ns/widgets "

    xmlns:gap = " " http://PhoneGap.com/ns/1.0 "

    ID = "com.my - site - url.testapp.

    versionCode = '5 '.

    version = "1.0.4" >

    Test App < name > < / name >

    < description >

    An application specially designed for your organization

    < / description >

    " < author href = ' https://www.my-site-URL.com "email =" " [email protected] "> "

    My application

    < / author >

    < name of gap: platform = "ios" / >

    < name of gap: platform = "android" / >

    < name of gap: platform = "winphone" / >

    < name of option = "orientation" value = "default" / >

    < name of option = "phonegap-version" value = "cli - 6.3.0" / >

    < name of option = "full screen" value = "false" / >

    < name of option = "loadUrlTimeoutValue" value = "700000" / >

    < option name = "LoadingDialog" value = "Please wait, the application will load" / >

    < name of option = "AllowInlineMediaPlayback" value = "true" / >

    < name of option = "SplashScreenDelay" value = "7000" / >

    < name of option = "KeepRunning" value = "true" / >

    "< src="res/icon/android-icon-36x36.png icon "gap: platform = gap: qualifier 'android' ="ldpi"/ >

    "< src="res/icon/android-icon-48x48.png icon "gap: platform = gap: qualifier"android"="mdpi"/ >

    "< src="res/icon/android-icon-72x72.png icon "gap: platform = gap: qualifier 'android' ="hdpi"/ >

    "< src="res/icon/android-icon-96x96.png icon "gap: platform = gap: qualifier 'android' ="xhdpi"/ >

    "< src="res/icon/apple-icon-57x57.png icon "gap: platform ="ios"width ="57"height ="57"/ >

    "< icon src="res/icon/apple-icon-72x72.png "gap: platform ="ios"width ="72"height ="72"/ >

    "< icon src="res/icon/apple-icon-76x76.png "gap: platform ="ios"width ="76"height ="76"/ >

    "< src="res/icon/apple-icon-114x114.png icon "gap: platform ="ios"width ="114"height ="114"/ >

    "< src="res/icon/apple-icon-144x144.png icon "gap: platform ="ios"width ="144"height ="144"/ >

    "< src="res/icon/apple-icon-120x120.png icon "gap: platform ="ios"width ="120"height ="120"/ >

    "< src="res/icon/apple-icon-152x152.png icon "gap: platform ="ios"width ="152"height ="152"/ >

    "< src="res/icon/android-icon-72x72.png icon "gap: platform ="webos"/ >

    "< src="res/icon/android-icon-48x48.png icon "gap: platform ="winphone"/ >

    "< src="res/icon/apple-icon-180x180.png icon "gap: Platform = 'winphone" gap: role = "background" / >

    "< src="res/screen/default.png gap: splash "/ >

    "< src="res/screen/default.png gap: splash "gap: platform = gap: qualifier 'android' ="port-ldpi"/ >

    "< src="res/screen/mdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-mdpi"/ >

    "< src="res/screen/hdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-hdpi"/ >

    "< src="res/screen/xhdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-xhdpi"/ >

    "< src="res/screen/xxhdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-xxhdpi"/ >

    "< src="res/screen/xxxhdpi.png gap: splash "gap: platform = gap: qualifier 'android' ="port-xxxhdpi"/ >

    "< src="res/screen/default.png gap: splash "gap: platform ="ios"width ="320"height ="480"/ >

    "< src="res/screen/640x960.png gap: splash "gap: platform ="ios"width ="640"height ="960"/ >

    "< src="res/screen/640x1136.png gap: splash "gap: platform ="ios"width ="640"height ="1136"/ >

    "< src="res/screen/750x1334.png gap: splash "gap: platform ="ios"width ="750"height ="1334"/ >

    "< src="res/screen/768x1024.png gap: splash "gap: platform ="ios"width ="768"height ="1024"/ >

    "< src="res/screen/1242x2208.png gap: splash "gap: platform ="ios"width ="1242"height ="2208"/ >

    "< src="res/screen/default.png gap: splash "gap: platform ="winphone"/ >

    < name of the ditch: plugin = 'cordova-plugin-camera' spec = "0.3.6" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-media-capture" spec = "1.0.1" source = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-device' source = 'MNP' / >

    < name of the ditch: plugin = "cordova-plugin-device-orientation" source = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-device-motion' source = 'MNP' / >

    < name of the ditch: plugin = source "cordova-plugin-file" = "MNP" / >

    < name of the ditch: plugin = source "cordova-plugin-file" = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-transfer files' source = 'MNP' / >

    < name of the ditch: plugin = spec 'cordova-plugin-media' = "0.2.16" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-inappbrowser" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-globalization" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-dialogues" source = "MNP" / >

    < name of the ditch: plugin = 'cordova-plugin-vibration' spec = "1.2.0" source = "MNP" / >

    < name of the ditch: plugin = "cordova-plugin-whitelist" source = "MNP" / >

    < allow navigation href = "" * "/ >"

    < allow intention href = "" * "/ >"

    < access origin = "" * "/ >"

    " < allow navigation href = ' http://*.my-site-URL.com " />

    < / widget >

    If downloading and recording is not available through inappbrowser, how can I managed to save files from an external site (which is what I want to look like a native app)?

    On my external site, I tried to open the files by using things like

    window.open(url, '_system');

    And _blank and adding 'location = no' etc, but no dice. Probably because the pages open in the inappbrowser are in sandbox.

    -Is it possible to start a download from an external web page in Inappbrowser using javascript?

    Is my only option to modify the java plugin onappbrowser? Seems sketchy and examples seem to only support iOS.

    Should I use an Iframe? Any ideas why my Iframes would be empty by using the above configuration? I'm doing something wrong?

    If you've read this far, thanks for reading!

    Using the configuration and the index below, I use window.open ('whatever.png', '_system'); and the png is displayed full screen and I have to use the device back button to return to the interface (or on iOS, you're stuck and have to restart).

    That's because window.open() does NOT part of the interface of the inappbrowser plugin. Thus, you do not invoke the inappbrowser plugin and you don't get the system browser to view it.

    Please read and apply the docs of the inappbrowser of the plugin.

    In your html code:

    It is not valid, because you have a script element between the head and the body, which is not validated.

    The code could still 'work', but the result is invalid and therefore not defined/unpredictable.

    On your config:

    -you have a mixture of gap: syntax of the area names and syntax most recent without social fracture: namespace. I suggest you drop the gap: namespace altogether and use the new syntax only.

    -you have specified the portrait and landscape, but lack the splash of landscape.

    -for some plugins (camera and media, for example), you pinned extremely old versions. What did you do for a special purpose?

    - http://*.my-site-url.com"/ > is redundant, since you already have

  • SplashScreen works only on Android only when built with Phonegap Build

    If I build my application locally, the splashscreen works well. However, if I build by Phonegap Build, it is not. In fact, this happens only if I use guidance in the density attribute such as:

    <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
    

    or

    <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
    

    Remove the parts of 'land -' or '-port' direction makes the splashscreen working again. But why this happens only when compiled by Phonegap Build? How can I treat the different directions this problem?

    I tried to downgrade the splashcreen plugin, change the resources folder names, file names, places, remove some preferences related to the splashscreen, but none worked. I tried Android 5.0 and 6.0 devices. Below is part of my config.xml file:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <widget id="aaa" version="1.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
      <name>aaa</name>
      <description>aaa</description>
      <author email="[email protected]" href="https://aaa.com/"></author>
    
      <content src="index.html"/>
      <access origin="*"/>
      <allow-navigation href="*"/>
      <allow-intent href="*"/>
    
      <preference name="permissions" value="none"/>
      <preference name="webviewbounce" value="false"/>
      <preference name="UIWebViewBounce" value="false"/>
      <preference name="DisallowOverscroll" value="true"/>
      <preference name="android-minSdkVersion" value="16"/>
      <preference name="BackupWebStorage" value="none"/>
    
      <!-- Splashscreen config -->
      <preference name="SplashScreen" value="screen"/>
      <preference name="SplashScreenDelay" value="4000"/>
      <preference name="FadeSplashScreenDuration" value="1000"/>
      <preference name="SplashMaintainAspectRatio" value="true"/>
      <preference name="SplashShowOnlyFirstTime" value="false"/>
      <!-- End of splashscreen config -->
    
      <preference name="phonegap-version" value="cli-6.1.0"/>
      <plugin name="cordova-plugin-splashscreen" spec="~3.2.2"/>
      <plugin name="cordova-plugin-inappbrowser" spec="~1.4.0"/>
      <plugin name="cordova-plugin-whitelist" spec="~1.2.2"/>
      <plugin name="cordova-plugin-dialogs" spec="~1.2.1"/>
    
      <feature name="StatusBar">
        <param name="ios-package" value="CDVStatusBar" onload="true"/>
      </feature>
      <platform name="android">
        <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/>
        <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/>
        <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/>
        <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/>
        <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/>
        <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/>
        <splash src="resources/android/splash/drawable-land-ldpi-screen.png" density="land-ldpi"/>
        <splash src="resources/android/splash/drawable-land-mdpi-screen.png" density="land-mdpi"/>
        <splash src="resources/android/splash/drawable-land-hdpi-screen.png" density="land-hdpi"/>
        <splash src="resources/android/splash/drawable-land-xhdpi-screen.png" density="land-xhdpi"/>
        <splash src="resources/android/splash/drawable-land-xxhdpi-screen.png" density="land-xxhdpi"/>
        <splash src="resources/android/splash/drawable-land-xxxhdpi-screen.png" density="land-xxxhdpi"/>
        <splash src="resources/android/splash/drawable-port-ldpi-screen.png" density="port-ldpi"/>
        <splash src="resources/android/splash/drawable-port-mdpi-screen.png" density="port-mdpi"/>
        <splash src="resources/android/splash/drawable-port-hdpi-screen.png" density="port-hdpi"/>
        <splash src="resources/android/splash/drawable-port-xhdpi-screen.png" density="port-xhdpi"/>
        <splash src="resources/android/splash/drawable-port-xxhdpi-screen.png" density="port-xxhdpi"/>
        <splash src="resources/android/splash/drawable-port-xxxhdpi-screen.png" density="port-xxxhdpi"/>
      </platform>
    
      <icon src="resources/android/icon/drawable-xhdpi-icon.png"/>
    </widget>
    

    Maybe your projections are simply not found.

    You can post a screenshot of your zip file directory structure, please?

    Also, if you use any BMP, you need not include an element in your config file.

    Finally, BMP requires your icon by default to the root (with index and config), does not in some resources/.../-directory.

  • IOS app do not compile in phonegap build after adding support for Push Notifications

    As the title says, I have an app for android and iOS using phonegap to build and push-plugin to the repository of the NPM. It worked perfectly for android, but for iOS, the events have not fired. Then I read that the AppID should have the active possibility of push notifications, so I added a development certificate and certificates and files of mobile provision changed.

    After that, the application is not compile more. I also added a certificate SSL Production to my App ID and certificate and files available mobile since I read the development of those who do not work with Phonegap, built on an old post, but that no longer works.

    Am I missing a step to make it work for the iOS with Phonegap Build? Thanks in advance

    Looks like commissioning your profile does not include your developer certificate. Try re-creating your provisioning profile.

    Maybe useful post:

    IOS create problem certificate does not match profile

Maybe you are looking for