Android :: Accelerometer False Detection
Oct 27, 2009
I have a code snippet to detect accelerometer movements. It works some times by properly detecting slight movements, but sometimes it detects movements when I kept my device idle too. Are there any problems with built-in accelerometer detection on Android?
I use an HTC G-1 device. My code snippet is below. How do I resolve it so I can detect small device movements but not detect anything when the device is idle?
CODE:..............
View 3 Replies
May 20, 2010
I want to know how to calculate the accelerometer movement.When i place the mobile horizontally in idle state and similarly when i place the mobile in hands,So there accelerometer value change when it is place horizontally or while it is in hand vertically.How To Identify them,Any Sample Codes will be useful.
View 1 Replies
View Related
Jul 31, 2009
I'm developing an app and i need to detect when the user shakes the phone from side to side , that means just along one axis (in this case X).I want to know when the user shakes the phone to the left and when to the right, the problem is that my code does not detect shaking but tilt, i have tested this code and it works when i tilt the phone to left or to the right, but not when a shake it from side to side (no matter the orientation of the phone).
View 2 Replies
View Related
Jun 9, 2009
I am developing a game. In which the user controls movement using the accelerometer. Sounds effects can also be enabled. However when laying the phone flat down and playing the game without the accelerometer gives nice 0,0,0 values. However when play WITH SOUNDS on, i get a buch of weird values: while the phone is NOT moving.
This is really a big bug that makes life hard for Game Developers. I tried to take an avarge of the last 5 values from the sensor.. but this is not enough.. The harder the sounds plays: the higher the weird sensor values. When using the headphones: almost no weird values. Seems that sounds interferes with the accelerometer sensor.
View 5 Replies
View Related
May 5, 2009
On my Google dev phone there is a problem with the new 1.5 version in combination with an official HTC adapter cable YC A300 and 3.5mm earphones. Android doesn't recognize the earphones (it worked on 1.1!). Android still recognizes the HTC earphones with ExtUSB.
View 2 Replies
View Related
Apr 30, 2010
I am pretty new to android. I have a use case where I need to detect a shake and show some images in my application. Can I test shake functionality on android emulator ? What are the other alternatives apart from testing it on a real phone ?
View 1 Replies
View Related
Jun 6, 2010
Is this possible? How do i do it? I want to learn but dont know where to begin even
View 3 Replies
View Related
May 30, 2010
As part of an application that I'm developing for Android I'd like to show the user an edge-detected version of an image they have taken (something similar to the example below).To achieve this I've been looking at the Sobel operator and how to implement it in Java. However, many of the examples that I've found make use of objects and methods found in AWT (like this example) that isn't part of Android.My question is then really, does Android provide any alternatives to the features of AWT that have been used in the above example? If we were to rewrite that example just using the libraries built into Android, how would we go about it?
View 1 Replies
View Related
Sep 23, 2010
I have an itemizedOverlay extended and I want to increase the hit detection on the OverLayItem's if this is possible?
View 1 Replies
View Related
Apr 27, 2009
I'm trying to product a binary that is compatible with 1.1 and 1.5, but i'm having trouble with the ViewSwitcher class behaving different. I'd like to create a wrapper for it, but I need a way to programatically detect the api level at runtime.
View 3 Replies
View Related
Nov 8, 2010
I am currently working on an experimental camera app. I'm looking into implementing face detection at the moment and am currently weighing up my options.I have considered the OpenCV port available for android and using their face detection functions, but from demos I have seen of previous implementations the camera seems to lag a lot.Considering the camera on the HTC desire has face detecting, I know it must be possible to get at least a semi decent face detection system in place. I was just wondering if anyone had an opinion on how I could get the best results.Using an available library? Implementing a particular algorithm myself?
View 1 Replies
View Related
Nov 5, 2010
Has anyone ever used the API for face detect in their android program?More simply stated, can I have a java class that pulls up the camera, scans a person's face and returns parameters back into the program?
View 1 Replies
View Related
Jul 29, 2010
On Froyo, we found that some new "Task Manager" apps are now using the ActivityManager.killBackgroundProcesses() to kill apps. When this happens, Intent.ACTION_PACKAGE_RESTARTED is no longer fired. How can I find out that my application has been killed? I tried to start a service, and I do see this message printed in logcat:
W/ActivityManager( 2426): Scheduling restart of crashed service com.example.android.apis/.app.RemoteService in 20000ms
However, the service is never restarted as advertised, if the app is killed using the killBackgroundProcesses API. (If I go into adb shell and kill the service process, the service will indeed be restarted ...) This looks like a bug anyway, because the notification created by the app is no longer removed like in eclair (the StatusBarService, and a bunch of other system services, depend on the Intent.ACTION_PACKAGE_RESTARTED broadcast).
View 14 Replies
View Related
Apr 2, 2010
I'm working on a soundboard, however I've got a problem when it come to drag the finger over the screen to play the sounds for the buttons I drag the finger over.Do anyone know how I can detect when a finger enter a button and not click the button?
View 1 Replies
View Related
Jul 1, 2010
I've been trying out Google Sky Map and it seems a bit off. I hold my phone in landscape mode and point it at the moon as if I were going to take a picture of it. The application shows the moon about 5-10 degrees off from where it actually is. Is this just the accuracy of the compass and orientation detection of the phone?
View 9 Replies
View Related
Apr 12, 2010
Really general, very new to bluetooth. Can we have one android device broadcasting a simple 'hello' bluetooth network (maybe a radius of just a few feet) - then when other android devices come into that area, reply with a 'hello' back? The client devices moving through the 'hello' radius wouldn't need to be always be checking for presence. I'd let the user open an app and check for bluetooth networks nearby. If they find one of these hubs, they can then choose to broadcast back a hello.Is that at all possible? Any general info would be great.
View 2 Replies
View Related
Nov 29, 2009
I am currently working on a collision detection routine for an Android based game which is capable of handling complex concave curves in 2D. I use complex in this post to describe any non-trivial, arbitrary shape (beyond circles, squares, etc). My problem is that all of the various methods I have come across are either too simplistic to be realistic or too complex for a cell phone. At the moment I am favoring a tile-based scheme but I am having problems figuring out how to do this with convex curves that span several tiles and may have several line segments per tile. I gave some thought to representing the curves mathematically, with each tile being an interval of the function, but there will likely be points where the curve doubles-back on itself (think the big loop at the top of a pinball table that brings the ball all the way around the table and back the direction it came). My questions boil down to:
1. Does anyone know of a way of hit testing a given simple shape (e.g. a circle) against a concave series of line segments (shapes beyond circles can be figured out from there) beyond just a Boolean result?
2. What is the best way to represent large, complex shapes programatically? I am currently favoring an XML file describing my levels and the objects in them with shape/position/physics/etc. data to be parsed in during load time.
3. Is there an altogether better way of doing this beyond line segments?
The one saving grace in this conundrum is that I know the vast majority of the objects are stationary with, at most, three or four (usually one) dynamic objects moving around.
View 3 Replies
View Related
Oct 15, 2010
I am writing an application that will behave similar to the existing Voice recognition but will be sending the sound data to a proprietary web service to perform the speech recognition part. I am using the standard MediaRecord (which is AMR-NB encoded) which seems to be perfect to speech recognition. The only data provided by this is the Amplitude via the getMaxAmplitude() method.I am trying to detect when the person starts to talk so that when the person stops talking for about 2 seconds I can proceed to send the sound data to the web service. Right now I am using a threshold for the amplitude that if its goes over a value (i.e. 1500) then I assume the person is speaking. My concern is that the amplitude levels may vary by device (i.e. Nexus One v Droid), so I am looking for a more standard approach to this that can be derived from the amplitude values.
View 3 Replies
View Related
Mar 5, 2014
According to the MS website, Windows Media Player queries an MTP device to see what formats it supports. My Razr Maxx HD supports ogg and m4a. When attempting to sync WMP does not sync those files stating they might not be supported on the device. Being that I've had so much trouble in the past even getting any of the Android devices to be properly detected as an MTP device I'm worried this is a driver issue.I should be able to get WMP to at least convert them.
this is the device mis-reporting the formats, Windows not querying them properly, or an actual WMP issue? Would like to be able to get sync working without any conversions. Maybe there is a way to hardcode formats within the mtp inf file?
View 1 Replies
View Related
Jun 29, 2010
I have a strange error that I can't understand. I have this code: if (VersionsKoll == Ver) { }
View 5 Replies
View Related
Apr 16, 2010
I am trying to send all my activities to background by calling this.moveTaskToBack(true); on a menu button click, but the call returns me a boolean value false. Please can anyone let me know if my way to invoke this is wrong or if I am doing anything wrong.
View 7 Replies
View Related
Jul 20, 2010
I need to check web site availability and use requestRouteToHost for that purpose. On real device everything works fine, but on emulator requestRouteToHost always return "false".
What's wrong? Code is:............
View 3 Replies
View Related
Apr 22, 2010
I need a seek bar to not be able to be adjusted, but without making the color change... setFocusable does not work for this. Is there a way to do this because it seems like there should be (without re- writing the seekbar class that is).
View 2 Replies
View Related
Mar 29, 2010
In my application during downloading of images, for some of the images i got the error like
D/skia (374): --- decoder->decode returned false
View 2 Replies
View Related
Aug 18, 2010
I have my application running on a Motorola droid. We have successfully used it in the intended enviornment for 2 days collecting 340 readings. The app is not full featured but it is running. The data storage is complete and we store, create, delete... small data files on the sdcard. Our design team prefers, in this application, the small files on the external storage sdcard and does not want to use sqlLite.
My beta tester purchased a AT&T Samsung Captivate (Samsung SGH-i897). It seems to have two sdcards. In an earlier thread on this list, they were referred to as an "internal sdcard" and an "external sdcard". Our test unit has both installed. I am having trouble accessing the external storage sdcard. I utilized the code from http://developer.android.com/guide/topics/data/data-storage.html to determine if the sdcard is installed and readable and writeable.
The code is:
CODE:...........
This code returns False which means it is neither readable or writeable. It prints the else - "in cksdcard, Something else is wrong".
The app will not run on the Samsung Captivate because it cannot access the data files on the sdcard.
Strangely, when I mount the device on the desktop computer, windows explorer shows two (2) connected usb drives which it calls E: and F:. E: is blank. I can copy the files to F:AndroiddatalmsmpT...... with windows explorer. Windows explored does not show /sdcard anywhere, it is probably using an Alias?
android.os.Environment.getExternalStorageDirectory() returns "/sdcard" on BOTH the Moto droid and the Samsung Captivate.
''adb shell" works on the Samsung Captivate. "ls -l /sdcard" returns "access denied" or something like that. "ls -l" does show /sdcard in the root directory with the following attributes: "d---------" which means the owner, group, and user (everybody) have no rights at all.
How I might get read and write access to the sdcard on the AT&T Samsung Captivate?
View 11 Replies
View Related
Mar 18, 2009
In the layout you can set the EditText widget to be non-editable via the android:editable attribute.
How can I do this in code? I need to make the EditText widget to be editable depending on conditions.
View 4 Replies
View Related
Sep 29, 2010
In early versions of Android the android:allowClearUserData flag worked. Using this flag with an application on Froyo has no effect, even if the application is installed as a system application. The "Clear Data" button is enabled no matter what in the application manager. I have found no reason in the Android documentation why this shouldn't work.
View 2 Replies
View Related
Jun 30, 2010
Is it possible to detect that the viewport is being dragged by a touch event?
Using the following code I am able to get the position of where the finger touched the screen, what node started the event and where it was dragged to. Which solves one of the problems but I would really like to detect when the user has dragged the page/window/viewport down.
To attempt to be more clear as to what I am trying to do: I would like simulate the refresh activity in Tweetie 2/Twitter for iPhone but in HTML5 and JavaScript. Code....
View 2 Replies
View Related
Jun 11, 2010
I recently set up a second POP3 account and have shortcuts to both on my home screen. The second one perpetually shows 1 new message, though I've checked every folder and rebooted the phone.
View 1 Replies
View Related
Oct 27, 2009
For my current application I collect images from different "event providers" in Spain.
However, when downloading images from salir.com I get the following logcat output: 13970 Gallery_Activity
I Fetching image 2/8 URL: http://media.salir.com/_images_/verticales/a/0/1/0/2540-los_inmortale... 13970 ServiceHttpRequest
I Image [url] fetched in [146ms] 13970 skia D --- decoder->decode returned false
Searching for that error message didn't provide much useful results.
View 4 Replies
View Related