Giter Club home page Giter Club logo

Comments (12)

xu-li avatar xu-li commented on May 30, 2024

@junmin 你的应用是否在微信里面注册并审核通过了?android的分享是需要你的应用被审核通过(当然你的签名和包名和审核过的应用需要一致)。

还有,日志里面有什么错误么?

from cordova-plugin-wechat.

junmin avatar junmin commented on May 30, 2024

应用已经在微信开放平台注册了也并通过了(有绿色的“已通过”)
审核通过后,我有改动过包名和签名,这个会有影响吗?(微信平台里没有说需要再审核)

我是移动开发方面的新手,今天一直在摸索SDK如何查看日志和debug
因为用的是ionic, 目前用到的debug工具基本上就是chrome (remote) inspector
Cordova 方面的debug无从下手,在网上google了一番也没找到好的方法,你可以给点提示或者资料来学习一下吗?

from cordova-plugin-wechat.

junmin avatar junmin commented on May 30, 2024

刚用logcat看到这些信息,但是看不出来有什么问题 :s

D/Cordova.Plugin.Wechat( 9368): share is called.
D/Cordova.Plugin.Wechat( 9368): Start building message.
I/ActivityManager( 749): START u0 {flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXEntryActivity (has extras)} from uid 10199 on display 0
V/WindowManager( 749): addAppToken: AppWindowToken{1378d279 token=Token{2bc8c340 ActivityRecord{27286ec3 u0 com.tencent.mm/.plugin.base.stub.WXEntryActivity t13371}}} to stack=1 task=13371 at 0
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): com.mohuatang.webapp.MainActivity onActivityPaused
D/Cordova.Plugin.Wechat( 9368): Message sent.
W/ActivityManager( 749): getTasks: caller 10076 does not hold GET_TASKS; limiting output
V/WindowManager( 749): Adding window Window{2b16d36c u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.WXEntryActivity} at 6 of 12 (after Window{2f68930a u0 com.mohuatang.webapp/com.mohuatang.webapp.MainActivity})
D/EventService( 2076): EventService : com.ifeng.ipush.client.EVENT_ORDER_TYPE_ALARM
D/AndroidHelper( 2076): checkService result : true
D/PushService( 2076): Send a heartBeat To Server
V/WindowManager( 749): Adding window Window{2253ba58 u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.WXEntryActivity} at 6 of 13 (before Window{2b16d36c u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.WXEntryActivity})
D/EventService( 2076): W:Service not registered: acj@122c2533
I/ActivityManager( 749): Displayed com.tencent.mm/.plugin.base.stub.WXEntryActivity: +244ms
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): WXStat trigger onBackground
W/ActivityManager( 749): Finishing task with all activities already finished
W/ActivityManager( 749): Duplicate finish request for ActivityRecord{27286ec3 u0 com.tencent.mm/.plugin.base.stub.WXEntryActivity t13371 f}
W/ResourceType( 908): No package identifier when getting value for resource number 0x00000000
I/Keyboard.Facilitator( 4568): onFinishInput()
W/IInputConnectionWrapper( 9368): showStatusIcon on inactive InputConnection
W/PackageManager( 908): Failure retrieving resources for com.mohuatang.webapp: Resource ID #0x0
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): com.mohuatang.webapp.MainActivity onActivityResumed
I/Keyboard.Facilitator( 4568): onFinishInput()
W/ActivityManager( 749): getTasks: caller 10076 does not hold GET_TASKS; limiting output
D/WearableService(13141): callingUid 10007, callindPid: 13141
W/ActivityManager( 749): getTasks: caller 10076 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output
V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb( 9368): WXStat trigger onForeground
W/ActivityManager( 749): getTasks: caller 10101 does not hold GET_TASKS; limiting output

from cordova-plugin-wechat.

xu-li avatar xu-li commented on May 30, 2024

@junmin 可能需要重新审核,这个我不清楚。我觉得能打开微信,插件的任务基本完成了,至于闪退或者分享后没有回到原来的应用,就是设置的问题了。

你可以先试试我的那个demo,也是ionic的。

from cordova-plugin-wechat.

junmin avatar junmin commented on May 30, 2024

@xu-li 已经试过demo, 一样的情况 :s

from cordova-plugin-wechat.

wgjtyu avatar wgjtyu commented on May 30, 2024

@xu-li 在idea里debug了一下android这边,看到拿到的WechatAppId是"$WechatAppId",不知道怎么解决这个

from cordova-plugin-wechat.

xu-li avatar xu-li commented on May 30, 2024

@wgjtyu 好的,多谢提供这个重要的细节。应该是安装插件的时候,变量没有被替换。

from cordova-plugin-wechat.

wgjtyu avatar wgjtyu commented on May 30, 2024

再次尝试了一下,把WechatAppId改成WECHATAPPID就好了

在 2015年7月23日,下午10:04,lixu [email protected] 写道:

@wgjtyu https://github.com/wgjtyu 好的,多谢提供这个重要的细节。应该是安装插件的时候,变量没有被替换。


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

from cordova-plugin-wechat.

junmin avatar junmin commented on May 30, 2024

@wgjtyu 是哪个文档的变量?

from cordova-plugin-wechat.

junmin avatar junmin commented on May 30, 2024

@xu-li 确认是插件的问题,我试用了另外一个插件 https://github.com/vilic/cordova-plugin-wechat 分享没有问题,也就是说app_id和应用签名,包名都配置正确;但是这个插件目前的功能太少了,所以我看看能不能debug一些东西出来,然后在这里反馈给你。如果你有时间的话,麻烦你也看看吧,相信随便找个安卓也能reporduct这个问题。

from cordova-plugin-wechat.

junmin avatar junmin commented on May 30, 2024

参考了 @wgjtyu 的反馈,发现是同一个问题,安装插件的时候没有自动替换所有的变量。我收到修改了下面的文档,把里面$WechatAppId替换成自己的app_id就好了。估计项目最后的一个更新没有测试就push上去了 不带这样玩的阿,哈哈,不过还是谢谢 @xu-li 的项目,还是为大家省了不少功夫~

platforms/android/AndroidManifest.xml
platforms/android/res/xml/config.xml
plugins/android.json

from cordova-plugin-wechat.

xu-li avatar xu-li commented on May 30, 2024

@junmin 真不好意思。下次要好好测试一下。

这个问题应该是plugin.xml里面不支持大小写混用的,只要是WECHATAPPID就能正确替换。

同时也感谢 @wgjtyu

from cordova-plugin-wechat.

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.