WearHttp

General

Category
Free
Tag
Networking
License
Apache License, Version 2.0
Registered
Sep 22, 2014
Favorites
0
Link
https://github.com/takahirom/WearHttp
See also
rxnetwork-android
WatchTower
EasyFTP
FARLA
DMNetworking

Additional

Language
Java
Version
0.0.7 (Oct 21, 2015)
Created
Sep 21, 2014
Updated
Oct 23, 2015 (Retired)
Owner
Takahiro Menju (takahirom)
Contributor
Takahiro Menju (takahirom)
1
Activity
Badge
Generate
Download
Source code

WearHttp

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

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

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.