Skip to content

Commit

Permalink
update android script
Browse files Browse the repository at this point in the history
  • Loading branch information
noobpk committed Aug 23, 2024
1 parent 76e7814 commit 96acf7f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions android_handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ Java.perform(function () {
var response_class = Java.use('');
var response_method = '';

request_class.request_method.overload('java.lang.String').implementation = function (request) {
console.log(colors.green, "[Original Request Body]\n", colors.resetColor, JSON.stringify(request), '\n');
request_class.request_method.overload('java.lang.String').implementation = function (arg0) {
console.log(colors.green, "[Original Request Body]\n", colors.resetColor, JSON.stringify(arg0), '\n');

var js = {};

send({ from: '/http', payload: JSON.stringify(js), api_path: 'request' })

var rcv_data = "FAILURE";
Expand All @@ -46,8 +49,11 @@ Java.perform(function () {
return result;
}

response_class.response_method.overload('java.lang.String').implementation = function (response) {
console.log(colors.green, "[Original Response Body]\n", colors.resetColor, JSON.stringify(response), '\n');
response_class.response_method.overload('java.lang.String').implementation = function (arg0) {
console.log(colors.green, "[Original Response Body]\n", colors.resetColor, JSON.stringify(arg0), '\n');

var js = {};

send({ from: '/http', payload: JSON.stringify(js), api_path: 'response' })

var rcv_data = "FAILURE";
Expand Down

0 comments on commit 96acf7f

Please sign in to comment.