[android-developers] Re: Web based Emulator

2011-04-21 Thread Igor Prilepov
If you have emulator on your local machine you can use it even when there is 
no internet connection ;)
What's the point ?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] getting gps status events

2011-04-21 Thread Igor Prilepov
You can request status update without location updates but the GPS status 
will be changed only if some other application did it.
Therefore listening for the status updates without location notifications 
makes sense only for some kind of a background service when you want to save 
location whenever somebody else gets it.
BTW: Android introduced "PASSIVE_PROVIDER" in API 8 which should be used to 
achieve such behavior (i.e. get location updates when someone enables GPS).

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Use of files

2011-04-21 Thread Igor Prilepov
Most likely this is about permissions: the native application (I guess you 
run it from the shell) is executed under different user ID than your Java 
application.
As a temporary development solution you can get root access and fix it but I 
would recommend to avoid using native code unless for the JNI level.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Web based Emulator

2011-04-21 Thread Igor Prilepov
This is not an emulator but a marketing demo.
Emulator should accurately represent the real device, for example you should 
be able to add a new record to the contacts list, open some page in the 
browser, etc. This is a development tool. 
The page you mentioned has different purpose - give some initial experience 
to a potential user (sort of "try before buy"). This is marketing tool.
Different goals - different requirements - different implementations. 
If your original question was about such demo then this is a wrong place.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Scan for wifi networks when connected to 3G

2011-04-22 Thread Igor Prilepov
Short answer: yes, you can do this.
First you start scanning WiFi using intent filter 
WifiManager.SCAN_RESULTS_AVAILABLE_ACTION, then get results, analyse them 
and only then select which network to connect to.
However, as you have found already, if you enabled WiFi and there is a 
"remembered" network then the WiFi manager will connect automatically. 
I guess the solution is in using WiFiLock with 
WIFI_MODE_SCAN_ONLY
 key 
- this is exactly what you are looking for:
http://developer.android.com/reference/android/net/wifi/WifiManager.html#WIFI_MODE_SCAN_ONLY

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Ignoring magnetic field sensor, calibrating the accelerometer

2011-04-23 Thread Igor Prilepov
1. Yes, there are a lot of issues related to the magnetic sensor but people 
still use it for thousands years so the real question is do you need it or 
not.
2. I don't know what does it mean "baseline values". Accelerometer always 
returns noise values (as well as any other sensor) - this is a nature of any 
real data source.
There is no "work around this problem" but there are many methods to filter 
noise out. All of them requires certain level of knowledge in math, 
statistics, etc. and they are very complicated. Take a look at Kalman filter 
on Wikipedia to get some feeling about this area.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: How to make an efficient rendering loop with cache-based scrolling/zooming

2011-04-27 Thread Igor Prilepov
Did you measure the one frame drawing performance? 
How complicated is your frame in terms of objects to be shown?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Re: How can I handle Exception message internationalization

2011-04-29 Thread Igor Prilepov
Use different catch for each exception type or analyse message text sting. 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Igor Prilepov
It looks like your app eats up a lot of CPU. Reduce (or remove completely) 
background processing and list update and check touch screen again.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: how to debug android device driver with ddd or gdbserver between Phone and PC

2011-04-29 Thread Igor Prilepov
Native code building and debugging was described here: 
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html
But you cannot debug device driver.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Building C code for Android (no Java/jni)

2011-05-03 Thread Igor Prilepov
It is possible with NDK and here is the best link I know: 
http://betelco.blogspot.com/2010/01/buildingdebugging-android-native-c.html

However, this approach is helpful only for a very few cases, for example, 
when you are making some tools for yourself only.
Any real application development must be done using Java/JNI approach. 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Battery Log using service

2011-05-03 Thread Igor Prilepov
These are two opposite cases:
1. Your service is crashed (or killed) and Android tries to restart it after 
a certain timeout 
2. On some conditions Android may decide to kill your service. Since the 
purpose of this action is to free some system resources it won't be 
restarted after a timeout.


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: how to draw a route and get the image of a map

2011-05-08 Thread Igor Prilepov
Use Canavas.drawLine() to how line between two points.
Saving an image in the DB seems to be a bad idea due to size and limited 
operations you can do with saved result. 
Save your points (from start to stop) instead and you will be able to draw 
them on the map any time later with all map related features (scale, modes, 
pan, etc.) 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Local variable type mismatch

2011-05-09 Thread Igor Prilepov
As it is shown in the log file you are trying to use array where a single 
object is expected.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Gyroscope heading change affects y axis

2011-05-09 Thread Igor Prilepov
All sensors report their values with respect to the phone's coordinates 
system and you have to find out how to detect device orientation and then 
how to convert XYZ from phone into the world coordinates.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: requestLocationUpdates has side effect on GPS usage of other applications

2011-05-09 Thread Igor Prilepov
The GPS receiver is turned on when you call "registerLocationUpdtaes" and 
turned off when you remove this listener.
The attributes of this call (i.e. how often do you want to get updates) do 
not affect the power consumption much (it controls how often your code 
should be executed but GPS is turned on all the time). 

Unfortunately cannot help you with the side effect described. Never used 
proximitAlert() because it is easier to execute distance checking from the 
location updates handler and I guess these two approached have been provided 
as alternatives. 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Local variable type mismatch

2011-05-09 Thread Igor Prilepov
Line number and source code won't help you because this is Dalvik VM code - 
very generic and definitely not the one causes the problem.
According to the message you are trying to set/get variable of type Object 
using local variable which is defined as [] Object.
Check your local arrays and how do you use them. Comment out pieces of your 
source code to identify the part responsible for this exception. If nothing 
helps then may be its time to stop using cat/paste "technology" and try to 
understand what exactly are you doing.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Convert from Polyline to ArrayList

2011-05-10 Thread Igor Prilepov
 I doubt you would find a ready to use solution because the task seems to be 
unrealistic (as well as trivial) .

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Register and UnRegister Broadcast Receiver

2011-05-10 Thread Igor Prilepov
1. Register broadcast receiver in onResume() without any additional 200ms 
and add some logic inside receiver to ignore intents for the first 200ms 
after startup. 
or
2. If you still want to do such weird things (i.e. to register BR in another 
task?!) then you need to inform this task when onPause is called to prvent 
new BR to be created. Because this is exactly what has happened: your "200ms 
task" creates a broadcast receiver after the app has received and processed 
onPause(). 
IMHO the whole idea of creating BR in another task contradicts the Android 
design and should be avoided.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] Re: Convert from Polyline to ArrayList

2011-05-10 Thread Igor Prilepov
It is unrealistic because people collect points and then show them as 
polyline, polygon or just dots not the other way around.
It is unrealistic because Google MapActivity on Android is different from 
the full scale Google Map API.
It is trivial because any Polyline (or Polygon) should be stored as some set 
of points and therefore all you need to do is to open a documentation to 
find out how exactly to do this. For example, if you open 
http://code.google.com/apis/maps/documentation/javascript/3.3/reference.html#Polyline
 you 
will find getPath()method to get 
MVCArray
 
http://code.google.com/apis/maps/documentation/javascript/3.3/reference.html#LatLng>
>. 


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en