Alex Brest
Alex Brest

Reputation: 105

How to feed fake time to an android app?

I'd like to know, can I feed fake time to a certain app? If I have the X app for example, can I create a Y app, that ensures that when the X app checks the time, it will receive the current time plus certain amount?

Cheers

Upvotes: 4

Views: 10676

Answers (1)

MaciejGórski
MaciejGórski

Reputation: 22232

You can't manipulate system clock normally.

On a rooted device you could try with SystemClock.setCurrentTimeMillis, but that's global for all applications.

Upvotes: 1

Related Questions