[android-developers] Re: Find the location in Android Map

2010-09-16 Thread Per
Hi there,

I see at least two issues:
1: your button click listener takes lat/long from the EditText's, then
effectively starts the Maps app (Intent url is geo:lat,long).
2: The GeoPoint constructor takes coordinates that are scaled by
100, i.e. 45.7 N would be 4570. (see e.g.
http://developer.android.com/resources/tutorials/views/hello-mapview.html)

BR
Per



On 15 Sep., 19:59, Dhrumil Shah dhrumilsh...@gmail.com wrote:
 Hey TreKing,

 If you dont mind, just refer this code.
 You exactly got what is going on here. I am new in Android so I dont know
 what is stack trace and log? How to check stack trace?

 So here is my code.

 public class ShowLocation extends MapActivity {
 private EditText lat;
 private EditText lng;
  GeoPoint gp=null;
  MapController  mapcontroller;
     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         Button btn = (Button)findViewById(R.id.btnShow);
         lat = (EditText)findViewById(R.id.lat);
         lng = (EditText)findViewById(R.id.lng);

         MapView mapView = (MapView)findViewById(R.id.myGMap);

         mapcontroller = mapView.getController();

         //gp = new GeoPoint(lat.intValue(), lng.intValue());
         mapView.setSatellite(true);
         mapView.setTraffic(true);
         mapView.setStreetView(true);
         mapView.displayZoomControls(true);
         mapView.setBuiltInZoomControls(true);

         //mapcontroller.animateTo(gp);
         mapcontroller.setZoom(2);
         LocationManager locationManager;
         String context = Context.LOCATION_SERVICE;
         locationManager = (LocationManager)getSystemService(context);

         Criteria criteria = new Criteria();
         criteria.setAccuracy(Criteria.ACCURACY_FINE);
         criteria.setAltitudeRequired(true);
         criteria.setBearingRequired(false);
         criteria.setCostAllowed(true);
         criteria.setPowerRequirement(Criteria.POWER_HIGH);
         String provider = locationManager.getBestProvider(criteria, true);

      Location location = locationManager.getLastKnownLocation(provider);

         btn.setOnClickListener(new View.OnClickListener() {
 �...@override
 public void onClick(View v) {
 // TODO Auto-generated method stub
 String _lat = lat.getText().toString();
 String _lng = lng.getText().toString();
 Uri uri = Uri.parse(geo:+_lat+,+_lng);
  startActivity(new Intent(Intent.ACTION_VIEW, uri));
 //mapcontroller.animateTo(gp);
 mapcontroller.setZoom(2);}
 });

         String _lat,_lng;
         MapOverlay mylocationoverlay = new MapOverlay();
         ListOverlay list = mapView.getOverlays();
         list.add(mylocationoverlay);
     }
  protected class MapOverlay extends com.google.android.maps.Overlay{
  public boolean draw(Canvas canvas, MapView myGMap, boolean shadow, long
 when){
 Paint paint = new Paint();
 //mapcontroller.animateTo(gp);
 super.draw(canvas, myGMap, shadow);
  Point myScreenCoords = new Point();
 //mapview.getProjection().toPixels(gp, myScreenCoords);
 //paint.setARGB(255, 255, 255, 255);
 Drawable marker = getResources().getDrawable(R.drawable.marker);
 Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
 R.drawable.marker);
 canvas.drawBitmap(bitmap, myScreenCoords.x, myScreenCoords.y, paint);
 canvas.drawText(Location is at here.., myScreenCoords.x, myScreenCoords.y,
 paint);
 return true;}
 }

 �...@override
 protected boolean isRouteDisplayed() {
 // TODO Auto-generated method stub
 return false;

 }
 }

 ~Dhr



 On Wed, Sep 15, 2010 at 11:17 PM, TreKing treking...@gmail.com wrote:
  On Wed, Sep 15, 2010 at 12:42 PM, Dhrumil Shah 
  dhrumilsh...@gmail.comwrote:

  You can change this at any time.
  - Ya, i know that thing, but its not working in my this application.

  It's not working is not useful information.

  Or you can animate or snap to the exact location.
  - I used this method but it generates and force close error on my
  emulator.

  Did you check the stack trace?

  Why not?
  -I dont know why not. I try to debug it but it gives me nothing.

  Nothing? No logs, no stack trace?

  --- 
  --
  TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
  transit tracking app for Android-powered devices

   --
  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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send 

[android-developers] Re: Edittext Cursor and Highlight Problem

2010-09-16 Thread SurtaX
Ahh I see what you meant, but no I am trying to do something
different. I want the cursor to be none existent.

I'm trying to display (read-only) a page of text in which they are
free to select and copy text from thus that is why I don't want the
cursor to be visible at all.

On Sep 14, 10:51 pm, TreKing treking...@gmail.com wrote:
 On Mon, Sep 13, 2010 at 9:44 PM, SurtaX garylo@gmail.com wrote:
  Could you tell me what modifications have you made to it?

 None. I see the same behavior when using the built-in messaging app.

  Because by default the cursor is definitely there to allow people to know
  where they are editing. By cursor I am referring to the  |  which blinks/
  flashes.

 Yes, it's there when you first opt to select text and have not highlighted
 anything. Once you start selecting text, it goes away. Is this the problem?

 --- 
 --
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices

-- 
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 get android version programmtically

2010-09-16 Thread cool.manish
I also want to add some more query in this.

1. Where and how can I add version info of my application? So that I
can check for the upgraded version and can upgrade my application.

 2. And if there is upgraded version of the application is available
in the Android Market then will I get any notification on my mobile or
I have to check in manually.

Thanks,
Mansih

On Sep 16, 9:48 am, Jiang webs...@yahoo.cn wrote:
 Hello, guyes.

 I need to get android version programmtically  dynamically when my 
 application is running on device.

 I tried android.os.Build.Version, but it doesn't exist in Android sdk 1.6.

 How to get android version?

 Thanks.
 Jiang

-- 
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: Uploading file through HTTP Post

2010-09-16 Thread Vinay S
Hi,

See this page..

http://rapidandroid.org/wiki/HttpUpload

-vinay

On Sep 16, 8:55 am, perumal316 perumal...@gmail.com wrote:
 Hi All,

 I am writing an application to upload a file from Android phone to a
 web server.

 I have tried the example from:

 http://www.anddev.org/novice-tutorials-f8/doing-http-post-with-androi...

 But it will only work for SDK 1.0 (why? Not Sure?).

 Can this be done for Android 2.1? Or is there any other method to load
 a file from Android to a webserver?

 Thanks In Advance,
 Perumal

-- 
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: system_server debugging using eclipse.

2010-09-16 Thread FrankG
As non native speaker this means that this is the wrong group for such
a question :-)


On 15 Sep., 09:07, Dianne Hackborn hack...@android.com wrote:
 You wouldn't use the NDK or SDK for this.

 On Tue, Sep 14, 2010 at 10:43 PM, kiran kiranbhat2...@gmail.com wrote:
  Hi
  how can  i  debug the android telephony and radio service part  of android
  (system_server) using eclipse debugging tool.
  Regards
  Kiran

  --
  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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

-- 
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 list files on SD card

2010-09-16 Thread Vinay S
Pl. look at http://developer.android.com/reference/java/io/FilenameFilter.html

On Sep 16, 8:40 am, cindy ypu01...@yahoo.com wrote:
 Hi all,

  My application needs to do some clean up. I need to list the files
 such as   ls voice*.amr, and then delete those files. How could I do
 it in Android?

 Thanks !

 Cindy

-- 
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 do this correctly in SQLite?

2010-09-16 Thread String
You're missing the inner (single) quotes around the temp string. Also,
your variable names aren't consistent, but I'm assuming that's just in
your post here - the compiler would have caught that for you. In any
case, your code should be:

  String temp = temp;
  db.execSQL(INSERT INTO  + TABLE_NAME +  VALUES (0 'A',
'Hello', '', ' + temp + ', ''););

On Sep 16, 6:37 am, Mystique joven.ch...@gmail.com wrote:
 Hi,

 I want to insert a String value call temp but I don't seems to get it
 working for the INSERT INTO statement.
 Anything wrong with the code?

 This is the initialization to create table and insert some default
 values into the table if the database doesn't exist.

 Many Thanks.

 ---code---
   @Override
    public void onCreate(SQLiteDatabase db) {
       db.execSQL(CREATE TABLE  + TABLE_NAME +  ( + _ID
             +  INTEGER PRIMARY KEY AUTOINCREMENT,  + FIELD1 + 
 VARCHAR(1),  + FIELD2
             +  TEXT,  + FIELD3 +  TEXT,  + FIELD4 +  TEXT,  +
 FIELD5 +  TEXT););

       String tmp = temp;
       db.execSQL(INSERT INTO  + TABLE_NAME +  VALUES (0 'A',
 'Hello', '',  + temp + , ''););
    }
 ---code---

-- 
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: HttpURLConnection or HttpClient

2010-09-16 Thread Indicator Veritatis
When you say 'speed', do you mean development time or runtime? If the
former, Apache's wins. If the latter, the speed is going to depend
much more heavily on what you the programmer write (regardless of
which package you choose) and on network conditions at the time you
run.

That said, lots of programmers have found that Apache's package is
easier to use for high performance code. That is why Manning Press's
Unlocking Android says, after briefly discussing the Java package,
Fortunately, Android provides another set of APIs in the form of the
Apache HttpClient library that abstract the java.net classes further
and that are designed to offer more robust HTTP support and help
handle the separate-thread issue.

The authors then show how it helps with concrete examples, which you
can download from their website even without purchasing the book: it
is ch.6 you want. See http://code.google.com/p/unlocking-android/ for
more details. In particular, see how he uses ApacheHTTPViaHelper with
the Swiss-army knife of thread management, Android's Handler and
Looper. But see also HTTPRequestHelper and ResponseHandler.

As an exercise, think of how you would re-write this example using
AsyncTask instead of Looper and Handler;)

Now OTOH, if you tried writing all that with the java.net package's
classes, you would have to take on a lot more of the thread management
yourself, because the APIs are all synchronous; it CAN be done, it is
just more tedious and error-prone.

On Sep 15, 8:34 pm, cindy ypu01...@yahoo.com wrote:
 How about speed? which one is fast?

 On Sep 15, 5:59 pm, Indicator Veritatis mej1...@yahoo.com wrote: Yes, we 
 know why. Because Apache's HttpClient (and other closely
  assoc. classes in the org.apache.http package) is a much better API
  than Sun's own HttpUrlConnection (and the rest of java.net's Http
  support). You can do far more work with less code, and it reads much
  better too.

  So, for example, HttpClient has helper classes that help you deal with
  spinning off a worker thread and doing all the waiting on HTTP there;
  it is designed to work well asynchronously. Sun's HttpUrlConnection
  has nothing of the sort.

  That said, you don't get to depart from using java.net entirely. You
  should still use it for dealing with URIs and URLs. But not for much
  more.

  On Sep 15, 2:41 pm, cindy ypu01...@yahoo.com wrote:

   Hi,

   I was told it was prefer to use Apache's library HttpClient, instead
   of java's Http URLConnection. Does any one know why?

   Thanks!

   Cindy



-- 
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] How to get android version programmtically

2010-09-16 Thread Michael MacDonald
On 09/16/10 00:48, Jiang wrote:
 Hello, guyes.

 I need to get android version programmtically  dynamically when my
 application is running on device.

 I tried android.os.Build.Version, but it doesn't exist in Android sdk 1.6.

 How to get android version?

 Thanks.
 Jiang

  
android.os.Build.VERSION.SDK

is deprecated now but it is the SDK number as a string, and it has been
available since 1.0

-- 
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 list files on SD card

2010-09-16 Thread cindy
ANy example to use the api? I am confused.

On Sep 15, 11:26 pm, Vinay S s.vinay@gmail.com wrote:
 Pl. look athttp://developer.android.com/reference/java/io/FilenameFilter.html

 On Sep 16, 8:40 am, cindy ypu01...@yahoo.com wrote:

  Hi all,

   My application needs to do some clean up. I need to list the files
  such as   ls voice*.amr, and then delete those files. How could I do
  it in Android?

  Thanks !

  Cindy

-- 
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 do this correctly in SQLite?

2010-09-16 Thread Mystique
Hi, sorry about the variable names aren't consistent.
I change it when I paste here to make it readable, my mistake for the
confusion.

About the single code, I want the value of temp instead of the string
temp ('temp') therefore I have not single code.
Many thanks.

On Sep 16, 2:28 pm, String sterling.ud...@googlemail.com wrote:
 You're missing the inner (single) quotes around the temp string. Also,
 your variable names aren't consistent, but I'm assuming that's just in
 your post here - the compiler would have caught that for you. In any
 case, your code should be:

       String temp = temp;
       db.execSQL(INSERT INTO  + TABLE_NAME +  VALUES (0 'A',
 'Hello', '', ' + temp + ', ''););

 On Sep 16, 6:37 am, Mystique joven.ch...@gmail.com wrote:



  Hi,

  I want to insert a String value call temp but I don't seems to get it
  working for the INSERT INTO statement.
  Anything wrong with the code?

  This is the initialization to create table and insert some default
  values into the table if the database doesn't exist.

  Many Thanks.

  ---code---
    @Override
     public void onCreate(SQLiteDatabase db) {
        db.execSQL(CREATE TABLE  + TABLE_NAME +  ( + _ID
              +  INTEGER PRIMARY KEY AUTOINCREMENT,  + FIELD1 + 
  VARCHAR(1),  + FIELD2
              +  TEXT,  + FIELD3 +  TEXT,  + FIELD4 +  TEXT,  +
  FIELD5 +  TEXT););

        String tmp = temp;
        db.execSQL(INSERT INTO  + TABLE_NAME +  VALUES (0 'A',
  'Hello', '',  + temp + , ''););
     }
  ---code---

-- 
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: OpenGL lockups in 2.2

2010-09-16 Thread Indicator Veritatis
You say you don't see why anyone would use it, but then your own words
give a pretty good description of when to use GLSurfaceView: when you
don't care about making your code less portable, and don't need the
control taken away from you.

And by less portable you must mean having in mind to port to non-
Android platforms. But if your application is Android specific anyway,
then this is not a consideration. There will be lots of OpenGL
applications out there. Just give it time to develop. GLSurfaceView is
a HUGE improvement over the JME way of supporting OpenGL.

On Sep 15, 5:25 pm, Leigh McRae leigh.mc...@lonedwarfgames.com
wrote:
   I don't use GLSurfaceView and I am not really sure why anyone would
 use it for anything other than a demo.  It makes your code less portable
 and takes control away from you.

  With that said, I do get people with HTC complaining about freezes.  So
 it would seem that it's not a GLSurfaceView problem.

 On 9/14/2010 8:38 PM, timedilation wrote:

  This appears to be an HTC specific bug. My app never freezes on the
  Motorla Droid. EVER. It is very stable on the Droid and I have tested
  it for about 4months without a single freeze. Interestingly though it
  never froze on my G1 either. The G1 I have is the ADP1 phone I bought
  directly from Google.

  All other HTC phones that I have exhibit the freezing - Evo, Desire
  and Nexus One (which is also from HTC I believe).

  Apart from that I tested it for a month on Samsung Moment. There was
  NO freezing there either.
  I have been in touch with a Google developer advocate and I have
  submitted the bug report to his team. They are looking into this as
  well.

  On Sep 14, 8:23 pm, Jeremy Statzjst...@gmail.com  wrote:
  That's my experience as well.  All my log results say that there's no
  loading or anything necessary -- the frame it dies on is bog standard,
  with drawFrame going from beginning to end.  Any loading is long since
  done.

  I'm currently wondering if this is an HTC driver bug.  I'm going to
  let this run on a Motorola Droid all night and see if it crashes.  Not
  sure I'm expecting it to, as my fiance has been using my wallpapers on
  her Droid since forever and says she's never seen it lock and reboot
  like we're describing.  Is there anyone at HTC to take something like
  that to, if I gather some evidence?

  On Sep 14, 3:32 pm, timedilationudayan.k...@gmail.com  wrote:

  That's interesting..
  Although I know for sure that all my gl* calls are happening only in
  the GL thread. And this freezing happens even when I simply leave the
  device (HTC Desire) running my app with zero user interaction
  whatsoever. All the app renders is a scenery with a single animation.
  No texture changes or geometry changes are taking place in this
  scenario. But because of the animation, I have to render continuously
  and this is why I have not used the Render_when_dirty approach.
  I did notice that when the app freezes, my main UI thread as well as a
  secondary thread (that talks to a game server) are still running and
  alive. The main UI thread does register touches until a point and then
  hangs while the secondary thread stays alive. I tried to send an
  interrupt() to the GLThread from this secondary thread but that did
  not help. The GLThread remained stuck in eglSwapBuffer();
  On Sep 14, 3:42 pm, Stringsterling.ud...@googlemail.com  wrote:
  On Sep 13, 11:24 pm, Jeremy Statzjst...@gmail.com  wrote:
  The big problem here, in my eyes, is that this appears to
  affect any OpenGL using application, and is tremendously discouraging,
  to the point that people pull things off the market and avoid using
  OpenGL.
  I've been chasing this in a couple of my own OpenGL apps for a couple
  of months as well. It's summed up well in this thread - extremely
  intermittent, but extremely serious when it does happen. And I'm one
  of the devs who has pulled an app from the Market as a result.
  At the moment, I'm provisionally optimistic that I've worked around
  the issue in my case. Given it's a race condition, I took the approach
  of maximum thread-safety: I put a whole load of semaphores into my
  code, added synchronized and volatile modifiers all over the
  place, that sort of thing. And it seems to have been successful... I
  can't be sure (because of the intermittency), but I haven't seen it
  happen for a couple of weeks now.
  If I had to speculate, I'd say that the problem finally went when I
  synchronized some code which re-generates geometry within my OpenGL
  model. I added semaphores to ensure that textures, geometry, and
  rendering never happened concurrently. There's no way to know that was
  the end problem, but that SEEMED to be it. If that helps anyone.
  Just to reiterate, I agree that this is a serious platform-level bug
  that needs to be fixed by Google. And it has gotten worse since 2.2,
  although I have (rarely) seen it happen on my G1 running 1.6.
  String

 --
 Leigh 

Re: [android-developers] Re: Find the location in Android Map

2010-09-16 Thread Dhrumil Shah
Hi Per,

I didnt get it your answer.
What you want to say??

~Dhr

On Thu, Sep 16, 2010 at 11:43 AM, Per p...@care2wear.com wrote:

 Hi there,

 I see at least two issues:
 1: your button click listener takes lat/long from the EditText's, then
 effectively starts the Maps app (Intent url is geo:lat,long).
 2: The GeoPoint constructor takes coordinates that are scaled by
 100, i.e. 45.7 N would be 4570. (see e.g.
 http://developer.android.com/resources/tutorials/views/hello-mapview.html)

 BR
 Per



 On 15 Sep., 19:59, Dhrumil Shah dhrumilsh...@gmail.com wrote:
  Hey TreKing,
 
  If you dont mind, just refer this code.
  You exactly got what is going on here. I am new in Android so I dont know
  what is stack trace and log? How to check stack trace?
 
  So here is my code.
 
  public class ShowLocation extends MapActivity {
  private EditText lat;
  private EditText lng;
   GeoPoint gp=null;
   MapController  mapcontroller;
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
 
  Button btn = (Button)findViewById(R.id.btnShow);
  lat = (EditText)findViewById(R.id.lat);
  lng = (EditText)findViewById(R.id.lng);
 
  MapView mapView = (MapView)findViewById(R.id.myGMap);
 
  mapcontroller = mapView.getController();
 
  //gp = new GeoPoint(lat.intValue(), lng.intValue());
  mapView.setSatellite(true);
  mapView.setTraffic(true);
  mapView.setStreetView(true);
  mapView.displayZoomControls(true);
  mapView.setBuiltInZoomControls(true);
 
  //mapcontroller.animateTo(gp);
  mapcontroller.setZoom(2);
  LocationManager locationManager;
  String context = Context.LOCATION_SERVICE;
  locationManager = (LocationManager)getSystemService(context);
 
  Criteria criteria = new Criteria();
  criteria.setAccuracy(Criteria.ACCURACY_FINE);
  criteria.setAltitudeRequired(true);
  criteria.setBearingRequired(false);
  criteria.setCostAllowed(true);
  criteria.setPowerRequirement(Criteria.POWER_HIGH);
  String provider = locationManager.getBestProvider(criteria,
 true);
 
   Location location = locationManager.getLastKnownLocation(provider);
 
  btn.setOnClickListener(new View.OnClickListener() {
   @Override
  public void onClick(View v) {
  // TODO Auto-generated method stub
  String _lat = lat.getText().toString();
  String _lng = lng.getText().toString();
  Uri uri = Uri.parse(geo:+_lat+,+_lng);
   startActivity(new Intent(Intent.ACTION_VIEW, uri));
  //mapcontroller.animateTo(gp);
  mapcontroller.setZoom(2);}
  });
 
  String _lat,_lng;
  MapOverlay mylocationoverlay = new MapOverlay();
  ListOverlay list = mapView.getOverlays();
  list.add(mylocationoverlay);
  }
   protected class MapOverlay extends com.google.android.maps.Overlay{
   public boolean draw(Canvas canvas, MapView myGMap, boolean shadow, long
  when){
  Paint paint = new Paint();
  //mapcontroller.animateTo(gp);
  super.draw(canvas, myGMap, shadow);
   Point myScreenCoords = new Point();
  //mapview.getProjection().toPixels(gp, myScreenCoords);
  //paint.setARGB(255, 255, 255, 255);
  Drawable marker = getResources().getDrawable(R.drawable.marker);
  Bitmap bitmap = BitmapFactory.decodeResource(getResources(),
  R.drawable.marker);
  canvas.drawBitmap(bitmap, myScreenCoords.x, myScreenCoords.y, paint);
  canvas.drawText(Location is at here.., myScreenCoords.x,
 myScreenCoords.y,
  paint);
  return true;}
  }
 
   @Override
  protected boolean isRouteDisplayed() {
  // TODO Auto-generated method stub
  return false;
 
  }
  }
 
  ~Dhr
 
 
 
  On Wed, Sep 15, 2010 at 11:17 PM, TreKing treking...@gmail.com wrote:
   On Wed, Sep 15, 2010 at 12:42 PM, Dhrumil Shah dhrumilsh...@gmail.com
 wrote:
 
   You can change this at any time.
   - Ya, i know that thing, but its not working in my this application.
 
   It's not working is not useful information.
 
   Or you can animate or snap to the exact location.
   - I used this method but it generates and force close error on my
   emulator.
 
   Did you check the stack trace?
 
   Why not?
   -I dont know why not. I try to debug it but it gives me nothing.
 
   Nothing? No logs, no stack trace?
 
  
 ---
 --
   TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
   transit tracking app for Android-powered devices
 
--
   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] How to calculate distance between to city (dynamically)

2010-09-16 Thread RKJ (Android developer)
Hi All,

I want to calculate the distance between 2 city, whatever user
mention.

Example -
Default City - 1st City - New York or New Delhi, London Seoul anything
User Put - 2nd City - California

Need - to calculate distance between California to New York  or London

Welcome any hints
--RKJ

-- 
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 create a common library in android - containing resource files as well

2010-09-16 Thread Indicator Veritatis
Mark Murphy posted a link to an excellent site on this very topic:
http://andparcel.com/. A careful reading of this site should answer
all your library questions.

On Sep 14, 10:40 pm, tj tederj...@gmail.com wrote:
 Hi,

 I have several android projects, they share some common codes, resources
 files. Does any body know how to create an android library that can be
 used among different projects?

 I know how to do this if it's only java code. But how do you deal with
 the resource files? The auto generated R.java? How to make the resources
 in the lib are accessible to the importing project?

 Thanks,
 tj

-- 
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] How to calculate distance between to city (dynamically)

2010-09-16 Thread Shashidhar
Have a look at this
http://developer.android.com/reference/android/location/Location.html#distanceBetween%28double,%20double,%20double,%20double,%20float[]%29

http://developer.android.com/reference/android/location/Location.html#distanceBetween%28double,%20double,%20double,%20double,%20float[]%29
-Shashidhar

On Thu, Sep 16, 2010 at 12:45 PM, RKJ (Android developer) 
rkjhaw1...@gmail.com wrote:

 Hi All,

 I want to calculate the distance between 2 city, whatever user
 mention.

 Example -
 Default City - 1st City - New York or New Delhi, London Seoul anything
 User Put - 2nd City - California

 Need - to calculate distance between California to New York  or London

 Welcome any hints
 --RKJ

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] Ramdisk image

2010-09-16 Thread Silwerstar
Hi,

I have just started using 0xlab's android port. I have been
successfully able to create the file system and have been able to
flash it as well. However, I have 2 questions to ask:
1) How do I create a ramdisk image and what should be the bootargs
given at the uboot prompt for this.
(I tried using ramdisk.img created in out/target/beagleboard/ but then
the kernel just does not boot when I use it.
Can any one help me out with this ?
2) How do I make my module part of the file system image. I have my
own driver, which I want to install after kernel boot up. What is the
procedure to ensure this module is part of the android.ubi image?

