- # to get your own developer credentials from http://developer.knurld.io/
- Create dropbox app and put access_token in string.xml (This is for storing wav file) reference : https://blogs.dropbox.com/developers/2014/05/generate-an-access-token-for-your-own-account/ P.S. If you do not have dropbox account, still ok. Keep access token in string.xml as empty and it will directly upload wav files to knurld dropbox account. Note that, It will add network latency to app and app will perform little slow.
##Knurld Getting Started Guide http://developer.knurld.io/getting-started-guide-0
-
checkout project
-
import in Android Studio or any Editor
-
Change following values in string.xml (%project_folder%/app/src/main/res/values/strings.xml)
<!-- client id and client secret will be found at the knurld developer account --> <string name="client_id">IpctcXXX</string> <string name="client_secret">zojtWjAnqXXX</string> <!-- You will get mail for dev id once you registered, Do not put Bearer: in developer id--> <string name="developer_id">eyJhbGciXXXXXXX-kdfjwnvpls</string> <!--If you do not have it you can keep it blank--> <string name="dropbox_access_token">UmDUkC6dXXXXX</string>
-
Go to https://explore.knurld-demo.com/#/# and create app model with Boston, Chicago and Pyramid
Click on create button you will get following screen, if you do not have app-model created automatically user will redirect to app-model screenThen update appmodel id from below screen
other way is curl #####Creating an app-model
#####Getting an OAuth2 token: export ACCESS_TOKEN=
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d client_id="$CLIENT&client_secret=$CLIENT_SECRET" "https://api.knurld.io/v1/oauth/client_credential/accesstoken?grant_type=client_credentials" | grep access_token | cut -d"\"" -f4
curl -XPOST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -H "Developer-Id: $DEV_ID" -d '{ "mode": "PassPhrase", "vocabulary": ["Boston","Chicago","Pyramid"], "verificationLength":3 }' "https://api.knurld.io/v1/app-models"
Response will be : {
"href":"https://api.knurld.io/v1/app-models/4e0473894972397714838708bb0002696" } -
Fill application ID from above response to
<string name="app_model">4e0473894972397714838708bb0002696</string>
-
Build and Run
-
Screens: