Any ideas on how to take over the screen - Java for Android App Development

Hello everyone!
I'm researching a little bit for a project at my university. I've got loads of books to educate myself, but instead of just going through them from the very beginning I would like to better orient myself. Any insights you might have would be very appreciated!
Basically I'm thinking about a way to make the screen respond to what's happening to the phone, independently of the app running in the foreground at any given moment. For example
the phone drops under the table where it's dark and the phone's screen begins flashing to make it easy to find,
you tap the side of the phone, or swirl it around playing a game, and the screen tints itself red giving an impression of taking in some damage
Obviously this would have to be an app connected for example to the accelerometer, able to modify or overlay what's currently being displayed. Is that stuff even possible?
I'm not expecting a solution here Just some brainstorming ideas that would send me in the right direction. Names of classes, sections of documentation, stuff like that. Thank you!

Do you look for ideas on how to overlay the screen? That's really easy. Look for WindowManager and System_Alert_Window.
But I don't know how you could code the other thing. For example a few devices have a light sensor which you can use - but for more complex actions this will be difficult.

Thank you EmptinessFiller I´m not really looking to launch popups.
I´m looking for a way to tap into the software or hadrware renderer and for example adjust brightness or tint the entire screen. Something my own, buggy CAT B15 does once in a while when I turn hardware accelleration on (it paints every interface item in a funny colour).

This would pertain more towards modifying the OS itself and creating a customized version of Android

Read this article a while ago whilst looking for stuff on surfaceflinger...might be of use to you....
http://jsharkey.org/blog/2010/07/01/android-surfaceflinger-tricks-for-fun-and-profit/
Sent from my AllianceROM'd S5

Excellent Goldie, thank you very much. That´s exactly the type of pointer that i needed!

Related

VueFlo - is it sensitive?

