Comments (29)
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.
Can you share some more details of your setup and perhaps share your project with me?
from toast-phonegap-plugin.
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.pngCan 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.
Mine is working in 3.5.0 in Android and iOS.
from toast-phonegap-plugin.
@jperl Are you able to take screenshot the current event and able to share it on Social Sharing in iOS.
from toast-phonegap-plugin.
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.
@jperl yes please. are you trying this in iOS.
from toast-phonegap-plugin.
"Cannot read property 'toast' of undefined", on Android 4.1. It does not recognize "window.plugins". Help, please?
from toast-phonegap-plugin.
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.
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.
@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.
Yes, I'm using the plugin way after 'deviceready'.
from toast-phonegap-plugin.
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.
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.
Same problem. It works on Android 4.4, but not on Android 4.1
from toast-phonegap-plugin.
@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.
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.
@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.
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.
@remon do you wait for deviceready to fire, or does it fire at all?
from toast-phonegap-plugin.
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.
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.
I am using the cli
and I did the cordova prepare too
from toast-phonegap-plugin.
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.
HI, that depends. Are you running on a real device? Which platform? Did you run cordova prepare
..
from toast-phonegap-plugin.
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.
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.
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.
AM testing the plugin on my android device 5.1 and i get the same issue, $window.plugins undefined
from toast-phonegap-plugin.
Was this fixed? I have to use window.plugins.toast
to get it working.
from toast-phonegap-plugin.
Related Issues (20)
- duration does not seem to accept values on "show" and "showWithOptions"methods (Android 8.0) HOT 17
- Android P doesnt display toast HOT 2
- Toast not shown in Honor 8XS HOT 14
- Toast is not showing in Android 9.0.0 (OnePlus 5) HOT 5
- Toast deprecation error on iOS 12.1.2 HOT 1
- why does the message have my app name before it pops up and how to remove it?
- What are advantages over web popover?
- iOS - Toast is displayed full width, no margins on left or right
- How can I increase the width and height of the toast?
- Android 9.0 Toast are not showing 2nd time HOT 1
- How is it possible to read Toast text?
- styling verticalPadding is not working properly in Android OS version 10 HOT 1
- Test0123
- null pointer exceptions in android 11 HOT 13
- window.plugins.toast.showWithOptions is not working
- Position of notification in Android 11 HOT 1
- Crash from API 30 HOT 7
- On Toast Click not working
- `showShortTop()` method is showing toast at the bottom only not at the top
- No color or styling For Android 12 and 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toast-phonegap-plugin.