[Live Wallpapers] dev your own - Nexus One Themes and Apps

was just thinking... once we get cracking on nexus development.. are ppl going to be able to design there own live wallpapers? would be sort of aweSOME!!!!

Depend what type of file they are.
Its obviously more than a picture or animated file.
My buddies first reply was "how very ..java scriptish"

I can't wait to see people create their own. I know it will be out of my current range of knowledge to do it myself. My friend suggested someone needs to make a Matrix like live wallpaper.

Bouncing boobies ftw!?

Carloswithac said:
Bouncing boobies ftw!?
Click to expand...
Click to collapse
And as you swipe to the next screen they jiggle to the way you swiped lol.

stewart1988 said:
and as you swipe to the next screen they jiggle to the way you swiped lol.
Click to expand...
Click to collapse
i would pay for this!!!

velazcod said:
i would pay for this!!!
Click to expand...
Click to collapse
http://www.youtube.com/watch?v=zKO-tZGuFDg

Aint these live wallpapers .GIF files?

Going thru the LiveWallpapers.apk right now. Interesting.... This is not something you can just replace. They are not GIF images. They are actually regular png/jpg with combo of some other code. I have not been programing for a while. I have to sit and figure out the actual logic behind them etc. I can tell you this came out of galaxy live wallpaper:
*/
void createParticle(struct Stars_s *star, struct Particles_s *part, float scale) {
float d = fabsf(randomGauss()) * State->galaxyRadius * 0.5f + randf(64.0f);
float id = d / State->galaxyRadius;
float z = randomGauss() * 0.4f * (1.0f - id);
float p = -d * ELLIPSE_TWIST;
Click to expand...
Click to collapse
/**
* Initialize all the stars. Called from Java.
*/
void initParticles() {
if (State->isPreview == 1) {
angle = 0.0f;
}
struct Stars_s *star = Stars;
struct Particles_s *part = Particles;
int particlesCount = State->particlesCount;
float scale = State->galaxyRadius / (State->width * 0.5f);
int i;
for (i = 0; i < particlesCount; i ++) {
createParticle(star, part, scale);
star++;
part++;
}
}
void drawSpace(float xOffset, int width, int height) {
bindTexture(NAMED_PFBackground, 0, NAMED_TSpace);
drawQuadTexCoords(
0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
width, 0.0f, 0.0f, 2.0f, 1.0f,
width, height, 0.0f, 2.0f, 0.0f,
0.0f, height, 0.0f, 0.0f, 0.0f);
}
Click to expand...
Click to collapse

The live wallpapers are evidently built using Processing(processing.org).
Source: http://www.curious-creature.org/2010/01/07/nexus-one-live-wallpapers/

shawncplus said:
The live wallpapers are evidently built using Processing(processing.org).
Source: http://www.curious-creature.org/2010/01/07/nexus-one-live-wallpapers/
Click to expand...
Click to collapse
nice find.. hope some ppl start developing these

There is already a bounty started for the first person to make Live Wallpapers for the community
http://alldroid.org/viewtopic.php?f=247&t=1283

From the Android IRC, think SDK for Live Wallpapers will be released very soon... likely with 2.1 SDK.

Processing
Processing is an artistically-inclined language built on Java that's relatively easy to use, and reminds me of coding flash animation. If this is written using Processing, the language is already available at http://www.processing.org.

ccunningham83 said:
I can't wait to see people create their own. I know it will be out of my current range of knowledge to do it myself. My friend suggested someone needs to make a Matrix like live wallpaper.
Click to expand...
Click to collapse
+1 to a Matrix wallpaper, and pressing it would have a ripple effect lighting up letters

http://androidandme.com/2010/01/news/google-to-offer-sdk-for-android-live-wallpapers/
just wait for the confirmed new sdk...kinda pointless making a bounty for this with the sdk release confirmed

DarkLord7854 said:
+1 to a Matrix wallpaper, and pressing it would have a ripple effect lighting up letters
Click to expand...
Click to collapse
+1 for both those ideas. If that wallpaper existed, I would be downloading it this moment and would love it forever.

Anyone know the location of the live wallpapers? I'd like to remove the ones I don't use. . . but, I guess, if they're part of the app, that might be a problem.
Pulled the apk. Think I just answered my own question. :-\

think /system/app/livewallpaper.apk .odex..
dont think you can just delete one but not sure

http://droidninja.com/?p=5341
"There are currently 10 live wallpapers to choose from and that number will be greatly expanding soon. Google will be releasing a SDK that will allow developers to code their own wallpapers, according to Android Engineer Romain Guy."

Related

Screen rotation on Tornado WM6??

The question was: Is the screen rotation possible on Tornado devices (for example for better Internet browsing).
Many efforts were done to gain this possibility. We have not fully received what we need, but we're on good way. We know now that the standard Tornado DDI.DLL driver is uncapable of screen rotation, so we (partially) replaced it with one taken from HTC Vox ROM. There is one serious disadvantage we're still working about: the joystick doesn't follow orientation for now, so using the phone in landscape mode is seriously difficult. We will be trying to adopt the Vox's keybddr.dll into Tornados.
I have collected all these things in an application, that you can install to skip manual registry editing.
Here is the application:
http://www.mediadrain.com/TDM_1.0.0.cab
You MUST install the following certificates! If not, a hard reset will be required!
http://www.mediadrain.com/WMtequan.cab
To rotate the screen select Change Driver option from the Display Driver option, and change to a VOX one.
i don't think it will be supported on this alpha version...!!!
qtek_metanol said:
i don't think it will be supported on this alpha version...!!!
Click to expand...
Click to collapse
this isn't connected
OS either supports screen rotation or not
WM6 supports screen rotation, like on the vox, so surely we could do the same for tornado but add some start menu shortcuts or a home screen plugin to make it rotate?
Phil
i tried writing an app in .net compact framework. While it worked and rotated a PPC WM5, it didn't work in my SP WM6.
maybe .net is hard-coded and disallows screen rotation on smartphone, what doesn't mean it's impossible
WM6 supports screen rotation, like on the vox, so surely we could do the same for tornado but add some start menu shortcuts or a home screen plugin to make it rotate
Click to expand...
Click to collapse
may you need the dll file from VOX which enable the screen rotation by opening the keyboard
i think we should write a list with Q&A, and other with Bugs, Do have somebody a list with a resume of troubles...??
i build a .NET project that allow to rotate the screen, but for me it works ONLY on emulator SDK only in both WM5 and WM6 why? i post the exe and the source.. give me some answer..
Code:
#include <windows.h>
#include <stdafx.h>
int
WINAPI
WinMain(
HINSTANCE,
HINSTANCE,
#ifdef UNDER_CE
LPWSTR,
#else
LPSTR,
#endif
int
)
{
DEVMODE DevMode;
int RotationAngles;
int CurrentAngle;
int NewAngle;
//
// Check for rotation support by getting the rotation angles supported.
//
memset (&DevMode, 0, sizeof (DevMode));
DevMode.dmSize = sizeof (DevMode);
DevMode.dmFields = DM_DISPLAYQUERYORIENTATION;
if (DISP_CHANGE_SUCCESSFUL == ChangeDisplaySettingsEx(NULL, &DevMode, NULL, CDS_TEST, NULL))
{
RotationAngles = DevMode.dmDisplayOrientation;
RETAILMSG(1, (L"ChangeDisplaySettingsEx supports these rotation angles %d", RotationAngles));
}
else
{
RETAILMSG(1, (L"ChangeDisplaySettingsEx failed to get the supported rotation angles."));
RotationAngles = -1;
}
//
// Get the current rotation angle.
//
memset(&DevMode, 0, sizeof (DevMode));
DevMode.dmSize = sizeof (DevMode);
DevMode.dmFields = DM_DISPLAYORIENTATION;
if (DISP_CHANGE_SUCCESSFUL == ChangeDisplaySettingsEx(NULL, &DevMode, NULL, CDS_TEST, NULL))
{
CurrentAngle = DevMode.dmDisplayOrientation;
RETAILMSG(1, (L"ChangeDisplaySettingsEx reports the current rotation as %d", CurrentAngle));
}
else
{
RETAILMSG(1, (L"ChangeDisplaySettingsEx failed to get the current rotation angle."));
CurrentAngle = -1;
}
//
// Rotate to the "next" angle.
//
if (CurrentAngle >= 0 && RotationAngles >= 0)
{
NewAngle = CurrentAngle;
do
{
NewAngle <<= 1;
if (NewAngle == DMDO_0)
{
NewAngle = DMDO_90;
}
if (NewAngle > DMDO_270)
{
NewAngle = DMDO_0;
}
} while (!(NewAngle & RotationAngles) && (NewAngle != DMDO_0));
memset(&DevMode, 0, sizeof (DevMode));
DevMode.dmSize = sizeof (DevMode);
DevMode.dmFields = DM_DISPLAYORIENTATION;
DevMode.dmDisplayOrientation = NewAngle;
if (DISP_CHANGE_SUCCESSFUL == ChangeDisplaySettingsEx(NULL, &DevMode, NULL, CDS_RESET, NULL))
{
RETAILMSG(1, (L"ChangeDisplaySettingsEx changed rotation angle to %d", NewAngle));
}
else
{
RETAILMSG(1, (L"ChangeDisplaySettingsEx failed to change the rotation angle to %d", NewAngle));
}
}
return 0;
}
giuseppebitonti said:
i build a .NET project that allow to rotate the screen, but for me it works ONLY on emulator SDK only in both WM5 and WM6 why? i post the exe and the source.. give me some answer..
Click to expand...
Click to collapse
Hey, I have a Vox (s710) for a few days so I could search which application is used by this phone to rotate the screen.
kartam said:
Hey, I have a Vox (s710) for a few days so I could search which application is used by this phone to rotate the screen.
Click to expand...
Click to collapse
that would be great mate. we'll be waiting for it.
bad news...
i found this somewhere in eMbedded VC++ documentation:
Screen rotation requires support from the display driver, which maintains information regarding rotation. Screen rotation is currently supported only on devices that use a single screen and is not supported on multiple screen devices.
An application calls the ChangeDisplaySettingsEx function to determine the screen orientation modes that the system supports, to set the angle by which the screen is rotated, and to query the current angle of rotation
Click to expand...
Click to collapse
I've written small utility (C++, native code just to be sure that no funny hardcode in compact framework is messing) and i've tested it on SPV C600 and TYTNII. On TYTN all was OK (screen rotated), on C600 (WM6) error was 'DISP_CHANGE_BADMODE' - exactly like described in docs...
so (IMHO): display driver (heh.. I suspected that there is sth like display driver ) just does not support screen rotation, so no matter that WM6 supports it...
we got two choices:
- find better one (heh... i do not even know the name of the file... but this i can find - i think i saw it once where i was plaing with regedit )
- live with 0 degrees rotation
It is necessary patch driver from vox. It approaches, but incorrectly turnoff screen. Illumination does not die away, and after that the image is displaced on 15 pixels to the right. With the all perfectly rotates. Except for joystick...
kmz said:
It is necessary patch driver from vox. It approaches, but incorrectly turnoff screen. Illumination does not die away, and after that the image is displaced on 15 pixels to the right. With the all perfectly rotates. Except for joystick...
Click to expand...
Click to collapse
could you uploader the driver plz
How can I find the driver in the ROM?
http://kmz.ho.com.ua/dispdriver.vox.zip
Here the driver and the certificate by which is signed the driver.
so we got POC done, now time for hard reset
driver supports screen rotation, but it got problems with display time out - when backlight should be off it is on, but screen becomes white and it's premament (until reboot).
Just for info - U can use MyMobiler to operate - no matter that screen is dead, phone itself is still doing his job
Hey, that is great
Good job guys, i'm sure you guys can improve it.
Just some suggestion, perhaps you can make some application which will toggle landscape/potrait and map it to one of the shortcut keys such as long_volup
driver supports screen rotation, but it got problems with display time out - when backlight should be off it is on, but screen becomes white and it's premament (until reboot).
Just for info - U can use MyMobiler to operate - no matter that screen is dead, phone itself is still doing his job
Click to expand...
Click to collapse
Excelent work Qlphn, what about the joystick control? It changes the way to control the Joystick when you switch to Panorama Modus?
THX
Has anyone got the Tornado display driver? I could probably check differences with windiff and hexedit it .
Hey!
I managed to do this with DDI driver you've attached.
Well, the joy doesn't follow orientation, screen rotation works. After some time my display takes weird colours. I hope this can be fixed anyway, well I will try to work it
Maybe only registry edit is required? I will compare vox registry with tornado one and say what I noticed.
Greetings

Camera mod for 2D gallery - CM6 Froyo roms?

Would anyone be able to modify the Camera apk so when you click on the image in the lower right corner of the last taken photo to open it in the gallery?
Right now a workaround to get to the gallery from the camera app is to hit Menu, Gallery.
Wondering if anyone can get the button working?
+1 I would like to see this too.
Tried myself a little. I believe the command for launching the review of the phone is
Code:
com.cooliris.media.action.REVIEW
The problem is that only the 3D Gallery is called, com.cooliris.media
The 2D Gallery is known has, com.android.camera.Camera
I tried swapping them out, but it just results in the camera app now showing up.
Maybe the 2D Gallery doesn't have a review command and this isn't even possible.
OK so a little more digging and trying and no success.
It appears that the 2D Gallery and 3D Gallery seem to appear to handle the "Reviewing of images differently"
2D:
Code:
com.android.camera.ReviewImage
and that seems to be it's own separate activity
whereas
3D:
Code:
com.cooliris.media.action.REVIEW
and is a action inside of the Gallery activity
It appears that there is no equivalent review action with the 2D Gallery, so it can easily be swapped out in the Camera.apk via a hex editor or the like. I would assume a change in the source code for the Camera.apk would be needed.
Would be nice to have it coded so it looks for 3D gallery 1st and if that fails falls back on 2D.
More digging found me this:
http://ip208-100-42-21.static.xda-developers.com/showthread.php?t=731659&page=96
Seems to exactly what you are looking for Jedis.
To get the Camera thumbnail to stop calling Gallery3D, I made the following change in the Camera source.
diff --git a/src/com/android/camera/Util.java b/src/com/android/camera/Util.java
index 44d5681..52a6639 100644
--- a/src/com/android/camera/Util.java
+++ b/src/com/android/camera/Util.java
@@ -42,7 +42,7 @@ public class Util {
public static final int DIRECTION_UP = 2;
public static final int DIRECTION_DOWN = 3;
- public static final String REVIEW_ACTION = "com.cooliris.media.action.REVIEW";
+ public static final String REVIEW_ACTION = "android.intent.action.VIEW";
private Util() {
}
There may be a better way, but this is working for me.

X10 Status Bar Icon Creator

So I needed some Icons for my status bar... and I thought, sweet, I'll just photoshop the stock ones
Then I opened them up, and to my eternal horror some idiot had added a background to them... How the hell am I gonna edit these nicely...
So, bugger that I thought, I'm not spending hours sorting them out in photoshop, so I made a little program to do it for me
Attached you'll find a pretty basic program in a folder with all the stock sony status bar images. If you run the program you can click on the square to choose your colour and then click on 'Select Folder'. The default is the folder that the exe is in.
As soon as you select the folder, all the icons in that folder will be processed and saved with the same name in an 'out' subfolder (like the ones in the attachment).
The images will be set to the selected color and the background is made transparent. This is hard-coded for the x10 stock status bar icons, it may work for other icons from the stock apk's, or it might not It just works on a hard-coded value for the blue channel. For anyone that is interested:
Code:
for (int x = 0; x < clone.Width; x++)
{
for (int y = 0; y < clone.Height; y++)
{
Color color = clone.GetPixel(x, y);
int a = Math.Min(color.B, color.G);
if (a < color.R) a = color.R;
if (a < 50) a = 0;
else
{
a = (int)(((double)a - 50.0d) / 205.0d * 255.0d);
}
color = Color.FromArgb(a, colorSelector.BackColor.R,
colorSelector.BackColor.G, colorSelector.BackColor.B);
bitmap.SetPixel(x, y, color);
}
}
Now you can have what ever color icons you want in the status bar
NOTE: .Net Framework 2.0 required (pre-installed on win vista and 7)
EDIT: There's a framework with a white status bar and these icons here: http://forum.xda-developers.com/showpost.php?p=9251090&postcount=18
Awesome between you and MrRusch you're take all the work out for us... much appreciation!
lookin good man! you sure are talented at this kinda thing
cheers, tim
Thanks guys
Let me know how it works... I have noticed that some of the icons are a little heavy on the alpha.
Nice mate! Soon we can click one button and the phone will automagically turn into an elephant
MrRusch said:
Nice mate! Soon we can click one button and the phone will automagically turn into an elephant
Click to expand...
Click to collapse
- Can we make it a dog tho' - elephants are a bit big...
this is just.......WOW!!!
and when thid work with all *.png files whould be...F#$*N WOW!!!
O NOW you do it lol, as always great work cal, between us all the X10 is getting a lot of support fast.
So looks like I have done all this for nothing? Damn.
Awesome job (as always) Calum!
Great job, Calum! This will be very useful.
Thanks!
I'm stunned! Awsome job mate!
Though maybe some themers (like Chewitt , shukla , myself etc) could have used that a bit earlier cause now my eyes are already on fire of all that .png editing!
Anyway congratulations! You did a hell of support!
I'm not into theming (yet) but WoW. Great tool.
Even if I wont use it I will sure use some icons created by that.
Thanks.
Wish I saw this before I modded each icon individually!!
Nice work!

Add leading 0 (zero) on lockscreen clock

Hi guys - Happy New Year.
Can anyone tell me how to add a leading '0' (zero) to the lockscreen clock?
I have used a large number of lockscreens, NONE of them have a leading zero. I am using 24hour time. I have the leading zero on the home tab, and on the top taskbar menu. I cannot seem to get it on the lockscreen.
eg: Lockscreen shows 8:00. I want 08:00.
Thanks in advance.
PS - I can get the zero with lockscreen widgets in CHT2. BUT I want it without any widget add ons.
Try Start-Settings-System-Regional Settings-Time [Page]-Time style HH:mm:ss
hgalanos said:
Hi guys - Happy New Year.
Can anyone tell me how to add a leading '0' (zero) to the lockscreen clock?
I have used a large number of lockscreens, NONE of them have a leading zero. I am using 24hour time. I have the leading zero on the home tab, and on the top taskbar menu. I cannot seem to get it on the lockscreen.
eg: Lockscreen shows 8:00. I want 08:00.
Thanks in advance.
PS - I can get the zero with lockscreen widgets in CHT2. BUT I want it without any widget add ons.
Click to expand...
Click to collapse
Thanks for your reply. I have changed the regional settings to:
hh:mm:ss and also
HH:mm:ss
Nothing happens. The flip clock stays without a zero.
If you are looking for lockscreen with leading zero try manals Windows LockScreen V4 http://forum.xda-developers.com/showthread.php?t=854047
with settings below it have leading zero for sure. (This is standard windows lockscreen modification, not CHT)
hgalanos said:
Thanks for your reply. I have changed the regional settings to:
hh:mm:ss and also
HH:mm:ss
Nothing happens. The flip clock stays without a zero.
Click to expand...
Click to collapse
The Touch x 24 hours clock fixes the alarm and lockscreen so they now appear as 08:00.
However nothing I have tried works for the home screen flip clock.
Anyone?
Try reg:
[HKEY_LOCAL_MACHINE\nls\overrides]
"STFmt"="HH:mm:ss tt" // (Ex: 08:00 AM or 20:00 PM)
"SSDte"="dd-MM-yyyy" // (Ex: 08-01-2011)
Yep, already tried/checked that. It is as you wrote it.
ALL clocks are showing leading zero, just not Manila home flip clock. Very strange.
Surely there is a way to change it.
hgalanos said:
Yep, already tried/checked that. It is as you wrote it.
ALL clocks are showing leading zero, just not Manila home flip clock. Very strange.
Surely there is a way to change it.
Click to expand...
Click to collapse
It will be controlled by the LUA script for the CHT main clock (assuming it is the main one with various flip/analog/weather options. I'll have a look over the weekend if you like?
Would I be safe in assuming you've already gone to the manila settings tab, date & time and then ticked 24-hour format?
Swarvey said:
Would I be safe in assuming you've already gone to the manila settings tab, date & time and then ticked 24-hour format?
Click to expand...
Click to collapse
Yes you would be safe in assuming this.
As per the ealier threads, time format, local settings have all been checked and changed. Even the registry. Nothing changes the flip clock have a leading zero.
Depending on what version of cht or sense you have it will be in the lua. There should be a statement near the top that says "shouldhideleadingzeros = true" you just need to change it to false and recompile.
EDIT:
Looked into it a little more for you and the file is 5fa4d4b7_manila from your stock sense.
Code:
-- Decompiled using luadec 3.2.2beta -- Tue Jan 11 10:19:35 2011
-- File name: 5fa4d4b7_manila
trace("Loaded digital clock\n")
TabHalf = {Tab = nil, HighDigit = nil, LowDigit = nil}
UV = {UP = 0.26171875, DOWN = 0.5234375}
TabHalf.new = function(l_1_0, l_1_1)
if not l_1_1 then
l_1_1 = {}
end
setmetatable(l_1_1, l_1_0)
l_1_0.__index = l_1_0
return l_1_1
end
TabFlip = {Time = 0, TimeDifference = 0, ShowingTime = 0, WrapAroundNumber = 0, StartValue = 0, [B][COLOR="Red"][B]ShouldHideLeadingZeros = true[/B][/COLOR][/B], TopTab = nil, TopTabFlip = nil, BottomTab = nil, BottomTabFlip = nil, LastDuration = -1, UseAltTiming = false, rotatecount = 1, getDuration = function(l_2_0)
if l_2_0.UseAltTiming then
Wow, I have stock version of 1.72 WWE ROM.
It sound like you are on a winner.
I will check this out tonight when I get home and see what I can do.
Thank you for the information, I will be sure to let you know what happens.
mrhayami said:
Depending on what version of cht or sense you have it will be in the lua. There should be a statement near the top that says "shouldhideleadingzeros = true" you just need to change it to false and recompile.
EDIT:
Looked into it a little more for you and the file is 5fa4d4b7_manila from your stock sense.
Code:
-- Decompiled using luadec 3.2.2beta -- Tue Jan 11 10:19:35 2011
-- File name: 5fa4d4b7_manila
trace("Loaded digital clock\n")
TabHalf = {Tab = nil, HighDigit = nil, LowDigit = nil}
UV = {UP = 0.26171875, DOWN = 0.5234375}
TabHalf.new = function(l_1_0, l_1_1)
if not l_1_1 then
l_1_1 = {}
end
setmetatable(l_1_1, l_1_0)
l_1_0.__index = l_1_0
return l_1_1
end
TabFlip = {Time = 0, TimeDifference = 0, ShowingTime = 0, WrapAroundNumber = 0, StartValue = 0, [B][COLOR="Red"][B]ShouldHideLeadingZeros = true[/B][/COLOR][/B], TopTab = nil, TopTabFlip = nil, BottomTab = nil, BottomTabFlip = nil, LastDuration = -1, UseAltTiming = false, rotatecount = 1, getDuration = function(l_2_0)
if l_2_0.UseAltTiming then
Click to expand...
Click to collapse
ok so I couldn't wait and though I would give it a go now. I have found the same Manila file you have listed, I also downloaded lua utility. How doesn this work, I ran it on my pc and nothing happens.
How can I edit the file?
hgalanos said:
ok so I couldn't wait and though I would give it a go now. I have found the same Manila file you have listed, I also downloaded lua utility. How doesn this work, I ran it on my pc and nothing happens.
How can I edit the file?
Click to expand...
Click to collapse
Well I suggest downloading the manila kitchen by 12 and kilaireg found here:
Thread
It will tell you how to run everything you need but the down and dirty is this.
Copy the manila file into this directory "kitchen>_source>file>xxxx_manila
then use the command prompt link and drag the file manilatool.cmd into the cmd window.
your main commands are going to be as followed in order:
-oem:2.5
-mnf:2.5
-dec
(now that it is decompiled you will be edit the lua in notepad save and then move to the next step.)
Notice: not all files will decompile correctly and you may have to tweak it to get it to decompile correctly.
-cmp (only if it does not fully decompile aka. you have the file in your incomplete folder.)
-rec (will recompile the file which you can then put on your device and enjoy)
I know it isn't much but as I said they have detailed info in the pack.
In case anyone is still trying to figure this out.
I installed the latest 314 WWE ROM and it supports a leading zero on the original manila clock.
Awesome.
hgalanos said:
Hi guys - Happy New Year.
Can anyone tell me how to add a leading '0' (zero) to the lockscreen clock?
I have used a large number of lockscreens, NONE of them have a leading zero. I am using 24hour time. I have the leading zero on the home tab, and on the top taskbar menu. I cannot seem to get it on the lockscreen.
...
Click to expand...
Click to collapse
If you set PocketShield clock display to 24h it will display the leading 0
NO fix as yet.
Guys,
I have to apologise, I don't know what planet I was on, but the new 314 ROM, does NOT fix this issue. There is still no leading zero for manila flip clock.
Anyway have a fix that works?
I have no idea how to edit manila files, and have not been successful is doing so.
I will have to rely on someone generous enough to do it for me.
Thank you in advance to anyone willing to help.

[Q] glReadPixels() Problem in Android to reconstruct the frame

I am working on a project on Augmented Reality with Android. The code captures the camera video, finds the marker and displays a cube on top of it. After this a motion vector (in the form of pixels moved in the x and y direction) is found. What I need to do is read the pixels from the GL layer and draw them again after moving them by the distance specified by the motion vector.
The GL layer is specified using the GLSurfaceView class which is a transparent layer. The problem I am facing is that when I use glReadPixels() to read the pixels and convert it into a 480x800 array (nexus one screen resolution), I get 3 different portions of the cube instead of one.
I intend to move the pixels by the motion vector after this and use glDrawPixels() to put the pixels back into the frame buffer
Please help me with the interpretation of the same. Is there something I am missing while using glReadPixels and also if there is some other function that will help me achieve the same. I was thinking of using glBlitFrameBuffer() but this is not supported by the android GL10 class.
I have attached the part of the code where I am reading the pixels and changing them to a 2D matrix along with the image of the pixels I reconstructed using MatLab.
Any help will be greatly appreciated.
Code:
gl.glPixelStorei(GL10.GL_PACK_ALIGNMENT, 1);
IntBuffer pixels = IntBuffer.allocate(384000);
gl.glReadPixels(0, 0, 800, 480, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE ,pixels);
File f = new File ("./mnt/sdcard/Sahiba_PixelData_" + flag + ".txt");
if(!f.exists())
f.createNewFile();
FileWriter fw = new FileWriter(f);
int pixelsArr [][] = new int [480][800];
//int temp[] = pixels.array();
int n=0;
for(int i=0; i<480; i++){
for(int j=0; j<800; j++){
pixelsArr[i][j] = pixels.get(n);
//temp[n + pixels.arrayOffset()];
fw.write(pixelsArr[i][j] + " ");
//fw.write(pixels.get(n) + " ");
n++;
}
//fw.write("\n");
}
Log.i("GLLayer", "Pixels reading and storing finished !!!");
}catch(Exception e){
Log.i("GLLayer","Exception = " +e);
}

Categories

Resources