-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d77f4c
commit 69a7347
Showing
13 changed files
with
240 additions
and
36 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,15 @@ | |
import android.os.Bundle; | ||
import android.util.Log; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import androidsdk.devless.io.devless.interfaces.DeleteResponse; | ||
import androidsdk.devless.io.devless.interfaces.EditDataResponse; | ||
import androidsdk.devless.io.devless.interfaces.GetDataResponse; | ||
import androidsdk.devless.io.devless.interfaces.LoginResponse; | ||
import androidsdk.devless.io.devless.interfaces.PostDataResponse; | ||
import androidsdk.devless.io.devless.interfaces.SearchResponse; | ||
import androidsdk.devless.io.devless.interfaces.SignUpResponse; | ||
import androidsdk.devless.io.devless.main.Devless; | ||
import androidsdk.devless.io.devless.messages.ErrorMessage; | ||
|
@@ -37,39 +45,145 @@ protected void onCreate(Bundle savedInstanceState) { | |
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); | ||
|
||
/* | ||
|
||
devless.signUpWithEmailAndPassword("[email protected]", "password", sp, new SignUpResponse() { | ||
// Sign Up | ||
/* | ||
devless.signUpWithEmailAndPassword("[email protected]", "password", sp, new SignUpResponse() { | ||
@Override | ||
public void onSignUpSuccess(Payload payload) { | ||
Log.e("hey", payload.toString()); | ||
Log.e("==Success==", payload.toString()); | ||
} | ||
@Override | ||
public void onSignUpFailed(ErrorMessage errorMessage) { | ||
Log.e("hey", errorMessage.toString()); | ||
Log.e("==Failure==", errorMessage.toString()); | ||
} | ||
}); | ||
*/ | ||
|
||
|
||
/* | ||
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()); | ||
} | ||
@Override | ||
public void userNotAuthenticated(ErrorMessage message) { | ||
Log.e("UnAuth", message.toString()); | ||
} | ||
@Override | ||
public void fullPostDataResponse(ResponsePayload response) { | ||
Log.e("FullPostdata", response.toString()); | ||
} | ||
}); | ||
*/ | ||
|
||
devless.getData("plans", "plans_table", new GetDataResponse() { | ||
/* get data | ||
devless.getData("plans", "test_table", new GetDataResponse() { | ||
@Override | ||
public void onSuccess(ResponsePayload response) { | ||
Log.e("==success==", response.toString()); | ||
Log.e("success", response.toString()); | ||
} | ||
@Override | ||
public void onFailed(ErrorMessage errorMessage) { | ||
Log.e("==failed==", errorMessage.toString()); | ||
Log.e("Failed", errorMessage.toString()); | ||
} | ||
@Override | ||
public void userNotAuthenticated(ErrorMessage message) { | ||
Log.e("UnAuth", message.toString()); | ||
} | ||
@Override | ||
public void fullRequestResponse(ResponsePayload response) { | ||
Log.e("FullPostData", response.toString()); | ||
} | ||
}); | ||
*/ | ||
|
||
|
||
/* | ||
Map<String, Object> change = new HashMap<>(); | ||
change.put("name", "kulee"); | ||
devless.edit("plans", "test_table", change, "1", new EditDataResponse() { | ||
@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 fullEditDataResponse(ResponsePayload response) { | ||
Log.e("FullPostData", response.toString()); | ||
} | ||
}); | ||
*/ | ||
|
||
/* Delete Message | ||
devless.delete("plans", "test_table", "1", new DeleteResponse() { | ||
@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 fullDeleteResponse(ResponsePayload response) { | ||
Log.e("FullPostData", response.toString()); | ||
} | ||
}); | ||
*/ | ||
|
||
|
||
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.