[android-developers] Re: Question about using TextView

2009-06-05 Thread Tao

Hi Mark,

It looks like we need to set a deprecated property on cupcake to make
android:ellipsize work properly.

android:Single line (Deprecated) = true  (--- without this, the
ellipsis will not show up)
android:ellipsize = end

I tried setMaxLines(1) without setting Single line property, it
doesn't work

Looks weird, maybe a SDK bug? Correct me if I am wrong.


On Jun 5, 2:25 pm, Tao grea...@gmail.com wrote:
 gotcha, thx :)

 On Jun 5, 1:27 pm, Mark Murphy mmur...@commonsware.com wrote:

  Tao wrote:
   Hi all,

   I just have a question which may be very simple to some of you.
   How can I make a TextView cut off long strings automatically?
   I noticed that Activity title can do that: from abcdefgh to abc...

  Use android:ellipsize

 http://developer.android.com/reference/android/widget/TextView.html#a...

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

  Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
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: MapView Draggable Objects

2009-06-05 Thread Wayne Wenthin
I haven't been able to drag but I have been able to use these methods to
pick the marker and then remove and re-insert into the ItemizedOverlay.   If
anyone does have code for dragging please post.  I would rather do it that
way then the dumb work around I have now.  Plus it looks much cooler!

On Fri, Jun 5, 2009 at 8:16 AM, Patrick patrick.ka...@gmail.com wrote:


 You can use an ItemizedOverlay to add to the maps overlay collection.
 Then handle the onTouchEvent and onTap which have MotionEvent. By
 handling these events you can see which object in the overlay has
 focus or has been tapped and implement your own moving of the overlay
 objects (drawables with geopoints). Using the Projection object of the
 map you can convert from xy touch coordinates into geopoints to set
 your overlayitem. I don't know if this is the best way to handle it
 but it worked for 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] Re: How to Implement the Compass function to my application?

2009-06-05 Thread Georgy

Ok for 1) I looked it up (thanks U SAVED ME TREMENDOUS CALCULATIONS)

but the function: float res =  distanceTo(loc); that takes loc which
is a location is not recognized. Is it deprecated or somethign?

for 2) do you have any working sample?

thnaks a lot!

On Jun 5, 11:14 am, Brian Smith avalo...@caerleon.us wrote:
 It's still a 2-step process, using classes from 2 completely different
 packages.

 1) android.location.Location to compute distance and angle from start
 to end point... unless you want to implement the math yourself

 2) SensorManager and SensorListener (in android.hardware) to determine
 current orientation of phone

 You will also want to use android.hardware.GeomagneticField to find
 the magnetic declination for the user's current location (or at least
 a point that's close to it).  The orientation sensor uses magnetic
 north, as far as I know, and I believe the math in Location probably
 uses true north.  The difference can be a lot or a little depending on
 where you are.

 On Jun 5, 11:02 am, Georgy georgearna...@gmail.com wrote:

  yeah I need to bring up the compass to tell the user where EXACTLY is
  the destination when the user is close.
--~--~-~--~~~---~--~~
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: Question about using TextView

2009-06-05 Thread Mark Murphy

Tao wrote:
 Hi Mark,
 
 It looks like we need to set a deprecated property on cupcake to make
 android:ellipsize work properly.
 
 android:Single line (Deprecated) = true  (--- without this, the
 ellipsis will not show up)
 android:ellipsize = end
 
 I tried setMaxLines(1) without setting Single line property, it
 doesn't work
 
 Looks weird, maybe a SDK bug? Correct me if I am wrong.

That is strange.

android:inputType is now the way to specify you want to support
multiline input, so I would have assumed that the default would have
been the equivalent of android:singleLine=true.

If nobody else chimes in with a solution, you might consider posting a
bug over at http://b.android.com.

Note that deprecated in Android does not mean unsupported, just not
recommended. It may be that this is still a necessary use of
android:singleLine, at least for the time being.

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
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: Enhanced Sensor API

2009-06-05 Thread Mark Murphy

RickB wrote:
 Anyone?

Well, this isn't really the right list, since what you are describing is
changes to the Android open source code, not developing applications to
the SDK. If you elect to pursue this further, you might wish to post to
a more appropriate list:

http://source.android.com/discuss

 My view is that it is not a good approach to create sensor-specific
 APIs with iterative releases of the Android platform and SDK's.  By
 this, I mean that instead of adding a location API, and an
 accelerometer API, and whatever comes next, we should create a
 generic sensor API that can work with a broad range of sensor types,
 including sensor configuration, demand read/write/configuration, event
 notifications, and other functions.

