Giter Club home page Giter Club logo

Comments (1)

shaohui10086 avatar shaohui10086 commented on August 21, 2024

首先说句谢谢,因为从ShareLoginLib学到了很多ヽ(^o^)丿。
其实算起来ShareUtil跟原作算是比较类似的,都是封装了SDK的调用,如果非要说点不一样的:

  1. 将代码从Activity中移出,这样看起来更方便些,逻辑更清晰,调用方式统一。
  2. 增加一个类似ImageHolder的类,这样就能既支持本地图片分享,也支持图片链接分享,而且分享的图片如果原本是在cache目录下中会被拷贝到public区域,这样别的应用也就能能读到
  3. 用Activity-alias转移了WxEntryActivity的位置,没有用Annotation的方式,想使用方尽量简单
  4. 同样用manifestPlaceholders,省去了Manifest文件的配置

踩的坑也有很多,我也希望能够交流一下:

  1. WxEntryActivity设置了SingleTask,但是微信的回调还是发生在了onCreate 方法里,没有发生在onNewIntent中,这个处理起来有些小麻烦
  2. 还是微信,分享图片会导致内存泄露,虽然只是泄露的_ShareActivity,也不算很大,只有4Kb左右,但还是有些不爽的,目前在着力解决这个问题

因为测试的并不算太全面,所以暂时遇到的坑就这些,希望多多交流(o゚▽゚)o

from shareutil.

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.