Android :: Compass Still Crashing

Aug 12, 2009

I've modified the code a bit since the last time, and now it crashes at runtime. I've got the log-cat and code below. how to go about debugging.

CODE:..................

Android :: Compass still crashing


Android :: Download - Compass App

Jan 7, 2010

I have the HTC hero right now with the Android 1.5 and was wondering if there is a compass app that i can download which is similar to the iPhone 3GS?

View 4 Replies View Related

Android :: Map With Compass Like Indicator

Aug 21, 2009

I'm trying to make a map with showing my location with an arrow that point to the way we are facing. the arraw image is something like this:

^ 0

Always pointing north, so i rotate it with sensor orientation event ( image.rotate(values[0]) )

I would like to ask if google map's north is always on 12 o'clock? because i try sometimes the arrow point to wrong direction. how to accurately make this thing works?

View 2 Replies View Related

Android :: Getting Compass Values And Use It On Map Overlay

Sep 13, 2010

I have a marker on the map using an Overlay. I also have access to the compass sensor which I'm able to show a textView with the orientation values (0 to 359). How can I apply this values to the marker? (which is a drawable). I already have a MAtrix created but when I insert the orientation value gives me an error, here it is:

GeoPoint geopoint = new GeoPoint((int) (newLocation.getLatitude() * 1E6),
(int) (newLocation.getLongitude() * 1E6)); Paint paint = new Paint();
Point pt = new Point(); mapView.getProjection().toPixels(geopoint, pt);
Bitmap bmp = BitmapFactory.decodeResource(getResources(),R.drawable.user2);
Matrix matrix = new Matrix(); matrix.postTranslate(-25, -25);
matrix.postRotate(direction); matrix.postTranslate(pt.x, pt.y);
paint.setAntiAlias(true); paint.setFilterBitmap(true);
int width = bmp.getWidth(); int height = bmp.getHeight();
Bitmap changedBitmap = Bitmap.createBitmap(bmp, 0, 0, width, height, matrix, true);
BitmapDrawable icon = new BitmapDrawable(changedBitmap);
icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight());
userOverlay useroverlay = new userOverlay(icon); useroverlay.addItem(item);
mapView.getOverlays().add(useroverlay);

I used the value retrieved from the sensor on "direction" but it doesn't work.

View 5 Replies View Related

Android :: Bad Compass And Sensor Data

Jul 22, 2009

Am researching a problem with compass and sensor values returned by the phone. I found this thread: http://groups.google.com/group/android-developers/browse_thread/threa. Which seems related, but it's old so I'm starting a new one. I'm getting stuck values from both the compass and orientation sensors. It was fine yesterday, but today, I'm only getting values in a limited range (e.g. compass headings from 240 - 290), no matter how I orient the device. What's even more odd is that the radians returned from the call to Sensor Manager.get Orientation(), which returns radians, is giving consistently out of range values. Anyone see this same behavior, and if so, any fixes? Here's some sample sensor data. Format is heading, pitch, roll. The first set contains raw values, the second set contains values after I've applied the orientation matrix generated by the Sensor Manager. The third set contains values after I've smoothed the data with my own algorithm.

View 4 Replies View Related

Android :: Want To Test Compass App On Emulator

Mar 4, 2010

I want to test a compass app on the emulator. Is this possible or do i have to use a real device. Also I do not want to use gps.

View 2 Replies View Related

Android :: Google Skymap Reversed Compass?

Nov 2, 2009

I just installed google sky map and started it up all excited and I just don't get it. I have searched this forum and done google searches and no-one seems to have my issue so I think its something I am not getting but I cant see what it is. I fire up the app and it looks good.. but... the map on the screen goes in the opposite direction. As I rotate left the stars on the screen move left and as I rotate right the move right. up and down movements are fine.

When I point north or south it is correct but as I rotate the horizon says east when I point it west and west when I point it east.? I have recalibrated my compass.. When I run the compass app it works correctly.. even google maps in street view works correctly. It is only google sky map that seems to have reversed east and west. Has anyone else seen this? Is it just me being dumb?

View 4 Replies View Related

Android :: Create Aircraft Mounted Liked Compass?

Oct 31, 2010

I want to create a non-generic compass that uses rotating directions instead of a rotating needle as in the conventional compass. The drawing is like the illustration below..................

View 14 Replies View Related

Android :: Implement The Compass Function To Application

Jun 5, 2009

How can I implement the Compass function having 2 geopoints (start and destination)?

View 10 Replies View Related

Android :: Way To Get Bearing To Update Using Hardware Compass / Not?

Jun 4, 2010

I can't find much information out there on Android's hardware compass. I keep trying to setup my criteria to force Android to use the hardware compass. Basically my problem is I want the bearing to update even while the device is stationary. From my understanding the GPS will only update your bearing when your moving. I'd like bearing to update regardless if your moving or not. I've tried tricking the device in to thinking it's moving by setting the speed at a constant 10 but the bearing returns 0.0 always. My device for testing (currently) is a HTC tattoo. It has a compass so that's not the problem. So my question is, is there a way to get the bearing to update using hardware compass or not? regardless if your moving or not?