Hi everyone,
just want to know, for the VueFlo Function, is it very sensitive to slight and mild tilts? eg if you tilt the device slowly to the sides or up and down in IE, does the screen/page move?
If it is, I plan to make an app/software for it in the future
So interested in Athena but sadly, it's not available in Aussie yet.
its pretty sensitive, only need to tilt a few degree up down left or right. trick is when to turn it on, since all movements are relative to the orientation of the device when vueflow is activated.
i find it just a gimmick for web browsing
the most obvious application would b an arcade game navigating a ball around a maze or something
or a dodgy electronic attitude indicator for an aircraft
shockboy2000 said:
its pretty sensitive, only need to tilt a few degree up down left or right. trick is when to turn it on, since all movements are relative to the orientation of the device when vueflow is activated.
i find it just a gimmick for web browsing
the most obvious application would b an arcade game navigating a ball around a maze or something
or a dodgy electronic attitude indicator for an aircraft
Click to expand...
Click to collapse
Ok. Thanks for that quick reply.
Electronic Attitude Indicator: That's the app I wanted to make.
The sensitivity can be adjusted to low or high and several points in between. Goto settings and VueFlo to adjust sensitivity.
You can also change it work to work in IE or Opera
How do you turn off Vue Flo?? It's driving me nuts!!!
jeffharris said:
How do you turn off Vue Flo?? It's driving me nuts!!!
Click to expand...
Click to collapse
Long press the same button...the icon will disappear in the above menu bar to confirm this.
Thanks!! That does the trick ... You Rock !!!!
So any more owners with comments on this feature? Anyone find it useful?
I find it very useful for random browsing of web pages and news pages.It is easy to turn on and off,and once you get used to it, it really works quite well.
Later.........
hdbueller said:
I find it very useful for random browsing of web pages and news pages.It is easy to turn on and off,and once you get used to it, it really works quite well.
Later.........
Click to expand...
Click to collapse
Great! Anyone else with thumbs up?
Packet 3 said:
Hi everyone,
just want to know, for the VueFlo Function, is it very sensitive to slight and mild tilts? eg if you tilt the device slowly to the sides or up and down in IE, does the screen/page move?
If it is, I plan to make an app/software for it in the future
So interested in Athena but sadly, it's not available in Aussie yet.
Click to expand...
Click to collapse
Can't you order an unlocked version and have it shipped to you?
ecsk2 said:
Great! Anyone else with thumbs up?
Click to expand...
Click to collapse
Yes, it's a nice little addon to the device. I use it when I am browsing long pages or am spending a lot of time online, etc.
Wish there was a way to customize it and allow it to interact with other applications. It would be ideal for there to be a settings area where you see a list of installed applications and a check box next to each. Then if you check the box next to Word for example, you could use it with that application. I wonder if it just emulates the directional keys and if so if this can be adapted as an alternate input method. Instead of using the joystick, just write a wrapper that will accept input from Vueflow.
ltxda said:
Yes, it's a nice little addon to the device. I use it when I am browsing long pages or am spending a lot of time online, etc.
Wish there was a way to customize it and allow it to interact with other applications. It would be ideal for there to be a settings area where you see a list of installed applications and a check box next to each. Then if you check the box next to Word for example, you could use it with that application. I wonder if it just emulates the directional keys and if so if this can be adapted as an alternate input method. Instead of using the joystick, just write a wrapper that will accept input from Vueflow.
Click to expand...
Click to collapse
That would be the ultimate solution for using SPB Insight RSS reader!!!
Any way to use VueFLO in all apps?
Obviously, this would be ideal for scrolling through emails/contacts etc.
Unfortunately, doesn't seem like anyone has managed to access the API's/runtimes for this yet---anyone want to give it a shot?
Guys,
I really think we should bring this one back to life, what with the iphone and all its spirit levels and labyrinth games
The simplicity of windows api structure is what makes pocket pc so versatile, lets take advantage!
And there isn’t a snowball’s chance in hell I’m going to sit back and watch my co-workers tell me how crap my phone is compared to their Iphone. I’m not in the game of letting a friend's spirit go uncrushed.
Y
The Vuoflo is no different in principle to the N95's accellerometer or the Iphone's auto rotate hardware. It could be used for anything involving d-pad movement (search for NOKMOTE or ROTATEME on Youtube and you'll see what I mean).
It seems that HTC have put a lot of effort into making this hardware un-tappable. Either that or developers aren't interested in developing for it. The possibilities are great though.

posibility of multitouch on universal or similar htc phones

before we go any further, id like to point out im not a complete luddite and ive thought about this a fair bit before posting...
looking at the iphone vids, i notice that multi touch pretty much means dual touch. i expect their technology allows for more than two fingers, but the space and OS dont really allow for this.
in playing with my univ, i notice it does some kind of averaging between to fingers - so possibly at a low level u could get multi-touch - but logic says if this is possible, sure it would have been done by now.
my logic also says this:
if u get a second touch screen plate (i beleive that the touch screen element is a layer over the screen - if this isnt true, my logic is flawed) and install it over the top of the current screen - but rotated 180 degrees, and there is the provisioning for a second touch screen input (probably unlikely but surely u could hijack something else such as the serial used for irda) then if you can read the top left touch of each screen, u should have fairly accurate multi touch, good enough for the cheesy 'grab photo and resize by stretching'
am i totally wrong here? is there any point looking further into this?
ps. in writing this, it also occurs to me that the iphones biggest use of this is the photos - which are always in the same place, scaled on correct aspect ratio etc - theres no need for two fingers - u could just grab one corner to stretch it and itd be a very similar efect
Nope, sorry.
Dear Alan,
I thank you for your insightful reply. I feel you have bettered the forum and the community as a whole with your intelligent wit and your interesting and thought inducing contradictions to the theories that i presented.
Without your thoughts I may have been tempted to push these ideas further, maybe even get out a soldering iron and a copy of visual studio, but I can clearly see that I am mistaken in where this project could go and will not further waste my time.
I must thank you kind sir, for your thought and advice. You are a squire and a gentleman.
Lol
I don't think DIY hardware upgrades have ever made it far - consider the viability of GPS on the Hermes - it does require one to pop out a soldering iron to play with the idea. So your market is already down to a fraction of a %.
But I'm sure you could wire up a bluetooth or even IRDA multitouch capacitance layer... However, from a theoretical point of view - is it worth it? I considered the idea, and the Universal/Athena might make sense with your bigger screen, but on your average Hermes, I can barely get two fingers on the screen without obscurring most of it.
Like momentum based scrolling, I think multitouch on such a small screen is kinda gimicky - as you said, it's easier to write logic to pin one corner, free rotate with a finger on the other corner, enlarge, zoom etc. Ie ergonomic single touch.
Multitouch, even if possible on HTCs, barely seems to have a practical milieu IMHO on devices with screens <= 3 inches.
V
djboo said:
ps. in writing this, it also occurs to me that the iphones biggest use of this is the photos - which are always in the same place, scaled on correct aspect ratio etc - theres no need for two fingers - u could just grab one corner to stretch it and itd be a very similar efect
Click to expand...
Click to collapse
I am totally agree with you. and there are some other relatively simple solutions that can be used to simulate "multi touch actions" on photos.
for an instance,
D-PAD can be used for photos enlargement:
press both "left" and "right" - scales photos up
press both "up" and "down" - scales photos down
or other way around, etc.
this one not so difficult to implement.
also, it is quite easy to emulate multi-touch action on single touch display itself.
How? if we have applied layer consisted from interleaved pressure sensitive and non-sensitive spots, then having two fingers moved in opposite directions accros this layer will likely create sequence of pressed spots that can be easily analysed and interpreted in guesture.
my understanding is that while your left finger is moving to the left and crossing pressure non-sensitive spot, there is a good chance that your right finger at the same time will be crossing presure sensitive spot and moving to the right. this creates easy to analyze patern.
I believe that logic behind this idea is simple to primitive and guaranteed to work. "public domain" 20.06.2007.
are there any existing apps to get the raw output from the touchscreen (ive got nothing against coding my own, but no need to re-invent the wheel if it already exists)
the more i play with the univ and more than one finger, the more that it almost seems like its multi touch dumbed down to single touch. the averaging it does is rather uncanny and im sure if we can see whats happening before the os gets a look in we can work something out

[PRJ]Teeter level editor NOT RELEASED - help needed

Please don't get excited, this is far from finished, and I'm about to go away for a week.
What I have done so far has taken about a week, but I guess its still a month away from a beta release,
sorry about that but I'm doing this in my spare time.
After reading this thread, I thought this would be a good project to learn VB.net with.
I did a bit of VB6 years ago, but since then its been mainly web stuff (php, javascript, sql),
more recently I have been studying oop Java with the Open University.
I'm going to look for a good VB.net forum when I get back, Ill probably need some help to finish this.
Let me know if you know of one, or even better a VB.net for windows mobile forum
So far, I have read the text files in and drawn them to the screen using GDI+.
The next step is to write the code to let you edit, but before I get to that I need a little help with something else.
The images I'm drawing to screen do not line up perfectly with the levels in Teeter,
have a look at the first 6 levels on this page to see what I mean.
These are composite screen shots, I have overlaid what my program draws onto the real levels in Teeter.
You can ignore the starting dots as the ball had moved by the time i took the screen shot.
My guess is I need to apply a transformation of some kind on the data before I draw it to the screen
(and eventually in reverse before I write it back to the text file),
but I'm not 100% sure if that's right, am I missing something about why this is happening?
Will there be any problems with this approach?
Maybe I can just move the holes a set amount, but what about the walls?
Anyone have any ideas?
Hi
Im not a coder, but just my observation. The black lines that you draw go from corner to opposite corner on each graphic, minus the drop-holes but there still in the corner.
My gues is the coding is seeing this as a full object. So that data that you are pulling and showing looks correct.
Ahh, yeah, so maybe the coordinates of the walls represent the top left and bottom right of the walls, not just end points.
Ill make some screen shots of the rest of the levels to check.
I guess the levels where the walls are not straight up or straight down will give more clues.
Thanks
Glad i could help
I code in php and using the GD graphic librays to display line graphs etc always do have stripped down co-ordinates, i suppose its so you dont have to use loads of info just to draw a line. top corner, bottom corner is far more speedy then drawing 6 coordinates or more.
How have you dound going from php, javascript mysql to vb? I keep getting tempted by vb and id love to make some interesting things for my mobile.
Im pretty much high level php/sql medium javascript, high level xml. Where would you recommend i begin? Cheers!
PS: im from Leeds so just up the motorway lol.
My memory of VB6 is that in general, all the books are wrong.
I really struggled to find examples that worked without fiddling around with it.
VB.net has been a similar experience, maybe a bit easier because Visual Studio has improved so much. I'm still a massive noob with it so I cant really give you that good an answer.
I'm starting to realise that the reason I find programming for the web so much easier than for windows is that the latter has so much more to deal with.
If you think on the web, your playing field is the browser, in windows, your playing field is the OS. There is so much more that you can do, finding help with what you want to do is so much harder.
Some people are very good at working out how to get something working, it sometimes takes me hours to solve one little problem. I don't have that much formal training in programming, so I tend to work by fiddling with things until they work. The difference in php is I've seen so many working examples that I know what I am doing is 'a good way' to be doing it.
In VB I have no idea if what I am doing is good, its just the only way I've found that works. Eventually I will release the source files for this, in the hope that 'good' VB programmers can help me do things in 'a good way'.
Where to begin? Get yourself a copy of Visual Studio, there are loads of versions, don't ask me which one you need, I don't know, I got mine of a friend who runs a software company, they have some package of set software from MS and more licenses than she needs.
Bookmark the MSDN library and start reading
All I use at the moment is that page and google.
Good luck!
Problem solved, it was pretty simple in the end
The top left, bottom right thing dzign-it pointed out (many thanks),
and the gdi draws the hole with the coordinates you give as top left.
I can move on to the actual editing now
Hey
Great to hear, not many people seem interested in this lol, i am though, a level editor would be fantastic, and im sure when you have a beta out for people to start making thier own levels etc..everybody will jump on board.
yeah go for it
go for it hellodavedave. People will be glad.
and credit to you
yeah!
That would be nice!
My little 2-year-old girl loves Teeter but she only solves the first level.
I'd like to have a "kids version" with only a green hole in the middle and kind of these easy things...
(yeah, I know: WHAT!? You give your diamond a baby...!? )
Has any progress been made on this? I'd love to see this working
There is now a level editor. You can download a new level here.
http://wmpoweruser.com/?p=1536
Surur

[GAME] DiamondTris - Tetris with support for VGA, stylus & wheel sensor

Updated: 2009-01-03, 21:05 (GMT+1)
Me and Swoop2 is creating a Tetris game for us HTC Touch Diamond users out there in need for a great one! Why I wanted to create a new Tetris game for the HTC Touch Diamond was because all of the Tetris games out there got some flaws (imo); not supporting VGA resolution, visually looking bad, running slow etc.. The closest thing I got was TeKnowMagic Tetris, but I wasn't satisfied either way. There's simply no Tetris game out there filling my requirements.
DiamondTris so far:
VGA resolution
Moving pieces - with the wheel sensor or via the on-screen buttons
Rotation of pieces - with the enter button or via the on-screen buttons
Line completion and destruction
Statistics: score, hi-score, level, lines done/remaining
Difficulties: easy, medium, hard (different speeds)
What needs to be done:
Some minior GUI tweaks
Sound effects
Settings (sounds, controls)
You'll need .NET Framework 3.5, which you'll find here
Changelog:
DiamondTris_20090103.cab:
Installs on device or internal storage
Creates a shortcut in Programs\Games
Pause function implemented
DiamondTris_20090102.cab:
New, better looking on-screen buttons
Added some statistics
Disabled piece rotation by tilting the device (needs further tweaking)
Application icon added
+1
sounds like a fairly simple and easy project... if only i had listened in class...
Why don't you get some pledges to encourage a developer
I would pay around £3 for a tetris game designed for our device
Not loads, but if enough people were too pledge their support...
hays said:
Why don't you get some pledges to encourage a developer
I would pay around £3 for a tetris game designed for our device
Not loads, but if enough people were too pledge their support...
Click to expand...
Click to collapse
good idea.
i'll let hays pay £3 for a Tetris game
(and i suppose i could chuck a few quid in as well )
Of course I'm in for some donations if this game is created
I started a very basic Tetris app for my touch diamond a while ago - just as a play around as my first Windows Mobile application. It uses the wheel for moving the current piece left and right and I was going to have a go at using the accelerometer to turn the piece clockwise/anticlockwise (i.e. a flick to the left or right).
I've never used OpenGL or anything so it was just done using a timer and the graphics object off the OnDraw event. I got as far as creating the grid, drawing the pieces, moving them around and knowing when lines were completed, etc. Still had a lot to do but it was a proof of concept more than anything else.
I'm just a normal application developer and develop form based applications and back end stuff. If I can get to where I am with my effort in the time I have, then someone who knows how to write games properly could easily do something really good.
Swoop2 said:
I started a very basic Tetris app for my touch diamond a while ago - just as a play around as my first Windows Mobile application. It uses the wheel for moving the current piece left and right and I was going to have a go at using the accelerometer to turn the piece clockwise/anticlockwise (i.e. a flick to the left or right).
I've never used OpenGL or anything so it was just done using a timer and the graphics object off the OnDraw event. I got as far as creating the grid, drawing the pieces, moving them around and knowing when lines were completed, etc. Still had a lot to do but it was a proof of concept more than anything else.
I'm just a normal application developer and develop form based applications and back end stuff. If I can get to where I am with my effort in the time I have, then someone who knows how to write games properly could easily do something really good.
Click to expand...
Click to collapse
Ah, that sounds great! Got any plans on continuation of your work? Onscreen buttons instead of accelerometer sounds even better imo, and is easier to do I think..?
Care to share your source? I can have a look at it myself and see if I can get into Mobil application programming too... or at least someone else here can continue on your base work.
I do plan on finishing it at some point - though I'm not 100% sure when! I don't mind sharing the code anyway, so once I'm back home I'll try and remember to put it on here.
Swoop2 said:
I do plan on finishing it at some point - though I'm not 100% sure when! I don't mind sharing the code anyway, so once I'm back home I'll try and remember to put it on here.
Click to expand...
Click to collapse
Sounds cool. Looks like I might get a good weekend after all! Do... not... forget... the... add... the source code!
Here's the source code. It is VERY much a work in progress. I started it as a windows application and ported it over to WinMob6. Here's a list of things that I know I still needed to do:
1. Optimise the graphics to get rid of the irritating flicker.
2. Add the piece rotation.
3. Add the score and level display, etc.
4. Decide on the size of the grid (considered leaving it customisable).
5. Add score saving and option saving, etc.
6. Add some backing music.
They're the things I can remember off the top of my head anyway. Lemme know if you have any ideas or questions, etc.
Swoop2 said:
Here's the source code. It is VERY much a work in progress. I started it as a windows application and ported it over to WinMob6. Here's a list of things that I know I still needed to do:
1. Optimise the graphics to get rid of the irritating flicker.
2. Add the piece rotation.
3. Add the score and level display, etc.
4. Decide on the size of the grid (considered leaving it customisable).
5. Add score saving and option saving, etc.
6. Add some backing music.
They're the things I can remember off the top of my head anyway. Lemme know if you have any ideas or questions, etc.
Click to expand...
Click to collapse
Sweet! I'm at home now, downloading all the requried applications to put up a proper environment here... big packages, so it'll take a while until I'm set.
I'll see if I can manage to do anything, and in case - I'll get back to you
Hi there again Swoop2!
Just tweaked the grid some, added some stats + onscreen buttons (stretched until later ;P) and changed some minor stuff. Here's my latest source. Thanks for sharing!
There's still bunch of stuff to tweak and add. Adding rotation to the game would make it fairly playable. The screen flickering is quite annoying, but perhaps we'll manage to get it working right in the future
Also adding a screenshot of how it looks with the current source.
EDIT: removed the source code, since there's a newer one out there.
Hi Sibbor
That's looking pretty good mate - I like it! I already have some ideas on how to fix the flicker - for the majority of the time anyway. Rendering the image as a bitmap in the background and then just drawing that should hopefully work like a double buffer or something. Also, only invalidating the relevant part of the screen instead of all of it should make a difference too. It worked for my other application anyway.
I'll try and have a play with it this week and send you an update
Swoop2 said:
Hi Sibbor
That's looking pretty good mate - I like it! I already have some ideas on how to fix the flicker - for the majority of the time anyway. Rendering the image as a bitmap in the background and then just drawing that should hopefully work like a double buffer or something. Also, only invalidating the relevant part of the screen instead of all of it should make a difference too. It worked for my other application anyway.
I'll try and have a play with it this week and send you an update
Click to expand...
Click to collapse
Sounds great! Made a few more changes but haven't got the latest source available here at work. I'll see if I can get time to upload it later. Otherwise it doesn't matter too much.
I reacted at the code where the grid updates, but have too less experience with WM6 and .NET to actually optimize this to a grade where we'll have no flicker at all. So with other words: I'm looking forward to your anti-flicker code !
I should finally have some time to look at this at the weekend so if you have an updated version can you post it on here?
Swoop2 said:
I should finally have some time to look at this at the weekend so if you have an updated version can you post it on here?
Click to expand...
Click to collapse
Hi again mate! Good to hear. Sadly I haven't been able to get too much done since last time, but I'll attach the current source now.
Thought about the rotation and how to create it. Had an idea where you could destroy the current piece when rotating, and creating a new - rotated - piece at the given location. You got any ideas about it otherwise?
I've been looking for a decent Tetris game for Diamond/TP myself.
Question: are you planning on implementing the scrollwheel to move the pieces? I think that would be a nice touch.
Good luck on this. I'll donate to the cause when you guys have something.
hefman said:
I've been looking for a decent Tetris game for Diamond/TP myself.
Question: are you planning on implementing the scrollwheel to move the pieces? I think that would be a nice touch.
Good luck on this. I'll donate to the cause when you guys have something.
Click to expand...
Click to collapse
The requested function is already supported We'll make sure to setup donations when we're ready
this is definately a worth while project, i wasted my time for about 3 hours looking for a nice tetris game 4-5 days ago and came up with very nasty looking basic tetris clones.
which all sucked, id donate £5-7 just for saving me the time!!
thanks
CDMA Tetris
I am so all about Tetris.
I also spent some time looking for some decent versions of Tetris but they all flopped.
I cannot wait till you guys complete this.

[PRJ][BETA][DEMO] Screen lock utility / concept

Hi Everyone,
I don't know if I'm just reinventing a wheel here but I encountered a problem with screen lock software and prying eyes. Basically it doesn't take long for repeated use on a single part of a touch screen to be visible at certain angles.
I had one idea to help prevent this and made a quick demo/beta app.
Wondered if anyone on here had any thoughts on the project before I commit too much time into it.
I'll work on screen shots...
The installation is pretty painless - there isn't one (lol) - just unzip the exe and run, make sure you have .NET 3.5. There's a ABOUT page displayed (with a real exit menu) and details / default PIN.
Comments welcome, but remember its the concept on display, not the desing (and distinct lack of graphics).
More Information
It is obviously developed for touch screen devices without a keypad, which I imagine circumnavigates this problem.
It has been tested in the emulator on 320 screens, and on Touch HD. I'll try it on the Magicinan, and Hermes later.
If anyone would develop such app, it would be great ! I was searching for months for something like this. Please, if anyone can develop such app for WVGA screen (SE Xperia X1) it would be great & very appreciated.
For avoiding the mess with downloading, unzipping, copying to emulator dir, running the emu etc, it's usually wise to post screenshots so people immediately grasp the idea.

Categories

Resources