diff --git a/README.md b/README.md index fe89f95..2c1cd96 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Add the below dependency in your app build.gradle file: ... - implementation ('com.github.DevnagriAI:android-java-sdk:1.0.5@aar') { transitive(true) } + implementation ('com.github.DevnagriAI:android-java-sdk:1.0.6@aar') { transitive(true) } } @@ -94,7 +94,7 @@ And inside code: # Change Language In case you don't want to use the system language, you can set a different language in the updateAppLocale method. The language code (locale) needs to be present in a release from Devnagri. - +updateAppLocale may take some time (for example: 3-4 seconds), we suggest you to add a loader before calling updateAppLocale and stop in callback. Locale locale = new Locale("hi"); BaseApplication.devNagriTranslationSdk.updateAppLocale(activity, locale, new ResponseListener() { @@ -135,7 +135,7 @@ You can use these methods anywhere in your project and these will provide transl @Override public void onCallback(String translation) { // use translated text here - }           + } }); @@ -173,26 +173,21 @@ You can use these methods anywhere in your project and these will provide transl # Get Translations Of JSON Object - // This method is used to convert the entire JSON object to requested language - // ignoreKeys -> Send a list of strings that you want to ignore during the conversion process + // This method is used to convert the entire JSON object to requested language + // ignoreKeys -> Send a list of strings that you want to ignore during the conversion process - JSONObject json = new JSONObject(); - json.put("Name", "DevNagri SDK"); - json.put("Language", "Java"); - - devNagriTranslationSdk.getTranslationOfJSON(jsonObjectValue, - ignoreKeys, - new GenericCallback() { - @Override - public void onCallback(JSONObject translatedJsonObject) { - //Here you find translated JSON Object - } - }); - -# For Modular Approach - - Please add DevNagriSDK dependency in each module level gradle file. - - If you have multiple modules in your application, then in each module's base activity override the below method. - - public AppCompatDelegate getDelegate() { - return MainApplication.devNagriTranslationSdk.fetchAppDelegate(this, super.getDelegate()); - } + JSONObject json = new JSONObject(); + json.put("Name", "DevNagri SDK"); + json.put("Language", "Java"); + devNagriTranslationSdk.getTranslationOfJSON(jsonObjectValue, + ignoreKeys, + new GenericCallback() { + @Override + public void onCallback(JSONObject translatedJsonObject) { + //Here you find translated JSON Object + } + }); + + + + diff --git a/android-java-sdk.aar b/android-java-sdk.aar index fe63386..43eee32 100644 Binary files a/android-java-sdk.aar and b/android-java-sdk.aar differ diff --git a/jitpack.yml b/jitpack.yml index 31884fe..86f62dd 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,6 +1,6 @@ install: - FILE="-Dfile=android-java-sdk.aar" - - mvn install:install-file $FILE -DgroupId=com.github.DevnagriAI -DartifactId=android-java-sdk -Dversion=1.0.5 -Dpackaging=aar -DpomFile=pom.xml + - mvn install:install-file $FILE -DgroupId=com.github.DevnagriAI -DartifactId=android-java-sdk -Dversion=1.0.6 -Dpackaging=aar -DpomFile=pom.xml jdk: - openjdk11 before_install: diff --git a/pom.xml b/pom.xml index 1e947fa..2bb47ed 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ 4.0.0 com.github.DevnagriAI android-java-sdk - 1.0.5 + 1.0.6