With the exception of location, that seems to describe quite nicely the
existing sensor API.

I imagine that part of the reason the location API is separate is
because there are many possible sensors for location, and it could
make the API rather cumbersome if every sensor had to deal with the
possibility that there are several of its type, and to figure out which
one is used, etc. Also, location requires permissions, whereas other
sensors do not, IIRC.

 In this way, 3rd parties could
 also add innovative sensing capabilities (or external sensors) to
 their Android devices which would be instantly supported by the
 platform.  Well-known sensor such as geolocation and acceleration
 could have agreed-to sensor names/namespaces, with full extensibility
 for additional sensor types.

Again, outside of location, you seem to describe the existing sensor API.

If you'd like to propose a replacement API, either to encompass
locations or just a re-re-work of the existing sensor API more to your
liking, give us some classes and methods to chew on...but perhaps in a
more appropriate list.

 As an example, geolocation as a 2D longitude/latitude is fine for some
 apps, but for inside the building applications or for other apps
 involving the need to accurate location of people or resources in 3
 dimensions, it doesn't cut it.

FWIW, the existing location API supports altitude, assuming the
underlying location provider offers it.

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

--~--~-~--~~~---~--~~
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 Implement the Compass function to my application?

2009-06-05 Thread Brian Smith

It's an object method, not a standalone function, so it would look
like this (assuming start and end are Location objects):

float res = start.distanceTo(end);

As for an example of using SensorManager and SensorListener, I don't
have anything handy, but there is an example in the API demos:
http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/os/Sensors.html

If you're looking for a compass display, a good example of that is in
the Professional Android Application Development book from Wrox.  It
has both simple and complex compass examples to get ideas from.  I
don't think Android has any stock widgets for that kind of thing.

--~--~-~--~~~---~--~~
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 query all phone numbers of all Contacts in the Database?

2009-06-05 Thread Meryl Silverburgh

Hi,

Can you please tell me how can I query all phone numbers of all
Contacts in the Database?
Where can I find some examples for that?

Thank you.
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: How to query all phone numbers of all Contacts in the Database?

2009-06-05 Thread Jack Ha

You can do something like this:

Cursor cursor = managedQuery(People.CONTENT_URI, null, null, null,
null);

if (cursor.moveToFirst()) {
do {

name = cursor.getString(cursor.getColumnIndex
(People.NAME)));
phoneNumber = cursor.getString(cursor.getColumnIndex
(People.NUMBER)));

} while (cursor.moveToNext());
}


--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.



On Jun 5, 12:26 pm, Meryl Silverburgh silverburgh.me...@gmail.com
wrote:
 Hi,

 Can you please tell me how can I query all phone numbers of all
 Contacts in the Database?
 Where can I find some examples for that?

 Thank you.
 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: How to query all phone numbers of all Contacts in the Database?

2009-06-05 Thread Jack Ha

You can do something like this:

Cursor cursor = managedQuery(People.CONTENT_URI, null, null, null,
null);

if (cursor.moveToFirst()) {
do {

name = cursor.getString(cursor.getColumnIndex
(People.NAME)));
phoneNumber = cursor.getString(cursor.getColumnIndex
(People.NUMBER)));

} while (cursor.moveToNext());
}


--
Jack Ha
Open Source Development Center
・T・ ・ ・Mobile・ stick together

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.



On Jun 5, 12:26 pm, Meryl Silverburgh silverburgh.me...@gmail.com
wrote:
 Hi,

 Can you please tell me how can I query all phone numbers of all
 Contacts in the Database?
 Where can I find some examples for that?

 Thank you.
 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: Publishing Paid Apps on Android Market Can Cost You Money

2009-06-05 Thread Marco Nelissen
On Fri, Jun 5, 2009 at 11:43 AM, intbt in...@tacberry.com wrote:


 I don't entirely agree with Google needs to make a profit to handle
 these situations. They take 30% to handle e-commerce, advertise,


Only part of that 30% is used to cover Google's cost, and the rest goes to
the carrier. As I said, Google does not make a profit on app sales.


 distribute, display, etc. If you sold a game to Game Crazy (or similar
 game vendor) they pay you a wholesale price and then re-sell the game.
 30% is probably less than their mark-up,


