View Single Post
Old 01-30-2012, 02:05 PM   #16
hberntsen
Member
hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.hberntsen is no ebook tyro.
 
Posts: 10
Karma: 1358
Join Date: Jan 2012
Device: PRS-T1
I made an app to enable the no-refresh mode, see norefreshenabler.zip attached to this post for the apk file and sourcecode. Once installed, just run the app and the no-refresh mode is enabled automatically. With no-refresh mode i mean the black and white mode you get when you zoom in the browser. With this app you do not need to do that trick anymore, just run it.

It is based on the code of Morkl, I edited the EinkListView.java so that it doesn't need a modified android sdk to compile. It now uses reflection, so the app searches at runtime for the right method and calls it. For example:
Morkl's code:
Code:
	@Override
	public void invalidate() {
		super.invalidate(mUpdateMode);
	}
New:
Code:
	@Override
	public void invalidate() {
		try {
			Method invalidateMethod = super.getClass().getMethod("invalidate", int.class);
			invalidateMethod.invoke(this, mUpdateMode);
		} catch(Exception e) {
			e.printStackTrace();
		}
	}
I tried to install/run the app on my phone and that works, it just prints a stacktrace because the method does not exist.

EDIT 7 feb: You might want to check out version 2 in post #33
Attached Files
File Type: zip norefreshenabler.zip (76.5 KB, 662 views)

Last edited by hberntsen; 02-07-2012 at 02:59 PM.
hberntsen is offline   Reply With Quote