Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,421 Members 38,937 Now Online
XDA Developers Android and Mobile Development Forum

[INFO] Palm Pre (Cards-Like) Thumbnails

Tip us?
 
Wysie
Old
(Last edited by Wysie; 12th June 2010 at 07:36 AM.)
#1  
Senior Member - OP
Thanks Meter 6
Posts: 1,119
Join Date: Jul 2009
Default [INFO] Palm Pre (Cards-Like) Thumbnails

Hi all,

@ruqqq (aka arctu, author of HelixLauncher) tweeted me a whole bunch of stuff this afternoon, and to be honest, this is 99% his credit, I only changed the required line in framework to help him test, so I get 1% :P. Anyway, @ruqqq did some searching online, and the one of most importance was this:

http://www.mail-archive.com/android-.../msg21135.html

After looking at the code, we simply uncommented the following line in ActivityThread.java:

Code:
//info.thumbnail = createThumbnailBitmap(r);
With it commented, it thumbnail will always be null, with it uncommented, well, we may be able to get actual thumbnails. @ruqqq then went on to write a quick (and ugly :P) app to find out if thumbnails of running apps can be retrieved, and the result is, yes, it can be retrieved. The screenshot I posted only shows 2 apps cause of the lack of ScrollView, but I believe he's writing a better proof-of-concept as we speak, while I'm rushing to go out once I end this post (else the girlfriend's fury :P).

Screenshot: http://twitpic.com/1w1p6t
New Screenshot (Still ugly :P): http://twitpic.com/1w1v6k

So what's the point of this post? Nothing, really. It's just that the commented line has apparently been in there as early as 1.5, but it was always commented out. We removed the comment, and it actually does return thumbnails. With this, it means that if future ROMs are compiled with that line uncommented, it will be possible to actually write apps to emulate/simulate the cards system, possibly even on a system level (by overriding the recent applications dialog).

That's all .

@ruqqq's concept app source: http://github.com/ruqqq/ActivityThum...pe-Application
framework source: Come on, it's just a line :P.
 
chowlala
Old
#2  
chowlala's Avatar
Senior Member
Thanks Meter 73
Posts: 818
Join Date: Jul 2009
Very interesting. Looking forward to seeing/hearing more! =)
 
ruqqq
Old
#3  
Senior Member
Thanks Meter 1,247
Posts: 526
Join Date: Oct 2008
yay! experimentation succeed. :P

just to add on:

the idea is that third-party developers can implement this in their apps without any breaking codes. the api has always been official. if thumbnail doesn't exist, it returns a null. so, a dev simply has to write a code that checks for this property and carry out 'instructions' based on the availability of the thumbnail.

implications:

what we learn is that the reason they disabled the code is to prevent wasteage of resource (CPU and Mem) as the thumbnail code runs everytime the onPause of an activity is performed. This means that enabling it may or may not cause slowness in the system. Conclusion? Need extensive testing.
Follow me @ruqqq for updates!

Main Phone: Stock/Odexed/Rooted Xperia V - 4.1
 
blaboy51
Old
#4  
Senior Member
Thanks Meter 0
Posts: 142
Join Date: Jun 2009
Location: Richmond Hill,Ga
wow this is great news looking forward to seeing cards like on web os
 
eViL D:
Old
#5  
eViL D:'s Avatar
Retired Recognized Developer
Thanks Meter 1,344
Posts: 4,472
Join Date: Jun 2006

 
DONATE TO ME
the wonders of Android!
 
Daneshm90
Old
(Last edited by Daneshm90; 12th June 2010 at 07:39 AM.)
#6  
Daneshm90's Avatar
Recognized Developer
Thanks Meter 636
Posts: 3,309
Join Date: Jun 2009
Pretty cool stuff. Perhaps you can make it so only if the app is running is that variable on and generating thumbnails ? Regardless cant wait for what developers do with this, im sensing the app taskos with live thumbnails it already has the fling up to end task.

Also to prevent this from being rom specific, maybe you could compare the hexcodes of 2 framework-res.apk's one with uncommented and one without, that way it could be added to any existing rom ?
Scripts : Recovery Customizer Link Apk Manager Link Auto Deodexer Link Backup Manager Link Update.zip Modifier/Creator Link
 
Wysie
Old
#7  
Senior Member - OP
Thanks Meter 6
Posts: 1,119
Join Date: Jul 2009
Daneshm90: This has to be baksmali/smali-ed in.. ^^
 
johnnie93
Old
#8  
johnnie93's Avatar
Senior Member
Thanks Meter 72
Posts: 399
Join Date: Apr 2009
Location: Kuwait
Cyanogen Please Put this in you next ROM! Android is just awesome! thanks for the post!
(((NEW)))
Phone: HTC desire Z
SDCard: 16GB class 2
Rom Build: CM7
(((Sold)))
Phone: Samsung Galaxy S
SDCard: 16GB Class 2
(((DEV PHONE)))
Phone: Google Nexus One
SDCard: 8GB class 6
Rom Build: CM7
(((OLD)))
Phone: T-Mobile G1 - Black
ROM Build: changing too much
Radio: 2.22.19.26I
SPL: Haykuro's SPL
SDCard: 8GB class 6
 
Daneshm90
Old
(Last edited by Daneshm90; 12th June 2010 at 08:11 AM.)
#9  
Daneshm90's Avatar
Recognized Developer
Thanks Meter 636
Posts: 3,309
Join Date: Jun 2009
Default Re: [INFO] Palm Pre (Cards-Like) Thumbnails

Quote:
Daneshm90: This has to be baksmali/smali-ed in.. ^^
Is that even possible ? it doesnt have a classes.dex (Nvm, u have to push the classes.dex of framework.jar into framework-res and decompile)

can u give me a modded and unmodded framework-res ? just wanna do some digging
Scripts : Recovery Customizer Link Apk Manager Link Auto Deodexer Link Backup Manager Link Update.zip Modifier/Creator Link
 
jasrups
Old
#10  
jasrups's Avatar
Senior Member
Thanks Meter 4
Posts: 262
Join Date: Sep 2009
Location: Winnipeg
Wow this has great potential!
Phone: Galaxy Nexus (Rogers, Stock)

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Change Your Samsung Galaxy S2’s Dialer Background in Real Time

As with anything, if youve looked at something long enough, things can … more

Increase Your Multitasking Workflow with C-Floating Windows

Technology has put life on the fast track. Lazy, relaxed days have turned into … more

Compile Your Own Kernel From Source with Comprehensive Tutorial

One glance at any developer section of any device forum on XDA and youll find … more

WowWee Mip – Android Accessory Review – XDA Developer TV

The holidays will be here in no time, so why not start thinking about … more