Thanks a lot!

-- 
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 do this correctly in SQLite?

2010-09-16 Thread Mystique
Hi String,

Thanks for your help.
It is working now, learn something new today.

Cheers.

On Sep 16, 3:04 pm, Mystique joven.ch...@gmail.com wrote:
 Hi, sorry about the variable names aren't consistent.
 I change it when I paste here to make it readable, my mistake for the
 confusion.

 About the single code, I want the value of temp instead of the string
 temp ('temp') therefore I have not single code.
 Many thanks.

 On Sep 16, 2:28 pm, String sterling.ud...@googlemail.com wrote:



  You're missing the inner (single) quotes around the temp string. Also,
  your variable names aren't consistent, but I'm assuming that's just in
  your post here - the compiler would have caught that for you. In any
  case, your code should be:

        String temp = temp;
        db.execSQL(INSERT INTO  + TABLE_NAME +  VALUES (0 'A',
  'Hello', '', ' + temp + ', ''););

  On Sep 16, 6:37 am, Mystique joven.ch...@gmail.com wrote:

   Hi,

   I want to insert a String value call temp but I don't seems to get it
   working for the INSERT INTO statement.
   Anything wrong with the code?

   This is the initialization to create table and insert some default
   values into the table if the database doesn't exist.

   Many Thanks.

   ---code---
     @Override
      public void onCreate(SQLiteDatabase db) {
         db.execSQL(CREATE TABLE  + TABLE_NAME +  ( + _ID
               +  INTEGER PRIMARY KEY AUTOINCREMENT,  + FIELD1 + 
   VARCHAR(1),  + FIELD2
               +  TEXT,  + FIELD3 +  TEXT,  + FIELD4 +  TEXT,  +
   FIELD5 +  TEXT););

         String tmp = temp;
         db.execSQL(INSERT INTO  + TABLE_NAME +  VALUES (0 'A',
   'Hello', '',  + temp + , ''););
      }
   ---code---

-- 
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] How to calculate distance between to city (dynamically)

2010-09-16 Thread Rocky
Hi Shashidhar,

Thanks dear...

On Thu, Sep 16, 2010 at 12:56 PM, Shashidhar shashi.zep...@gmail.comwrote:

 Have a look at this

 http://developer.android.com/reference/android/location/Location.html#distanceBetween%28double,%20double,%20double,%20double,%20float[]%29http://developer.android.com/reference/android/location/Location.html#distanceBetween%28double,%20double,%20double,%20double,%20float%5B%5D%29


 http://developer.android.com/reference/android/location/Location.html#distanceBetween%28double,%20double,%20double,%20double,%20float%5B%5D%29
 -Shashidhar

 On Thu, Sep 16, 2010 at 12:45 PM, RKJ (Android developer) 
 rkjhaw1...@gmail.com wrote:

 Hi All,

 I want to calculate the distance between 2 city, whatever user
 mention.

 Example -
 Default City - 1st City - New York or New Delhi, London Seoul anything
 User Put - 2nd City - California

 Need - to calculate distance between California to New York  or London

 Welcome any hints
 --RKJ

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thanks  Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030273740
(R) +919886336619

-- 
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] How to use GridView with ScrollView (containg Data of ListView)

2010-09-16 Thread RKJ (Android developer)
Hi All,

I want to use GridView with Scroll View(which containing ListView)

Example -

||
||
|GridView (3 col) |
||
||
||
|ScrollView   |
| ListView |
|   /ListView|
|/ScrollView|
||

But problem is that, when I'm using this way, only GridView is coming
alone

--Thanks

-- 
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] How to use GridView with ScrollView (containg Data of ListView)

2010-09-16 Thread Kostya Vasilyev
 Don't put ListView inside ScrollView, as ListView already provides 
scrolling.


To show both views, make e.g. GridView have height wrap_content, and 
ListView height - fill_parent. There are certainly other ways, too.


-- Kostya

16.09.2010 11:42, RKJ (Android developer) пишет:

Hi All,

I want to use GridView with Scroll View(which containing ListView)

Example -

||
||
|GridView (3 col) |
||
||
||
|ScrollView   |
|ListView |
|/ListView |
|/ScrollView |
||

But problem is that, when I'm using this way, only GridView is coming
alone

--Thanks




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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: Ramdisk image

2010-09-16 Thread Chris Stratton


Silwerstar wrote:
 Hi,

 I have just started using 0xlab's android port. I have been
 successfully able to create the file system and have been able to
 flash it as well. However, I have 2 questions to ask:
 1) How do I create a ramdisk image and what should be the bootargs
 given at the uboot prompt for this.
 (I tried using ramdisk.img created in out/target/beagleboard/ but then
 the kernel just does not boot when I use it.
 Can any one help me out with this ?
 2) How do I make my module part of the file system image. I have my
 own driver, which I want to install after kernel boot up. What is the
 procedure to ensure this module is part of the android.ubi image?

 Thanks a lot!

-- 
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: Can we customize spinner dialog

2010-09-16 Thread karteek
Thank you
I created an xml which is having one textview as below
spinner.xml
?xml version=1.0 encoding=utf-8?
TextView android:text=@+id/TextView01 android:id=@+id/TextView01
android:layout_width=wrap_content
android:layout_height=wrap_content
xmlns:android=http://schemas.android.com/apk/res/android;
/TextView

while setting adapter for my spinner i did as follows
 ArrayAdapter roomAdapter = new ArrayAdapter(this,
R.layout.spinner, roomsArray);
spinner.setAdapter(roomAdapter);

But still i am getting the display as the screen size, If i change
text width in spinner.xml to some 60px instead of wrap_content
The string is cut into two are three rows but the background display
is still as the device screen width
Any help,
Thanks,
Karteek

On Sep 16, 10:01 am, Shashidhar shashi.zep...@gmail.com wrote:
 Yes, You can do it. While setting the dropdownviewresource for the adapter
 of your spinner, define your own xml layout instead of the android's inbuilt
 resource xml. Your xml can simply have a textview with your required layout
 parameters.

 -Shashidhar

 On Thu, Sep 16, 2010 at 9:55 AM, Karteek N kartee...@gmail.com wrote:
  When we select spinner it shows a display of  items which almost the device
  screen size

  Can we minimize its width or height, I think this question was already
  posted by some one. But i am unable to find solution

  Thanks,
  Karteek

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
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] How to use GridView with ScrollView (containg Data of ListView)

2010-09-16 Thread Rocky
thanks Kostya.

On Thu, Sep 16, 2010 at 1:17 PM, Kostya Vasilyev kmans...@gmail.com wrote:

  Don't put ListView inside ScrollView, as ListView already provides
 scrolling.

 To show both views, make e.g. GridView have height wrap_content, and
 ListView height - fill_parent. There are certainly other ways, too.

 -- Kostya

 16.09.2010 11:42, RKJ (Android developer) пишет:

  Hi All,

 I want to use GridView with Scroll View(which containing ListView)

 Example -

 ||
 ||
 |GridView (3 col) |
 ||
 ||
 ||
 |ScrollView   |
 |ListView |
 |/ListView |
 |/ScrollView |
 ||

 But problem is that, when I'm using this way, only GridView is coming
 alone

 --Thanks



 --
 Kostya Vasilyev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.com

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thanks  Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030273740
(R) +919886336619

-- 
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] How to make an android notification for the application?

2010-09-16 Thread Lidia
Hello,

Does anyone knows how to do an android notification?
I have an application that needs to be updated from time to time.
I would like to know how can i implement the android notification
feature for my app?

I would appreciate any idea.
Thanks
Lidia

-- 
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 list files on SD card

2010-09-16 Thread karteek
You can use File apis as follows
  File f=new File(/sdcard);
   if(f.isDirectory()){
 String files[]=  f.list();
 for(int i=0;ifiles.length;i++){
 Log.d(,files[i]);

 }

And identify your file and construct file path and delete
On Sep 16, 11:56 am, cindy ypu01...@yahoo.com wrote:
 ANy example to use the api? I am confused.

 On Sep 15, 11:26 pm, Vinay S s.vinay@gmail.com wrote:

  Pl. look 
  athttp://developer.android.com/reference/java/io/FilenameFilter.html

  On Sep 16, 8:40 am, cindy ypu01...@yahoo.com wrote:

   Hi all,

    My application needs to do some clean up. I need to list the files
   such as   ls voice*.amr, and then delete those files. How could I do
   it in Android?

   Thanks !

   Cindy



-- 
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] how export an resources attribute

2010-09-16 Thread eli
Hi,

I have problem trying to export an resource attribute. Let's say I
have a jar file containing some android widget class and R.java under
the package com.example.test.

package com.example.test

public class Widget1 extends TextView {

...

}

attr.xml

resources
item type=id name=widget_id /
/resources

So manually generated a jar file that contains the Widget1.class and
auto-generated R.java.

Create a new android project and include the jar file as a library.
Try to use widget_id in one of the layout file failed. Try
android:id=@com.example.test:id/widget_id and aapt complains
resource cannot be found. Have try aapt -I option to include my custom
jar file but failed too.

So may I know what is the correct way to do it?

Thanks



-- 
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] VM aborting

2010-09-16 Thread chetan
Hi All,
I have one service name syncservice which is getting
killed himself. Looks that VM aborting it. Please have look and guide
me.



I/DILEEP  (  262): Synchronise constructor
DILEEPPP
I/Synchronise(  262): onCreate..
I/ActivityManager(   61): Start proc com.example.syncservice for
service com.example.syncservice/.SyncmlService: pid=268 uid=10011
gids={3003}
I/Synchronise(  262): getInstance..
D/ddm-heap(  268): Got feature list request
I/SyncmlService(  268): Chetan: onCreate  of SyncmlService
D/dalvikvm(  268): Trying to load lib /system/lib/libsyncml_port.so
0x0
D/dalvikvm(  268): Added shared lib /system/lib/libsyncml_port.so 0x0
D/(  268): *** Loading PORT library.
D/(  268): after registering methods for ext handler
D/(  268): after registering methods for DSAcc
D/(  268): after registering methods for DevInfo
D/dalvikvm(  268): Trying to load lib /system/lib/libsyncml_core.so
0x0
D/dalvikvm(  268): Added shared lib /system/lib/libsyncml_core.so 0x0
D/(  268): *** Loading CORE library.
D/(  268): before registering methods for basic connector
D/(  268): before registering methods for clam connector
D/(  268): after registering methods for SAN
D/DsAccConnector(  268): chetan: Library to be loaded.
D/DsAccConnector(  268): chetan: Library to be loaded 1 .
D/dalvikvm(  268): Trying to load lib /system/lib/libsyncml_port.so
0x0
D/dalvikvm(  268): Shared lib '/system/lib/libsyncml_port.so' already
loaded in same CL 0x0
D/dalvikvm(  268): Trying to load lib /system/lib/libsyncml_core.so
0x0
D/dalvikvm(  268): Shared lib '/system/lib/libsyncml_core.so' already
loaded in same CL 0x0
I/SyncmlService(  268): start registering mExtHandler
I/SyncmlService(  268): calling registerExtHandlerConnector
W/dalvikvm(  268): JNI WARNING: JNI method called with exception
raised
W/dalvikvm(  268):  in Lsyncmlcore/Interface/
SyncmlConnector;.tslds_register_ext_handler_connector (Lsyncmlcore/
Interface/TsldsExtHandlerInterface;)I (NewGlobalRef)
W/dalvikvm(  268): Pending exception is:
I/dalvikvm(  268): Ljava/lang/NoClassDefFoundError;:
I/dalvikvm(  268):  at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm(  268): main prio=5 tid=3 NATIVE
I/dalvikvm(  268):   | group=main sCount=0 dsCount=0 s=N
obj=0x4001b268 self=0xbd00
I/dalvikvm(  268):   | sysTid=268 nice=0 sched=0/0 cgrp=default
handle=-1344001384
I/dalvikvm(  268):   at
syncmlcore.Interface.SyncmlConnector.tslds_register_ext_handler_connector(Native
Method)
I/dalvikvm(  268):   at
syncmlcore.Interface.SyncmlConnector.registerExtHandlerConnector(SyncmlConnector.java:
53)
I/dalvikvm(  268):   at
com.example.syncservice.SyncmlService.onCreate(SyncmlService.java:184)
I/dalvikvm(  268):   at
android.app.ActivityThread.handleCreateService(ActivityThread.java:
2780)
I/dalvikvm(  268):   at android.app.ActivityThread.access
$3200(ActivityThread.java:119)
I/dalvikvm(  268):   at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1917)
I/dalvikvm(  268):   at
android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm(  268):   at android.os.Looper.loop(Looper.java:123)
I/dalvikvm(  268):   at
android.app.ActivityThread.main(ActivityThread.java:4363)
I/dalvikvm(  268):   at java.lang.reflect.Method.invokeNative(Native
Method)
I/dalvikvm(  268):   at java.lang.reflect.Method.invoke(Method.java:
521)
I/dalvikvm(  268):   at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
I/dalvikvm(  268):   at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I/dalvikvm(  268):   at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm(  268):
E/dalvikvm(  268): VM aborting
I/DEBUG   (  184): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG   (  184): Build fingerprint: 'generic/generic/generic/:2.1-
update1/ECLAIR/eng.amitarora.20100830.172601:eng/test-keys'
I/DEBUG   (  184): pid: 268, tid: 268   com.example.syncservice 
I/DEBUG   (  184): signal 11 (SIGSEGV), fault addr deadd00d
I/DEBUG   (  184):  r0 0354  r1 afe1331d  r2 000c  r3 deadd00d
I/DEBUG   (  184):  r4 0026  r5 ad07ff50  r6   r7 fffe72f8
I/DEBUG   (  184):  r8 becca948  r9 4104bd60  10 4104bd48  fp 
I/DEBUG   (  184):  ip ad080160  sp becca880  lr afe142dd  pc
ad035452  cpsr 2030
W/InputManagerService(   61): Got RemoteException sending
setActive(false) notification to pid 231 uid 10010


