Giter Club home page Giter Club logo

cordova-plugin-wechat-example's People

Contributors

xu-li avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-plugin-wechat-example's Issues

Question:为什么不把share.js定义成为一个service?

您好,感谢你的wechat plugin,但是我有个问题,我看到share 里边将share定义为一个全局的函数。为什们不把它写成一个angular service进行使用?我试了一下,似乎这样是不能工作的,不知道您有没有考虑过?或者这样有什么问题?多谢

cordova.js Cannot read property 'length'

When I run this demo,I get the following errors:

D/CordovaLog(23450): file:///android_asset/www/cordova.js: Line 914 : Uncaught T
ypeError: Cannot read property 'length' of undefined

What's wrong with that? Please help me, thanks!

微信分享(朋友圈和好友)每次都提示登录问题

我这出现了分享时每次都提示登录的问题,刚开始加入插件测试时是好用的(第一次分享提示登录,以后只提示近期已经登录,不再需要登录)。后来不知道为什么就不好用了。没做过任何改变。
请帮忙分析下什么可能的原因?
另外,IOS在这种情况有发现需要多次才成功的情况。

发送消息alert“未知错误”

按说明安装运行后,点击任何一个“发送消息给微信”,都alert错误信息“未知错误”;
在build的过程中transformClassesWithDexForDebug报一个warning,从官方下载最新的libammsdk.jar覆盖也运行不了。

部分发送成功但app停止运行

文字消息,发送成功,但返回时显示‘很抱歉,app已停止运行’;
图片发送,刚点击就显示停止运行。
使用的最新ionic框架,在安卓4.4下多个手机测试的结果一样

这个demo ,android环境下不能使用吗?

我测试了,
在iOS环境下,能够正常使用,
但是在android环境下,除了能够检测微信是否安装以外,不能使用其他的 功能,有没有人遇到和我一样的问题,谁能告诉我解决方法?(这个问题解决了,android 包签名后,就能正常使用了)

Wechat.share相关问题

求助,当使用Wechat.share遇到以下2个问题,

  1. 在android ionic v1,无法使用这个plugin,显示package name incorrect。

  2. 如下图,在iOS share to session后,会出现cordova plugin的字眼(红色圈起来的地方),请问可以如何去掉呢?
    在安装的时候wechat app id我是使用demo的,会有影响吗?
    ionic plugin add cordova-plugin-wechat --variable wechatappid=wx4a525790c75c494f

WhatsApp Image 2019-04-30 at 11 33 01

WhatsApp Image 2019-04-30 at 12 51 00

build failed in cordova

My app and the demo(example) both built failed in cordova.
The result kept the same when I cordova platform update ios

手动点击授权之后,以后的登录都是自动登录无授权页面,就是直接获取code,无需点击,求教

主要登录代码 :

Wechat.auth("snsapi_userinfo", function (response) {
    // you may use response.code to get the access token.
    alert(JSON.stringify(response));
}, function (reason) {
    alert("Failed: " + reason);
});

首次点击,出现下面的授权页面 :

相关环境:

Installed platforms:
  android 6.1.2

cordova-plugin-wechat 2.1.0

Gradle 3.3

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_91 (Oracle Corporation 25.91-b14)
OS:           Mac OS X 10.13.2 x86_64

cordova version :  6.5.0

然而,第二次登录直接弹出 字符串格式的 response ,微信登录的上述确认登录页面不再出现。
求教:如何解决这种问题让每次登录,都要用户手动点击 "确认登录" 然后才弹出 response

demo似乎不能正常工作?

Hi,

我把你的ionic 放在本地测试时,通过ios simulator 可以正常运行,但貌似点击任何功能都没效果出现的?请问是否我哪个步骤做错了,谢谢。

微信支付failed 普通错误类型

  var params = {
    mch_id: '1280971401', // merchant id
    prepay_id: 'wx20151106110724aa7a36a51c0292643654', // prepay id
    nonce: 'nLYur40d6aQZaRIy', // nonce
    timestamp: "1446778330", // timestamp
    sign: '2508E9C7977473C45807DCF688E407A2', // signed string
  };

