Giter Club home page Giter Club logo

Comments (10)

aaronisme avatar aaronisme commented on May 30, 2024

同样的问题,link和text可以分享,但是video等不行,run example的时候闪退

from cordova-plugin-wechat.

match08 avatar match08 commented on May 30, 2024

我看了下里面的代码,是video没实现。

from cordova-plugin-wechat.

aaronisme avatar aaronisme commented on May 30, 2024

那个文件?@match08,看看能不能自己实现了

from cordova-plugin-wechat.

match08 avatar match08 commented on May 30, 2024

你看源码 原生的部分

from cordova-plugin-wechat.

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

@match08 请问用的哪个版本?什么平台?代码是怎么样的?

@AaronChen118 android暂时只有文本,图片和链接。

from cordova-plugin-wechat.

Chaunjie avatar Chaunjie commented on May 30, 2024

插件好像分享链接不能带缩略图哦,貌似作者没有写图片缩略,微信分享链接只能允许32k的图片过去

from cordova-plugin-wechat.

Chaunjie avatar Chaunjie commented on May 30, 2024

protected Bitmap resizeBitmap(Bitmap bitmap, int w, int h) {
if(null == bitmap) {
return null;
}

    Bitmap BitmapOrg = bitmap;  
    int width = BitmapOrg.getWidth();  
    int height = BitmapOrg.getHeight();  
    int newWidth = w;  
    int newHeight = h;  

    float scaleWidth = ((float) newWidth) / width;  
    float scaleHeight = ((float) newHeight) / height;  

    Matrix matrix = new Matrix();  
    matrix.postScale(scaleWidth, scaleHeight);  
    // if you want to rotate the Bitmap   
    // matrix.postRotate(45);   
    Bitmap resizeBitmap = Bitmap.createBitmap(BitmapOrg, 0, 0, width,  
                    height, matrix, true);    

    bitmap.recycle();

    return resizeBitmap;
}

加上这个就可以压缩图片引入import android.graphics.Matrix;望作者采纳

from cordova-plugin-wechat.

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

@xudao520 原来插件的想法是尽量做的和官方SDK一样,也就是说,仅仅作为一个Javascript调用SDK的中转。最近比较忙,回头我测试一下你的代码,看看吧。

from cordova-plugin-wechat.

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

终于有点时间看图片的问题了,现在新的版本加入了压缩的代码。

from cordova-plugin-wechat.

Chaunjie avatar Chaunjie commented on May 30, 2024

可以出一系列的社会化分享

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.