Thanks
chetan

-- 
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 to list files on SD card

2010-09-16 Thread Kostya Vasilyev

 16.09.2010 12:09, karteek пишет:

You can use File apis as follows
   File f=new File(/sdcard);
if(f.isDirectory()){
 String files[]=  f.list();
 for(int i=0;ifiles.length;i++){
 Log.d(,files[i]);

 }
Except that hard-coding /sdcard is bad - it's /mnt/sdcard in Froyo. 
Use Environment.getExternalStorageDirectory instead.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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] what is the basic idea of sensor driven animation

2010-09-16 Thread dadada
Hi all,

I want to do a sensor driven animation ( like AR)  where by i use
azimuth to control the flowing of drawable in the camera overlay.

right now, i have the sensor reading ready on camera. I can drawable
on the camera overlay.

However, I am not sure how can the sensor data to be used to control
the animation?

i looked at the animatedrawable in apidemo,

should i be calling translate animation everytime i get a new sensor
reading?

   Animation an = new TranslateAnimation(0, 100, 0, 200);
an.setDuration(2000);
an.setRepeatCount(-1);
an.initialize(10, 10, 10, 10);


mDrawable = new AnimateDrawable(dr, an);
an.startNow();

-- 
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] How to make an android notification for the application?

2010-09-16 Thread Kostya Vasilyev

 Lidia,

You could set up your own web server, with a special URL that provides 
latest version info, and add code to your application to periodically 
fetch the URL and compare latest version code to what's installed.


Or you could just release your new version to Market - recent versions 
of Market App appear to do background checks for updates, and display a 
notification in the phone's status bar.


You won't have control over how often these checks are performed, but 
the effect / effort ratio is unmatched here.


-- Kostya

16.09.2010 12:06, Lidia пишет:

Hello,

Does anyone knows how to do an android notification?
I have an application that needs to be updated from time to time.
I would like to know how can i implement the android notification
feature for my app?

I would appreciate any idea.
Thanks
Lidia




--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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] Ampersand in String Array

2010-09-16 Thread KG
Hi Everyone,

I've looked around for how to use an ampersand ( '' ) in an item for
a string-array but can't seem to find it.  I feel silly for having to
ask for something this simple, but does anyone know how to escape it?

-- 
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] Ampersand in String Array

2010-09-16 Thread Frank Weiss
I suppose you mean in XML. The answer is amp;.

On Sep 16, 2010 1:59 AM, KG kevinconca...@gmail.com wrote:
 Hi Everyone,

 I've looked around for how to use an ampersand ( '' ) in an item for
 a string-array but can't seem to find it. I feel silly for having to
 ask for something this simple, but does anyone know how to escape it?

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] Problem Adding configuration to Lunar Lander sample

2010-09-16 Thread KrcK ---
Hi all,

I have a problem with the Lunar lander sample. I am trying to add a
configuration part to this game using a PreferenceActivity.

So to do this, I have created a LunarPreferenceActivity and I have added it
to AndroidManifest.xml.

On the other hand I have added a new menu item to call this new Actitvity,
and it is called from LunarLander.

startActivity(new Intent(this, LunarPreferenceActivity.class));

The problem is when I am in the PreferenceActivity and I press the return
button. This produces the following error.

09-16 09:35:20.887: ERROR/AndroidRuntime(223): Uncaught handler: thread main
exiting due to uncaught exception
09-16 09:35:20.906: ERROR/AndroidRuntime(223):
java.lang.IllegalThreadStateException: Thread already started.
09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
java.lang.Thread.start(Thread.java:1322)
09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
com.example.android.lunarlander.LunarView.surfaceCreated(LunarView.java:864)
09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
android.view.SurfaceView.updateWindow(SurfaceView.java:454)
09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:189)
09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
android.view.View.dispatchWindowVisibilityChanged(View.java:3782)
09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:692)

Could anyone explain me why happens and how could I fix it?

Thank you and regards!

-- 
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] How to make an android notification for the application?

2010-09-16 Thread Lidia G
thank you Kostya for your advices,

I already have something like you said about my own URL. 
I have implemented an auto-updated somehow, but it is not convenient because i 
use a Service class that is running always in the background:
e.g. all version of the application are saved on an server, and the application 
knows which version it is and for update, the application generates the name of 
the next version and appends it to the known URL and checks e.g. every 30 min 
if the new version exists on the server, if the generated URL exists.
 
But i would like to use android notifications, do you know how it is working, 
to release on the Market is the only possibility?.

I found An open source project to provide push notification support for 
Android 
-- a xmpp based notification server and a client tool kit. 
-  http://androidpn.sourceforge.net/  but don't know how to use it.
Maybe someone has an idea

Lidia


--- On Thu, 9/16/10, Kostya Vasilyev kmans...@gmail.com wrote:

From: Kostya Vasilyev kmans...@gmail.com
Subject: Re: [android-developers] How to make an android notification for the 
application?
To: android-developers@googlegroups.com
Date: Thursday, September 16, 2010, 8:44 AM

 Lidia,

You could set up your own web server, with a special URL that provides latest 
version info, and add code to your application to periodically fetch the URL 
and compare latest version code to what's installed.

Or you could just release your new version to Market - recent versions of 
Market App appear to do background checks for updates, and display a 
notification in the phone's status bar.

You won't have control over how often these checks are performed, but the 
effect / effort ratio is unmatched here.

-- Kostya

16.09.2010 12:06, Lidia пишет:
 Hello,
 
 Does anyone knows how to do an android notification?
 I have an application that needs to be updated from time to time.
 I would like to know how can i implement the android notification
 feature for my app?
 
 I would appreciate any idea.
 Thanks
 Lidia
 


-- Kostya Vasilyev -- WiFi Manager + pretty widget -- 
http://kmansoft.wordpress.com

-- 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



  

-- 
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] How to make an android notification for the application?

2010-09-16 Thread Kostya Vasilyev
 Checking every 30 minutes really seems excessive (although I don't 
know the specifics of your application). I think if you made the 
interval larger (maybe once a day or once a week), you'd find that the 
service is terminated by Android in due time, thus freeing memory.


Not familiar with XMPP, so can't advise on that.

If your application uses some kind of server, you could build version 
checking into the same network protocol as used to exchange data.


-- Kostya

16.09.2010 13:41, Lidia G пишет:

thank you Kostya for your advices,

I already have something like you said about my own URL.
I have implemented an auto-updated somehow, but it is not convenient 
because i use a Service class that is running always in the background:
e.g. all version of the application are saved on an server, and the 
application knows which version it is and for update, the application 
generates the name of the next version and appends it to the known URL 
and checks e.g. every 30 min if the new version exists on the server, 
if the generated URL exists.


But i would like to use android notifications, do you know how it is 
working,

to release on the Market is the only possibility?.

I found An open source project to provide push notification support 
for Android -- a xmpp based notification server and a client tool kit. 
-  http://androidpn.sourceforge.net/  but don't know how to use it.

Maybe someone has an idea

Lidia