我看例子中是传这几个字段,签名是重新对这些值签名对吧?时间戳有什么要求吗,为什么一直返回failed:普通错误类型。。求大神帮帮忙

demo无法使用

我在项目中引入插件发现无法使用后按照您的readMe上所说步骤部署安装了example发现结果相同,
点击各种分享都是返回未知错误,而点击微信授权登录无响应。请问可能是什么原因造成的呢?

Authorization doesn't work

Hi, I've tried this example on my android device and when I click to auth button nothing is heppen...
In the logcat http://prntscr.com/8uh7xz I see that wrong activity is started (I think so) : com.tencent.mm.plugin.base.stub.WXEntryActivity instead of xu.li.test.cordova.plugin.wechat.wxapi.WXEntryActivity. Can you help me with this issue? I want to use xu.li.cordova.plugin.wechat in my project for users authorization, but it doesn't work at all. Thanks for the help

P.S. there is no any error in the log

WeChat Plugin not found

Hi,

What does that mean, I installed the example as APK in my Android phone which having Wechat on it.
Is this project complete or still in development?

Thanks

运行Demo问题

我首先git clone https://github.com/xu-li/cordova-plugin-wechat-example.git

然后cd ionic执行:

  1. ionic plugin add https://github.com/xu-li/cordova-plugin-wechat --variable wechatappid=wx4a525790c75c494f
  2. ionic platform add android
  3. ionic run android

build的时候出现红色的告警:
:preDexDebugwarning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.openapi.WXApiImplV10$ActivityLifecycleCb$2) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.
warning: Ignoring InnerClasses attribute for an anonymous inner class
(com.tencent.mm.sdk.b.b) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.

执行“发送Text消息给微信”等操作报“Failed:未知错误”

在我的平板上测试 ionic run android,执行“发送Text消息给微信”等操作报“Failed:授权失败”

logcat:

"发送Text消息给微信"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@2f4321ac

"发送Photo消息给微信(本地图片)"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null
E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389)
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818)
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@b83cf57

"发送Photo消息给微信(远程图片)"报“Failed:未知错误”
D/Cordova.Plugin.Wechat( 7152): share is called.
D/Cordova.Plugin.Wechat( 7152): Start building message.
E/Cordova.Plugin.Wechat( 7152): Failed to decode image at null
E/Cordova.Plugin.Wechat( 7152): org.json.JSONException: No value for thumb
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.get(JSONObject.java:389)
E/Cordova.Plugin.Wechat( 7152): at org.json.JSONObject.getString(JSONObject.java:550)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.getBitmap(Wechat.java:335)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat.buildSharingMessage(Wechat.java:263)
E/Cordova.Plugin.Wechat( 7152): at xu.li.cordova.wechat.Wechat$1.run(Wechat.java:151)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/Cordova.Plugin.Wechat( 7152): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/Cordova.Plugin.Wechat( 7152): at java.lang.Thread.run(Thread.java:818)
D/Cordova.Plugin.Wechat( 7152): Message sent.
D/Cordova.Plugin.Wechat( 7152): com.tencent.mm.sdk.modelmsg.SendMessageToWX$Resp@22870461

“微信授权登录”没有反应:
D/Cordova.Plugin.Wechat( 7152): sendAuthRequest is called.

微信一闪而过

我按照readme的步骤操作,再做分享的时候弹出微信一闪又消失了,是否需要appid的签名等参数呢?

iOS build failed

添加IOS平台,通过ionic emulate ios或者用XCode打开,均build失败:
duplicate symbol _llvm.cmdline in:
/Users/libin/Projects/try-ionic/wechat-example/cordova-plugin-wechat-example/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/cordova-plugin-wechat/libWeChatSDK.a(MTAEvent.o)
/Users/libin/Projects/try-ionic/wechat-example/cordova-plugin-wechat-example/ionic/platforms/ios/Wechat DEMO for cordova.plugin.wechat/Plugins/cordova-plugin-wechat/libWeChatSDK.a(MTAPasteboard.o)

ld: 24 duplicate symbols for architcture x86_64
clang: error: Linker command failed with exit code 1

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.