You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Filip Maj (Closed) (JIRA)" <ji...@apache.org> on 2012/03/05 04:17:07 UTC
[jira] [Closed] (CB-296) Cordova.hasResouce doesn't work for
Android
[ https://issues.apache.org/jira/browse/CB-296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Filip Maj closed CB-296.
------------------------
Resolution: Won't Fix
Assignee: Filip Maj (was: Joe Bowser)
hasResource is not part of the core API (see the docs).
In 1.5 for the Android implementation, we moved to using the Android build of the Cordova-JS project, a unified JavaScript layer for all Cordova platforms. You can find that project here:
https://github.com/apache/incubator-cordova-js
P.S. hasResource's implementation was literally:
{code:javascript}
function hasResource(res) {
return (window.plugins[res] !== undefined);
}
{code}
... which you can now check by calling require() on a specific plugin and seeing if it returns a truthy value.
> Cordova.hasResouce doesn't work for Android
> -------------------------------------------
>
> Key: CB-296
> URL: https://issues.apache.org/jira/browse/CB-296
> Project: Apache Callback
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.5.0
> Environment: Android
> Reporter: Takashi Okamoto
> Assignee: Filip Maj
>
> I tried Cordova.hasResource with Cordova 1.5.0 snapshot on Android.
> I found Cordova.hasResouce doesn't work and not defined in cordova-1.5.0.js
> cordova.js.base may not include cordova-1.5.0.js and
> it seems build.xml problem.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira