Code Monkey home page Code Monkey logo

Comments (29)

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

Hi, I don't think 3.5.0 is the problem as I just used the cordova CLI to create a 3.5.0 app for Android and added the plugin. It all works fine as per this screenshot of the simulator.
schermafbeelding 2014-06-12 om 21 06 01

Can you share some more details of your setup and perhaps share your project with me?

from toast-phonegap-plugin.

 avatar commented on August 15, 2024

Sorry, I cant share the project. But if you say it's working I guess it is,
and surely I'm doing something wrong.
I'll make a test with a new project.

Thanks for the answer

@luichanfe https://twitter.com/#!/luichanfe

On Thu, Jun 12, 2014 at 4:08 PM, Eddy Verbruggen [email protected]
wrote:

Hi, I don't think 3.5.0 is the problem as I just used the cordova CLI to
create a 3.5.0 app for Android and added the plugin. It all works fine as
per this screenshot of the simulator.
[image: schermafbeelding 2014-06-12 om 21 06 01]
https://cloud.githubusercontent.com/assets/1426370/3262388/a2f44fe6-f264-11e3-80c3-6bdaf2167ff8.png

Can you share some more details of your setup and perhaps share your
project with me?


Reply to this email directly or view it on GitHub
#8 (comment)
.

from toast-phonegap-plugin.

jperl avatar jperl commented on August 15, 2024

Mine is working in 3.5.0 in Android and iOS.

from toast-phonegap-plugin.

MateenKadwaikar avatar MateenKadwaikar commented on August 15, 2024

@jperl Are you able to take screenshot the current event and able to share it on Social Sharing in iOS.

from toast-phonegap-plugin.

jperl avatar jperl commented on August 15, 2024

I am not using the social sharing plugin. Would you like me to take a screenshot of a toast?
On Mon, Jul 21, 2014 at 5:48 AM, Mateen [email protected] wrote:@jperl Are you able to take screenshot the current event and able to share it on Social Sharing.

—Reply to this email directly or view it on GitHub.

from toast-phonegap-plugin.

MateenKadwaikar avatar MateenKadwaikar commented on August 15, 2024

@jperl yes please. are you trying this in iOS.

from toast-phonegap-plugin.

melojms avatar melojms commented on August 15, 2024

"Cannot read property 'toast' of undefined", on Android 4.1. It does not recognize "window.plugins". Help, please?

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

How did you install the plugin?

On 23 jul. 2014, at 14:38, José Melo [email protected] wrote:

"Cannot read property 'toast' of undefined", on Android 4.1. It does not recognize "window.plugins". Help, please?


Reply to this email directly or view it on GitHub.

from toast-phonegap-plugin.

melojms avatar melojms commented on August 15, 2024

Inserted this on config.xml:

"<gap:plugin name="nl.x-services.plugins.toast" />"

It works on Android 4.2 and 4.4.4, but not on 4.1

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

@melojms So you're using build.phonegap.com and have deployed the exact same apk on those 3 devices?

Could it be you're not waiting for deviceready to fire before using the plugin? Could explain the issue as the 4.1 device is probably a bit slower.

from toast-phonegap-plugin.

melojms avatar melojms commented on August 15, 2024

Yes, I'm using the plugin way after 'deviceready'.

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

Ok, so can you send me the code or apk at eddyverbruggen at gmail?

On 23 jul. 2014, at 16:57, José Melo [email protected] wrote:

Yes, I'm using the plugin way after 'deviceready'.


Reply to this email directly or view it on GitHub.

from toast-phonegap-plugin.

tylercollier avatar tylercollier commented on August 15, 2024

I'm not able to get it working in 3.5 either. I get the same error as melojms: [phonegap] [console.error] TypeError: Cannot read property 'toast' of undefined. I installed the plugin with

phonegap local plugin add https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git

and got success.

I'm a rookie at this. I spent a few hours just now figuring out to wait for the device to be ready for audio capture. I know that's not my problem here.

@EddyVerbruggen can you share the sample app that you used to take a screenshot above?

from toast-phonegap-plugin.

yannickbel avatar yannickbel commented on August 15, 2024

Same problem. It works on Android 4.4, but not on Android 4.1

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

@tylercollier, @yannickbel I've just gone out of my way to reproduce your troubles with the Cordova CLI and PhoneGap CLI. I can't reproduce any trouble on 4.1.1.

Can you please send me your Android projects at eddyverbruggen at gmail dot com if you want my assistance?

from toast-phonegap-plugin.

tylercollier avatar tylercollier commented on August 15, 2024

This works for me when using phonegap run android. I was using the phonegap developer app and it doesn't work there.

Now I'm remembering once where someone mentioned that the phonegap developer app is cool but since it doesn't work with plugins, they claimed it was useless. Now I see their point. But, that's not the fault/problem of this plugin. Thanks Eddy for helping out and your time.

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

@tylercollier Thanks for letting me know. Yes, those developer apps are really nice for testing your html/css/js, but most plugins don't work unless they ship the app with the plugin installed. So basically core plugins only.

from toast-phonegap-plugin.

remon avatar remon commented on August 15, 2024

I am having the same problem with cordova 3.5 and window.plugins are undefined however I installed the plugin successfully

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

@remon do you wait for deviceready to fire, or does it fire at all?

from toast-phonegap-plugin.

remon avatar remon commented on August 15, 2024

on device ready function , other plugins are working but toast not working and when I alert windows.plugins it returns undefined
@EddyVerbruggen would you mind provide your code you tested to get that screenshot

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

I can do that. Are you using the CLI and build locally?

Last check: did you run Cordova prepare after adding the plugin?

from toast-phonegap-plugin.

remon avatar remon commented on August 15, 2024

I am using the cli
and I did the cordova prepare too

from toast-phonegap-plugin.

simonshout avatar simonshout commented on August 15, 2024

I don't mean to dig up old discussions but I stumbled across this while I was searching for a solution to the same problem. I used the "cordova plugin add nlx.." and just tried to run a window.plugins.toast.showShortCenter(msg) in a .js file from a button click. I get the same undefined property error. Was there a solution to this?

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

HI, that depends. Are you running on a real device? Which platform? Did you run cordova prepare..

from toast-phonegap-plugin.

simonshout avatar simonshout commented on August 15, 2024

Hello,

I'm running an avd (nexus 7/android 19). I ran cordova prepare, though not
right after I installed the package. I hastily tried emulating it once
before I did. I also tried to insert the one-liner into the device prepared
logic from the stock cordova app as a quick test to see if it was my js
file with the error; it had the same obscure error.

from toast-phonegap-plugin.

EddyVerbruggen avatar EddyVerbruggen commented on August 15, 2024

You're best off trying from scratch with a new cordova create.. command, add the plugin and deploy to a real device. If that works, try to find what's different..

from toast-phonegap-plugin.

kartagis avatar kartagis commented on August 15, 2024

Hi, sorry to hijack this issue but I have the very same issue; only on a 4.4.4. I used the exact same line in README.md to test and I commented out my own js file, but still no dice.

from toast-phonegap-plugin.

luckyforu avatar luckyforu commented on August 15, 2024

AM testing the plugin on my android device 5.1 and i get the same issue, $window.plugins undefined

from toast-phonegap-plugin.

fmtoffolo avatar fmtoffolo commented on August 15, 2024

Was this fixed? I have to use window.plugins.toast to get it working.

from toast-phonegap-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.