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% . Anyway, @ruqqq did some searching online, and the one of most importance was this:
http://www.mail-archive.com/[email protected]/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 ) 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 ).
Screenshot: http://twitpic.com/1w1p6t
New Screenshot (Still ugly ): 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/ActivityThumbnailPrototype-Application
framework source: Come on, it's just a line .
Very interesting. Looking forward to seeing/hearing more! =)
yay! experimentation succeed.
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.
wow this is great news looking forward to seeing cards like on web os
the wonders of Android!
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 ?
Daneshm90: This has to be baksmali/smali-ed in.. ^^
Cyanogen Please Put this in you next ROM! Android is just awesome! thanks for the post!
Daneshm90: This has to be baksmali/smali-ed in.. ^^
Click to expand...
Click to collapse
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
Wow this has great potential!
I agree is this became stable Activity closer and switcher in the format + ADW + cyan or any other great developer + froyo = greatness
The bitmap can be used to make rotation and other screen changes faster. Load the bitmap before you load the real screen. This could be very important.
lsim001 said:
The bitmap can be used to make rotation and other screen changes faster. Load the bitmap before you load the real screen. This could be very important.
Click to expand...
Click to collapse
Thats actually true. The iPhone OS takes a screenshot of each app on exit, and then when you open it again it displays that screenshot until the activity is fully loaded. Could be implemented as such on Android too, but would take a lot of back end work.
Also, theres one thing I'm worried about. Since it takes a screenie on every OnPause of the activity, how will you stop it from displaying a "card" for every activity of an application. I mean for instance my game has 3 activities, one for each the play surface, the start screen, and the score screen, wouldn't I see a "card" for each of those the way this is now?
Sounds like that was put in to future proof the OS.
At the time it was probably too gpu reliant, and they decided to forego it.
Hello!
Please excuse my ignorance, but I have a few questions.
I am the developper of TaskOS and this feature is what I'm looking for months in my application.
Si, if I understand well this topic, the linecode to add must be done by ROM's developpers, is it true?
I really would like to have a list of compatible ROM's or please tell me if I am totally misunderstanding what you say.
Profete162
Profete, I don't think that any ROMs have this yet because it has just been discovered.
Je crois qu'il n'y a pas de ROMs qui utilisent ce code car il vien d'etre decouvert
Hi all, by uncommenting the line, you can then simply refer to the official API (oddly), and all the methods will work instead of returning null (for thumbnails). Check it out here: http://developer.android.com/reference/android/app/ActivityManager.RunningTaskInfo.html
According to Fede (developer of LauncherPro), the thumbnail resolution is 84dip by 63dip .
profete162: As of now, I doubt any ROMs include this. Hit me up on Twitter @Wysie_Soh !
profete162 said:
Hello!
Please excuse my ignorance, but I have a few questions.
I am the developper of TaskOS and this feature is what I'm looking for months in my application.
Si, if I understand well this topic, the linecode to add must be done by ROM's developpers, is it true?
I really would like to have a list of compatible ROM's or please tell me if I am totally misunderstanding what you say.
Profete162
Click to expand...
Click to collapse
this is at discussion stage currently and the first post is just my prototype to show it works.
basically, the current plan is to improvise the code to:
1. higher resolution + optimization (perhaps: a bit sensitive issue)
2. orientation detection (discussed with Fede on twitter, it's quite simple)
3. incorporate in custom rom (e.g. cyanogenmod)
...if you're using CyanogenMod, get in touch with Wysie to get his framework or .. you can compile yourself to test it.
i don't have my N1 with me right now and hence can't develop this any further than now. *irritated*
Any further developments with this, guys?
gee
gee willickers!
I'm at my first Android Apps creation and I would like to pull information from the web.
I want to get on the Android Device only the selection ( 6 drop down) and get the Schedule on the display after the selection is done.
I have attached the screenshot of the drop down selection that I want to put on my Apps. I was looking at Spinner, but I am pretty sure that since the selection is done on the web page that I could just pull the info from the page for each drop down and re-page it on the Apps. Something like having the 6 drop down then once the 6 selection is done the Page will be popping up on the device. It could be open as a Spreadsheet or pure HTML.
In the Eclipse Layout it is something similar that I am looking for.
Should HTTPGet would do the job?
Keep in mind each drop down are providing option in the next one. they need to be filled in sequence.
Any suggestion would be appreciated.
Thanks,
Sylvain
Hi everyone, I'm a longtime lurker on this forum, but this is the first second thread I've opened. I've just begun studying at the university level, majoring in mechatronics systems engineering and minoring in computing science. I've done a lot of research in the area of music theory, and I discovered peculiar arrangement of musical notes which I call a "pitch-correct harmonic note table" (Google it for a higher resolution than the attached image; I'm too new to post links).
The concept has been explored in the past (see Wikipedia's harmonic note table layout) and the interesting thing about it is that it visually reveals how notes and chords are related to each other. My version, unlike every other one I've found, preserves the proper pitch spelling. A C minor chord, for example, is properly notated as C-Eb-G, not C-D#-G.
The table by itself can prove useful for those learning theory and composition, but right now it's just a picture. Here's where Android application development comes in. I hope to turn this picture into an interactive chord-generating device. It'd be like a guitar, except anyone can pick it up and create music with it, as the chords are easy to play and the relationships are obvious.
The application's general flow would go something like this: First, select a key signature (which positions the purple ribbon), time signature and tempo. Hold down the root of the desired chord. Slide your finger up to select its major chord or down to select its minor chord, and release. Press the root again to play the chord or press a different note (like the seventh) to play an extended chord. The chord will loop until you perform that last step again for a different chord (selecting another chord by touching and sliding does not interrupt the looping).
However, here's where my inexperience with development hinders my progress with this application. I've only taken one programming course and it was in C. I'm taking the Java course now but we're only going as far as the command line. I'm therefore at a loss as to where to begin. I have the SDK and Eclipse all set up and I have some basic ideas for how I would go about coding the notes, like using the "fifths" and "augmented" axes to create a rectangular grid instead of trying to use the hexagonal grid that the table is currently in. I'm probably going to end up creating a playChord() method with parameters for root, quality, extension, and bass. I'm not sure whether to use Canvas or OpenGL; I'm not sure whether to use JetPlayer or MediaPlayer, .mid's or .mp3's or .ogg's, or generate the chords on the fly; I'm not even sure how I'm going to voice the chords (though my Casio keyboard might be able to help with that).
Most of those issues I can worry about later though. For now I'm going to focus on creating something like a soundboard except more refined. This is why I looked to XDA - to give me an initial push in the right direction so I can avoid coding myself into a corner and having to start over. If you can give me any tips or advice, I'll greatly appreciate it. =)
Bump? =)
Hello,
I hope this thread is placed right. If not feel free to move it.
I have a fairly simple idea:
All I want is to add a button to the Android 6 text selection menu that appears on several text fields like this:
developer.android.com/images/android-6.0/text-selection.gif
So far I managed to add my app to the "..." menu by adding text processing intents to my app manifest. But I also want to add a button to the "paste" menu as well so I can alternatively execute my own paste operation. Since I have never customized my Android OS I am not sure where to start. It would be perfect if there was a way to do that using official APIs so I could potentially put my final app into the playstore. Do you have any ideas how to approach this?
My system: OnePlus X, Android 6.0.1, CyanogenMod 13.0-20160819-nightly-onyx
Thank you for your help.
Greetings,
vrcomputing
I have done some basic Android dev by creating a simple app that is basically like a website.
Enter some data on a "form", button does some logic based on the form data, and displays output in a ListView or RecyclerView.
This is basically a "website" that happens to be implemented as an Android app.
I would like to do a tutorial that showcases mobile specific features like touch screen, accelerator, etc.
Anyone have any ideas?
Also, is this the right forum to ask coding specific questions?