View 1 Replies View Related

Android :: Finding Direction Using Compass Interface

Jan 11, 2010

I need to know if there is an interface to access the direction in which the phone is pointing.

View 2 Replies View Related

Android :: Compass Pointing Direction Other Than North

Sep 16, 2010

I'm trying to implement something that I don't even know if it's possible. So I have this class which implements a SensorEventListener like this:
private SensorEventListener mySensorEventListener = new SensorEventListener(){
@Override public void onAccuracyChanged(Sensor sensor, int accuracy) {
} @Override public void onSensorChanged(SensorEvent event) {
myCompass.updateDirection((float)event.values[0]); } };

And a class that handles the way the compass looks like this:
public static class compassLook extends View {
private Paint paintPointer = new Paint(Paint.ANTI_ALIAS_FLAG);
private Paint paintCircle = new Paint(Paint.ANTI_ALIAS_FLAG);
private Paint paintLeters = new Paint(Paint.ANTI_ALIAS_FLAG);
private boolean firstDraw; private float direction = 0 ;
public compassLook(Context context) { super(context); init();
} public compassLook(Context context, AttributeSet attrs) { super(context, attrs); init();
} public compassLook(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle); init(); } private void init(){
paintPointer.setStyle(Paint.Style.STROKE); paintPointer.setStrokeWidth(3);
paintPointer.setColor(Color.argb(255, 209, 114, 2)); paintCircle.setStyle(Paint.Style.STROKE);
paintCircle.setStrokeWidth(2); paintCircle.setColor(Color.argb(150, 255, 255, 255));
paintLeters.setStyle(Paint.Style.STROKE); paintLeters.setStrokeWidth(1);
paintLeters.setColor(Color.argb(230, 255, 255, 255)); paintLeters.setTextSize(12);
firstDraw = true; } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec),
MeasureSpec.getSize(heightMeasureSpec)); } @Override protected void onDraw(Canvas canvas) {
int cxCompass = (getMeasuredWidth()/2); int cyCompass = (getMeasuredHeight()/2);
float radiusCompass; if(cxCompass > cyCompass){ radiusCompass = (float) (cyCompass * 0.9);
} else{ radiusCompass = (float) (cxCompass * 0.9);}
canvas.drawCircle(cxCompass-50, cyCompass, radiusCompass, paintCircle);
if(!firstDraw){ // Desenho da linha que aponta canvas.drawLine(cxCompass-50, cyCompass,
(float)(cxCompass-50 + radiusCompass * Math.sin((double)(- direction) * 3.14/180)),
(float)(cyCompass - radiusCompass * Math.cos((double)(-direction) * 3.14/180)),
paintPointer); double mLatitude = (mLocation.getLatitude() / 1E6);
// I get this value from a LM request double mLongitude = (mLocation.getLongitude() / 1E6);
// I get this value from a LM request double picLatitude= Double.parseDouble(picLatitudeString);
// I get this value from a bundle double picLongitude = Double.parseDouble(picLongitudeString);
// I get this value from a bundle float direction = (float)
Math.toDegrees(Math.atan2(picLongitude- mLongitude, picLatitude-mLatitude));
float distancia = (float) (Math.sqrt(Math.pow(mLatitude- picLatitude,
2) + Math.pow(mLongitude-picLongitude,2)))/2;
//Desenho do texto que indica a distancia
canvas.drawText(String.valueOf(distancia) + "Km", cxCompass-30,
cyCompass+20, paintLeters); } } public void updateDirection(float dir)
{ firstDraw = false; direction = dir; invalidate(); } }

View 5 Replies View Related

Android :: Not Accurate - Build Compass For My Application

May 4, 2010

I need to build compass for my application.

From reading the documentation it seems there are two reasonable ways of doing this:

Sensor.TYPE_ORIENTATION method: This is the easy way of doing it. The problem with this is it is not accurate. When I compare my reading with Snaptic Compass it is about 10-15 degress off which for my purposes is unacceptable.

Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD and getRotationMatrix() in conjunction with remapCoordinateSystem() and getOrientation() method: The documentation says this "is usually more accurate". The problem is regardless of the delay I register with listener the compass goes crazy even when the device is stationary on flat surface.

View 2 Replies View Related

Android :: Accuracy Of Sensors Such As Electronic Compass

Mar 19, 2009

I am now beginning an app which will use the compass and tilt sensors to determine a persons heading and line of sight. Can I assume the sensors on devices such as the G1 are fairly accurate or can I expect to run into problems such as the compass being 5-10 degress off etc?

View 4 Replies View Related

Android :: Market Filtering For Accelerometer Or Compass?

Sep 4, 2010

I just read the developer blog post about non-phone Android devices such as tablets and GoogleTV - http://android-developers.blogspot.com/2010/09/brace-for-future.html.

I'm writing an accelerometer-based game and would like to filter for devices that have an accelerometer (or orientation sensor). Is there a way to do that? It would also be useful to filter for devices with a compass or GPS receiver.

View 2 Replies View Related