Exactly, and it's because of this extra mark-up that outfits like that can
provide extra services such as covering credit card chargeback costs.
They've simply factored the average cost of chargebacks in to their mark-up.

--~--~-~--~~~---~--~~
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 Implement the Compass function to my application?

2009-06-05 Thread Georgy

Thanks Brian,

I could use the radar from :
http://code.google.com/p/apps-for-android/source/browse/#svn/trunk/Radar/src/com/google/android

it is very helpful as well

On Jun 5, 3:22 pm, Brian Smith avalo...@caerleon.us wrote:
 It's an object method, not a standalone function, so it would look
 like this (assuming start and end are Location objects):

 float res = start.distanceTo(end);

 As for an example of using SensorManager and SensorListener, I don't
 have anything handy, but there is an example in the API 
 demos:http://developer.android.com/guide/samples/ApiDemos/src/com/example/a...

 If you're looking for a compass display, a good example of that is in
 the Professional Android Application Development book from Wrox.  It
 has both simple and complex compass examples to get ideas from.  I
 don't think Android has any stock widgets for that kind of thing.
--~--~-~--~~~---~--~~
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: Still searching for HOME screen, and more question about ActivityManager

2009-06-05 Thread Max Salley

What do you mean by 'detect home screen'?

On Jun 5, 2:18 pm, sherry syang...@gmail.com wrote:
 I've asked how to detect home screen before. I'm still searching...

 I noticed when I press home button on Android emulator, I got this
 statement in catlog:

 INFO/ActivityManager(584):
  Starting activity: Intent { action=android.intent.action.MAIN
 categories={android.intent.category.HOME} flags=0x1020 comp=
 {com.android.launcher/com.android.launcher.Launcher} }

 so I went to ActivityManager to see if I can find a clue there. Here
 is my findings:

 1. I can not instantiate ActivityManager because it's constructor is
 not public, and it's not a singleton
 2. it has a function called: getRunningAppProcesses sounds promising
 -- would it give me all the running processes?
 3. since I can not instantiate ActivityManager I tried to use one of
 the derived class: RunningAppProcesseInfo to see if I can use it's
 parent methods: getRunningAppProcesses. Nope.

 Am I on the right track or totally lost?

 Thanks,

 Sherry
--~--~-~--~~~---~--~~
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: Publishing Paid Apps on Android Market Can Cost You Money

2009-06-05 Thread Keith Wiley

Happened to me too.  I was pissed off as hell and sent numerous emails
to Google, but in the end I was screwed with no recourse...and of
course the looming threat that it will happen again.  Yay.  Seems to
me it's the CC co's fault, or the original purchaser who bears some
varying responsibility for putting their card at risk of theft, or
whatever.  The one person cannot possibly be considered culpable is
the software developer making ten cents an hour amortized income, but
we're the ones who end up paying for it because we're weak and
powerless.

--~--~-~--~~~---~--~~
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: Still searching for HOME screen, and more question about ActivityManager

2009-06-05 Thread sherry

my app would like to know if the phone or emulator's HOME screen is
displayed either by a way to detect (check some status or so) or
someone notify me (notification to interested parties).

In BREW, registered apps used to receive notifications if the HOME
(idle) screen is displayed. Based on that, apps may act differently.

Cheers,

Sherry

On Jun 5, 2:10 pm, Max Salley msalley@gmail.com wrote:
 What do you mean by 'detect home screen'?

 On Jun 5, 2:18 pm, sherry syang...@gmail.com wrote:

  I've asked how to detect home screen before. I'm still searching...

  I noticed when I press home button on Android emulator, I got this
  statement in catlog:

  INFO/ActivityManager(584):
   Starting activity: Intent { action=android.intent.action.MAIN
  categories={android.intent.category.HOME} flags=0x1020 comp=
  {com.android.launcher/com.android.launcher.Launcher} }

  so I went to ActivityManager to see if I can find a clue there. Here
  is my findings:

  1. I can not instantiate ActivityManager because it's constructor is
  not public, and it's not a singleton
  2. it has a function called: getRunningAppProcesses sounds promising
  -- would it give me all the running processes?
  3. since I can not instantiate ActivityManager I tried to use one of
  the derived class: RunningAppProcesseInfo to see if I can use it's
  parent methods: getRunningAppProcesses. Nope.

  Am I on the right track or totally lost?

  Thanks,

  Sherry
--~--~-~--~~~---~--~~
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] HTC Magic Dev phone

2009-06-05 Thread NTDYLF

