SkillAgentSearch skills...

WearHttp

This library provides a means to access the content on the Web easily from AndroidWear. Welcome pull request

Install / Use

/learn @takahirom/WearHttp
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

WearHttp

This library provides a means to access the content on the Web easily from AndroidWear.

Android Arsenal

Example

Code in AndroidWear app

new WearGetText(MainActivity.this).get("http://example.com/text.txt", 
  new WearGetText.WearGetCallBack() {
    @Override
    public void onGet(String contents) {
        mTextView.setText(contents);
    }

    @Override
    public void onFail(final Exception e) {
        mTextView.setText(e.getMessage());
    }
});
new WearGetImage(MainActivity.this).get("https://example.com/image.png", 
  new WearGetImage.WearGetCallBack() {
    @Override
    public void onGet(Bitmap image) {
        mImageView.setImageBitmap(image);
    }

    @Override
    public void onFail(final Exception e) {
        mTextView.setText(e.getMessage());
    }
});

AndroidWear screen shot

image

Usage

In Mobile and Wear module build.gradle:
You must be implemented in both the Mobile and Wear

dependencies {
    ...
    compile 'com.kogitune:wear-http:0.0.5'
}

Example Project

Directory

  • mobilesample
  • wearsample

Suggestion

WearHttp can use in WearSharedPreferences and simultaneous.

License

This project is released under the Apache License, Version 2.0.

Related Skills

View on GitHub
GitHub Stars49
CategoryContent
Updated2y ago
Forks2

Languages

Java

Security Score

60/100

Audited on Aug 13, 2023

No findings