在addThis安卓应用中添加签名

时间:2012-02-23 06:59:31

标签: android addthis

我正在开发一个新闻阅读器类型的Android应用程序。从这个应用程序用户可以在Facebook或Twitter上分享他最喜欢的新闻链接。链接共享工具由addThis android库提供。现在我想在发布链接时添加签名(例如:“通过MyNewsReaderApp共享”)。但是没有添加签名字符串的选项。我不想在签名字符串中添加新闻说明。请帮忙。

1 个答案:

答案 0 :(得分:0)

您必须在应用程序中添加签名jar文件,然后从用户处获取签名。该签名可以存储在您的SD卡中或您想要的位置,即我们必须为此提供路径。

String  fileName;

静态位图位图; private static final int CAPTURE_REQUEST_CODE = 0;

/**
 * 
 */
Intent intent;
private void startCaptureActivity() {


     intent = new Intent("biz.binarysolutions.signature.CAPTURE");



    String keyFileName    = "biz.binarysolutions.signature.FileName";
    String keyTitle       = "biz.binarysolutions.signature.Title";
    String keyStrokeWidth = "biz.binarysolutions.signature.StrokeWidth";
    String keyCrop        = "biz.binarysolutions.signature.Crop";
    String keyWidth       = "biz.binarysolutions.signature.Width";
    String keyHeight      = "biz.binarysolutions.signature.Height";

  fileName    = Environment.getExternalStorageDirectory()+ "/imdad.png";    // set the file name (global write permissions)
    //String  title       = "Imdad app";    // optional, default is set in AndroidManifest.xml
    int     strokeWidth = 10;    // optional, default is 12
    boolean crop        = false; // optional, default is true

    // allowed units: px, dp, dip, sp, pt, mm, in
    String width  = "600dip"; // optional, default is max
    String height = "300dip"; // same as above

    intent.putExtra(keyFileName, fileName);
    //intent.putExtra(keyTitle, title);
    intent.putExtra(keyStrokeWidth, strokeWidth);
    intent.putExtra(keyCrop, crop);
    intent.putExtra(keyWidth, width);
    intent.putExtra(keyHeight, height);
    //Log.v("FILE SAVE ",fileName);
    Button done=new Button(this);
    done.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            startActivityForResult(intent, CAPTURE_REQUEST_CODE);

        }
    });
//  startActivityForResult(intent, CAPTURE_REQUEST_CODE);


}

这是添加您可以从biz.binarysolutions

购买的签名应用andjar文件的代码