rohit1814 / flutter_open_whatsapp Goto Github PK
View Code? Open in Web Editor NEWA Flutter plugin to open WhatsApp and send message to single number.
License: MIT License
A Flutter plugin to open WhatsApp and send message to single number.
License: MIT License
Null safety will be available soon ?
This is a problem when the message contains a link with ?
. Then everything after and including the ?
is cut off.
Hello, I just changed the Target SDK version to 30, but it stips stops flutter open whatsapp working. could you please help me to fix it? thanks!
Is it possible to send a message in a group I have?
Greetings I have an app that has worked perfectly up to android 10, with andoid 11 it does not open whatsApp and it does not show me any error it simply does not do anything, there is something special or some permission that I must give in android 11.
first of all, Thanks
I would like to be able to send images to people who are not in my contact list. Would that be possible with this plugin?
Not working on iOS, it crashes.
OS: Mojave 10.14.6
Xcode: 11.2.1 (11B53)
Flutter: 1.14.4-pre.17 channel master
Tested on iPhone X
you can use url_launcher, and device_apps to do everything you need...
i don't use this plugin i faced it randomly, i wanted to help people because it sounds like no body updates this plugin a long time
who want to open WA only, just use this line of code
device_apps:
DeviceApps.openApp('com.whatsapp');
who want to open it with text message use this line of code:
url_launcher:
launch('https://api.whatsapp.com/send/?phone=(phone number here without +)&text=(you message here)&app_absent=1');
Can't run Pod install. Message below:
[!] Unable to determine Swift version for the following pods:
flutter_open_whatsapp
does not specify a Swift version and none of the targets (Runner
) integrating it have the SWIFT_VERSION
attribute set. Please contact the author or set the SWIFT_VERSION
attribute in at least one of the targets that integrate this pod.The plugin is working perfectly... but I wanted to show error message if the user is not installed Whatsapp on his phone. Is it possible ?
Test message: Hello # World
Message shown in whatsapp: Hello
I found the error was because the plugin was not encoding the message in URI format, due to this it escaped at "#". It is a critical bug and I think the library should encode the message and then send it.
Would be happy to contribute :)
I only want to open whatsapp,not need to send everything,have API or function
@rohit1814 when use url_launcher
to call a phone number I do something like this:
final url = "tel:${myInvestment['contact']['phone']}";
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
That would call to the exact phone number I have saved, that means that it would not include extra country codes.
Doing something like this:
FlutterOpenWhatsapp.sendSingleMessage(666666666, "");
will open a +34666666666 and it'd work. But it have +34 on my contact it would add another +34
and it would fail.
Also I cannot have another number from a different country because it adds a wront country code.
I think we should have this logic independently on our sides but not on this package
Device
Model: iPhone 8
Orientation: Portrait
RAM free: 34.61 MB
Disk free: 50.62 GB
Operating System
Version: 13.5.1 (17F80)
Orientation: Portrait
Jailbroken: No
I use this library like this:
final message ="Hola, me gustó!";
final number = "+5715188076";
FlutterOpenWhatsapp.sendSingleMessage(number, message);
I dont get where is the issue, the error is criptic :P.
Im getting no issues on android, but for iOS it crashes and prints this error:
Crashed: com.apple.main-thread
0 flutter_open_whatsapp 0x102cb341c $s21flutter_open_whatsapp30SwiftFlutterOpenWhatsappPluginC6handle_6resultySo0E10MethodCallC_yypSgctFyycfU_ + 1776
1 flutter_open_whatsapp 0x102cb362c $sIeg_IeyB_TR + 28
2 libdispatch.dylib 0x1a673a9a8 _dispatch_call_block_and_release + 24
3 libdispatch.dylib 0x1a673b524 _dispatch_client_callout + 16
4 libdispatch.dylib 0x1a671e6fc _dispatch_main_queue_callback_4CF$VARIANT$armv81 + 860
5 CoreFoundation 0x1a69f37fc __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
6 CoreFoundation 0x1a69ee6d0 __CFRunLoopRun + 1724
7 CoreFoundation 0x1a69edce8 CFRunLoopRunSpecific + 424
8 GraphicsServices 0x1b0b3838c GSEventRunModal + 160
9 UIKitCore 0x1aab1c444 UIApplicationMain + 1932
10 Runner 0x1023672ac main + 6 (AppDelegate.swift:6)
11 libdyld.dylib 0x1a68758f0 start + 4
Hi, I have been trying to use this package for a Flutter iOS app, but I am getting the following warnings that do not let the app build successfully:
/.pub-cache/hosted/pub.dartlang.org/flutter_open_whatsapp-0.1.2/ios/Classes/SwiftFlutterOpenWhatsappPlugin.swift:30:58: warning: forced cast from 'NSURL?' to 'URL' only unwraps and bridges; did you mean to use '!' with 'as'?
if UIApplication.shared.canOpenURL(whatsAppUrl as! URL) {
~~~~~~~~~~~ ^~~ ~~~
!as
/.pub-cache/hosted/pub.dartlang.org/flutter_open_whatsapp-0.1.2/ios/Classes/SwiftFlutterOpenWhatsappPlugin.swift:31:58: warning: forced cast from 'NSURL?' to 'URL' only unwraps and bridges; did you mean to use '!' with 'as'?
UIApplication.shared.openURL(whatsAppUrl as! URL)
~~~~~~~~~~~ ^~~ ~~~
!as
I am trying to run the app from Android Studio 3.6.3 and building the iOS version with XCode 11.4.1.
What could the problem be? Thanks for your help.
Not working for me :) .
import 'package:flutter_open_whatsapp/flutter_open_whatsapp.dart';
class call{
sendMsg() {
FlutterOpenWhatsapp.sendSingleMessage(900000000, 'msg');
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.