Skip to content

Commit

Permalink
Update MainActivity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
adin234 committed Nov 29, 2013
1 parent 237d469 commit 2d5e1fe
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Android/test/com/globelabs/api/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,31 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
GlobeApi globe = new GlobeApi();

Auth oauth = globe.auth("97nG9SMy74jC7ocyn6i7xyCd5ny5SpXd", "fd64841f05085429f5b9ea91679fe62a7e2373afdfc6b3381685ecfb317819f1");
Auth oauth = globe.auth("[KEY]", "[SECRET]");
Log.d("Login", oauth.getLoginUrl());
oauth.getAccessToken("p6eUy4LKrh76xoGuAKKp9Ub75q5I5nA86Hrb9BjSKbrd7h49jMgHgMgXbIea9xkI4bgnLHKz5KLUzrB5RuokERLunR7p4HXr6ykFoaxRAS76KKdF9RzobCBra8RfA7cxbeia6zfazz5jCqXKokFkAx8bSMR6a8Fn77KeHbLEoXuMkBEKu7d5r4Up5gk8HGa9EqIAygndI8xjXGHBxraLhrA9XjS8eApaHap5RGIkRKbnUMgxz6uABL7Lh7zpRbUM",
oauth.getAccessToken("[CODE]",
new PostRequestHandler() {
@Override
public void postProcess(String string) {
Log.d("TEST ACCESS", string);
}
});
Sms sms = globe.sms("4448");
sms.sendMessage("X1obYywA-O5GRAEv4vEUrk-MvJF6P3uNkgLQS3roQUw",
"9176234236",
"message here",
Sms sms = globe.sms("[SHORTCODE]");
sms.sendMessage("[ACCESS_TOKEN]",
"[RECEIVER_NUMBER]",
"[MESSAGE]",
new PostRequestHandler() {
public void postProcess(String string) {
Log.d("TEST", string);
//process the json response here
Log.d("SEND SMS RESPONSE", string);
}
});

Payment payment = globe.payment("X1obYywA-O5GRAEv4vEUrk-MvJF6P3uNkgLQS3roQUw", "9176234236");
payment.charge(0, "44481000008", new PostRequestHandler() {
Payment payment = globe.payment("[ACCESS_TOKEN]", "[RECEIVER_NUMBER]");
payment.charge([AMOUNT], "[REFERENCE_CODE]", new PostRequestHandler() {
@Override
public void postProcess(String string) {
//process the json response here
Log.d("CHARGE RESPONSE", string);
}
}
Expand Down

0 comments on commit 2d5e1fe

Please sign in to comment.