Skip to content

Commit

Permalink
Merge: Merged @nayrams pull request. works perfectly so the token iss…
Browse files Browse the repository at this point in the history
…ue has now been fixed. Big ups @nayram
  • Loading branch information
charlesagyemang committed Jan 23, 2018
2 parents 58443b4 + d1327f1 commit 36a3760
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 186 deletions.
4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
![alt text](https://img.shields.io/badge/dv--android--sdk--1.0-official-blue.svg)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/7b3ca66eec8045158528d57a29ed37ad)](https://www.codacy.com/app/charlesagyemang/dv-android-sdk-1.0?utm_source=github.com&utm_medium=referral&utm_content=DevlessTeam/dv-android-sdk-1.0&utm_campaign=Badge_Grade)

[![](https://jitpack.io/v/DevlessTeam/dv-android-sdk-1.0.svg)](https://jitpack.io/#DevlessTeam/dv-android-sdk-1.0/1.0)
[![](https://jitpack.io/v/DevlessTeam/dv-android-sdk-1.0.svg)](https://jitpack.io/#DevlessTeam/dv-android-sdk-1.0/1.0.1)

# Devless_Android_SDK(dv-android-sdk-1.0)

Expand All @@ -23,7 +22,7 @@ Add the dependency to your build.gradle(Module: app)
```Java
dependencies {
...
compile 'com.github.DevlessTeam:dv-android-sdk-1.0:1.0'
compile 'com.github.DevlessTeam:dv-android-sdk-1.0:1.0.1'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,18 @@ protected void onCreate(Bundle savedInstanceState) {
String devlessToken = "41b1f8b6dd4823f63f8eeed626bfafa8"; //this is my token

//This is how to create a devless instance
Devless devless = new Devless(this, appUrl, devlessToken);
//Devless devless = new Devless(this, appUrl, devlessToken);

/*
setUpDevlessUserToken Right under the instance and pass in the
name of your shared preference variable. Im my case I called my shared preference *sp*
*/
devless.addUserToken(sp);
//devless.addUserToken(sp);

//Log.e("token", devless.getDevlessUserToken());

Log.e("==repo==", devless.getDevlessUserToken());

//Log.e("==repo==", devless.getDevlessUserToken());


// Sign Up
Expand All @@ -67,52 +69,76 @@ public void onSignUpFailed(ErrorMessage errorMessage) {
*/


/*
devless.loginWithEmailAndPassword("[email protected]", "password", sp, new LoginResponse() {
@Override
public void onLogInSuccess(ResponsePayload response) {
Log.e("==Success==", response.toString());
}
@Override
public void onLogInFailed(ErrorMessage errorMessage) {
Log.e("==Failure==", errorMessage.toString());
}
});
*/






/* Post Data
Map<String, Object> data = new HashMap<String, Object>();
data.put("name", "koobi");

devless.postData("plans", "test_table", data, new PostDataResponse() {
@Override
public void onSuccess(ResponsePayload response) {
Log.e("success", response.toString());
}

@Override
public void onFailed(ErrorMessage errorMessage) {
Log.e("Failed", errorMessage.toString());
}
// devless.loginWithEmailAndPassword("[email protected]", "password", sp, new LoginResponse() {
// @Override
// public void onLogInSuccess(ResponsePayload response) {
// Log.e("==Passed==", response.toString());
// }
//
// @Override
// public void onLogInFailed(ErrorMessage errorMessage) {
// Log.e("==Failure==", errorMessage.toString());
// }
// });


//
// devless.getData("gitmo", "test_table", new GetDataResponse() {
// @Override
// public void onSuccess(ResponsePayload response) {
// Log.e("Success", response.toString());
// }
//
// @Override
// public void onFailed(ErrorMessage errorMessage) {
// Log.e("Failure", errorMessage.toString());
// }
//
// @Override
// public void userNotAuthenticated(ErrorMessage message) {
// Log.e("UserNotAuth", message.toString());
// }
//
// @Override
// public void fullRequestResponse(ResponsePayload response) {
// Log.e("Full", response.toString());
// }
// });







//Post Data
// Map<String, Object> data = new HashMap<String, Object>();
// data.put("name", "koobi");
//
// devless.postData("plans", "test_table", data, new PostDataResponse() {
// @Override
// public void onSuccess(ResponsePayload response) {
// Log.e("success", response.toString());
// }
//
// @Override
// public void onFailed(ErrorMessage errorMessage) {
// Log.e("Failed", errorMessage.toString());
// }
//
// @Override
// public void userNotAuthenticated(ErrorMessage message) {
// Log.e("UnAuth", message.toString());
// }
//
// @Override
// public void fullPostDataResponse(ResponsePayload response) {
// Log.e("FullPostdata", response.toString());
// }
// });

@Override
public void userNotAuthenticated(ErrorMessage message) {
Log.e("UnAuth", message.toString());
}
@Override
public void fullPostDataResponse(ResponsePayload response) {
Log.e("FullPostdata", response.toString());
}
});
*/

/* get data
devless.getData("plans", "test_table", new GetDataResponse() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
public interface RequestResponse {
void onSuccess(ResponsePayload response);
void userNotAuthenticated(ErrorMessage message);
void fullRequestResponse(ResponsePayload response);
// void fullRequestResponse(ResponsePayload response);
}
Loading

0 comments on commit 36a3760

Please sign in to comment.