Skip to content

CurrencyConverter, convert any currency into different currency

License

Notifications You must be signed in to change notification settings

moktar/CurrencyConverter

Repository files navigation

CurrencyConverter

Android Arsenal API

Integrating into your project

This library is available in JitPack.io repository. To use it, make sure to add the below inside root build.gradle file

allprojects {
    repositories {
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
}

and add the repository's url to the app's build.gradle file.

dependencies {
   implementation 'com.github.vinisauter:CurrencyConverter:master-SNAPSHOT'
    // Other dependencies your app might use
}

IMPLEMENTATION

Get currency list:

 List<Currency> clist = CurrencyConverter.getCurrencyList();

Calculate currency from:

 CurrencyConverter.calculate(10, "BDT", "USD", new CurrencyConverter.Callback() {
            @Override
            public void onValueCalculated(Double value, Exception e) {
                if (e != null) {
                    Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show();
                }else{
                    //Do someting with value.
                    ...
                    textView.setText(CurrencyConverter.formatCurrencyValue(to, value));
                }
            }
        });

Reset data if necessary:

 CurrencyConverter.reset();

About

CurrencyConverter, convert any currency into different currency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages