Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8127703
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:37:28+00:00 2026-06-06T07:37:28+00:00

I am developing a Phonegap plugin. My HTML file looks like this: <!DOCTYPE HTML>

  • 0

I am developing a Phonegap plugin. My HTML file looks like this:

<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
  function fun(){
    alert("hai I am alert");
    window.plugins.Unixell.list(SuccessCallBack ,failureCallBack);
    function SuccessCallBack() {
      alert("success");
    };
    function failureCallBack() {
      alert("failure");
    };
  }
</script>
</head>
<body>
  <input type="button" value="i am button" onclick="fun()" />
  <script src='apis/Phonegap.js'></script>
  <script src='apis/Unixell.js'></script>
</body>
</html>

and Unixell.js is:

var cam=function(){};
cam.prototype.list = function(successCallback, failureCallback) {
  return PhoneGap.exec(successCallback,failureCallback, 'Unixell', 'list', [null]);
};
PhoneGap.addConstructor(function() {
  alert("I am in unixell.js3333");
  PhoneGap.addPlugin("Unixell", new cam());
  PluginManager.addService("Unixell", "com.phonegap.plugins.unixell.Unixell");
});

And my com.phonegap.plugins.unixell.Unixell.java file is:

public class Unixell extends Plugin{
  private static final String TAG = "unixell";
  private static final String ACTION = "list";
  @Override
    public PluginResult execute(String action, JSONArray arg1, String arg2) {
      // TODO Auto-generated method stub
      PluginResult result = null;
      result=new PluginResult(Status.OK, "I am a message");
      if(ACTION.equals(action)){
        System.out.println("success");
        LOG.d(TAG,"U R success");
      }
      return result;
    }

But I got an error in logcat:

Uncaught TypeError: Cannot call method 'list' of undefined at file:///android_asset/www/index.html

What would be the problem? Why am I getting this error? What is the solution for this ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T07:37:31+00:00Added an answer on June 6, 2026 at 7:37 am

    I suppose that you can get a function by executing Unixell.prototype.list like you defined it, but I didn’t work a lot with Phonegap ;- )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a cross-platform PhoneGap app, and I'd like a string of text in
Hi I am developing phonegap application. If I use console.log in index.html file then
I am developing a BlackBerry Phonegap application. Therefore, I am using JavaScript. From a
I am developing phonegap app in iphone,after successfully viewing pdf file (from server) on
I'm developing a phonegap based application, and I also need to call javascript from
I am developing a mobile application using phonegap and jquery mobile. I have this
I am developing an application for Android using phonegap. When I include phonegap.js file
I am developing PhoneGap webapp where I use some javascript, and sometimes I need
I'm developing a phonegap/jquery-mobile test application (I'm new in this technologies) for android and
We are developing a HTML 5 phonegap app and are using local-storage to persist

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.