Here's the basics you need to know:
- setup an event handler to handle your ontouch events
- touch events have different actions: ACTION_DOWN, ACTION_UP, etc. are used for the first touch event registered. ACTION_POINTER_DOWN, ACTION_POINTER_UP are used for the second touch event. As far as I know Android only supports 2 touch events.
- to use the second event, you must combine the event.getAction() and MotionEvent.ACTION_MASK by anding them as seen below.
First you need to catch your action in your touch event and store it as an int:
public class GameEvent implements OnTouchListener{
public boolean onTouch(View v, MotionEvent event) {
actionCode = event.getAction() & MotionEvent.ACTION_MASK;//this combines single and multitouch
}
}
Then test to see what the event action was:
if(actionCode == MotionEvent.ACTION_DOWN){
}else if(actionCode == MotionEvent.ACTION_POINTER_DOWN )...
from here you can get the X&Y coordinates of each touch, the pressure, and more.
Showing posts with label android. Show all posts
Showing posts with label android. Show all posts
Monday, August 30, 2010
Tuesday, August 17, 2010
Best Android Apps
Here are a few of the Android apps that I use on my droid:
Apps
NFL mobile (Verizon only) - Watch what is currently on NFL network live! Free!
Terminal Emulator (Root Users) - Good free terminal for entering commands
Pandora - Streaming radio based on your favorites
Overclock widget (Root)- allows you to set your CPU based on whether your phone is awake or asleep
Tesla LED - mototorch replacement that works with 2.2
Handcent SMS - Unleashes all of the options you could dream up for texting.
Wireless Tether (root) - share your 3g connection with wifi devices
ADW Launcher - Homescreen replacement that gets rid of the laggy 2.2 homescreen that is slow loading icons sometimes. Also allows for 4 items on dock, and 5 homescreens.
Games
iCommando - decent sniping game
Hockey Nations 2010 - Overpriced hockey game, but you might be into it. Nice graphics, gameplay gets old.
Raging thunder lite - Haven't tried the full version.
Amtalee lite - 3d puzzle game
Abduction - Papi jump, but with a cow.
Craigs Race - Awesome game, be sure to calibrate your tilt sensor. Buy the full version for 2 faster cars
Radiant lite - like space invaders/asteroid mixed together
2 player reactor - great game for killing time with someone. See who can touch the screen when it turns white faster etc...
Emulators - There are currently emulators for ps1, game boy advance, super nintendo, nintendo, and most likely sega (haven't seen sega myself). The lite versions of each allow you to play games, just not save them. So you can try them out and see if that's your thing.
Widgets
Power widget - quicker than quick settings
Weather - not weather channel, this comes with your phone and shows you a 24 hour forecast, along with a weekly forecast.
Apps
NFL mobile (Verizon only) - Watch what is currently on NFL network live! Free!
Terminal Emulator (Root Users) - Good free terminal for entering commands
Pandora - Streaming radio based on your favorites
Overclock widget (Root)- allows you to set your CPU based on whether your phone is awake or asleep
Tesla LED - mototorch replacement that works with 2.2
Handcent SMS - Unleashes all of the options you could dream up for texting.
Wireless Tether (root) - share your 3g connection with wifi devices
ADW Launcher - Homescreen replacement that gets rid of the laggy 2.2 homescreen that is slow loading icons sometimes. Also allows for 4 items on dock, and 5 homescreens.
Games
iCommando - decent sniping game
Hockey Nations 2010 - Overpriced hockey game, but you might be into it. Nice graphics, gameplay gets old.
Raging thunder lite - Haven't tried the full version.
Amtalee lite - 3d puzzle game
Abduction - Papi jump, but with a cow.
Craigs Race - Awesome game, be sure to calibrate your tilt sensor. Buy the full version for 2 faster cars
Radiant lite - like space invaders/asteroid mixed together
2 player reactor - great game for killing time with someone. See who can touch the screen when it turns white faster etc...
Emulators - There are currently emulators for ps1, game boy advance, super nintendo, nintendo, and most likely sega (haven't seen sega myself). The lite versions of each allow you to play games, just not save them. So you can try them out and see if that's your thing.
Widgets
Power widget - quicker than quick settings
Weather - not weather channel, this comes with your phone and shows you a 24 hour forecast, along with a weekly forecast.
Saturday, August 7, 2010
WiFi Tethering on Verizon for 2.2 (Froyo) Mac and PC
Edit: This is free. There is no $20/month fee or anything of the sort.
After a lot of trial and error, I've found a wifi tethering app that works on Verizon for root users on Mac or PC.
The "Wireless Tether" app in the app store works great. Just download, run, then click the giant wifi symbol to enable. You may get an error that says something like "started with errors, view the log". The log will most likely say that access control failed. Hit menu and go to access control and turn it on and off (or just off if it was already on). Then go to your computer and join your new network. Currently I haven't tried any security (WEP/WPA), but I'm pretty confident none of the tractors I'm driving by in central Iowa have wifi devices.
This works for Pete Alfonso's Rooted 2.2 ROM based on the test release, on a moto droid, and many other combinations.
Just to reiterate. A lot of people have problems with access control, just toggle it on and off to get things to run smoothly.
After a lot of trial and error, I've found a wifi tethering app that works on Verizon for root users on Mac or PC.
The "Wireless Tether" app in the app store works great. Just download, run, then click the giant wifi symbol to enable. You may get an error that says something like "started with errors, view the log". The log will most likely say that access control failed. Hit menu and go to access control and turn it on and off (or just off if it was already on). Then go to your computer and join your new network. Currently I haven't tried any security (WEP/WPA), but I'm pretty confident none of the tractors I'm driving by in central Iowa have wifi devices.
This works for Pete Alfonso's Rooted 2.2 ROM based on the test release, on a moto droid, and many other combinations.
Just to reiterate. A lot of people have problems with access control, just toggle it on and off to get things to run smoothly.
Subscribe to:
Posts (Atom)