Hello all. I received an HTC Magic at the Google IO conference, and
had heard that it is a dev phone, but when I adb shell into it and
type su, I get su: permission denied. If this is not a dev phone,
is it possible to make it one?

--~--~-~--~~~---~--~~
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: Detecting when a MapView is changed (panned or zoomed)

2009-06-05 Thread mscwd01

Im still struggling with this...

I create an overlay and add it to the MapView, then i override the
onTouchEvent to capture all the panning movements made. However, while
this reads all panning movements the map no longer pans. Its as if, I
have replaced the defualt MapView onTouchEvent with my own. How can i
fix this?

On Jun 5, 3:21 pm, mscwd01 mscw...@gmail.com wrote:
 Hi,

 I thought this would have an easy answer but I cant seem to find one.

 Does MapView have a mechanism such as an onChange listener which is
 fired when the MapView is either panned or zoomed?

 I have expermiented with onClick, motion events etc, all are not
 really what i'm after.

 I just need to know when the state of the MapView is changed by the
 user zooming or moving 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] ISSUE: Using ACTION_IMAGE_CAPTURE to save an image and set it to background

2009-06-05 Thread Logik

TAKING SMALL PICTURE IMAGE

I am trying to use the camera intent ACTION_IMAGE_CAPTURE to retrieve
a small bitmap image that I can
  set to an imageview background on the current running activity
screen

Objective of code: User will be able to take a picture of an image
   which will then be displayed on the
current
   activity screen in an ImageView
box

Utilizing: ImageView Class, MediaStore Class, an intent to capture
image,
Bitmap Factory class to convert file string to
bitmap

Pseudo:  1.  Start Camera on top of current activity calling
intent w/ ACTION_IMAGE CAPTURE
 (not really   2.  Take Picture and place image to file
  but...)3.  Take file and store to bitmap (I have no clue
what I'm doing there)
   4.  Set it to the background of the ImageView
to the captured image

ISSUE: Biitmap bm IS NULL AFTER IMAGE IS ASSIGNED
  The picture has been saved to the phone,
 and that part is correct

I need someone to show me how I can set the background of imageNew
  to the stored image

code
ImageView imageNew = (ImageView) findViewById
(R.id.ProductImageView);
Intent imageCaptureIntent = new Intent
(MediaStore.ACTION_IMAGE_CAPTURE);

startActivityForResult(imageCaptureIntent, 1);
imageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT,

Uri.fromFile(new File(NewImage)));
startActivityForResult(imageCaptureIntent, 1);



Bitmap bm = null;
bm = BitmapFactory.decodeFile(New_Image);

imageNew.setImageBitmap(bm);
code

PS. I hope this code is helpful to others looking to do similar
   tasks with small returned images
--~--~-~--~~~---~--~~
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: Publishing Paid Apps on Android Market Can Cost You Money

2009-06-05 Thread Marco Nelissen
On Fri, Jun 5, 2009 at 3:03 PM, Disconnect dc.disconn...@gmail.com wrote:


 If google does ANYTHING with zero expectation of profit, they are
 quite literally behaving illegally. They are a publicly traded company

and as such every action needs to either break even or make a profit
 SOMEWHERE, directly or otherwise.


I am not a lawyer (and I suspect you aren't either), but I doubt that's
true. Google and other companies sponsor many events and charities, when
there are no profits - expected or actual - as a result of such sponsorship.
I also note that you said break even, which is exactly what the app store
does (I never said Google loses money on it, I said Google doesn't make a
profit from it)
In any case, my point is: if you can find another reseller somewhere that
does NOT pass chargeback costs on to you, then I bet that reseller is taking
more than 30% of the sale price.
It's a trade-off. Either you handle these things yourself, or you pay
someone else to do it for it you.

--~--~-~--~~~---~--~~
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: Accessing System Brightness

2009-06-05 Thread Hiro

This is indeed frustrating. however, there's a funny new
wrinkle whenever I use the new cupcake-approved sugar-free method,
the brightness stays after I go back to the home screen. (yay) I seem
to have problems when brightness gets too low though (IE, cant do
anything with the unit ... obviously). So do yourself a favor and put
a lower limit on it ;) I set mine to .1.



On May 28, 12:06 am, Mark android.eggenst...@googlemail.com wrote:
 It must still be possible in 1.5 cupcake:
 - PowerManager can set it
 - Settings - SoundDisplay - Brightness can change it
 - haven't checked Locale
 While the system setting might have privileged access to the API, the
 PowerManager is just a normal program. So how do they do 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
