Quantcast
Channel: Chilkat Forum - latest questions
Viewing all articles
Browse latest Browse all 1061

Android: using Example for CkHttp and QuickGetStr - not working

$
0
0

Hello, I started to try out Chilkat-library with Android. I was able to print out the Chilkat-Version in a first Test, which I show in a TextView.

But if I try to output the result of a String I receive from http.quickGetstr I get an empty String.

Is it me doing it wrong, or is there a bug?

 public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView tv = new TextView(this);

        CkCrypt2 crypt = new CkCrypt2();

        // Display the version of the CkCrypt2 class
        tv.setText(crypt.version()); //works and shows 9.5.0.68

        setContentView(tv);

        //now http request

        CkHttp http = new CkHttp();

        boolean success;

        //  Any string unlocks the component for the 1st 30-days.
        success = http.UnlockComponent("Anything for 30-day trial");
        if (success != true) {
           //---
            return;
        }

        //  Send the HTTP GET and return the content in a string.
        String html;
        html = http.quickGetStr("http://www.wikipedia.org/");

        tv.setText(html);

Viewing all articles
Browse latest Browse all 1061

Trending Articles