Jump to content

Recommended Posts

Posted

I want to be able to run a specific java method in an android program (APK).

How can I do it?

------------------

Here is an example where I test TapJoy implementation (and run some code that simulate some points that have been earned.):

Somewhere in the code of an Activity that implements TapjoyEarnedPointsNotifier I have

TapjoyConnect.getTapjoyConnectInstance().setEarnedPointsNotifier(this);

Here is the interface of TapjoyEarnedPointsNotifier
public abstract interface TapjoyEarnedPointsNotifier
{
  public abstract void earnedTapPoints(int paramInt);
}


What I want to do is to simulate a call to earnedTapPoints. As an example I can do it using:
TapjoyConnect.getTapjoyConnectInstance().tapjoyOffers.tapjoyEarnedPointsNotifier.earnedTapPoints(12345);
or by finding all Activities, and running earnedTapPoints in one of these activities.

----------------------

The goal is to test some code. I cannot change the source code as I'm testing the "final version", but I can read the source code.

Posted

Seems interesting, will see if I can somehow apply this. Shifted to c# though, was sick of Java and JIDEA

Sent from my GT-I9100 using Tapatalk 2

  • 1 month later...
Posted

I want to be able to run a specific java method in an android program (APK).

How can I do it?

------------------

Here is an example where I test TapJoy implementation (and run some code that simulate some points that have been earned.):

Somewhere in the code of an Activity that implements TapjoyEarnedPointsNotifier I have

TapjoyConnect.getTapjoyConnectInstance().setEarnedPointsNotifier(this);

Here is the interface of TapjoyEarnedPointsNotifier

public abstract interface TapjoyEarnedPointsNotifier

{

public abstract void earnedTapPoints(int paramInt);

}

What I want to do is to simulate a call to earnedTapPoints. As an example I can do it using:

TapjoyConnect.getTapjoyConnectInstance().tapjoyOffers.tapjoyEarnedPointsNotifier.earnedTapPoints(12345);

or by finding all Activities, and running earnedTapPoints in one of these activities.

----------------------

The goal is to test some code. I cannot change the source code as I'm testing the "final version", but I can read the source code.

I tried that and it doesnt work since the hex values vary too much. You have to make a routine to change the value with the real server answer since points are not accepted when it comes to the answer

Posted

I found this using GameCIH, Input Name

Hoping I sill get a lot of points or etc.

But its on their server even you edit it you will get the same results

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.