-~--~~~~--~~--~--~---



[android-developers] Re: Still searching for HOME screen, and more question about ActivityManager

2009-06-05 Thread Romain Guy

Home is an application like any other, it does not notify other apps
about when it comes to the front.

On Fri, Jun 5, 2009 at 3:09 PM, sherrysyang...@gmail.com wrote:

 my app would like to know if the phone or emulator's HOME screen is
 displayed either by a way to detect (check some status or so) or
 someone notify me (notification to interested parties).

 In BREW, registered apps used to receive notifications if the HOME
 (idle) screen is displayed. Based on that, apps may act differently.

 Cheers,

 Sherry

 On Jun 5, 2:10 pm, Max Salley msalley@gmail.com wrote:
 What do you mean by 'detect home screen'?

 On Jun 5, 2:18 pm, sherry syang...@gmail.com wrote:

  I've asked how to detect home screen before. I'm still searching...

  I noticed when I press home button on Android emulator, I got this
  statement in catlog:

  INFO/ActivityManager(584):
   Starting activity: Intent { action=android.intent.action.MAIN
  categories={android.intent.category.HOME} flags=0x1020 comp=
  {com.android.launcher/com.android.launcher.Launcher} }

  so I went to ActivityManager to see if I can find a clue there. Here
  is my findings:

  1. I can not instantiate ActivityManager because it's constructor is
  not public, and it's not a singleton
  2. it has a function called: getRunningAppProcesses sounds promising
  -- would it give me all the running processes?
  3. since I can not instantiate ActivityManager I tried to use one of
  the derived class: RunningAppProcesseInfo to see if I can use it's
  parent methods: getRunningAppProcesses. Nope.

  Am I on the right track or totally lost?

  Thanks,

  Sherry
 




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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 cut off a long string in TextView

2009-06-05 Thread Jeff Sharkey

Try android:ellipsize=end on the TextView in XML.

j

On Thu, Jun 4, 2009 at 1:29 PM, Tao grea...@gmail.com wrote:

 Hi All,

 Maybe it is a simple problem for some of you. But how do
 you automatically cut off long strings and add ... to the right end
 in TextViews, like Activity title does?

 Sorry for posting twice coz I didn't see my previous post in the list

 




-- 
Jeff Sharkey
jshar...@android.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: 2D animation with User interaction

2009-06-05 Thread sagar.indianic

Hi, MrChaz.

Thanks for the info.

I have another question. How can we map accelerometer readings to
screen cords. Both systems are completely different. Is there any
function for this??



On Jun 5, 4:28 pm, MrChaz mrchazmob...@googlemail.com wrote:
 To get the accelerometer readings you'll need to implement a listener,
 have a look at the SensorManager.
 As for displaying the images you can do that either in software using
 a SurfaceView or openGL using a GlSurfaceView.

 Checking for intersections can be done when you update the positions.
 The simplest way would to use Rect's based on the image position and
 use the intersects method.

 On Jun 5, 6:03 am, sagar.indianic sagar.india...@gmail.com wrote:

  Hello,

  I want to develop a simple application which will move an image
  accelerometer readings change. How can i implement that? is it
  possible using openGL only??

  Another problem is that how can i get notified when two images
  intersect while animating???

  Thanks for the help
--~--~-~--~~~---~--~~
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: Need tips on BitmapFactory and ImageView Class setting backgrounds

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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 Implement the Compass function to my application?

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: Priority in Messages

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: Append TextViews

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: Append TextViews

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: Append TextViews

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: Music EQ

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: [android-developers]

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: file uri doesn't work for Messaging

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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: Invoking Java function via c

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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 can I gray out a toggle button?

2009-06-05 Thread Numan Ahmed
on sat, 6/ 6/ 2009 numan numan@gmail.com
helllo my friends have a nice day
latest summer fashion  more fashion shows videos
visit us http://www.fashioninfokit.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] Media player problem : got the error (1,-15)

2009-06-05 Thread manoj

Hi friends,

I am playing a progressive streamable content.

I got the error (1, -15).

I am not understanding this. Why the android guys doesn't specify any
reference to all the error codes.

And also, I didn't get any reference to the video file properties ( I
mean the properties that the video file must have to be played
successful like its video codec, video size, fps).

Can any one please help me to solve this issue.

Thanks,
Manoj.


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