--- On *Thu, 9/16/10, Kostya Vasilyev /kmans...@gmail.com/* wrote:


From: Kostya Vasilyev kmans...@gmail.com
Subject: Re: [android-developers] How to make an android
notification for the application?
To: android-developers@googlegroups.com
Date: Thursday, September 16, 2010, 8:44 AM

Lidia,

You could set up your own web server, with a special URL that
provides latest version info, and add code to your application to
periodically fetch the URL and compare latest version code to
what's installed.

Or you could just release your new version to Market - recent
versions of Market App appear to do background checks for updates,
and display a notification in the phone's status bar.

You won't have control over how often these checks are performed,
but the effect / effort ratio is unmatched here.

-- Kostya

16.09.2010 12:06, Lidia пишет:
 Hello,

 Does anyone knows how to do an android notification?
 I have an application that needs to be updated from time to time.
 I would like to know how can i implement the android notification
 feature for my app?

 I would appreciate any idea.
 Thanks
 Lidia



-- Kostya Vasilyev -- WiFi Manager + pretty widget --
http://kmansoft.wordpress.com

-- 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
/mc/compose?to=android-develop...@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
/mc/compose?to=unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


--
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 



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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: Ampersand in String Array

2010-09-16 Thread KG
Yeah I do, thanks a ton.

On Sep 16, 2:35 am, Frank Weiss fewe...@gmail.com wrote:
 I suppose you mean in XML. The answer is amp;.

 On Sep 16, 2010 1:59 AM, KG kevinconca...@gmail.com wrote:

  Hi Everyone,

  I've looked around for how to use an ampersand ( '' ) in an item for
  a string-array but can't seem to find it. I feel silly for having to
  ask for something this simple, but does anyone know how to escape it?

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en



-- 
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] phone book problem

2010-09-16 Thread mishra
hello all

  I am trying to implement the phone book for android phone and I want
to access the number of the phone book ,I can access only the name
that the number save in phone book .

please tell me by what way I can access the number .I am using the
code for accessing  the
 number is


   private Cursor getContacts() {
// Run query
Uri uri = ContactsContract.Contacts.CONTENT_URI;
String[] projection = new String[] { BaseColumns._ID,
ContactsContract.Contacts.DISPLAY_NAME,
ContactsContract.Contacts.Data.DATA4};
String selection = ContactsContract.Contacts.IN_VISIBLE_GROUP + 
 =
'
+ (mShowInvisible ? 0 : 1) + ';
String[] selectionArgs = null;
String sortOrder = ContactsContract.Contacts.DISPLAY_NAME
+  COLLATE LOCALIZED ASC;

return managedQuery(uri, projection, selection, selectionArgs,
sortOrder);
}



thanks a lot

-- 
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: Droid Losing Values When I Load Image Picker

2010-09-16 Thread GregAZ
To try to work-around it, I added the URL to the image picker intent
figuring I could read it back out in the onActivityResult, but that
didn't work, even on my Hero it was NULL.

Anyone have any ideas?

On Sep 15, 8:09 pm, GregAZ ggur...@gmail.com wrote:
 I have an Android app that is mostly a WebView except for a few
 things.  One of them is uploading pictures.

 After the user picks an image I get the filepath and pass that along
 with the webview's url to a new method in a new thread.

 For some reason, in the onActivityResult method I can't get the value
 from the webview to know what page they're on.  It's null.  It works
 on my HTC Hero (2.1), just not on Droid's.(those are the only users
 with the problem).

 I've tried setting a global variable to the url before showing the
 image picker, but when I try to read it in the onActivityResult method
 it's just an empty string.  On my HTC Hero it still has the value.

 I need the url so where can I put it where it won't get lost on Droid
 phones?  This is all in an Activity.

-- 
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] How to get the height width of emulator in android

2010-09-16 Thread RKJ (Android developer)
Hi all,

I want to get the height  width of emulator (which will reflect in
device also).

--RKJ

-- 
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: Uploading file through HTTP Post

2010-09-16 Thread perumal316
Hi Vinay,

As I have mentioned this is only possible for SDK 1.0. In SDK 2.1 this
will not work. You are aware of any other way?

Regards,
Perumal

On Sep 16, 2:21 pm, Vinay S s.vinay@gmail.com wrote:
 Hi,

 See this page..

 http://rapidandroid.org/wiki/HttpUpload

 -vinay

 On Sep 16, 8:55 am, perumal316 perumal...@gmail.com wrote:



  Hi All,

  I am writing an application to upload a file from Android phone to a
  web server.

  I have tried the example from:

 http://www.anddev.org/novice-tutorials-f8/doing-http-post-with-androi...

  But it will only work for SDK 1.0 (why? Not Sure?).

  Can this be done for Android 2.1? Or is there any other method to load
  a file from Android to a webserver?

  Thanks In Advance,
  Perumal- Hide quoted text -

 - Show quoted text -

-- 
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: Problem Adding configuration to Lunar Lander sample

2010-09-16 Thread KrcK ---
Ups sorry!

I had not searched for information about this issue before to write here,
but I have found that this is a well known bug.

I found the solution in this thread:

http://groups.google.es/group/android-developers/browse_thread/thread/f7f2917df6742447/19fe74830f2ac97a?lnk=gstq=lunar+lander#19fe74830f2ac97a

http://groups.google.es/group/android-developers/browse_thread/thread/f7f2917df6742447/19fe74830f2ac97a?lnk=gstq=lunar+lander#19fe74830f2ac97a

2010/9/16 KrcK --- krc...@gmail.com

 Hi all,

 I have a problem with the Lunar lander sample. I am trying to add a
 configuration part to this game using a PreferenceActivity.

 So to do this, I have created a LunarPreferenceActivity and I have added it
 to AndroidManifest.xml.

 On the other hand I have added a new menu item to call this new Actitvity,
 and it is called from LunarLander.

 startActivity(new Intent(this, LunarPreferenceActivity.class));

 The problem is when I am in the PreferenceActivity and I press the return
 button. This produces the following error.

 09-16 09:35:20.887: ERROR/AndroidRuntime(223): Uncaught handler: thread
 main exiting due to uncaught exception
 09-16 09:35:20.906: ERROR/AndroidRuntime(223):
 java.lang.IllegalThreadStateException: Thread already started.
 09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
 java.lang.Thread.start(Thread.java:1322)
 09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
 com.example.android.lunarlander.LunarView.surfaceCreated(LunarView.java:864)
 09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
 android.view.SurfaceView.updateWindow(SurfaceView.java:454)
 09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
 android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:189)
 09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
 android.view.View.dispatchWindowVisibilityChanged(View.java:3782)
 09-16 09:35:20.906: ERROR/AndroidRuntime(223): at
 android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:692)

 Could anyone explain me why happens and how could I fix it?

 Thank you and regards!


-- 
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: Uploading file through HTTP Post

2010-09-16 Thread Yahel
See this page..
http://rapidandroid.org/wiki/HttpUpload

 As I have mentioned this is only possible for SDK 1.0. In SDK 2.1

That is exactly what I'm doing in my app and it works perfectly from
1.5 to 2.2.

What error do you see in your app ?

Yahel
http://www.a-world-of-faces.com

-- 
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 get the height width of emulator in android

2010-09-16 Thread grace
getWindowManager().getDefaultDisplay().getWidth() and
getWindowManager().getDefaultDisplay().getHeight()

On Sep 16, 3:20 pm, RKJ (Android developer) rkjhaw1...@gmail.com
wrote:
 Hi all,

 I want to get the height  width of emulator (which will reflect in
 device also).

 --RKJ

-- 
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] Standard Mime Type for ContentProvider query performing a count()?

2010-09-16 Thread Mark Carter
The ContentProvider documentation details how to define Mime Types for
single row (item) or multiple row (dir) queries. But what about a
query which performs a count()?

Maybe:

vnd.android.cursor.item/java.lang.Integer

???

-- 
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] Standard Mime Type for ContentProvider query performing a count()?

2010-09-16 Thread Mark Murphy
On Thu, Sep 16, 2010 at 8:15 AM, Mark Carter mjc1...@googlemail.com wrote:
 The ContentProvider documentation details how to define Mime Types for
 single row (item) or multiple row (dir) queries. But what about a
 query which performs a count()?

 Maybe:

 vnd.android.cursor.item/java.lang.Integer

So long as it is unique on the device, it does not matter what you
call it. There are no built-in assumptions based on MIME type names,
AFAIK.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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] Animation loop

2010-09-16 Thread arnouf
Hi all,

I created an animation in an xml file.
I apply it on a textview like this :
Animation anim = AnimationUtils.loadAnimation(this,
R.anim.exit_about);
anim.setRepeatMode(Animation.RESTART);
anim.setRepeatCount(Animation.INFINITE);
v.findViewById(R.id.global_about).startAnimation(anim); // v is my
view

This runs once even if I set a repeat count.

Any idea ?

-- 
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 to get the height width of emulator in android

2010-09-16 Thread Rocky
Hi,
thanks for replay, but its not reflecting in my case ---

I want to set the height of ListView = 330 (in emulator case) i.e 65% of
total view (height)

ListView l1 = (ListView) findViewById(R.id.ListView01);
 l1.setAdapter(new EfficientAdapter(this));
 l1.setMinimumHeight(list_height);

list_height =getWindowManager().getDefaultDisplay().getHeight();
list_height = list_height*65/100;


my xml file -

 ListView android:id=@+id/ListView01
 android:layout_height=330px
 android:layout_width=fill_parent
 /ListView

Q. my question is - how to set the ListView height through the code, not thr
the xml.



On Thu, Sep 16, 2010 at 5:23 PM, grace grace.a...@wipro.com wrote:

 getWindowManager().getDefaultDisplay().getWidth() and
 getWindowManager().getDefaultDisplay().getHeight()

 On Sep 16, 3:20 pm, RKJ (Android developer) rkjhaw1...@gmail.com
 wrote:
  Hi all,
 
  I want to get the height  width of emulator (which will reflect in
  device also).
 
  --RKJ

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thanks  Regards

Rakesh Kumar Jha
Software Developer
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030273740
(R) +919886336619

-- 
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] CTS Test plan Query

2010-09-16 Thread Uander
Hi All ,

 I am running cts plan on cts console using command :

start --plan CTS
Console Logs are :

start test plan CTS

CTS_INFO  Checking API...

CTS_INFO  This might take several minutes, please be patient...

CTS_ERROR 
null

CTS_ERROR  Timeout: checkapi
API Check TIMEOUT.
(timeout)


CTS_INFO  Max ADB operations reached. Restarting ADB...

CTS_INFO  Restarting device ...
06:21:51 E/DeviceMonitor: Sending jdwp tracking request failed!
Device(1234567890ABCDEF) disconnected
**


Can anybody explains why I am not able to run CTS test plan on my android
2.2 platform .

while I can run a individual test case of CTS plan successfully .



Thanks :
Uander

-- 
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 to list files on SD card

2010-09-16 Thread TreKing
On Thu, Sep 16, 2010 at 1:56 AM, cindy ypu01...@yahoo.com wrote:

 ANy example to use the api? I am confused.


FilenameFilter has a single method accept(File dir, String filename) which
returns true if the given parameters are what you're looking for.

So you implement a class that extends FilenameFilter and override the accept
method to return true if the given parameters are what you're looking for.
So in your case you could check filename for starting with voice and
ending in .amr.

Then you use the File.list() method with an instance of your newly defined
class to get all the files that match your criteria. Then it's a simple
matter of iterating the list and calling File.delete().

Hope that helps.

And do test thoroughly so you don't end up deleting all of the user's SD
card contents =P

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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: Edittext Cursor and Highlight Problem

2010-09-16 Thread TreKing
On Thu, Sep 16, 2010 at 1:17 AM, SurtaX garylo@gmail.com wrote:

 I'm trying to display (read-only) a page of text in which they are free to
 select and copy text from thus that is why I don't want the cursor to be
 visible at all.


This sounds like a strange requirement. Read-only or not, if you want to
allow text selection, I don't see why you would want to get rid of the
cursor completely. How is the user supposed to know where they're starting
their selection?

I don't know if this is possible, but you may try extending EditText and
seeing if you can control it's properties that way. Or worst-case look at
the source for how it's done and copy-paste your own version of EditText to
do this.

But this sounds like one of those things that's really not worth the effort
it may take to get it to work ...

Good luck in any case.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] problems with Typeface

2010-09-16 Thread Christophe
hello everybody,

I've got 2 problems with the Typeface.create(...) method :

- the javadoc for this methods say : Create a typeface object given a
family name, and option style information. If null is passed for the
name, then the default font will be chosen. However if I use for
example : Typeface.create(null, Typeface.ITALIC), it does not compile,
with the following error : The method create(String, int) is
ambiguous for the type Typeface. This is because there is 2 different
methods : create(String, int) and create(Typeface, int). I guess there
is a problem with the API here :(

- italic does not work with sans serif. For example if I use
Typeface.create(Typeface.SANS_SERIF, Typeface.ITALIC), the text will
not be in italic. Bold works fine. Serif works fine with both bold and
italic.

regards,
Christophe

-- 
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: problems with Typeface

2010-09-16 Thread Christophe
and this is how I use the typeface :

TextView title = new TextView(this.getApplicationContext());
title.setText(some text);
title.setTypeface(Typeface.create(Typeface.SANS_SERIF,
Typeface.BOLD_ITALIC));

On Sep 16, 3:29 pm, Christophe christophe.lebesner...@gmail.com
wrote:
 hello everybody,

 I've got 2 problems with the Typeface.create(...) method :

 - the javadoc for this methods say : Create a typeface object given a
 family name, and option style information. If null is passed for the
 name, then the default font will be chosen. However if I use for
 example : Typeface.create(null, Typeface.ITALIC), it does not compile,
 with the following error : The method create(String, int) is
 ambiguous for the type Typeface. This is because there is 2 different
 methods : create(String, int) and create(Typeface, int). I guess there
 is a problem with the API here :(

 - italic does not work with sans serif. For example if I use
 Typeface.create(Typeface.SANS_SERIF, Typeface.ITALIC), the text will
 not be in italic. Bold works fine. Serif works fine with both bold and
 italic.

 regards,
 Christophe

-- 
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] Custom Screen Locker

2010-09-16 Thread Tez
How do I write a custom screen locker?
Where is the source of the default screen locker?
Any links on writing custom screen lockers?

Cheers,
Earlence

-- 
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] Layouts for tablets in the wild - Dell Streak for example

2010-09-16 Thread niko20
Ok,

I've spent the last few days working on my layouts, and I have
everything looking good on small screens and normal screens. Now I'm
tackling large screens.

However, the question I have is, how do we really know what a device
reports itself as? For example, in the blog post about the Samsung
tablet, it was stated that even though the tablet is 170dpi, it
reports itself as hdpi.

So my question is then how can we really know, based on a a device's
specs, what it is going to report itself to android as? Such as large,
hdpi, normal, etc,

In particular the Dell Streak is 5 inches, and has 187ppi. Is the
Streak going to report itself as mdpi or hdpi. If it reports itself as
mdpi will it still be considered large?

Maybe we don't know the answers to this since even android 2.2 does
not support really large screens well yet - but any more input is
appreciated.

I do have a layout working for the Samsung tablet specs, but obviously
this layout would be too large for a dell streak layout (I'll be
working on the layout to make it so it can resize more correctly
though)

But in order to test the different scenarios we need to know the
actual specs of what the hardware will report itself as. The Samsung
tablet appears to have broken convention and reports itself as
something different than one would think.


-niko

-- 
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: Custom Screen Locker

2010-09-16 Thread niko20
Hi, you can't, such a thing is not supported.



On Sep 16, 8:33 am, Tez earlencefe...@gmail.com wrote:
 How do I write a custom screen locker?
 Where is the source of the default screen locker?
 Any links on writing custom screen lockers?

 Cheers,
 Earlence

-- 
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] One more question about different size screens - how to use extra space? How to code for it?

2010-09-16 Thread niko20
Ok,

One final question regarding extra space. Say for example on a large
screen device I decide instead now to create a whole new layout with
new controls so the user has access to all the controls instead of
having to use a menu.

How do you code for that then? Is there a way at runtime to tell which
layout really was loaded by the framework so the code can hook into
it differently?


Thanks!

-niko

-- 
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] Same color specified in xml file and png appear differently?

2010-09-16 Thread Mark Wyszomierski
Hi,

I have a 9 png which is used as the background of a view, the
stretchable region has a color of:

   #ebebeb

I have a view next to it, and I've set its background color like so:

  LinearLayout
   
   android:background=#ebebeb 

when the two views are beside one another, you can clearly tell that
the colors are not the same, they're different shades of grey. I'm
seeing this on the emulators, haven't had a chance to try it on a
device. Is this expected, or is there something I'm doing wrong in the
color declaration?

Thanks

-- 
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] One more question about different size screens - how to use extra space? How to code for it?

2010-09-16 Thread Mark Murphy
On Thu, Sep 16, 2010 at 9:49 AM, niko20 nikolatesl...@yahoo.com wrote:
 One final question regarding extra space. Say for example on a large
 screen device I decide instead now to create a whole new layout with
 new controls so the user has access to all the controls instead of
 having to use a menu.

 How do you code for that then? Is there a way at runtime to tell which
 layout really was loaded by the framework so the code can hook into
 it differently?

If you have such-and-so widget in the large layout, that does not
exist in other layouts, use findViewById() to get that widget. If it's
there, configure it for use. If it's not there, don't configure it for
use.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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] Regarding Gallery3D application

2010-09-16 Thread Girish H T
Hello all,

I was going through the code on Gallery3D from cooliris. Is there any
detailed level documentation that is available on internet ? I want details
like how the application accesses 3D libraries sitting @ native side using
android frame work. What is the corresponding framework i need to refer for
Gallery3D ? Please give me some details.

Regards
Girish

-- 
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] Same color specified in xml file and png appear differently?

2010-09-16 Thread Mark Murphy
Might be an alpha channel difference.

On Thu, Sep 16, 2010 at 9:51 AM, Mark Wyszomierski mar...@gmail.com wrote:
 Hi,

 I have a 9 png which is used as the background of a view, the
 stretchable region has a color of:

   #ebebeb

 I have a view next to it, and I've set its background color like so:

  LinearLayout
       
       android:background=#ebebeb 

 when the two views are beside one another, you can clearly tell that
 the colors are not the same, they're different shades of grey. I'm
 seeing this on the emulators, haven't had a chance to try it on a
 device. Is this expected, or is there something I'm doing wrong in the
 color declaration?

 Thanks

 --
 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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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] problems with Typeface

2010-09-16 Thread Mark Murphy
On Thu, Sep 16, 2010 at 9:29 AM, Christophe
christophe.lebesner...@gmail.com wrote:
 - the javadoc for this methods say : Create a typeface object given a
 family name, and option style information. If null is passed for the
 name, then the default font will be chosen. However if I use for
 example : Typeface.create(null, Typeface.ITALIC), it does not compile,
 with the following error : The method create(String, int) is
 ambiguous for the type Typeface. This is because there is 2 different
 methods : create(String, int) and create(Typeface, int). I guess there
 is a problem with the API here :(

Call Typeface.create((String)null, Typeface.ITALIC);

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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: problems with Typeface

2010-09-16 Thread Mark Murphy
On Thu, Sep 16, 2010 at 9:33 AM, Christophe
christophe.lebesner...@gmail.com wrote:
 and this is how I use the typeface :

 TextView title = new TextView(this.getApplicationContext());
 title.setText(some text);
 title.setTypeface(Typeface.create(Typeface.SANS_SERIF,
 Typeface.BOLD_ITALIC));

Please delete getApplicationContext() and just use this.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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] Clarification about ImageView.setImageURI()

2010-09-16 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 9/14/10 14:02 , Fabrizio Giudici wrote:

 I'm using ImageView.setImageURI() to render an image that has been
 previously downloaded from the Internet. It works fine, but I
 haven't understood whether the call is blocking or not. In my code,
 I've implemented a background thread to download the bits, in the
 meantime a placeholder is rendered, and as soon as a download is
 complete, setImageURI() is called. This approach is used both for
 a Gallery with thumbnails and for a single, large rendered with
 ImageView. The thing is working, but I see that the application
 freezes for a while when a download has been completed and
 setImageURI() is called. Which make me wonders whether I'm using
 it properly.

 For the record, I know that the images I'm downloading are larger
 than I need (at least initially); that is, they are much larger
 than the thumbnail and the large viewer. Since images, once
 downloaded, are stored locally forever, I should probably create
 some smaller-size previews in background and then pass them to
 Gallery and ImageView? Would that make the UI really more
 responsive?

Anybody here...?

- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - We make Java work. Everywhere.
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkySJHwACgkQeDweFqgUGxeAPgCfYWxFYRudMVkTzkLfusVUWaBS
B7cAoLEKO7410fblPivzb47ozhzqX/3K
=Q2i7
-END PGP SIGNATURE-

-- 
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: Layouts for tablets in the wild - Dell Streak for example

2010-09-16 Thread String
I was prompted to pursue this myself this week after stumbling across
one of Al Sutton's blog posts on the subject: http://tinyurl.com/334gvne

In short, the Streak reports itself as mdpi/large, and we know from
elsewhere that the Galaxy Tab reports as hdpi/large. I felt this gave
enough to get started with, so I created a couple of emulator
instances - for these two devices' resolutions, API levels, and
densities - and got to work. Before I was done, 2 of my 3 top apps
were looking quite good on both configurations; the third will require
some new graphics, so I'm putting it off for the moment.

Basically, I'm assuming that all tablets will report as large in one
density or another, and therefore large roughly means = 5
diagonal. And to be honest, I didn't have too much trouble with the
misreporting Galaxy Tab config; if I worked my layouts  dimensions
from size (large vs. normal) rather than density (hdpi vs mdpi),
things seemed to go OK.

So now I have apps which work reasonably well on everything from a 3
QVGA to a 7 WSVGA, and everything in between (HVGA, WVGA, ...). While
I can't deny that I've got a goodly number of layouts, drawables, and
dimensions now, it still seems manageable - and I'm fairly confident
that I'm ready for the current crop of devices.

String

On Sep 16, 2:42 pm, niko20 nikolatesl...@yahoo.com wrote:
 Ok,

 I've spent the last few days working on my layouts, and I have
 everything looking good on small screens and normal screens. Now I'm
 tackling large screens.

 However, the question I have is, how do we really know what a device
 reports itself as? For example, in the blog post about the Samsung
 tablet, it was stated that even though the tablet is 170dpi, it
 reports itself as hdpi.

 So my question is then how can we really know, based on a a device's
 specs, what it is going to report itself to android as? Such as large,
 hdpi, normal, etc,

 In particular the Dell Streak is 5 inches, and has 187ppi. Is the
 Streak going to report itself as mdpi or hdpi. If it reports itself as
 mdpi will it still be considered large?

 Maybe we don't know the answers to this since even android 2.2 does
 not support really large screens well yet - but any more input is
 appreciated.

 I do have a layout working for the Samsung tablet specs, but obviously
 this layout would be too large for a dell streak layout (I'll be
 working on the layout to make it so it can resize more correctly
 though)

 But in order to test the different scenarios we need to know the
 actual specs of what the hardware will report itself as. The Samsung
 tablet appears to have broken convention and reports itself as
 something different than one would think.

 -niko

-- 
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] Database of android device configurations

2010-09-16 Thread EmilDiego
Is there a database anywhere that has all of the different devices
that use the android operating system and what their technical specs
are.  Mainly screen size, screen density, internal storage, external
storage, memory, 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: problems with Typeface

2010-09-16 Thread Christophe
 Call Typeface.create((String)null, Typeface.ITALIC);

yes, this works. I should have thought of this by myself _

 Please delete getApplicationContext() and just use this

I did this, but the problem is still here.
Also same problem if I use (String)null instead of
Typeface.SANS_SERIF (I guess sans serif was the default).

thanks for your help.

On Sep 16, 4:01 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Sep 16, 2010 at 9:33 AM, Christophe

 christophe.lebesner...@gmail.com wrote:
  and this is how I use the typeface :

  TextView title = new TextView(this.getApplicationContext());
  title.setText(some text);
  title.setTypeface(Typeface.create(Typeface.SANS_SERIF,
  Typeface.BOLD_ITALIC));

 Please delete getApplicationContext() and just use this.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

-- 
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: problems with Typeface

2010-09-16 Thread Kostya Vasilyev

 16.09.2010 18:16, Christophe пишет:

  Please delete getApplicationContext() and just use this

I did this, but the problem is still here.
Also same problem if I use (String)null instead of
Typeface.SANS_SERIF (I guess sans serif was the default).


Perhaps not all typefaces (serif, sans serif) are available in all 
variations (bold, italic, bold + italic)?


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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] [AO PCM] Failed to open /dev/msm_pcm_out for writing!

2010-09-16 Thread pgil
I would like to open an mp3 file with my own audio player(based on
mplayer and FFmpeg) I packaged in a apk file. It runs fine using
command line and the executable version but not when packaged in apk.
I got the messages using adb logcat window:

I/stdout  ( 2115): PCM: Samplerate: 48000Hz Channels: Stereo Format
s16le
I/stdout  ( 2115): [AO PCM] Info: Faster dumping is achieved with -vc
null -vo null -ao pcm:fast
I/stdout  ( 2115): [AO PCM] Info: To write WAVE files use -ao
pcm:waveheader (default).
I/stderr  ( 2115): [AO PCM] Failed to open /dev/msm_pcm_out for
writing!
I/stderr  ( 2115): Failed to initialize audio driver 'pcm:file=/dev/
msm_pcm_out'
I/stderr  ( 2115): Could not open/initialize audio device - no sound.
I/stdout  ( 2115): Audio: no sound
I/stdout  ( 2115): Video: no video
I/stdout  ( 2115): Exiting... (End of file)

I put the permission in the manifest file as follows:

  uses-permission
android:name=android.permission.WRITE_SECURE_SETTINGS/uses-
permission
  uses-permission android:name=android.permission.WRITE_SETTINGS/
uses-permission
  uses-permission android:name=android.permission.RECORD_AUDIO/
uses-permission
  uses-permission
android:name=android.permission.MODIFY_AUDIO_SETTINGS/uses-
permission
  uses-permission android:name=android.permission.FACTORY_TEST/
uses-permission
  uses-permission android:name=android.permission.HARDWARE_TEST/
uses-permission
  uses-permission android:name=android.permission.INTERNET/uses-
permission
  uses-permission
android:name=android.permission.WRITE_EXTERNAL_STORAGE/uses-
permission


Any idea about what's wrong! Any help would be appreciated.

best regards

-- 
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] Database of android device configurations

2010-09-16 Thread Frank Weiss
Deviceatlas.com

On Sep 16, 2010 7:13 AM, EmilDiego emildi...@gmail.com wrote:
 Is there a database anywhere that has all of the different devices
 that use the android operating system and what their technical specs
 are. Mainly screen size, screen density, internal storage, external
 storage, memory, 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

-- 
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] Formal Android training

2010-09-16 Thread Chris Stewart
The company I work for is looking to send someone off for formal training in
Android, that person most likely being me.  Mailing list regular Mark Murphy
is holding a 5-day course in December through Big Nerd Ranch but my company
is hoping to do this in the next month.  Knowing who he is makes me feel
more comfortable suggesting that course but since I can't wait that long,
I'm having trouble finding other offerings and feeling comfortable about
recommending them.

Aside from Big Nerd Ranch, the only other offering I can find is through
Marakana [1].  I've not heard of these folks before, which doesn't mean much
since I've never really looked either.  I'm curious to know if anyone here
has gone through any formal training, or if you could where would you look?

[1] http://marakana.com/training/android/

--
Chris Stewart
http://chriswstewart.com

Fantasy 
Footballhttp://chriswstewart.com/android-applications/fantasy-football/-
Android app for MFL fantasy football owners

-- 
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: [AO PCM] Failed to open /dev/msm_pcm_out for writing!

2010-09-16 Thread Chris Stratton
Apps run as unpriveleged users and so can't access the audio device
directly.  You are supposed to do sound through the java apis.

pgil wrote:
 I would like to open an mp3 file with my own audio player(based on
 mplayer and FFmpeg) I packaged in a apk file. It runs fine using
 command line and the executable version but not when packaged in apk.
 I got the messages using adb logcat window:

 I/stdout  ( 2115): PCM: Samplerate: 48000Hz Channels: Stereo Format
 s16le
 I/stdout  ( 2115): [AO PCM] Info: Faster dumping is achieved with -vc
 null -vo null -ao pcm:fast
 I/stdout  ( 2115): [AO PCM] Info: To write WAVE files use -ao
 pcm:waveheader (default).
 I/stderr  ( 2115): [AO PCM] Failed to open /dev/msm_pcm_out for
 writing!
 I/stderr  ( 2115): Failed to initialize audio driver 'pcm:file=/dev/
 msm_pcm_out'
 I/stderr  ( 2115): Could not open/initialize audio device - no sound.
 I/stdout  ( 2115): Audio: no sound
 I/stdout  ( 2115): Video: no video
 I/stdout  ( 2115): Exiting... (End of file)

 I put the permission in the manifest file as follows:

   uses-permission
 android:name=android.permission.WRITE_SECURE_SETTINGS/uses-
 permission
   uses-permission android:name=android.permission.WRITE_SETTINGS/
 uses-permission
   uses-permission android:name=android.permission.RECORD_AUDIO/
 uses-permission
   uses-permission
 android:name=android.permission.MODIFY_AUDIO_SETTINGS/uses-
 permission
   uses-permission android:name=android.permission.FACTORY_TEST/
 uses-permission
   uses-permission android:name=android.permission.HARDWARE_TEST/
 uses-permission
   uses-permission android:name=android.permission.INTERNET/uses-
 permission
   uses-permission
 android:name=android.permission.WRITE_EXTERNAL_STORAGE/uses-
 permission


 Any idea about what's wrong! Any help would be appreciated.

 best regards

-- 
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] Verizon Moto droid auto update to 2.2 yesterday

2010-09-16 Thread john brown
Hello,

Yesterday my Verizon Motorola droid was automatically updated from
Android 2.1 to 2.2. I was informed that it had been done via text
message. I was not consulted or warned, only informed after the fact.
It does not cause any problem in my app. I used the getSDcardPath
(syntax approx) rather than hard-coding /sdcard/data. and I have
not found any other conflicts.

How are Android updates handled on devices? Always done automatically,
this instance of auto update was unusual, or what?

If it is always done automatically then we MUST incorporate all
accommodations for future changes that are not backwards compatible
just to keep our apps running on machines that they were designed to
run on. (it is difficult to anticipate all future changes!)

Previous to this automatic update, I was thinking that we should
incorporate all accommodations for future changes that are not
backwards compatible so the app would run on future Android versions.
(this option does not require knowledge of the future.)

Thanks, John Brown

PS. I did opt to do the Adobe update yesterday. But that just seemed
like a normal application update. No indication that it affected
anything else.

-- 
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: Ramdisk image

2010-09-16 Thread Chris Stratton
You need to ask on android-porting.

They really should rename this group to android-java-sdk

Silwerstar wrote:
 Hi,

 I have just started using 0xlab's android port. I have been
 successfully able to create the file system and have been able to
 flash it as well. However, I have 2 questions to ask:
 1) How do I create a ramdisk image and what should be the bootargs
 given at the uboot prompt for this.
 (I tried using ramdisk.img created in out/target/beagleboard/ but then
 the kernel just does not boot when I use it.
 Can any one help me out with this ?
 2) How do I make my module part of the file system image. I have my
 own driver, which I want to install after kernel boot up. What is the
 procedure to ensure this module is part of the android.ubi image?

 Thanks a lot!

-- 
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] How can i save a data into the phone, and keep this data after uninstall?

2010-09-16 Thread Lidia
Hello guys,

I need to save a data into the phone through my application and after
updating  my application (uninstall and new download)  i need to
retrieve this data from the phone.
As i see from the android API , the external storage
http://developer.android.com/guide/topics/data/data-storage.html#filesExternal
refers only about sdcard, but i would like to retrieve the data even
when the sdcard is changed.
And using  the internal storage data are always removed after
uninstall.


Can someone please give me an idea?
Thanks
Lidia

-- 
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] Media URI stability

2010-09-16 Thread jarkman
We store references to media (music tracks) by storing media URIs.
Things like this:

content://media/external/audio/media/3

Of late, we've had a few complaints from users who saw the tracks
change periodically. It's as if some other bit of software was running
once a day or so and forcing a re-index of the media library, so every
track gets a new (and different) URI. One possible culprit seems to be
Zedge, though I'm not sure of that.

I've looked in the docs, and I can't see a way to force a re-index. Is
it possible ?

And, is there anything else we can do to get stable references to
tracks ? Do the built-in apps take any steps to identify (for example)
notification tones so they will be stable against reindexing of the
media db ?

Thanks!

Richard

-- 
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] Formal Android training

2010-09-16 Thread Mark Murphy
On Thu, Sep 16, 2010 at 10:50 AM, Chris Stewart cstewart...@gmail.com wrote:
 The company I work for is looking to send someone off for formal training in
 Android, that person most likely being me.

Cool!

 Mailing list regular Mark Murphy
 is holding a 5-day course in December through Big Nerd Ranch but my company
 is hoping to do this in the next month.  Knowing who he is makes me feel
 more comfortable suggesting that course

I dunno...that Murphy guy is balding... :-)

 but since I can't wait that long,
 I'm having trouble finding other offerings and feeling comfortable about
 recommending them.
 Aside from Big Nerd Ranch, the only other offering I can find is through
 Marakana [1].  I've not heard of these folks before, which doesn't mean much
 since I've never really looked either.  I'm curious to know if anyone here
 has gone through any formal training, or if you could where would you look?
 [1] http://marakana.com/training/android/

If they're willing to ship you to London (UK), I have a three-day
intro course going on before DroidCon UK in late October, through
Skills Matter.

Marakana's public courses are principally taught by Marko Gargenta.
I've dealt with him some, and he seems solid. He has an O'Reilly book
coming out on Android sometime soonish.

I haven't had any direct dealings with any other firms doing US-based
public Android training, and so I have no particular recommendations.

If you have additional questions regarding my training, feel free to
contact me off-list.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

-- 
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] How can i save a data into the phone, and keep this data after uninstall?

2010-09-16 Thread TreKing
On Thu, Sep 16, 2010 at 10:10 AM, Lidia lidyp...@yahoo.com wrote:

 And using  the internal storage data are always removed after uninstall.


Yes, but not during an update, to be clear, if that's your concern.


 Can someone please give me an idea?


Store your data online somewhere. You can't force the user to keep data on
their phone or on the SD card if they don't want it, and with good reason.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] How can i save a data into the phone, and keep this data after uninstall?

2010-09-16 Thread Chris Stewart
 Store your data online somewhere. You can't force the user to keep data
on their phone or on the SD card if they don't want it, and with good
reason.

Agreed.  I'm pretty sure there's no other place you can store information
that persists after someone uninstalls your app.

--
Chris Stewart
http://chriswstewart.com

Fantasy 
Footballhttp://chriswstewart.com/android-applications/fantasy-football/-
Android app for MFL fantasy football owners


On Thu, Sep 16, 2010 at 11:17 AM, TreKing treking...@gmail.com wrote:

 On Thu, Sep 16, 2010 at 10:10 AM, Lidia lidyp...@yahoo.com wrote:

 And using  the internal storage data are always removed after uninstall.


 Yes, but not during an update, to be clear, if that's your concern.


 Can someone please give me an idea?


 Store your data online somewhere. You can't force the user to keep data on
 their phone or on the SD card if they don't want it, and with good reason.


 -
 TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
 transit tracking app for Android-powered devices


  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en


-- 
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] about video capture!!!

2010-09-16 Thread xc s
I want a sample  code about video capture.not the audio capture in the
sdk .I hope it can capture video and then click  save button put the
video.3gp into the sdcard. who help me?!THANKS!!

-- 
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: Uploading file through HTTP Post

2010-09-16 Thread perumal316
Hi,

Managed to get it working already. Thanks for the info.

Regards.

On Sep 16, 7:39 pm, Yahel kaye...@gmail.com wrote:
 See this page..
 http://rapidandroid.org/wiki/HttpUpload
  As I have mentioned this is only possible for SDK 1.0. In SDK 2.1

 That is exactly what I'm doing in my app and it works perfectly from
 1.5 to 2.2.

 What error do you see in your app ?

 Yahelhttp://www.a-world-of-faces.com

-- 
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: Camera Preview Zoom in Android

2010-09-16 Thread uday
In Android i think they have already implemented this.. because with
out implementing this in android HAL how they will provide this API??

Is there any chance that this type of implementation is device
specific??

On Sep 7, 10:32 am, nagaraj attimani nagaraj.attim...@gmail.com
wrote:
 Please check is SetZoom implemented in HAL.
 and also setparameters in HAL will be called whenever you trying to change
 zoom level
 In setparameters() in HAL, Setzoom should be called.
 Setzoom() will send IOCTL command to native camera driver to set the zoom.



 On Tue, Sep 7, 2010 at 9:58 AM, uday uday.pic...@gmail.com wrote:
  Hi All,
  I've a problem with Camera Preview Zoom.. The methods present in
  Android 2.2, setZoom() is not working to zoom the preview.. Is there
  any another way to do the Zoom in android??

  Im using the code present in the Android API Demos..
  Is ther any body who has worked on implementing ZoomIn  ZoomOut and
  got succeed??

  --
  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.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Warm Regards,
 Nagaraj

-- 
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] How can i save a data into the phone, and keep this data after uninstall?

2010-09-16 Thread Lidia G
Chris Stewart,

I think saying update here:
| And using  the internal storage data are always removed after uninstall.
   Yes, but not during an update, to be clear, if that's your concern. 

you mean an kind of override - maybe like an update should work.

But to implement an update feature, my application just checks if the new 
version exists and tries to install this, it founds that one version already 
exists on the phone, and asks if i want to replace the application with the new 
one. 

Anyway thank you for your advice.




--- On Thu, 9/16/10, Chris Stewart cstewart...@gmail.com wrote:

From: Chris Stewart cstewart...@gmail.com
Subject: Re: [android-developers] How can i save a data into the phone, and 
keep this data after uninstall?
To: android-developers@googlegroups.com
Date: Thursday, September 16, 2010, 3:23 PM

 Store your data online somewhere. You can't force the user to keep data on 
their phone or on the SD card if they don't want it, and with good reason.


Agreed.  I'm pretty sure there's no other place you can store information that 
persists after someone uninstalls your app.


--Chris Stewarthttp://chriswstewart.com


Fantasy Football - Android app for MFL fantasy football owners



On Thu, Sep 16, 2010 at 11:17 AM, TreKing treking...@gmail.com wrote:


On Thu, Sep 16, 2010 at 10:10 AM, Lidia lidyp...@yahoo.com wrote:




And using  the internal storage data are always removed after uninstall.

Yes, but not during an update, to be clear, if that's your concern. 


 

Can someone please give me an idea?
Store your data online somewhere. You can't force the user to keep data on 
their phone or on the SD card if they don't want it, and with good reason.





-
TreKing - Chicago transit tracking app for Android-powered devices









-- 

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




-- 

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


  

-- 
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 calculate distance between to city (dynamically)

2010-09-16 Thread dadada
you can also use 'haversine' formula. google it. you need two
geopoint.

On Sep 16, 3:36 pm, Rocky rkjhaw1...@gmail.com wrote:
 Hi Shashidhar,

 Thanks dear...

 On Thu, Sep 16, 2010 at 12:56 PM, Shashidhar shashi.zep...@gmail.comwrote:





  Have a look at this

 http://developer.android.com/reference/android/location/Location.html...[]%29http://developer.android.com/reference/android/location/Location.html...

  http://developer.android.com/reference/android/location/Location.html...
  -Shashidhar

  On Thu, Sep 16, 2010 at 12:45 PM, RKJ (Android developer) 
  rkjhaw1...@gmail.com wrote:

  Hi All,

  I want to calculate the distance between 2 city, whatever user
  mention.

  Example -
  Default City - 1st City - New York or New Delhi, London Seoul anything
  User Put     - 2nd City - California

  Need - to calculate distance between California to New York  or London

  Welcome any hints
  --RKJ

  --
  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.comandroid-developers%2Bunsubs
   cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

   --
  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.comandroid-developers%2Bunsubs 
  cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Thanks  Regards

 Rakesh Kumar Jha
 Software Developer
 Symphony Services Corp (India) Pvt Ltd
 Bangalore
 (O) +918030273740
 (R) +919886336619

-- 
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 can i save a data into the phone, and keep this data after uninstall?

2010-09-16 Thread DanH
Store the data as a picture.

On Sep 16, 10:10 am, Lidia lidyp...@yahoo.com wrote:
 Hello guys,

 I need to save a data into the phone through my application and after
 updating  my application (uninstall and new download)  i need to
 retrieve this data from the phone.
 As i see from the android API , the external 
 storagehttp://developer.android.com/guide/topics/data/data-storage.html#file...
 refers only about sdcard, but i would like to retrieve the data even
 when the sdcard is changed.
 And using  the internal storage data are always removed after
 uninstall.

 Can someone please give me an idea?
 Thanks
 Lidia

-- 
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] IntentService: Sending Message to a handler on dead thread

2010-09-16 Thread Samuh
We are starting an IntentService periodically using AlarmManager
service. The IntentService class fires a few AsyncTask from its
onHandleIntent() callback.

The setup works well for some time. But when the device is put to
sleep or if the application is exited and resumed after some time,
whenever the IntentService code runs, I get the following exceptions:

Handler{44f1b3a8} sending message to a Handler on a dead thread
java.lang.RuntimeException: Handler{44f1b3a8} sending message to a
Handler on a dead thread
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:181)
at android.os.Handler.sendMessageAtTime(Handler.java:457)
at android.os.Handler.sendMessageDelayed(Handler.java:430)
at android.os.Handler.sendMessage(Handler.java:367)
at android.os.Message.sendToTarget(Message.java:317)
at android.os.AsyncTask$3.done(AsyncTask.java:214)
at java.util.concurrent.FutureTask$Sync.innerSet(FutureTask.java:
252)
at java.util.concurrent.FutureTask.set(FutureTask.java:112)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:
310)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1068)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:561)
at java.lang.Thread.run(Thread.java:1096)

When I run the code on the thread that is executing onHandleIntent()
the occurences of this error is minimized. However, I am not sure if
the possibility of it happening is zero.

Questions:

1. What is causing these exceptions?
2. How can such exceptions be avoided?
3. What happens when the device sleeps?
4. I've read somewhere that if the network connectivity is through
WiFi, it is disabled when the device sleeps. What are the cases that a
developer should take care of when a device wakes up?

Please help.

Thanks.

-- 
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] How can i save a data into the phone, and keep this data after uninstall?

2010-09-16 Thread TreKing
On Thu, Sep 16, 2010 at 10:40 AM, Lidia G lidyp...@yahoo.com wrote:

 Chris Stewart,

 I think saying update here:

 | And using  the internal storage data are always removed after
 uninstall.
Yes, but not during an update, to be clear, if that's your concern.
 

 you mean an kind of override - maybe like an update should work.


That was me, not Chris ...
What I mean is if you're updating from the Market (or using adb to simulate
an update), your data is preserved.


 But to implement an update feature, my application just checks if the new
 version exists and tries to install this, it founds that one version already
 exists on the phone, and asks if i want to replace the application with the
 new one.

 Anyway thank you for your advice.


You might want to elaborate on what you're doing. Are you trying to
implement your own update mechanism?

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] Find the location in Android Map

2010-09-16 Thread Frank Weiss
On Wed, Sep 15, 2010 at 9:56 PM, Dhrumil Shah dhrumilsh...@gmail.comwrote:

  I thought you want to to display a mark on a map from the latitude and
 longitude a user entered in two text fields. But I don't understand if you
 want to display that on a MapActivity in your app or in another app.
 - I want to display that  on a MapActivity in my app. Not in another
 activity.




OK, but I'm not following the code you posted. What is supposed to happen
after startActivity():

public void onClick(View v) {
// TODO Auto-generated method stub
String _lat = lat.getText().toString();
String _lng = lng.getText().toString();
Uri uri = Uri.parse(geo:+_lat+,+_lng);
startActivity(new Intent(Intent.ACTION_VIEW, uri));

It's unclear why you are doing that from the MapActivity itself. Also, I
mentioned earlier that the latititude and longitude from the text boxes are
not used anywhere else.

-- 
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] How can i save a data into the phone, and keep this data after uninstall?

2010-09-16 Thread Lidia G
Sorry Tre ,
I see, thanks

--- On Thu, 9/16/10, TreKing treking...@gmail.com wrote:

From: TreKing treking...@gmail.com
Subject: Re: [android-developers] How can i save a data into the phone, and 
keep this data after uninstall?
To: android-developers@googlegroups.com
Date: Thursday, September 16, 2010, 3:49 PM

On Thu, Sep 16, 2010 at 10:40 AM, Lidia G lidyp...@yahoo.com wrote:


Chris Stewart,

I think saying update here:
| And using  the internal storage data are always removed after uninstall.
   Yes, but not during an update, to be clear, if that's your concern. 



you mean an kind of override - maybe like an update should work.

That was me, not Chris ...
What I mean is if you're updating from the Market (or using adb to simulate an 
update), your data is preserved.


 But to implement an update feature, my application just checks if the new 
version exists and tries to install this, it founds that one version already 
exists on the phone, and asks if i want to replace the application with the new 
one. 



Anyway thank you for your advice.
You might want to elaborate on what you're doing. Are you trying to implement 
your own update mechanism?

-


TreKing - Chicago transit tracking app for Android-powered devices





-- 

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


  

-- 
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] ContentProvider blank screen

2010-09-16 Thread netlander
Hi,

My app has one activity and one ContentProvider, the activity is
simple in that it's just a splash screen at the moment with no other
logic in it (I do intend to have more activities in the app). The
ContentProvider uses SQLite as a back end and loads some static data
from files on first install, a slow process due to file sizes and
database initialisation.

My problem is that I want the activity to show up as soon as the
install starts and maybe display a progress bar or dialog to show the
user progress about the install. At the moment I get a blank (white)
screen while the ContentProvider is initialising the data which takes
quite a long time and I get Activity idle timeout for history record
warning in LogCat. My splash screen only shows when the
ContentProvider is done, from the app standpoint this is undesirable
behaviour.

One potential solutions would be to manually start the provider via an
AsyncTask but I have a feeling that this is a bad approach due to the
fact that if the activity is interupted and restarted while the
install is underway and a new AsyncTast is created through the
activity's onCreate() then I'll have worst problems on my hands.

Is there a way to start the content provider in the background and
display my splash screen activity straight after the app is started?
Note that this problem is only an issue on first install.

Many thanks

-- 
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: Failed to open /dev/msm_pcm_out for writing!

2010-09-16 Thread pgil
Hi, do you have any samples of Java code to access to this audio
device, in fact a way to write and read into this msm_pcm_out driver?


On Sep 16, 4:55 pm, Chris Stratton cs07...@gmail.com wrote:
 Apps run as unpriveleged users and so can't access the audio device
 directly.  You are supposed to do sound through the java apis.

 pgil wrote:
  I would like to open an mp3 file with my own audio player(based on
  mplayer and FFmpeg) I packaged in a apk file. It runs fine using
  command line and the executable version but not when packaged in apk.
  I got the messages using adb logcat window:

  I/stdout  ( 2115): PCM: Samplerate: 48000Hz Channels: Stereo Format
  s16le
  I/stdout  ( 2115): [AO PCM] Info: Faster dumping is achieved with -vc
  null -vo null -ao pcm:fast
  I/stdout  ( 2115): [AO PCM] Info: To write WAVE files use -ao
  pcm:waveheader (default).
  I/stderr  ( 2115): [AO PCM] Failed to open /dev/msm_pcm_out for
  writing!
  I/stderr  ( 2115): Failed to initialize audio driver 'pcm:file=/dev/
  msm_pcm_out'
  I/stderr  ( 2115): Could not open/initialize audio device - no sound.
  I/stdout  ( 2115): Audio: no sound
  I/stdout  ( 2115): Video: no video
  I/stdout  ( 2115): Exiting... (End of file)

  I put the permission in the manifest file as follows:

    uses-permission
  android:name=android.permission.WRITE_SECURE_SETTINGS/uses-
  permission
    uses-permission android:name=android.permission.WRITE_SETTINGS/
  uses-permission
    uses-permission android:name=android.permission.RECORD_AUDIO/
  uses-permission
    uses-permission
  android:name=android.permission.MODIFY_AUDIO_SETTINGS/uses-
  permission
    uses-permission android:name=android.permission.FACTORY_TEST/
  uses-permission
    uses-permission android:name=android.permission.HARDWARE_TEST/
  uses-permission
    uses-permission android:name=android.permission.INTERNET/uses-
  permission
    uses-permission
  android:name=android.permission.WRITE_EXTERNAL_STORAGE/uses-
  permission

  Any idea about what's wrong! Any help would be appreciated.

  best regards



-- 
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] Question about NDK

2010-09-16 Thread Paolo
Hi there,
I should port a framework written in C/C++ to Android, in order to
allow developer to use it to implement application. Is the NDK the
right way?

and then... this framework won't open, so how can I distribute it
ready to be used in every android app?

Thanks to anyone helps me.

-- 
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] Intent Service not actually spawning a new thread

2010-09-16 Thread Bret Foreman
My IntentService is blocking my UI thread and I wanted to find out
why. So I turned on profiling in the onStartCommand method of the
IntentService and turned it off at the end of the onStartMethod. The
working being done in between is web access with the Apache HTTP
client.

According to the profiler, the onStartCommand method of the
IntentService is running on the main thread, not in a worker thread.
Any idea what could cause this behavior?

-- 
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] Viewing the broadcast queue

2010-09-16 Thread Bret Foreman
I'm broadcasting an Intent that is not being received as expected. Can
I use DDMS (or some other tool) to view the broadcast queue to verify
that the Intent is there?

-- 
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] Compass pointing a direction other than North

2010-09-16 Thread Pedro Teixeira

Hi everyone..I'm trying to implement spomething 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();
}

}

This classes work perfectlly showing me a little circle with a line
pointing the North.

What I would like to do, is ..given this 2 points in space (mLatitude,
mLongitude) and (picLatitude, picLongitude) which are the user
position, and a certain picture position. I'd like the compass to
point to the position of the picture (picLatitude,picLongitude) from
the position they are in the moment (mLatitude,mLongitude)

I came to the trignometry formula that calculates this..being:

float direction = (float) Math.toDegrees(Math.atan2(picLongitude-
mLongitude,  picLatitude-mLatitude));

But when I use it 

[android-developers] Re: License Verification Library: getting error NOT_MARKET_MANAGED

2010-09-16 Thread Craigo
Scratch that comment, I now seem to be getting Signature verification
failed. instead.

Serves me right for trying to do some work while on holidays in a
country that doesn't have paid apps!  :-)


On Sep 15, 11:32 am, Craigo craig...@gmail.com wrote:
 In my experience, it has to be less then or equal.

 Which makes it easier for people who want to sell paid apps, but don't
 have access to paid apps.  They can just increase the version number
 and not worry about their license code failing.

 On Aug 4, 3:26 pm, BoD bodl...@gmail.com wrote:



  All right I'm sorry I didn't see this has been addressed before.
  The problem was that the version code of the calling app has to be
  greater than or equal to the one that is published.
  I had incremented it as part of my test, that's why it didn't work.

  Thanks,

  BoD

  On Aug 4, 5:59 pm, BoD bodl...@gmail.com wrote:

   Hi!

   I'm trying to integrate the LVL to my app, and I followed the
   'Licensing Your Applications' document [1].

   For some reason I'm receiving the ERROR_NOT_MARKET_MANAGED error,
   although my app (package: org.jraf.android.logcatlivewallpaper) is
   indeed available in the Market.

   I suppose I made a mistake is on my side but all I did is follow the
   document (I used the ServerManagedPolicy and the AESObfuscator), so I
   don't see what I could have done wrong.

   Any idea?
   Thanks a lot for you help.

   BoD

     [1]:http://developer.android.com/guide/publishing/licensing.html

-- 
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] Intent Service not actually spawning a new thread

2010-09-16 Thread Kostya Vasilyev

 16.09.2010 20:21, Bret Foreman пишет:

According to the profiler, the onStartCommand method of the
IntentService is running on the main thread, not in a worker thread.
Any idea what could cause this behavior?
This is correct - onStartCommand is a framework method that exists in 
any service, and so is called by the framework on the UI thread. Same as 
with any service.


The IntentService-specific worker method is onHandleIntent:

http://developer.android.com/reference/android/app/IntentService.html#onHandleIntent(android.content.Intent)

this is called on the worker thread.

Make sure you don't override onStart / onStartCommand, or call the 
superclass. It's these methods in IntentService that dispatch the intent 
to the worker thread, and, ultimately, to onHandleIntent.


--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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] how to create colored multicolumn listview

2010-09-16 Thread dadada
hi,

do I use the imageview as the skin of the colored listview or is there
better ways to create them?

thanks.

bryan

-- 
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] how to create colored multicolumn listview

2010-09-16 Thread TreKing
On Thu, Sep 16, 2010 at 11:34 AM, dadada ytbr...@gmail.com wrote:

 is there better ways to create them?


If you want multiple columns, you probably want to look at TableLayout or
GridView.

-
TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago
transit tracking app for Android-powered devices

-- 
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] I'm really impressed...

2010-09-16 Thread Doug Gordon
...with this operating system and tool chain. When I decided to port
my old PalmOS app over a few weeks ago, I faced a steep learning curve
since this was all new to me: Android, Java, and Eclipse. Now that
I've worked up the mountain much more quickly than expected and am
making excellent progress, I'm appreciating all of the things the O/S
(and language) do for you that used to be much more painful.

For example, I added photo support to my app yesterday, taking JPEG
data as a blob out of a SQLite database, converted it to a Bitmap,
put a thumbnail version in an ImageButton, then when the user clicks
the button the full-size image pops up. I was surprised at how few
lines of XML/Java were required for all this, plus with Java doing its
dynamic compilation it all worked on the first try (it's nice that
Java eliminates the possibility of many of the dumb mistakes that you
can make in C/C++).

Sorry for this semi-OT post, but among some of the gripes that we
sometimes express here, the developers have gotten a LOT right! And
apparently an old dog can still learn a few new tricks...

-- 
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


  1   2   3   >