小编And*_*kss的帖子

InappBilling错误 - 验证是必需的.你需要登录你的谷歌帐户

我正在尝试进行不适用的演示.我按照本教程学习这个.

Lemme告诉我执行此任务所遵循的步骤

  1. 我使用了下面提到的代码

    package com.ohn.inappbilling;
    
    import android.content.Intent;
    import android.os.Bundle;
    import android.support.v7.app.ActionBarActivity;
    import android.util.Log;
    import android.view.View;
    import android.widget.Button;
    
    import com.hello.inappbilling.util.IabHelper;
    import com.hello.inappbilling.util.IabResult;
    import com.hello.inappbilling.util.Inventory;
    import com.hello.inappbilling.util.Purchase;
    import com.ohn.inappbilling.R;
    
    public class MainActivity extends ActionBarActivity {
    
    private static final String TAG = "com.hello.inappbilling";
    static final String ITEM_SKU = "com.buttonclick";
    IabHelper mHelper;
    private Button clickButton;
    private Button buyButton;
    
    
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        buyButton = (Button) findViewById(R.id.buyButton);
        clickButton = (Button) findViewById(R.id.clickButton);
        clickButton.setEnabled(false);
        String base64EncodedPublicKey = "******";
    
        mHelper = new …
    Run Code Online (Sandbox Code Playgroud)

android in-app-billing

6
推荐指数
1
解决办法
1348
查看次数

无法使用asmack和xmpp接收文件

我正在使用asmack和xmpp进行文件共享.我能够发送文件,但无法在另一台设备上接收文件.我做了很多研究和开发,发现很多方法尝试了所有这些但没有取得成功.似乎我犯了任何小错误,尝试了很多,但没有解决我的问题.我用来发送文件的代码是:

d.findViewById(R.id.btnsendphoto).setOnClickListener(
                    new OnClickListener() {

                        @Override
                        public void onClick(View v) {
                            // TODO Auto-generated method stub
                            if (!filepath.equals("")) {

                                configureProviderManager(connection);
                                FileTransferNegotiator.IBB_ONLY = true;
                                FileTransferNegotiator.setServiceEnabled(
                                        connection, true);
                                mFileTransferManager = new FileTransferManager(
                                        connection);

                                String to = connection.getRoster()
                                        .getPresence("cac6ba9dc9c6ac67@pc")
                                        .getFrom();
                                final OutgoingFileTransfer transfer = mFileTransferManager
                                        .createOutgoingFileTransfer(to);
                                File file = new File(filepath);

                                try {
                                    configureProviderManager(connection);
                                    transfer.sendFile(file, "test_file");
                                } catch (XMPPException e) {
                                    e.printStackTrace();
                                }
                                new AsyncTask<Void, Void, Void>() {

                                    protected void onPreExecute() {

                                    }

                                    @Override
                                    protected Void doInBackground(
                                            Void... params) {
                                        while (!transfer.isDone()) { …
Run Code Online (Sandbox Code Playgroud)

android xmpp asmack

5
推荐指数
0
解决办法
735
查看次数

标签 统计

android ×2

asmack ×1

in-app-billing ×1

xmpp ×1