Android :: Best Phone Orientation For Compass Readings?

Dec 26, 2009

I've noticed that I get a slightly different reading from the compass depending on how I hold the phone. If I hold it vertically, its different than when I hold it horizontal (ie parallel to a table or floor). Does anyone know the most accurate way to hold the phone for the compass?

View 5 Replies View Related

Android :: Tutorial To Create A Compass In Droid App?

Nov 18, 2009

I cannot find any tutorial on the web. How can I do it in a simple way?

View 1 Replies View Related

Android :: Practice For Obtaining Compass Reading?

Aug 18, 2010

Now that SENSOR_ORIENTATION is deprecated, what's the best practice for obtaining compass reading? The old way was so simple.

View 1 Replies View Related

General :: How To Determine Android Compass Headings

Jul 25, 2012

I have seen applications like gpsstatus which have compass and determines whether the device is heading north south etc. How can i determine the heading of my device?

View 1 Replies View Related

Android :: Application For Compass For HTC Hero - Similar To One On IPhone

Nov 11, 2009

I was just curious as to whether theres an application for a compass for the HTC Hero, similar to the one on the iPhone?

View 1 Replies View Related

Android :: Super Compass - Many Styles And Backgrounds To Choose From

Jul 12, 2010

Super compass is a compass in the English tools. There are many styles and backgrounds to choose from, the essential software for your trip.

Super compass, both app and home screen widget, several styles and backgrounds to choose.
Version 1.4:
- show GPS location
- show current address
- GPS status
- connectivity status
Feature
- Home screen widget
- change background
- change style
- calibrate
- GPS location, address

View 1 Replies View Related

Android :: How Can I Replace Compass Image Of Location Overlay?

Aug 24, 2010

I want to use my image to replace the Compass image of MyLocationOverlay, how can i implement?

View 1 Replies View Related

Android :: Camera Application With Compass Direction Overlay?

Jul 12, 2010

I'm a bit new to Android but after searching on the Market, the web and this forum, I can't seem to find anything like this but I feel like it has to exist (or hopefully will soon). I'm looking for a camera application that can place the current compass direction on the image (and stamp the saved image with the direction). The tilt of the phone would be cool to have, too, but just the compass would be great. I did find an application that shows the compass direction on over top of a feed from the camera ("Reality + Compass" by Udell Enterprises).

I want something just like this, but with the ability to save the image. In case you're wondering, I'd like to use this for bettering the storm spotting community. A problem when people send in images of clouds/storms/tornadoes/etc is that you never know (1) where the picture was taken and (2) in what direction. Ideally GPS location could be added, too, but for now I just want the compass. (Other image services can handle the location part fine, like Twitter for Android/Twitpic.)

(I'm on the HTC Aria, but I can sideload apps now thanks to the new version of HTC Sync.)

View 5 Replies View Related

HTC EVO 4G :: Compass - Off

Oct 16, 2010

My compass and any apps that use it are all off. I've tried calibrating it through the compass app, but it's still real jumpy.

View 2 Replies View Related

Android :: My Location Overlay - Customizing Compass Position On Screen?

Nov 3, 2010

I am using these three lines to add a compass on the MapView: mMyLocationOverlay = new MyLocationOverlay (this,mapView);mMyLocationOverlay. enableCompass(); mapView.getOverlays() .add(mMyLocation Overlay) ; However the default position of the compass showing on the screen is not too good for my apps, and I want to move it to somewhere else. Anyone knows how I can achieve that?

View 2 Replies View Related

HTC Legend :: Compass App

May 3, 2010

I tried to find compass app in my htc legend, but no success. Seems that I have to look for one. But i don't know which one will work for my phone.

View 1 Replies View Related

Samsung Galaxy S :: Best Compass App

Sep 24, 2010

my wife wants a compass app on her phone (I think this is so she knows which way to walk to the most expensive shops, and becuase her friends with iPhones have them ).... as it appears that there is not one on the SGS, can anyone reccommend the best one to download? I presume that they are all as accurate as each other, but are there any that have any nice additional features?

View 8 Replies View Related

HTC Tattoo :: App - Digital Compass

Nov 6, 2009

is there an app that makes use of the digital compass? also whats a good facebook app?

View 11 Replies View Related

HTC Desire :: Digital Compass

Jun 3, 2010

I am on T-Mob with my Desire and have just realised i have no Digital Compass.Or am i looking in wrong place ? ,have tried manage apps ,and its not listed ,compass mode works ok in Maps,so whats happening?.

View 10 Replies View Related

HTC Droid Eris :: Compass And Map

Mar 6, 2010

I noticed that when I am lookinh at google map (satellite or normal), when I turn the phone the map will not stay to point to the same direction. It turns with the phone. Is this the way it should be?

I also downloaded the Compass application. and it behaves kind of wierd: holding the phone horizonally, I turn around. The compass should keep pointing to the north regardless how I turn. Mine is all over the place. If I point the phone to NE, it does show the N direction but when I try to turn the phone to point to the North it goes all over the place.

This is regardless GPS on or off. I am still at 1.5...

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved