[android-developers] Re: Receiving MMS

2010-06-09 Thread mike

hi guys,

does that mean it's not possible???
but there's a permission name Receive_MMS. if it's not possible why do
we need such a permission???

regards,
Randika

-- 
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] Placing a bitmap image in ImageView

2010-06-09 Thread Ericson, Anders
Sounds like you want to change the scale type on the image view. 

http://developer.android.com/reference/android/widget/ImageView.ScaleType.html

/Anders

--
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of pawan nimje
Sent: den 9 juni 2010 19:39
To: Android Developers
Subject: [android-developers] Placing a bitmap image in ImageView

Hi All,

I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50

when i do iv.setImageBitmap(bm) ... only a portion of the entire image is seen 
..How can i see the whole image in the 50 dip by 50 dip ImageView ..

any suggestion will do ..
-- 
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] Dynamically obtaining several instance of a view item defined in layout/xml file

2010-06-09 Thread Ericson, Anders
Hi,

Just inflate from the xml each time you want a new instance of that particular 
view. Like this:

View innerRL = LayoutInflater.from(context).inflate(R.layout.inner_view, null);

/Anders

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of krishna
Sent: den 8 juni 2010 02:37
To: Android Developers
Subject: [android-developers] Dynamically obtaining several instance of a view 
item defined in layout/xml file

I have a relative layout (let's say innerRL place in layout
inner_view.xml) which I wanna add to another layout (main_layout), I
wanna dynamically add multiple instances of innerRL. Specifying
innerRL in xml gives me ease of maintenance (as against doing totally
in the code), however I want to be able to add several instances
dynamically. Using findViewById(resource_id) gives me that particular
instance, should I have to use clone()?

One other approach I see is ArrayAdapter, but it seems overkill.

-Krishna

-- 
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: App disappears from the Market after upgrade

2010-06-09 Thread Scott STEPHEN - Better Contacts
Ian,

What apps ? I will test here from France.

Scott

On Jun 10, 8:09 am, "piemm...@googlemail.com"
 wrote:
> Similar problems here,
>
> Before google did the market 'fix' for 2.1/2.2,  2 of my apps (Torque)
> appeared correctly in the Android Market for Android1.6 and upward
> (The MyTouch 3G as an example), after the upgrade, they are no longer
> visible apart from on Android 2.x+ devices
>
> Regards,
>
> Ian

-- 
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: App disappears from the Market after upgrade

2010-06-09 Thread piemm...@googlemail.com
Similar problems here,

Before google did the market 'fix' for 2.1/2.2,  2 of my apps (Torque)
appeared correctly in the Android Market for Android1.6 and upward
(The MyTouch 3G as an example), after the upgrade, they are no longer
visible apart from on Android 2.x+ devices

Regards,

Ian

-- 
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] Developing HTC touchflo like inteface for android

2010-06-09 Thread Sudeep Jha
Hi,
After seeing HTC touchflo interface for windows mobile phones,
I thought of building the same for my android app.
Can anybody suggest how to go about this for the quick launch buttons
view @bottom of screen?

-- 
Warm Regards,
Sudeep

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

2010-06-09 Thread Sandy
Actually the link I was referring to was horizontalscrollview within a
scrollview (NOT a listview like i mentioned below). Here it is:

http://stackoverflow.com/questions/2646028/android-horizontalscrollview-within-scrollview-touch-handling

This will not work for me because the functionality I desire to have
is a vertical ListView with 100 list items and the selected item will
have few buttons (around 10) which can be scrolled horizontally.

Thanks,
Sandy

On Jun 9, 6:02 pm, Mark Murphy  wrote:
> Sandy wrote:
> > I read in few articles about using HorizontalScrollView within a
> > ListView to achive horzintal scroll within a vertical list item. Has
> > anyone tried this ?
>
> Please provide links.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android Training...At Your Office:http://commonsware.com/training

-- 
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] Best way for web service calls ??

2010-06-09 Thread paulb
I tend to make RESTful requests over HTTP and expect back JSON
results. Everything else seems a bit too heavy.

On Thu, Jun 10, 2010 at 3:15 PM, StillALearner  wrote:
> Hello,
> I have been trying to develop an android application for sometime now
> and i would like to get some suggestion on the best way of making web
> service calls or to be generic the best way of communication between
> the android platform and web server.
> Soap(using Ksoap) and HTTP(using POST) are two methodologies & XML and
> JSON are the two data formats that am aware of,(let me know if they
> are few other options too..) and ,
> i would like to know what is the best option of data transfer when
> i) the data to transfer is Large and less frequent.
> ii) more frequent but less data is being transfered.
>
> Also when it comes to data synchronization between server and our
> app , how is that generally implemented ??
>
> --
> 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] how to develop a site client?

2010-06-09 Thread JUN
Hello all,

How to develop a site client?

i thinks:

1, the site provides the api, webservice, and call this interfaces?

2, create yourself connections,read/write interface, and ui all?

some demos to show 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] How/where to find key used for signing the system.img applications.

2010-06-09 Thread Chris
The problem is i want to access email db from my application, but when
im accessing it im getting permission denial exception. Since email is
a system.img application and the permission set for it is
"signatureOrSystem".
So i need to sign my application with the same key. So the question is
where could i find the key in the frameworkcode.

Thanks in advance.

-- 
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] Best way for web service calls ??

2010-06-09 Thread StillALearner
Hello,
I have been trying to develop an android application for sometime now
and i would like to get some suggestion on the best way of making web
service calls or to be generic the best way of communication between
the android platform and web server.
Soap(using Ksoap) and HTTP(using POST) are two methodologies & XML and
JSON are the two data formats that am aware of,(let me know if they
are few other options too..) and ,
i would like to know what is the best option of data transfer when
i) the data to transfer is Large and less frequent.
ii) more frequent but less data is being transfered.

Also when it comes to data synchronization between server and our
app , how is that generally implemented ??

-- 
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: Placing a bitmap image in ImageView

2010-06-09 Thread pawan nimje
Hi Kumar Bibek,

Can you suggest some method to pre-scale the bitmap.

Thanks.

On Thu, Jun 10, 2010 at 8:24 AM, Kumar Bibek  wrote:

> One tip to save some memory, pre-scale your bitmaps since it's just 50
> by 50. This would save a lot of memory, and if you are loading real
> big images, this can prevent OutOfMemory errors.
>
> Thanks and Regards,
> Kumar Bibek
> http://tech-droid.blogspot.com
>
> On Jun 10, 6:25 am, 楊健  wrote:
> > Try this method:
> >
> >  <
> http://developer.android.com/reference/android/widget/ImageView.html#...)>
> setScaleType( <
> http://developer.android.com/reference/android/widget/ImageView.Scale...>
> ImageView.ScaleType scaleType)
> >
> > Controls how the image should be resized or moved to match the size of
> this ImageView.
> >
> >   _
> >
> > From: android-developers@googlegroups.com [mailto:
> android-develop...@googlegroups.com] On Behalf Of pawan nimje
> > Sent: Thursday, June 10, 2010 2:39 AM
> > To: Android Developers
> > Subject: [android-developers] Placing a bitmap image in ImageView
> >
> > Hi All,
> >
> > I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50
> >
> > when i do iv.setImageBitmap(bm) ... only a portion of the entire image is
> seen ..How can i see the whole image in the 50 dip by 50 dip ImageView ..
> >
> > any suggestion will do ..
> >
> > --
> > 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 athttp://
> 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

RE: [android-developers] Force Close - Debug

2010-06-09 Thread 楊健
Can u paste the detail error log?

Maybe the “myPrefs” is the old reference of the  SharedPreferences,try to 
getSharedPreferences again before read it .I am not sure ,:-)

  _  

From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Jason Hensler
Sent: Thursday, June 10, 2010 12:02 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Force Close - Debug

 

using the sharedpreferences.. my app keeps crashing when i have this code 
active..

 

text.setText((

int) myPrefs.getInt("state", 0)); 

is there anything wrong with this statement?

---

This code is above that line that is error out:

SharedPreferences myPrefs = 

this.getSharedPreferences("muter", MODE_WORLD_READABLE); 

SharedPreferences.Editor prefsEditor = myPrefs.edit();

int stt = AudioManager.STREAM_RING; 

prefsEditor.putInt(

"state", stt); 

prefsEditor.commit();



 

On Wed, Jun 9, 2010 at 8:42 PM, 楊健  wrote:

What about  “SharedPreferences”?

Notice that  the setting will not be delete even if you update your application 
,but when you uninstall the application the setting will be lost. 

 

  _  

From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Jason Hensler
Sent: Thursday, June 10, 2010 10:17 AM
To: android-developers@googlegroups.com
Subject: [android-developers] Force Close - Debug

 

Hello Team,

 

Is there a writeini / readini functions for andriod/ecplise developent? Or what 
is the best way to 'remember' a setting, and then at a later time restore it?

 

Thanks!

 

Jason

-- 

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

-- 
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: Couple questions regarding gestures and system uis

2010-06-09 Thread Josh
Thanks!

On Jun 9, 10:30 pm, Kumar Bibek  wrote:
> Umm, that thing is handled by the default ringtone that you would set.
> When you get a call, that app takes over. I am not too sure about it,
> but as far as I can think, toast is fine, but playing an audio, not
> possible I guess.
>
> Thanks and Regards,
> Kumar Bibekhttp://tech-droid.blogspot.com
>
> On Jun 9, 7:48 am,Josh wrote:
>
>
>
> > Ok, round three if you've got a second 'cause I can't find the answer
> > to this either.  Is it possible to (maybe start a worker thread) that
> > will play audio in when a phone call is coming in (over the normal
> > ring) or is all that off limits too?  It looks like you can show a
> > Toast, but I haven't been able to get any audio going.  Also, can
> > notifications play when a call is coming in?
>
> > On Jun 8, 6:07 pm,Josh wrote:
>
> > > Thanks a ton Mark.  I'm a bit overwhelmed by the amount of new info to
> > > learn and really appreciate the help clearing up some of this stuff.
>
> > > On Jun 8, 5:58 pm, Mark Murphy  wrote:
>
> > > >Joshwrote:
> > > > > I can have a program start up on boot
>
> > > > Yes, you can have a program start up on boot. That's OK if you are using
> > > > it to schedule tasks via AlarmManager or something. Trying to have
> > > > something run forever is not a good design move:
>
> > > >http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-a...
>
> > > > > then begin a background thread
>
> > > > You cannot just have a random thread floating around the ether. It needs
> > > > to be associated with some component (usually an activity or service).
>
> > > > > that will listen to certain system events and when those events happen
> > > > > I could send a notification alert
>
> > > > Most "system events" are broadcast Intents. You do not need to have
> > > > anything start at boot or have any long-running threads for that. Just
> > > > set up BroadcastReceivers, registered in your manifest, that will get
> > > > control on those events and register Notifications.
>
> > > > > (actually, would really like to pop
> > > > > a dialog box or some other view up over what is currently showing on
> > > > > the phone's display)
>
> > > > If you do that, users will attempt to perform anatomically inappropriate
> > > > things to you. Users really dislike being interrupted in the middle of
> > > > their game, phone call, text message, browsing, etc.
>
> > > > --
> > > > Mark Murphy (a Commons 
> > > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > > _The Busy Coder's Guide to *Advanced* Android Development_
> > > > Version 1.6 Available!

-- 
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: Couple questions regarding gestures and system uis

2010-06-09 Thread Kumar Bibek
Umm, that thing is handled by the default ringtone that you would set.
When you get a call, that app takes over. I am not too sure about it,
but as far as I can think, toast is fine, but playing an audio, not
possible I guess.

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jun 9, 7:48 am, Josh  wrote:
> Ok, round three if you've got a second 'cause I can't find the answer
> to this either.  Is it possible to (maybe start a worker thread) that
> will play audio in when a phone call is coming in (over the normal
> ring) or is all that off limits too?  It looks like you can show a
> Toast, but I haven't been able to get any audio going.  Also, can
> notifications play when a call is coming in?
>
> On Jun 8, 6:07 pm, Josh  wrote:
>
> > Thanks a ton Mark.  I'm a bit overwhelmed by the amount of new info to
> > learn and really appreciate the help clearing up some of this stuff.
>
> > On Jun 8, 5:58 pm, Mark Murphy  wrote:
>
> > >Joshwrote:
> > > > I can have a program start up on boot
>
> > > Yes, you can have a program start up on boot. That's OK if you are using
> > > it to schedule tasks via AlarmManager or something. Trying to have
> > > something run forever is not a good design move:
>
> > >http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-a...
>
> > > > then begin a background thread
>
> > > You cannot just have a random thread floating around the ether. It needs
> > > to be associated with some component (usually an activity or service).
>
> > > > that will listen to certain system events and when those events happen
> > > > I could send a notification alert
>
> > > Most "system events" are broadcast Intents. You do not need to have
> > > anything start at boot or have any long-running threads for that. Just
> > > set up BroadcastReceivers, registered in your manifest, that will get
> > > control on those events and register Notifications.
>
> > > > (actually, would really like to pop
> > > > a dialog box or some other view up over what is currently showing on
> > > > the phone's display)
>
> > > If you do that, users will attempt to perform anatomically inappropriate
> > > things to you. Users really dislike being interrupted in the middle of
> > > their game, phone call, text message, browsing, etc.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> > > _The Busy Coder's Guide to *Advanced* Android Development_
> > > Version 1.6 Available!

-- 
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 global is the app market?

2010-06-09 Thread NightGospel
Hi Neilz,

Be one of Asian people, AFAIK, mainland China people they have market
their own, it's name is "安卓市場"(Translation to English is "Android
Market"). Because Google doesn't open Asian area (except for Japan) to
let developers upload paid softwares, they are out of patience and
create one market to play. Their android market has many very qulified
and full-idea softwares I've never seen. But one drawback is that many
of them are Simplified-Chinese only. :(

Their forum: http://hiapk.com/bbs/

NightGospel

On 6月10日, 上午2時27分, Neilz  wrote:
> Hi. I'm UK based and I'm wondering how much of the world can see and
> download my apps from the market?
>
> For example, the chinese market, which I believe is quite large, can
> they see UK or US based apps? Or does some kind of specific
> translation need to be done for this to happen? Or is it a separate
> market place?
>
> 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: java.lang.OutOfMemoryError

2010-06-09 Thread Streets Of Boston
For Bitmaps, calling System.gc() can help quite a bit.
The DalvikVM does not 'see' the raw binary data held by a Bitmap. The
process may be getting close to out-of-memory while the DalvikVM
thinks there is plenty the DalvikVM does not call a garbage
collection when needed.

When an allocation happens and the process runs out of memory...
kablooi.

Calling System.gc() makes sure that the garbage collection is run and
finalizers of de-referenced Bitmap instance are run so that the raw
binary data can be released.

In my experience, it is actually more 'effective' to call System.gc()
just before you start allocating a big Bitmap, causing finalizers to
run of Bitmaps that then clear/release 'hidden' raw binary data. This
cleans up the process-memory beforehand, not after the fact (after an
OOM-error).


On Jun 9, 9:35 pm, Bob Kerns  wrote:
> Carefully study the exception type hierarchy. Error and Exception are
> distinct (and deliberately so). You are not catching OutOfMemoryError.
>
> But catching an OutOfMemoryError and retrying is unlikely to succeed.
> The VM does GC before throwing the error. It's not entirely pointless,
> however -- occasionally a second GC will be able to collect something
> prior GC was not able to, possibly because of running finalizers or
> similar issues.  Putting the call to System.gc() there isn't a
> requirement because of a deficiency in the VM, but rather a
> desperation move for when in desperate straits.
>
> It is quite likely that if that GC call helps, you're doomed to have
> another OutOfMemoryError soon, that you won't recover from.
>
> I'm NOT arguing against doing it, just putting it into context. It's
> survival mode programming.
>
> On Jun 8, 11:39 am, Greg Donald  wrote:
>
>
>
> > I used this sort of code to make sure my bitmaps load:
>
> >     try
> >     {
> >       foo = BitmapFactory.decodeResource( resources, R.drawable.foo );
> >     }
> >     catch( Exception e )
> >     {
> >       System.gc();
> >       foo = BitmapFactory.decodeResource( resources, R.drawable.foo );
> >     }
>
> > In 2.2, it's now failing sometimes and my catch block no longer
> > catches anything.  Why would that be?
>
> > Is there a better way to avoid a java.lang.OutOfMemoryError ?
>
> > Thanks,
>
> > --
> > Greg Donald
> > destiney.com | gregdonald.com- 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: Retrieving Contact Information (Name, Number, and Email) from the Phone book

2010-06-09 Thread asicwizard
The sample app in the SDK -- ContactManager -- shows how do it with
Android 2.0
You might be able to use that figure out how to use the old APIs.

http://developer.android.com/resources/samples/ContactManager/index.html


On Jun 8, 4:59 am, abhay mulye  wrote:
> Hi,
>
> I am working on Android SDK 1.5, I need to read the person name, phone
> number & Email ID from the phone book.
> I searched on forums - net & got some  guidelines to read the contacts & the
> phone number of a person.
> But could not find any way to retrieve the email-id from phone book. So,
> please help me for the same.
>
> thanks,
> Abhay.

-- 
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] Force Close - Debug

2010-06-09 Thread Jason Hensler
using the sharedpreferences.. my app keeps crashing when i have this code
active..


text.setText((*int*) myPrefs.getInt("state", 0));

is there anything wrong with this statement?

---

This code is above that line that is error out:

SharedPreferences myPrefs = *this*.getSharedPreferences("muter", *
MODE_WORLD_READABLE*);

SharedPreferences.Editor prefsEditor = myPrefs.edit();

*int* stt = AudioManager.*STREAM_RING*;

prefsEditor.putInt("state", stt);

prefsEditor.commit();




On Wed, Jun 9, 2010 at 8:42 PM, 楊健  wrote:

>  What about  “SharedPreferences”?
>
> Notice that  the setting will not be delete even if you update your
> application ,but when you uninstall the application the setting will be
> lost.
>
>
>  --
>
> *From:* android-developers@googlegroups.com [mailto:
> android-develop...@googlegroups.com] *On Behalf Of *Jason Hensler
> *Sent:* Thursday, June 10, 2010 10:17 AM
> *To:* android-developers@googlegroups.com
> *Subject:* [android-developers] Force Close - Debug
>
>
>
> Hello Team,
>
>
>
> Is there a writeini / readini functions for andriod/ecplise developent? Or
> what is the best way to 'remember' a setting, and then at a later time
> restore it?
>
>
>
> Thanks!
>
>
>
> Jason
>
> --
> 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: Change background after an Orientation change

2010-06-09 Thread Kumar Bibek
Sure, you have to create a different layout file for the landscape
mode with a different background image in the layout-land folder.

Try searching for it in the docs and you will get an idea on what and
how to do it.
http://tech-droid.blogspot.com/2009/10/orientation-independent-applications.html

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jun 9, 1:08 am, ChadS  wrote:
> I have an image set as my background and when it is vertical, the
> image looks fine.  However, when the orentation is changed, the image
> get streched out.  If there a way that I can change the image based on
> the orentation of the device?

-- 
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: Placing a bitmap image in ImageView

2010-06-09 Thread Kumar Bibek
One tip to save some memory, pre-scale your bitmaps since it's just 50
by 50. This would save a lot of memory, and if you are loading real
big images, this can prevent OutOfMemory errors.

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jun 10, 6:25 am, 楊健  wrote:
> Try this method:
>
>   
> setScaleType( 
>  
> ImageView.ScaleType scaleType)
>
> Controls how the image should be resized or moved to match the size of this 
> ImageView.
>
>   _  
>
> From: android-developers@googlegroups.com 
> [mailto:android-develop...@googlegroups.com] On Behalf Of pawan nimje
> Sent: Thursday, June 10, 2010 2:39 AM
> To: Android Developers
> Subject: [android-developers] Placing a bitmap image in ImageView
>
> Hi All,
>
> I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50
>
> when i do iv.setImageBitmap(bm) ... only a portion of the entire image is 
> seen ..How can i see the whole image in the 50 dip by 50 dip ImageView ..
>
> any suggestion will do ..
>
> --
> 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 
> athttp://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 can i vertically align items in RelativeLayout?

2010-06-09 Thread Kumar Bibek
If you want the views to be below one another, you should be using
android:layout_below and not android:layout_toRightOf.

To align them, use android:layout_alignLeft, or alignRight etc.

Thanks and Regards,
Kumar Bibek
http://tech-droid.blogspot.com

On Jun 10, 3:00 am, Thierry Legras  wrote:
> Hi,
>
> As i am facing limitation of layout depth in my application, i am replacing
> some LinearLayout with RelativeLayout.
> However i am stopped by a supposely very simple issue (but apparantly
> without clean solution regarding 
> thathttp://stackoverflow.com/questions/1499555/android-layout-centering-i...,
> nor in the ApiDemos sample where RelativeLayout are too simple):
>
> How can i align vertically 3 items (in a simple way!) which are on a
> horizontal line with RelativeLayout without ???
>
> does not seem to have any effect at all.
>
> Here is the xml; in this example i would like an icon at left (fixed width),
> a text label in the middle (fixed width) and an edit text on the right
> (remaining space). the problem is that the TextView seems to ignore the
> parameter android:layout_gravity="center_vertical", and seems to be top
> aligned with parent
>
> 
>      xmlns:android="http://schemas.android.com/apk/res/android";
>     android:layout_height="wrap_content" android:layout_width="fill_parent"
>     >
>              android:id="@+id/Add_ImageView_name"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:layout_gravity="center_vertical"
>         android:maxWidth="35dip"
>         android:adjustViewBounds="true"
>         android:scaleType="fitXY"
>         android:src="@android:drawable/ic_menu_edit"
>         />
>              android:id="@+id/Add_TextView_name"
>         android:text="blabla"
>         android:layout_toRightOf="@+id/Add_ImageView_name"
>         android:layout_gravity="center_vertical"
>         android:layout_width="50dip"
>         android:layout_height="wrap_content"
>         />
>              android:id="@+id/Add_EditText_name"
>         android:text="sometext"
>         android:layout_toRightOf="@+id/Add_TextView_name"
>         android:layout_alignBaseline="@+id/Add_TextView_name"
>         android:layout_alignParentRight="true"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         />
> 
>
> Of course i can use marginTop/Bottom and alignTop/Bottom on each single item
> but that's not very clean :(
>
> Any idea?
>
> --
> Thierry.

-- 
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] Any way to make localized resources separate downloads?

2010-06-09 Thread eehouse
It's looking as if my first app will be about 200K in size, English-
only.  Each localization adds about 12K.  So far it's only available
on sourceforge where it has a few hundred downloads and already
volunteers have contributed three translations, so it seems possible
that once it's on the android marketplace translations will nearly
double its size.  That seems wasteful of users' phone storage when
most of them want only one language.  In the PocketPC version the
translations are separately downloadable .dll files -- which sucks for
lots of reasons but does allow users to manage how much space the app
consumes.  Is there any way to mimic this behavior on Android?  For
example, could I have the full-sized app offer to download a one-
language version of itself that would then replace the larger
version?  Or is there a mechanism I've missed close to what .dlls
provide?

Thanks,

--Eric

-- 
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] Images in ListView in wrong places

2010-06-09 Thread 楊健
I meet the same problem when I used a class inherit from  BaseAdapter ,
My solution is set the image every time in BaseAdapter.getView().
I think this is the same of 
if(null!=iv)
iv.setImageBitmap(bmp);
try to comment out the if(null!=iv)

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of julius
Sent: Thursday, June 10, 2010 8:19 AM
To: Android Developers
Subject: [android-developers] Images in ListView in wrong places

Hi,

I have a ListView which has rows that include an ImageView. I am
populating the ImageView with the following code (getting the image
from the SDCard if available):

Bitmap bmp = BitmapFactory.decodeFile(filename);
ImageView iv = getCoverImageView();
if(null!=iv)
iv.setImageBitmap(bmp);

However when I scroll and the images are loaded they seem to turn up
in the wrong places.

The ListView is populated through a CursorAdapter:

@Override
public void bindView(View row, Context ctxt, Cursor c) {
SDIReleaseWrapper wrapper = (SDIReleaseWrapper) row.getTag();
wrapper.populateFrom(c);
}

@Override
public View newView(Context ctxt, Cursor c,
ViewGroup parent) {
LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(R.layout.release_row, parent, 
false);
SDIReleaseWrapper wrapper = new SDIReleaseWrapper(row);
row.setTag(wrapper);
wrapper.populateFrom(c);

return row;
}

and the rows are populated with information from the database through
the wrapper. The TextViews in the rows show up fine, but the
ImageViews seem to have random effects.

I'm not really understanding the process of populating an ImageView in
the row or why the ImageView doesn't know which row to populate with
the image.

If someone could point me in the right direction that would be great.

-- 
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] Re: java.lang.OutOfMemoryError

2010-06-09 Thread Greg Donald
On Wed, Jun 9, 2010 at 9:35 PM, Bob Kerns  wrote:
> Carefully study the exception type hierarchy. Error and Exception are
> distinct (and deliberately so). You are not catching OutOfMemoryError.

That's what Stephen said, but thanks all the same.


-- 
Greg Donald
destiney.com | gregdonald.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


RE: [android-developers] Force Close - Debug

2010-06-09 Thread 楊健
What about  “SharedPreferences”?

Notice that  the setting will not be delete even if you update your application 
,but when you uninstall the application the setting will be lost. 

 

  _  

From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Jason Hensler
Sent: Thursday, June 10, 2010 10:17 AM
To: android-developers@googlegroups.com
Subject: [android-developers] Force Close - Debug

 

Hello Team,

 

Is there a writeini / readini functions for andriod/ecplise developent? Or what 
is the best way to 'remember' a setting, and then at a later time restore it?

 

Thanks!

 

Jason

-- 
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] Force Close - Debug

2010-06-09 Thread Mark Murphy
Jason Hensler wrote:
> Is there a writeini / readini functions for andriod/ecplise developent?
> Or what is the best way to 'remember' a setting, and then at a later
> time restore it?

Use a SQLite database. Or a file (JSON, XML, CSV, INI, whatever). Or a
SharedPreferences.

http://developer.android.com/guide/topics/data/data-storage.html

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

Android Consulting: http://commonsware.com/consulting

-- 
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: java.lang.OutOfMemoryError

2010-06-09 Thread Bob Kerns
Carefully study the exception type hierarchy. Error and Exception are
distinct (and deliberately so). You are not catching OutOfMemoryError.

But catching an OutOfMemoryError and retrying is unlikely to succeed.
The VM does GC before throwing the error. It's not entirely pointless,
however -- occasionally a second GC will be able to collect something
prior GC was not able to, possibly because of running finalizers or
similar issues.  Putting the call to System.gc() there isn't a
requirement because of a deficiency in the VM, but rather a
desperation move for when in desperate straits.

It is quite likely that if that GC call helps, you're doomed to have
another OutOfMemoryError soon, that you won't recover from.

I'm NOT arguing against doing it, just putting it into context. It's
survival mode programming.

On Jun 8, 11:39 am, Greg Donald  wrote:
> I used this sort of code to make sure my bitmaps load:
>
>     try
>     {
>       foo = BitmapFactory.decodeResource( resources, R.drawable.foo );
>     }
>     catch( Exception e )
>     {
>       System.gc();
>       foo = BitmapFactory.decodeResource( resources, R.drawable.foo );
>     }
>
> In 2.2, it's now failing sometimes and my catch block no longer
> catches anything.  Why would that be?
>
> Is there a better way to avoid a java.lang.OutOfMemoryError ?
>
> Thanks,
>
> --
> Greg Donald
> destiney.com | gregdonald.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


RE: [android-developers] How global is the app market?

2010-06-09 Thread 楊健
You must register your application to mmarket of 
ChinaMobile(http://www.mmarket.com/). 

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Neilz
Sent: Thursday, June 10, 2010 3:27 AM
To: Android Developers
Subject: [android-developers] How global is the app market?

Hi. I'm UK based and I'm wondering how much of the world can see and
download my apps from the market?

For example, the chinese market, which I believe is quite large, can
they see UK or US based apps? Or does some kind of specific
translation need to be done for this to happen? Or is it a separate
market place?

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

-- 
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] Placing a bitmap image in ImageView

2010-06-09 Thread 楊健
Try this method: 

 

 setScaleType( 

 ImageView.ScaleType scaleType) 

Controls how the image should be resized or moved to match the size of this 
ImageView.

 

 

  _  

From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of pawan nimje
Sent: Thursday, June 10, 2010 2:39 AM
To: Android Developers
Subject: [android-developers] Placing a bitmap image in ImageView

 

Hi All,

 

I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50

 

when i do iv.setImageBitmap(bm) ... only a portion of the entire image is seen 
..How can i see the whole image in the 50 dip by 50 dip ImageView ..

 

any suggestion will do ..

-- 
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] Problem in getting height of contetn in Webview

2010-06-09 Thread 楊健
Did you show the webview in a activity? If you are not show it the 
getContentHeight() will return 0;

 

Try to call getContentHeight use the WebView reference witch  
WebViewClient.onPageFinished(WebView view, String url) returned.

  _  

From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of brijesh masrani
Sent: Wednesday, June 09, 2010 9:53 PM
To: android-developers@googlegroups.com; android-beginn...@googlegroups.com
Subject: [android-developers] Problem in getting height of contetn in Webview

 

hello,

 

I have a HTML file in a  web view. I want to find the length of the content of 
that HTML file.

I have tried all methods like getContentHeight() and getHeight() but it doesn't 
gave me the exact height which i want.

 

There is one Protected method in View class " computeVerticalScrollRange() " so 
if any one knows how to use this method in webview than please reply.

If there is any alternative to find content height than please let me know.

 

 

-- 
Regards,
Brijesh Masrani

-- 
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] Force Close - Debug

2010-06-09 Thread Jason Hensler
Hello Team,

Is there a writeini / readini functions for andriod/ecplise developent? Or
what is the best way to 'remember' a setting, and then at a later time
restore it?

Thanks!

Jason

-- 
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: EGL initialized failed

2010-06-09 Thread Lance Nanek
One thing to check is to make sure are loading your textures again
when you come back. I use GLSurfaceView, so any EGL stuff is handled
for me, but I know I have to load textures again in
GLSurfaceView.Renderer#onSurfaceChanged, not
GLSurfaceView.Renderer#onSurfaceCreated, which is called less often.
Otherwise I get similar problems. That's sort of similar to your
situation.

On May 24, 4:22 am, JoJo  wrote:
> Hello Everybody,
>
> I used a SurfaceView and EGL to render my 3D contents. When I press
> BACK and return my activity, the activity's 3D objects become to
> white.
>
> The reason is when the original activity(3D activity) resume, EGL
> would initialize again. So EGL would initialize and destroy everytime
> when different activities switch. I am not sure if the problem is EGL
> initialize twice... but I did initialize and destroy EGL correctly.
>
> Anybody have this problem ? Have any solutions about this ??
>
> Thank you so much !!
>
> --
> 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 
> athttp://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] Which way is better for an app to support multiple screens?

2010-06-09 Thread Stanley Li
Hi all,

I have read the topic about supporting multiple screen size as well as
different dpi.

I am wondering which of the following way is better in supporting multiple
screens:

1. have different layout for different screen size (stretch the images)
2. have different set of graphics for different screen (use the same layout)
3 have different set of graphics and different set of layout for each of the
screen

Which way is the easiest? And which way is the most optical way to design?
Or is there another better way?

Thanks,

Stanley

-- 
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] TaskAffinity causes new instance being created when startActivity

2010-06-09 Thread Dianne Hackborn
Why are you using NEW_TASK?  You shouldn't do so unless you  have a good
reason (like you are implementing a launcher).

On Wed, Jun 9, 2010 at 1:10 AM, James Wang  wrote:

> Hi,
> I have a problem about taskAffinity of Activity.
> Activities A and B with the same taskAffinity.
>
> A starts B with FLAG_ACTIVITY_NEW_TASK and the B starts A with
> FLAG_ACTIVITY_NEW_TASK again.
> Dumpsys activity of system gives us task stack like below:
>
> TOP-> A
>  B
>  A
>
> According to SDK's reference to FLAG_ACTIVITY_NEW_TASK, the result is
> supposed to be like below:
> TOP -> A
>   B
>
> If we did not set taskAffinity, A will not be created again but in
> different task stack from B. (A and B are in different Apps)
>
> After a little more research, we found FLAG_ACTIVITY_REORDER_TO_FRONT
> is what we want.
>
> My question is whether SDK' reference to FLAG_ACTIVITY_NEW_TASK is
> wrong?
>
> Thanks,
>
> James
>
> --
> 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
>



-- 
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: TaskAffinity causes new instance being created when startActivity

2010-06-09 Thread James Wang
Can anybody help 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


Re: [android-developers] Re: button background image scaled down by default?

2010-06-09 Thread Stanley Li
lol...I just found out why. It is a stupid mistake.

My background image is 400X100, but I ignored the white space which counts
up to 200 pixel wide. That is why I can't see the whole image filling out
the screen horizontally.

Sorry for my stupid mistake.

Please ignore my question.

Thanks.

Stanley

On Wed, Jun 9, 2010 at 5:05 PM, Stanley Li  wrote:

> Sorry, I have tried all attributes for android:scaleType but it still
> doesn't work.
>
> I tried debugging it using log.d to see the width of the view
>
> int a =startGameB.getWidth();
> int b = startGameB.getHeight();
> log.d(TAG, String.valueOf(a));
> log.d(TAG, String.valueOf(b));
>
> the result is "width = 480px", which is what I want. However, the
> background image is not 480px. It is much smaller than 480px.
>
> Again, the xml for the button is:
>
>  android:id="@+id/start_game_button"
> android:layout_width="480px"
> android:layout_height="wrap_content"
> android:text="@string/Start_Game"
> android:textSize="25dip"
> android:layout_gravity="center_horizontal"
> android:background="@drawable/startgame_button"
> />
>
> How can I change the size of the background image for the button?
>
>
>
> Thanks so much,
>
> Stanley
>
> On Wed, Jun 9, 2010 at 3:10 PM, HeHe  wrote:
>
>> i guess you could try android:scaleType attribute.
>>
>> On Jun 9, 2:06 pm, Stanley Li  wrote:
>> > Hi all,
>> >
>> > I try to make a button with a background image. However, the background
>> > image is scaled down.
>> >
>> > In my xml code, I have:
>> >
>> > > > android:id="@+id/start_game_button"
>> > android:layout_width="480px"
>> > android:layout_height="wrap_content"
>> > android:text="@string/Start_Game"
>> > android:textSize="25dip"
>> > android:layout_gravity="center_horizontal"
>> > android:background="@drawable/startgame_button"
>> > />
>> >
>> > The background image is 400X100. However, when it goes to the screen
>> > (480X854), the image is much smaller than 400 pixel wide.
>> >
>> > If i use an image of 480X100, the image still can't fit the whole
>> screen.
>> >
>> > It seems there is a relationship between layout_width and the size of
>> the
>> > background image. For example, when i set layout_width=700px, the
>> background
>> > image's width is increased but it still can't fit the whole screen
>> > horizontally.
>> >
>> > Can any help me with this?
>> >
>> > Thanks so much.
>> >
>> > Stanley
>>
>> --
>> 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: Strange Media Player Behavior on EVO

2010-06-09 Thread Lance Nanek
SoundPool seems screwed up on the Evo 4G too. On G1/N1/Droid I can
play a sound at low priority, then change its stream to high priority.
This prevents sounds from stopping each other, even when the maximum
streams are reached. The new sound just won't play instead. I think it
is nicer than stopping a sound midway through. This doesn't work on
the Evo 4G, though. It just starts ignoring all new sounds requests,
even if previous ones are long finished, and no sounds get played at
all after the first few.

On Jun 9, 6:50 pm, "info.sktechnol...@gmail.com"
 wrote:
> I create a media player for playing an audio file.
> After it plays for a while I pause it.
> I then seek to a position 5 seconds earlier (the new position) than
> the current position (the old position).
> I immediately call getCurrentPosition and it returns the correct new
> position.
> I have an OnSeekCompleteListener and in it I call getCurrentPosition.
> It returns the old position (before the seek).
> Any additional calls to getCurrentPosition with the media player
> paused
> return the old position.
> When I now call start, it starts playing from the new position,
> and after that, calls to getCurrentPosition are correct.
> Note: all calls are being made by the same thread.
>
> The problem does not occur if I do all of this while the player is
> playing.
> The problem occurs only on my stock EVO running 2.1-update1
> (1.32.651.6).
> It does not occur on my G1 (1.6), Hero (2.1), Nexus (2.1)
> or in the emulator.
>
> Any ideas?

-- 
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] Images in ListView in wrong places

2010-06-09 Thread Mark Murphy
Julius Spencer wrote:
> Would you recommend filling the images via an AsyncTask given they are coming 
> from the SDCard?

Flash reads are relatively quick, so unless you are perceiving scrolling
as being "janky" (to use Brad Fitzpatrick's term), I wouldn't worry
about it.

If you were fetching images on the fly off the Web, that you should do
in an AsyncTask or other form of work queue.

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

Android Training...At Your Office: http://commonsware.com/training

-- 
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] Images in ListView in wrong places

2010-06-09 Thread Julius Spencer
> Well, all I can tell you is that the symptom of "images seem randomized
> when I scroll" usually points to some sort of binding problem.
> 
> Julius Spencer wrote:
>>> Are you sure your SDIReleaseWrapper is pointing to the right
>>> ImageView?
>> Yes I performed a search and the only layout (or xml file for that
>> matter) with release_icon in it is release_row, which I am trying to
>> populate.
> 
> Actually, that doesn't strictly answer my question.
> 
> For example, when you are looking up that ImageView, are you calling
> findViewById() on the row View, or on the Activity? You need to look it
> up on the row -- otherwise, the Activity will return to you the first
> instance of your ImageView with that name it finds in the list.
Genius. (on your behalf - stupidity on mine...)

I had missed out "row."

Sorry for such a silly question...

Thank you once again!

Would you recommend filling the images via an AsyncTask given they are coming 
from the SDCard?

Regards,
Julius.

-- 
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 using adb push

2010-06-09 Thread Jiss
Hello everyone !

I am trying to port PC/SC on my G1 in order to develop on a smartcard.
I am using the SEEK for Android tutorial ( 
http://code.google.com/p/seek-for-android/wiki/UsingPCSC
)

But when I get to

"
Create required directories (/data/pcsc and /data/pcscd) on the device
and copy pcscd and testpcsc to /data/pcsc

$ adb shell mkdir /data/pcsc
$ adb shell mkdir /data/pcscd
$ adb push src/pcscd /data/pcsc
$ adb push src/testpcscd /data/pcsc

"

I simply can't push pcscd and testpcsc to the /data/pcsc folder on the
G1.

I've tried many things as giving all the rights to the folders, or
trying to copy them on an other place on the phone, but I simply
can't. When I push on of them, the console just waits until I
press CTRL + C to abort the operation, then the device is no longer
recognized by the system, I have to unplug it, plug it and restart adb
root.

A thing that is very strange, is that I can push .txt files to /data/
pcsc, but it seems I can't push executable files


Can someone help me please ?


Thanks

Jiss

-- 
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: button background image scaled down by default?

2010-06-09 Thread Stanley Li
Sorry, I have tried all attributes for android:scaleType but it still
doesn't work.

I tried debugging it using log.d to see the width of the view

int a =startGameB.getWidth();
int b = startGameB.getHeight();
log.d(TAG, String.valueOf(a));
log.d(TAG, String.valueOf(b));

the result is "width = 480px", which is what I want. However, the background
image is not 480px. It is much smaller than 480px.

Again, the xml for the button is:



How can I change the size of the background image for the button?



Thanks so much,

Stanley

On Wed, Jun 9, 2010 at 3:10 PM, HeHe  wrote:

> i guess you could try android:scaleType attribute.
>
> On Jun 9, 2:06 pm, Stanley Li  wrote:
> > Hi all,
> >
> > I try to make a button with a background image. However, the background
> > image is scaled down.
> >
> > In my xml code, I have:
> >
> >  > android:id="@+id/start_game_button"
> > android:layout_width="480px"
> > android:layout_height="wrap_content"
> > android:text="@string/Start_Game"
> > android:textSize="25dip"
> > android:layout_gravity="center_horizontal"
> > android:background="@drawable/startgame_button"
> > />
> >
> > The background image is 400X100. However, when it goes to the screen
> > (480X854), the image is much smaller than 400 pixel wide.
> >
> > If i use an image of 480X100, the image still can't fit the whole screen.
> >
> > It seems there is a relationship between layout_width and the size of the
> > background image. For example, when i set layout_width=700px, the
> background
> > image's width is increased but it still can't fit the whole screen
> > horizontally.
> >
> > Can any help me with this?
> >
> > Thanks so much.
> >
> > Stanley
>
> --
> 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] Images in ListView in wrong places

2010-06-09 Thread Mark Murphy
Well, all I can tell you is that the symptom of "images seem randomized
when I scroll" usually points to some sort of binding problem.

Julius Spencer wrote:
>> Are you sure your SDIReleaseWrapper is pointing to the right
>> ImageView?
> Yes I performed a search and the only layout (or xml file for that
> matter) with release_icon in it is release_row, which I am trying to
> populate.

Actually, that doesn't strictly answer my question.

For example, when you are looking up that ImageView, are you calling
findViewById() on the row View, or on the Activity? You need to look it
up on the row -- otherwise, the Activity will return to you the first
instance of your ImageView with that name it finds in the list.

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

Android 2.2 Programming Books: http://commonsware.com/books

-- 
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] Images in ListView in wrong places

2010-06-09 Thread Julius Spencer
Hi Mark,

Thank you for the reply.

> You could use iv.setImageURI(Uri.fromFile(...)).
Oh great, yes I did read that. :)

>> However when I scroll and the images are loaded they seem to turn up
>> in the wrong places.
> 
> Are you doing the image loading in the main application thread, or a
> background thread (e.g., AsyncTask)?
I believe I am using the main application thread - perhaps this would be better 
using a background thread. For the moment though the list is small.

> If you are using a background thread, bear in mind that you may have
> scrolled before the image gets put into the list.
I'll keep this in mind when moving to this method.

> Are you sure your SDIReleaseWrapper is pointing to the right ImageView?
Yes I performed a search and the only layout (or xml file for that matter) with 
release_icon in it is release_row, which I am trying to populate.

> Is your above bitmap-loading code part of populateFrom()?
Yes that is correct:
void populateFrom(Cursor c) {...

There is a unique id in the Cursor (result) I can use to reference the file.

I omitted that the adapter (SDIReleaseAdapter) implements SectionIndexer 
although I'm assuming this won't affect things.

Regards,
Julius.


-- 
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] Images in ListView in wrong places

2010-06-09 Thread Mark Murphy
julius wrote:
> Hi,
> 
> I have a ListView which has rows that include an ImageView. I am
> populating the ImageView with the following code (getting the image
> from the SDCard if available):
> 
>   Bitmap bmp = BitmapFactory.decodeFile(filename);
>   ImageView iv = getCoverImageView();
>   if(null!=iv)
>   iv.setImageBitmap(bmp);

You could use iv.setImageURI(Uri.fromFile(...)).

> However when I scroll and the images are loaded they seem to turn up
> in the wrong places.

Are you doing the image loading in the main application thread, or a
background thread (e.g., AsyncTask)?

If you are using a background thread, bear in mind that you may have
scrolled before the image gets put into the list.

> The ListView is populated through a CursorAdapter:
> 
>   @Override
>   public void bindView(View row, Context ctxt, Cursor c) {
>   SDIReleaseWrapper wrapper = (SDIReleaseWrapper) row.getTag();
>   wrapper.populateFrom(c);
>   }
> 
>   @Override
>   public View newView(Context ctxt, Cursor c,
>   ViewGroup parent) {
>   LayoutInflater inflater = getLayoutInflater();
>   View row = inflater.inflate(R.layout.release_row, parent, 
> false);
>   SDIReleaseWrapper wrapper = new SDIReleaseWrapper(row);
>   row.setTag(wrapper);
>   wrapper.populateFrom(c);
> 
>   return row;
>   }
> 
> and the rows are populated with information from the database through
> the wrapper. The TextViews in the rows show up fine, but the
> ImageViews seem to have random effects.

Are you sure your SDIReleaseWrapper is pointing to the right ImageView?

Is your above bitmap-loading code part of populateFrom()?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | 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] Images in ListView in wrong places

2010-06-09 Thread julius
Hi,

I have a ListView which has rows that include an ImageView. I am
populating the ImageView with the following code (getting the image
from the SDCard if available):

Bitmap bmp = BitmapFactory.decodeFile(filename);
ImageView iv = getCoverImageView();
if(null!=iv)
iv.setImageBitmap(bmp);

However when I scroll and the images are loaded they seem to turn up
in the wrong places.

The ListView is populated through a CursorAdapter:

@Override
public void bindView(View row, Context ctxt, Cursor c) {
SDIReleaseWrapper wrapper = (SDIReleaseWrapper) row.getTag();
wrapper.populateFrom(c);
}

@Override
public View newView(Context ctxt, Cursor c,
ViewGroup parent) {
LayoutInflater inflater = getLayoutInflater();
View row = inflater.inflate(R.layout.release_row, parent, 
false);
SDIReleaseWrapper wrapper = new SDIReleaseWrapper(row);
row.setTag(wrapper);
wrapper.populateFrom(c);

return row;
}

and the rows are populated with information from the database through
the wrapper. The TextViews in the rows show up fine, but the
ImageViews seem to have random effects.

I'm not really understanding the process of populating an ImageView in
the row or why the ImageView doesn't know which row to populate with
the image.

If someone could point me in the right direction that would be great.

-- 
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] Google Maps API: Catching zoom and panning events

2010-06-09 Thread Steve Howard
On Tue, Jun 8, 2010 at 9:03 PM, Raymond Rodgers wrote:

>
>
> On Tue, Jun 8, 2010 at 7:14 PM, Steve Howard  wrote:
>
>> A simple solution is to add an Overlay, override the draw() method, and
>> not actually do any drawing, but simply use the method as a hook to know
>> anytime the map has potentially moved or zoomed.  The problem is, this will
>> get called more often than necessary, so you'll need some custom logic to
>> decide when the viewport has changed "enough" for you to make a new query.
>>  This shouldn't be too difficult however -- you can track the current center
>> and zoom in your Overlay subclass -- and you'd probably need some kind of
>> logic like this anyway.
>>
>> Let me know how that works for you, or if it works at all.
>>
>> Steve
>>
>>
>> Thanks Steve, I eventually came to give that very method a try, although I
> haven't yet decided on how to avoid the excessive updating. I may try to
> find out when the user's fingers are no longer on the touch screen or when
> the trackball (if present) is no longer moved.
>

Yeah, you do have to do some work here, which is unfortunate.  There are
several options, you may already be aware of them.  One is to use
Overlay.onTouchEvent() to detect ACTION_UP events, which could help detect
when touch gestures have finished.  Another is to use a timeout mechanism in
draw() itself.  On each draw() call, you can have a Handler to send a
message at a specified time in the near future, after canceling any other
such previously requested messages.  When you get the message, you know the
user's been idle for that short period of time.
 android.view.GestureDetector uses this approach for long press detection,
among other things -- check out lines 456-7,
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/GestureDetector.java
.


> Can I recommend that a simpler method of doing this sort of detection be
> added in the future? Perhaps an interface/listener combination like many
> other similar cases?
>

I agree with this sentiment.

Steve



>
> Thanks,
> Raymond
>
> --
> 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: Custom namespace using .Net webservice and ksoap.

2010-06-09 Thread Ed
Hi All,

I eventually solved this. What I was missing was the mapping on the
envelope. I had seen this in examples but mistakingly assumed that
this was for handling the response and that it wouldn't effect the
request. The below line of code solved my problem and now all is well.

envelope.addMapping(request.getNamespace(), "MyRequestClass",
MyRequestClass.class);

No doubt I'll have move questions as soon as I have more time to work
on the app.

Ed


On Jun 8, 11:15 am, Ed  wrote:
> Hi All,
>
> I believe I'm having the same problem as Rahul.
>
> Basically I have a .Net webservice that I am trying to call. The
> request contains a complex data type which I have been able to
> replicate and use with KSoap2. Using a proxy I can see the request is
> almost the same as a working call from a flash UI. The difference
> between the working flash call and the failing KSoap2 call is the
>  tag from KSoap is  and .Net is
> refusing to parse this.
>
> Please note that I cannot change the webservice in anyway. The
> solution to this problem has to be via a change to the Android app.
>
> Cheers,
>
> Ed
>
> On Jun 1, 10:25 pm, rrohilla  wrote:> Hi,
>
> > I am calling a web service which has the following request format.
>
> > http://schemas.xmlsoap.org/soap/
> > envelope/" xmlns:ns="http://test.com/2009/08"; xmlns:dat="http://
> > test.com/2009/08/DataContracts">
> >    
> >    
> >       
> >          
> >             
> >                
> >                   Sample Field Data
> >                   
> >                   
> >                      Books
> >                      Both
> >                      MyInfo
> >                      2
> >                      true
> >                   
> >                
>
> >                
> >                   Sample Field Data
> >                   
> >                   
> >                      Clothes
> >                      Both
> >                      MyInfo
> >                      2
> >                      true
> >                   
> >                
> >             
> >          
> >       
> >    
> > 
>
> > Now when I call the web service I get the following error
> > SoapFault - faultcode: 'a:DeserializationFailed' faultstring: 'The
> > formatter threw an exception while trying to deserialize the message:
> > There was an error while trying to deserialize 
> > parameterhttp://test.com/2009/08:data. The InnerException message was 
> > 'Error in
> > line 1 position 463. Element 'http://test.com/2009/08/
> > DataContracts:InFields' contains data of the 'http://test.com/2009/08/
> > DataContracts:anyType' data contract. The deserializer has no
> > knowledge of any type that maps to this contract. Add the type
> > corresponding to 'anyType' to the list of known types - for example,
> > by using the KnownTypeAttribute attributre or by adding it to the list
> > of known types passed to DataContractSerializer.'.  Please see
> > InnerException for more details.' faultactor: 'null' detail:
> > org.kxml2.kdom.n...@43bcb040
>
> > The Request sent is has  i:type="n0:anytype" in each tag which is
> > creating an error in server side. How do T remove the attribute from
> > the XML tag of the request XML for example
> >  should be as
> > 
>
> > Thanks,
> > Rahul

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

2010-06-09 Thread Mark Murphy
Sandy wrote:
> I read in few articles about using HorizontalScrollView within a
> ListView to achive horzintal scroll within a vertical list item. Has
> anyone tried this ?

Please provide links.

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

Android Training...At Your Office: http://commonsware.com/training

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

2010-06-09 Thread Sandy
I read in few articles about using HorizontalScrollView within a
ListView to achive horzintal scroll within a vertical list item. Has
anyone tried this ?

Thanks,
Sandy

On Jun 9, 11:24 am, Sandy  wrote:
> Would it possible to have a gallary inside a ListView?
>
> Thanks,
> Sandy
>
> On Jun 9, 10:01 am, TreKing  wrote:
>
>
>
> > On Tue, Jun 8, 2010 at 9:19 PM, schwiz  wrote:
> > > There has got to be an example of this somewhere in the source code
> > > to Launcher2  or somewhere in the 2.x framework, this is exactly what they
> > > do for contacts in 2.x
>
> > What they do for contacts, I believe, is a PopupWindow, not another ListView
> > embedded in a the main ListView, which I really don't think is possible
> > anyway since you can't have a scrollable item inside another scrollable
> > item.
>
> > --- 
> > --
> > TreKing - Chicago transit tracking app for Android-powered 
> > deviceshttp://sites.google.com/site/rezmobileapps/treking

-- 
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] Strange Media Player Behavior on EVO

2010-06-09 Thread info.sktechnol...@gmail.com
I create a media player for playing an audio file.
After it plays for a while I pause it.
I then seek to a position 5 seconds earlier (the new position) than
the current position (the old position).
I immediately call getCurrentPosition and it returns the correct new
position.
I have an OnSeekCompleteListener and in it I call getCurrentPosition.
It returns the old position (before the seek).
Any additional calls to getCurrentPosition with the media player
paused
return the old position.
When I now call start, it starts playing from the new position,
and after that, calls to getCurrentPosition are correct.
Note: all calls are being made by the same thread.

The problem does not occur if I do all of this while the player is
playing.
The problem occurs only on my stock EVO running 2.1-update1
(1.32.651.6).
It does not occur on my G1 (1.6), Hero (2.1), Nexus (2.1)
or in the emulator.

Any ideas?

-- 
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 do I access alert dialog?

2010-06-09 Thread TreKing
On Wed, Jun 9, 2010 at 3:09 PM, Anu Tripathi  wrote:

> I am trying to grab current alert dialog on the screen. Does anyone know
> how can I do that?
>

If it's one you showed, keep a reference to it.
If it's not one you showed, you probably can't just "grab" it.

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

-- 
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: button background image scaled down by default?

2010-06-09 Thread HeHe
i guess you could try android:scaleType attribute.

On Jun 9, 2:06 pm, Stanley Li  wrote:
> Hi all,
>
> I try to make a button with a background image. However, the background
> image is scaled down.
>
> In my xml code, I have:
>
>  android:id="@+id/start_game_button"
> android:layout_width="480px"
> android:layout_height="wrap_content"
> android:text="@string/Start_Game"
> android:textSize="25dip"
> android:layout_gravity="center_horizontal"
> android:background="@drawable/startgame_button"
> />
>
> The background image is 400X100. However, when it goes to the screen
> (480X854), the image is much smaller than 400 pixel wide.
>
> If i use an image of 480X100, the image still can't fit the whole screen.
>
> It seems there is a relationship between layout_width and the size of the
> background image. For example, when i set layout_width=700px, the background
> image's width is increased but it still can't fit the whole screen
> horizontally.
>
> Can any help me with this?
>
> Thanks so much.
>
> Stanley

-- 
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 vertically align items in RelativeLayout?

2010-06-09 Thread Thierry Legras
Hi,

As i am facing limitation of layout depth in my application, i am replacing
some LinearLayout with RelativeLayout.
However i am stopped by a supposely very simple issue (but apparantly
without clean solution regarding that
http://stackoverflow.com/questions/1499555/android-layout-centering-in-relativelayout-for-custom-listview,
nor in the ApiDemos sample where RelativeLayout are too simple):

How can i align vertically 3 items (in a simple way!) which are on a
horizontal line with RelativeLayout without ???

does not seem to have any effect at all.

Here is the xml; in this example i would like an icon at left (fixed width),
a text label in the middle (fixed width) and an edit text on the right
(remaining space). the problem is that the TextView seems to ignore the
parameter android:layout_gravity="center_vertical", and seems to be top
aligned with parent


http://schemas.android.com/apk/res/android";
android:layout_height="wrap_content" android:layout_width="fill_parent"
>






Of course i can use marginTop/Bottom and alignTop/Bottom on each single item
but that's not very clean :(

Any idea?

-- 
Thierry.

-- 
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] button background image scaled down by default?

2010-06-09 Thread Stanley Li
Hi all,

I try to make a button with a background image. However, the background
image is scaled down.

In my xml code, I have:



The background image is 400X100. However, when it goes to the screen
(480X854), the image is much smaller than 400 pixel wide.

If i use an image of 480X100, the image still can't fit the whole screen.

It seems there is a relationship between layout_width and the size of the
background image. For example, when i set layout_width=700px, the background
image's width is increased but it still can't fit the whole screen
horizontally.

Can any help me with this?



Thanks so much.

Stanley

-- 
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 global is the app market?

2010-06-09 Thread Ken
While I can't speak for other countries, I know people can't find my
app in the Chinese Android Market. A user from Germany told me that he
couldn't see the app either because it's set to copy-restricted due to
some 2.1 glitches.


On Jun 9, 2:27 pm, Neilz  wrote:
> Hi. I'm UK based and I'm wondering how much of the world can see and
> download my apps from the market?
>
> For example, the chinese market, which I believe is quite large, can
> they see UK or US based apps? Or does some kind of specific
> translation need to be done for this to happen? Or is it a separate
> market place?
>
> 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: Submit Android form data to the web via POST

2010-06-09 Thread theSmith
@ko5tik,

I was simply referring to the libraries included with android,
specifically the org.apache.http.* ones.

-chris

On Jun 9, 4:03 pm, ko5tik  wrote:
> You do not need additional libraries, as android already got
> HttpClient
> I do following:
> -%<---
>  httpClient = new DefaultHttpClient();
>
> HttpPost httpRequest = new HttpPost(PUSH_URL);
>  List pairs = new ArrayList();
>  pairs.add(new BasicNameValuePair("name", entry.getName()));
> ...
>
> httpRequest.setEntity(new UrlEncodedFormEntity(pairs));
>
> HttpResponse response = httpClient.execute(httpRequest);
>
> -%<-
>
> On Jun 9, 6:44 pm, theSmith  wrote:
>
> > I saw your entry on stackoverflow 
> > too.http://stackoverflow.com/questions/245/submit-form-with-post-data...
>
> > I would suggest using the Apache libraries (all the http client, get/
> > post, response stuff) and parsing the data your self. If they just
> > wanted a webview the user might as well just open the browser
> > initially.
> > On another note if you really want a webview make sure to enable
> > javascript manually (could be the problem of things not displaying
> > correctly)
>
> > Some pointers with the network communication on Android.
> > Use an AsyncTask to put the network comm on another thread (gets it
> > off the UI thread).
> > Make good use of try-catch blocks and let the user know whats going on
> > when things get ugly (very important to a good user experience)
>
> > If you need some more tips feel free to ask.
>
> > -Chris
> > ---
> > Creator of My College Lifehttp://mycollegelife.org
>
> > On Jun 8, 1:54 pm, datguywhowanders 
> > wrote:
>
> > > I've been searching the web for a way to do this for about a week now,
> > > and I just can't seem to figure it out.
>
> > > I'm trying to implement an app that my college can use to allow users
> > > to log in to various services on the campus with ease. The way it
> > > works currently is they go to an online portal, select which service
> > > they want, fill in their user name and pwd, and click login. The form
> > > data is sent via post (it includes several hidden values as well as
> > > just the user name and pwd) to the corresponding login script which
> > > then signs them in and loads the service.
>
> > > I've been trying to come at the problem in two ways. I first tried a
> > > WebView, but it doesn't seem to want to support all of the html that
> > > normally makes this form work. I get all of the elements I need,
> > > fields for user and pwd as well as a login button, but clicking the
> > > button doesn't do anything. I wondered if I needed to add an onclick
> > > handler for it, but I can't see how as the button is implemented in
> > > the html of the webview not using a separate android element.
>
> > > The other possibility was using the xml widgets to create the form in
> > > a nice relative layout, which seems to load faster and looks better on
> > > the android screen. I used EditText fields for the input, a spinner
> > > widget for the service select, and the button widget for the login. I
> > > know how to make the onclick and item select handlers for the button
> > > and spinner, respectively, but I can't figure out how to send that
> > > data via POST in an intent that would then launch a browser. I can do
> > > an intent with the action url, but can't get the POST data to feed
> > > into it.
>
> > > Anyone have any suggestions?

-- 
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] AudioTrack.flush problem

2010-06-09 Thread ls02
After I call AudioTrack.flush() to flush all cached audio buffers I
cannot resume playback on the same track. I call play() but playback
does not resume. I tried stopping or pausing playback before calling
flush() but it does not make any difference.

-- 
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 do I access alert dialog?

2010-06-09 Thread Anu Tripathi
Hi there,
 as part of automating tests on android app. I am trying to grab
current alert dialog on the screen. Does anyone know how can I do
that?

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: Is it possible to hide installed apps icon??

2010-06-09 Thread ko5tik
IIRC, if you omit:

  

in your application manifest,  laubcher will not show it, but you will
be able to start it with
intent


On Jun 8, 4:02 am, jlc488  wrote:
> I have a situation like this.
>
> I have a "A" app which shows on home screen. When I click this "A"
> app, It will show many other apps which installed or will be installed
> on the device.
>
> But the problem is I only want to show these apps through the "A" app
> only.
>
> Is it possible??
>
> If installing and hiding icons not possible, I can dynamically
> download these apps from my own cloud and load them at the request.
>
> Is this also possible??
>
> Can anyone please guide me some ideas or something??
>
> I'm so lost here and just no clue at all how to start!!!
>
> Thanks in advance.

-- 
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: Submit Android form data to the web via POST

2010-06-09 Thread ko5tik
You do not need additional libraries, as android already got
HttpClient
I do following:
-%<---
 httpClient = new DefaultHttpClient();

HttpPost httpRequest = new HttpPost(PUSH_URL);
 List pairs = new ArrayList();
 pairs.add(new BasicNameValuePair("name", entry.getName()));
...

httpRequest.setEntity(new UrlEncodedFormEntity(pairs));


HttpResponse response = httpClient.execute(httpRequest);

-%<-

On Jun 9, 6:44 pm, theSmith  wrote:
> I saw your entry on stackoverflow 
> too.http://stackoverflow.com/questions/245/submit-form-with-post-data...
>
> I would suggest using the Apache libraries (all the http client, get/
> post, response stuff) and parsing the data your self. If they just
> wanted a webview the user might as well just open the browser
> initially.
> On another note if you really want a webview make sure to enable
> javascript manually (could be the problem of things not displaying
> correctly)
>
> Some pointers with the network communication on Android.
> Use an AsyncTask to put the network comm on another thread (gets it
> off the UI thread).
> Make good use of try-catch blocks and let the user know whats going on
> when things get ugly (very important to a good user experience)
>
> If you need some more tips feel free to ask.
>
> -Chris
> ---
> Creator of My College Lifehttp://mycollegelife.org
>
> On Jun 8, 1:54 pm, datguywhowanders 
> wrote:
>
> > I've been searching the web for a way to do this for about a week now,
> > and I just can't seem to figure it out.
>
> > I'm trying to implement an app that my college can use to allow users
> > to log in to various services on the campus with ease. The way it
> > works currently is they go to an online portal, select which service
> > they want, fill in their user name and pwd, and click login. The form
> > data is sent via post (it includes several hidden values as well as
> > just the user name and pwd) to the corresponding login script which
> > then signs them in and loads the service.
>
> > I've been trying to come at the problem in two ways. I first tried a
> > WebView, but it doesn't seem to want to support all of the html that
> > normally makes this form work. I get all of the elements I need,
> > fields for user and pwd as well as a login button, but clicking the
> > button doesn't do anything. I wondered if I needed to add an onclick
> > handler for it, but I can't see how as the button is implemented in
> > the html of the webview not using a separate android element.
>
> > The other possibility was using the xml widgets to create the form in
> > a nice relative layout, which seems to load faster and looks better on
> > the android screen. I used EditText fields for the input, a spinner
> > widget for the service select, and the button widget for the login. I
> > know how to make the onclick and item select handlers for the button
> > and spinner, respectively, but I can't figure out how to send that
> > data via POST in an intent that would then launch a browser. I can do
> > an intent with the action url, but can't get the POST data to feed
> > into it.
>
> > Anyone have any suggestions?

-- 
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] VideoView continues to play?

2010-06-09 Thread Mark Murphy
Bill wrote:
> Hi,
> 
> I have a ListView with information about videos. Once a row is
> selected, I use a ViewFlipper to show the VideoView. If I go back to
> the listview (I have a button), the videoview keeps playing. How can I
> stop the video and hide the videoview when I go back to the listview?

Call pause() or stopPlayback() on the VideoView, I guess. Those methods
are lightly documented, so you will have to experiment or look at the
source code to see what fits your needs.

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

Android Consulting: http://commonsware.com/consulting

-- 
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] VideoView continues to play?

2010-06-09 Thread Bill
Hi,

I have a ListView with information about videos. Once a row is
selected, I use a ViewFlipper to show the VideoView. If I go back to
the listview (I have a button), the videoview keeps playing. How can I
stop the video and hide the videoview when I go back to the listview?

Thanks,
Bill

-- 
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] about sqlite and sql rownum

2010-06-09 Thread Mark Murphy
Jose Luis Montes wrote:
> Hello!
> 
> I have been using rownum in sql to retrieve a limited set of records per
> query. is there a way to use something like that in sqlite?

Look at the LIMIT clause of a SQL SELECT:

http://www.sqlite.org/syntaxdiagrams.html#select-stmt

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

Android Consulting: http://commonsware.com/consulting

-- 
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 sqlite and sql rownum

2010-06-09 Thread Jose Luis Montes
Hello!

I have been using rownum in sql to retrieve a limited set of records per
query. is there a way to use something like that in sqlite?

What i want is that when I do a query, only retrive 15 records of the table;
the first 15 records of the query (including the sort statement).

Do you have any clue about this?

Thanks in advance!

-- 
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 retrieve android version

2010-06-09 Thread Jose Luis Montes
thank you so much :)

On Wed, Jun 9, 2010 at 9:07 PM, Mark Murphy  wrote:

> Jose Luis Montes wrote:
> > Hello!
> >
> > maybe this question is too easy but I can't find the solution :S
> >
> > how may I know the android version in which my app is running from
> > source code; i want to know if it is 1.5, 1.6, 2.1 (ecclair), 2.2
> (froyo).
>
> Look at android.os.Build.VERSION.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android Consulting: http://commonsware.com/consulting
>
> --
> 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] HTC Incredible Phone Storage and such: This is what i found out and is there a more robust way for future phones?

2010-06-09 Thread Streets Of Boston
This has come up a few times, but it's still not quite clear how to
deal with this in a portable, forward compatible way. The question is
how to deal with images (media) that is stored on the phone's storage
and possibly on a sd-card as well.

This code below shows what i found out:
==
Cursor cur;
String[] projection = new String[]
{ MediaStore.Images.ImageColumns.DATA };
cur = MediaStore.Images.Media.query(getContentResolver(),
MediaStore.Images.Media.getContentUri("phoneStorage"),
projection);
File phoneStorageMount = new File("/emmc");
boolean phoneStorageMounted = (cur != null);
if (cur != null) cur.close();


cur = MediaStore.Images.Media.query(getContentResolver(),
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
projection);
boolean externalStorageMounted = (cur != null);
File externalMount = Environment.getExternalStorageDirectory();
if (cur != null) cur.close();
===

If the phone-storage is mounted, phoneStorageMounted is true. When
querying 'cur', you'll find that the root-directory (mount) of the
phone-storage is "/emmc".

If the external storage is mounted, externalStorageMounted is true.
The root-directory can be obtained in a compatible way using
Envirionment.getExternalStorageDirectory().

If you replace EXTERNAL_CONTENT_URI with INTERNAL_CONTENT_URI, you'll
find that the HTC Desire returns a proper cursor with a number of
rows. It points to images stored in the directory "/system/customize/
resource". But you can't insert or modify anything in this directory.
It is all read-only.


My questions are:
- If phoneStorageMounted, is it safe to assume that the root/mount-
directory is always "/emmc"?
- Is it safe to assume that INTERNAL_CONTENT_URI is never phone-
storage and read-only?

Can a google or HTC engineer chime in on this?
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 retrieve android version

2010-06-09 Thread Mark Murphy
Jose Luis Montes wrote:
> Hello!
> 
> maybe this question is too easy but I can't find the solution :S
> 
> how may I know the android version in which my app is running from
> source code; i want to know if it is 1.5, 1.6, 2.1 (ecclair), 2.2 (froyo).

Look at android.os.Build.VERSION.

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

Android Consulting: http://commonsware.com/consulting

-- 
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 retrieve android version

2010-06-09 Thread Jose Luis Montes
Hello!

maybe this question is too easy but I can't find the solution :S

how may I know the android version in which my app is running from source
code; i want to know if it is 1.5, 1.6, 2.1 (ecclair), 2.2 (froyo).


greetings and thanks in advance!

-- 
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: Updated MultiTouchController.java for simplifying the development of multi-touch applications on Android

2010-06-09 Thread Lance Nanek
Not showing up in a Market app search for "multitouch visualizer" on
my Evo 4G here.

On Jun 9, 8:35 am, luke  wrote:
> OK, I found the problem with running the controller on Android-2.1,
> and updated the code in the android-multitouch-controller project
> linked above.  If somebody could please test on 2.1 and/or 2.0.x I
> would greatly appreciate it, I only have an Android-2.2 device.
> Thanks!
>
> On Jun 9, 7:47 am, luke  wrote:
>
>
>
> > OK, the first review of MultiTouch Visualizer 2 on the Market says
> > that the app only shows one touch point on the HTC Incredible.  It
> > works fine on the Nexus One.  Can anybody please test this on an
> > Incredible for me, or even better, can anyone with an Incredible
> > please put a few Log.i() statements in the code and see how the second
> > touch point is getting lost on the Incredible?  The code for the
> > visualizer (and the controller, you'll need both) is here:
>
> >http://code.google.com/p/android-multitouch-vizualizerhttp://code.goo...
>
> > There's really no reason this should work on the Nexus One and not at
> > all on the Incredible.
>
> > On Jun 9, 7:11 am, luke  wrote:
>
> > > I should add that I uploaded a significantly updated "MultiTouch
> > > Visualizer 2" to the Market that uses this controller.  It now
> > > supports 3+ touch points, and numbers all the touch points according
> > > to their pointer indices.  It also shows the diagonal pinch diameter
> > > so that you can see how the pinch diameter doesn't get affected much
> > > when dual-touch operations snap together in X or Y on Synaptics
> > > devices like the G1 or the Nexus One.
>
> > > I hear the EVO 4G can support some large number of touch points, can
> > > somebody please test this?
>
> > > (...I had to change the package name of MultiTouch Visualizer, because
> > > I managed to lose the keystore password, so the old version is not
> > > there anymore and version 2 is a separate download :-) ...)
>
> > > On Jun 9, 7:00 am, luke  wrote:
>
> > > > If anybody is creating multi-touch apps for Android, you may have
> > > > noticed the MotionEvent class is getting more and more complicated
> > > > over time.  Additionally you may have discovered your code has
> > > > different quirky behavior on different devices (e.g. on Synaptics
> > > > devices, touch-down / touch-up can cause sudden jumps in pointer
> > > > position before the down/up event is received).
>
> > > > I have written a class to simplify the process of writing multi-touch
> > > > applications for Android, and just updated it to Android 2.2 (and to
> > > > handle 3+ touch points on true 2D multi-touch sensors, as present on
> > > > the HTC Incredible and HTC EVO 4G), and moved the project to Google
> > > > Code hosting:
>
> > > >http://code.google.com/p/android-multitouch-controller/
>
> > > > There are numerous advantages to using this controller over trying to
> > > > reinvent the wheel yourself, including simplicity and automatic device-
> > > > space / object-space coordinate conversion for pinch-zoom.  This also
> > > > correctly centers the zoom of a pinch operation on the center of the
> > > > pinch rather than the center of the screen, and supports simultaneous
> > > > pinch-and-drag for more realistic pinching :-)

-- 
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 global is the app market?

2010-06-09 Thread Neilz
Hi. I'm UK based and I'm wondering how much of the world can see and
download my apps from the market?

For example, the chinese market, which I believe is quite large, can
they see UK or US based apps? Or does some kind of specific
translation need to be done for this to happen? Or is it a separate
market place?

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] Re: Urgent response needed.

2010-06-09 Thread Kevin Duffey
Onomp,

I think I get the gist of what you are worried about. I think all of us sort
of have that fear... will Android survive with so many buggy apps out there
and with more and more mom/dad/non-geeky people adopting android phones,
downloading these potentially problem apps, seeing them crash, and get
frustrated and leave... will Android survive through all this? I too have
had this thought from time to time. It is going to happen. People are going
to get android phones, realize they aren't iPhones.. and leave. It already
happens. People are going to see that android devices, while no harder than
other smart phones and offers a lot more to boot, can be difficult at times.
After all, android devices are essentially a dumbed down computer. It runs
multiple things at once, and sometimes those things crash.

There are a few things for you to consider tho, before you give up on
Android as a platform to develop for. First, most PC owners are Windows
users.. and we all know the never ending jokes of blue screens, crashes,
etc. I think most users are familiar with program crashes to some extent. It
will look different in Android.. a Force Close message is not exactly
non-geek friendly, but most users these days will have a rough idea that the
app crashed, and either to restart it, or possibly to go to their computer
and look up the issue. Some people will get pissed and eventually leave. It
will happen. I think what you are possibly overlooking is that the world of
phones has drastically changed the past couple years, but that most end
users have not yet stepped up to them. Billions of cell phones, only a 100
million or so smart phones. Prob < 5% of the world wide market is smart
phones at this point, but it's rapidly changing. It will be a few more years
before the majority of people are used to the idea of a phone that can do
everything their computer can... that you can download apps and play games,
read the news, an e-book, stocks, connect to your email, company vpn, etc.
It's catching on quick tho. So like the 80s and 90s when people slowly
adopted PCs (and Macs to a much lesser extent), the pains we all went
through with blue screens, and random reboots.. we're doing it again with
smart phones, only smart phones are a lot better at handling these issues.
It will just take some time for the mass consumers to get used to this new
way of communicating, playing, using, and understanding the issues that may
crop up.

As for Android going away.. I honestly worried about the same thing. I
thought..man.. there are a LOT of issues with Android as a whole. The market
app is taking too long for updates.. we should be able to better filter
apps.. why not a way to allow us to see only 4 star apps with over 5000
downloads for example? It's a very easy thing to do... google has all the
data, a simple query can pull that info and allow us to get more detailed
filtering on apps we may want ... or want to avoid. But, Android is far from
going anywhere. Despite it's flaws, like others said, it's an evolving
beast. It's going to get a LOT better. Froyo (2.2) in my opinion bumps up
Android devices to beyond iPhone, with the exception of games/music apps and
user interface.

Part of what you are seeing and worried about is what drives iPhone so well.
The user interface on iPhone is the best, period. I personally like the
Android one better, but the majority of people including Android users will
say the iPhone interface is about as easy as it gets. There new iOS4 with
multi tasking should make it better. However, for the same reason a lot of
developers are leaving iPhone for Android.. the openness of Android, we're
going to see a lot of "painful" initial learning curves on the market. I
can't tell you how many threads I see in here and on other android forums of
people who want to write a game, and have no idea what Java is. It's scary
how many developers with almost no experience are coming out of the woodwork
to build a game for Android. It's both scary, yet good too.. because that
means you have a huge interest in the development of Android apps. I bought
my Droid in November, there were 5000 apps on the market. Now there are over
55,000 7 months later. In a year, we'll be up to 150,000 apps. That can be a
good thing IF the market app itself improves and allows more filtering
options, but I am sure you're worried that the bulk of those are going to be
horribly bad apps, and most end users won't know, and will get scared and
return their android phones and thus the android market will shrink.

I think the opposite tho.. I think.. .well, I hope that what we see in
Froyo.. the new google free service that developers can now log in and see
the full stack trace + comments of a crashed app, will only improve in many
ways. The biggest thing that urks me right now with regards to the market is
how fast your app can stop being downloaded based on user feedback. There is
no way to really respond to user feedback in the market... so ev

[android-developers] Re: Receiving MMS

2010-06-09 Thread moneytoo
MMS can't be received the same way as SMS. There's no other official
way in the SDK.

On Jun 9, 4:43 pm, mike  wrote:
> hi guys,
>
> is it possible to receive MMS pro grammatically in Android.
>
> couldn't find a way to achieve this this.
>
> i have successfully on receiving sms messages in android.
>
> this is how i have achieved it
>
>         @Override
>         public void onReceive(Context context, Intent intent) {
>                 // TODO Auto-generated method stub
>                 Bundle bundle = intent.getExtras();
>                 SmsMessage[] msgs = null;
>                 NotificationManager manager;
>                 String[] values;
>                 // String str = "";
>                 if (bundle != null) {
>                         // ---retrieve the SMS message received---
>                         Object[] pdus = (Object[]) bundle.get("pdus");
>                         msgs = new SmsMessage[pdus.length];
>                         String number = null;
>                         String body = null;
>                         String msg[] = null;
>                         for (int i = 0; i < msgs.length; i++) {
>                                 msgs[i] = SmsMessage.createFromPdu((byte[]) 
> pdus[i]);
>                                 number = msgs[i].getOriginatingAddress();
>                                 body = 
> msgs[i].getMessageBody().toString().trim();
>                                 msg = new String[] { number, body };
>                         }
>
> }
>
> like this is there a way to receive MMS??
> your help is greatly appreciated...
>
> regards,
> Mike

-- 
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] Problem in Controlling Audio

2010-06-09 Thread sachin ravi
Just check for user permission for changing audio manager and add in the
AndroidManifest file.

On Tue, Jun 8, 2010 at 11:15 AM, Alok  wrote:

> Hello,
>
> I have some years of experience in C/C++ and bit of Java programming
> in Linux, but I'm new to Android.
>
> For start I'm trying to develop a video player on android. I'm able to
> play the video using the VideoView widget. But when I'm trying to
> control the volume using AudioManager, the application crashes saying:
> "The application Video (process com.android.video) has stopped
> unexpectedly. Please try again."
>
> If it helps : I've downloaded the Android source (ECLAIR) and using
> the sdk directly from the source and I'm using Eclipse 3.1.1. I've
> successfully run the sample apps from the source code.
>
> The following is a snapshot of what I'm trying to do in my code:
>
> [code]
> package com.android.video;
> 
> import android.media.AudioManager;
> 
> public class Video extends Activity {
>   .
>   .
>   private AudioManager MyAudio;
>   .
>   .
>   .
>   MyVolUp.setOnClickListener(new OnClickListener(){
>  public void onClick(View view) {
>MyAudio.adjustStreamVolume(MyAudio.STREAM_MUSIC,
> MyAudio.ADJUST_RAISE, MyAudio.FLAG_PLAY_SOUND);
>}
>  });
>   .
>   .
>
> [/code]
>
> 1. What am I doing wrong here?
> 2. I was going through the Android source and saw that AudioManager
> (even MediaPlayer) are using the native functions for handling audio.
> How can I use those native function (just for experimenting, not
> related to my project) in my application? We can do it using JNI but
> I'm not sure how to use the native functions already there in android.
>
> --
> 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] custom seek bar

2010-06-09 Thread peeyush varshney
Hi,
you just need to set the thumb and progress bar as @drawable/seeker" in xml
file.
and if you want more customization then you have to extend ur class from
View class.

On Wed, Jun 9, 2010 at 2:21 PM, Renuka Deshpande <
renukanil.deshpa...@gmail.com> wrote:

> Hello All,
>
> I am new to android. I want to customize a seek bar like attached
> image.white and brown portions are the images.
> Can anybdy tell me how to do that?
>
> --
> Thanks & Regards,
> Renuka
>
> --
> 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




-- 
Thank & Regards
Peeyush Varshney

-- 
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] Placing a bitmap image in ImageView

2010-06-09 Thread pawan nimje
Hi All,

I have a Bitmap image (bm) and a an ImageView (iv) of 50 by 50

when i do iv.setImageBitmap(bm) ... only a portion of the entire image is
seen ..How can i see the whole image in the 50 dip by 50 dip ImageView ..

any suggestion will do ..

-- 
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: Need help on List Adapter

2010-06-09 Thread Ramesh Sangili
I would like to display the list dynamically filtered by the text input
entered by the user on the textbox. the Problem that I am facing
NotifyDataSetChanged() is refreshing the list based on the text input

On Tue, Jun 8, 2010 at 12:26 AM, Tommy  wrote:

>  Are you getting any errors? what do you mean by NofifyDataSetChanged is
> not working as expected?
>
>
>
> *From:* android-developers@googlegroups.com [mailto:
> android-develop...@googlegroups.com] *On Behalf Of *Ramesh Sangili
> *Sent:* Friday, June 04, 2010 10:58 PM
> *To:* android-developers@googlegroups.com
> *Subject:* [android-developers] Re: Need help on List Adapter
>
>
>
> Any help is greatly appreciated!!!
>
>
>
> Please guys share your thougths
>
> On Sun, May 30, 2010 at 8:01 AM, Ramesh Sangili 
> wrote:
>
> Guys,
>
>
>
>   I am extending BaseAdapter and trying to populate the List Screen on my
> Activity Screen. NotifyDataSetChanged is not working as expected. Please
> find the below snippet of code. Please do let me know your thoughts.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> public void onCreate(Bundle savedInstanceState) {
>
>
>
> super.onCreate(savedInstanceState);
>
>
>
> initialize();
>
> context = this;
>
> config = Config.getInstance();
>
> searchText =  new EditText(this);
>
>
>
> handler = new Handler() {
>
>
>
> @Override
>
> public void handleMessage(Message msg)
> {
>
>
> msgQueueAdapter.notifyDataSetChanged();
>
>
> context.msgQueueAdapter.notifyDataSetChanged();
>
>
> msgQueueAdapter.notifyDataSetInvalidated();
>
> }
>
> };
>
>
>
> searchText.addTextChangedListener( new
> TextWatcher() {
>
>
>
> @Override
>
> public void onTextChanged(CharSequence
> s, int start, int before, int count) {
>
> // TODO Auto-generated
> method stub
>
> Log.d("on text", "String: "
> + s);
>
> loadData(s.toString());
>
> msgQueueAdapter = new
> ListAdapter(context, msgQueueList);
>
> Message msg =
> handler.obtainMessage();
>
> handler.sendMessage(msg);
>
> searchText.bringToFront();
>
>
>
> runOnUiThread(new
> Runnable()  {
>
>
>
> @Override
>
> public void
> run() {
>
>
> msgQueueAdapter.notifyDataSetChanged();
>
>
> searchText.setCursorVisible(true);
>
>
> searchText.setClickable(true);
>
> }
>
> });
>
> }
>
>
>
> @Override
>
> public void
> beforeTextChanged(CharSequence s, int start, int count,
>
> int after) {
>
>
>
>
>
> }
>
>
>
> @Override
>
> public void afterTextChanged(Editable
> s) {
>
> // TODO Auto-generated
> method stub
>
>
>
> }
>
> });
>
>
>
> msgQueueAdapter = new ListAdapter(this,
> msgQueueList);
>
> Log.d("list", "List Display - 1" +
> msgQueueAdapter);
>
>
>
> msgQueueListView = this.getListView();
>
> msgQueueListView.addHeaderView(searchText);
>
>
>
> setListAdapter(msgQueueAdapter);
>
> msgQueueAdapter.notifyDataSetChanged();
>
> this.msgQueueAdapter.notifyDataSetInvalidated();
>
> }
>
>
>
>
>
> --
> 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 ema

[android-developers] Re: Focus problem in GridView inside Dialog

2010-06-09 Thread Piotr Buła
Just for the record, I resolved the problem. The problem was in
ListAdapter, or rather, the way it interacted with the rest of the
program. As a result, call to getItem() triggered unnecessary list
change notification, which caused this weird behavior.

Cheers,
Piotr

On 7 Cze, 19:44, Piotr Buła  wrote:
> H there,
>
> I have a little problem with selecting items that are insideGridView
> that is displayed inside adialog.
>
> What I want to achieve is adialogwindow that shows a grid of images
> that user can select (click on them) and some action is executed. I
> figured I'd just create aGridViewbacked by ListAdapter and set that
> on theDialog. But that causes some problems. Once you scroll the list
> of images, they become unselectable. Using trackball brings the
> selection back to the items and they become clickable again, until you
> scroll the list. This really gives me a headache.
>
> Below is the code I use to create mydialog:
>
> GridViewmyView = newGridView(MyActivity.this);
> myView.setNumColumns(2);
> myView.setAdapter(myImages.getListAdapter());
> myView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
>     @Override
>     public void onItemClick(AdapterView parent, View view,
>             int position, long id) {
>         Log.i(TAG, "onItemClick: ");
>     }
>
> });
>
> DialogmyDialog = newDialog(MyActivity.this);
> myDialog.setTitle("My Cool Images");
> myDialog.setContentView(myView);
>
> return myDialog;
>
> Am I missing something here? The sample code from ApiDemos is not much
> different, except that it does not involve Dialogs, so I'm thinking it
> might be something related toDialogstuff.
>
> Cheers,
> Piotr

-- 
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: Call Log on HTC Hero

2010-06-09 Thread Mark Murphy
Denis Souza wrote:
> Ok, bad choice of words... still, I can generate requests to a the
> call log's content provider. Does that mean that HTC likely replaced
> the content provider with a buggy/restrictive version?

I have always considered CallLog to be read-only. It is only a matter of
time before somebody realizes the problems inherent in it being
read-write (e.g., forging outbound phone call records) and locks it
down. I am rather surprised the core Android team hasn't locked this
down yet.

However, given your apparent symptoms, it is likely that HTC replaced
it, and equally likely that the CTS doesn't test a read-write CallLog
very much.

> If that's the
> case would there be another way to change that data without root
> access?

Probably not.

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

Android App Developer Books: http://commonsware.com/books

-- 
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: StackOverflowError in UI redraw

2010-06-09 Thread Thierry Legras
Ok thanks.
Now the good news is that when i changed my code to
setText(getText(aResID).toString() + anotherString) i don't have any more
the same trace (but as it was not easily reproductible, it is difficult to
say it is completly solved).

The bad news is that when i add also these 2 following lines in my
TabActivity.onCreate to change the tab color:

tabHost.setBackgroundColor(Color.BLACK);

tabHost.getTabWidget().setBackgroundColor(getResources().getColor(R.color.dark_blue));

I have now a systematic crash at startup :( (no mention of CharSequence in
the backtrace)
Does changing the color has anything to do this layout nest level??

Particularly the "tabHost.setBackgroundColor(Color.BLACK);" seems to cause
the crash.


06-09 18:59:42.597: ERROR/AndroidRuntime(3992): java.lang.StackOverflowError
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.text.Layout.measureText(Layout.java:1600)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.text.Layout.getLineMax(Layout.java:654)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.text.Layout.draw(Layout.java:310)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.text.BoringLayout.draw(BoringLayout.java:356)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.widget.TextView.onDraw(TextView.java:3934)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.View.draw(View.java:5838)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.View.draw(View.java:5841)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.View.draw(View.java:5841)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.View.draw(View.java:5944)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.View.draw(View.java:5841)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1538)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.View.draw(View.java:5841)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.widget.FrameLayout.draw(FrameLayout.java:352)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.drawChild(ViewGroup.java:1540)
06-09 18:59:42.597: ERROR/AndroidRuntime(3992): at
android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
06-09 

[android-developers] Re: Call Log on HTC Hero

2010-06-09 Thread Denis Souza
Ok, bad choice of words... still, I can generate requests to a the
call log's content provider. Does that mean that HTC likely replaced
the content provider with a buggy/restrictive version? If that's the
case would there be another way to change that data without root
access?

On Jun 9, 11:08 am, Mark Murphy  wrote:
> Denis Souza wrote:
> > Ultimately it's a database, right? So there must be a way to do it if
> > I have access to the database.
>
> You do not have access to the database.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to *Advanced* Android Development_
> Version 1.6 Available!

-- 
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: Force Close when running AccountManager.get(this).getAccounts()

2010-06-09 Thread PP
Yes you DO need to add
  
in your manifest.
otherwise your application will die with an exception that you can
track in the DDMS perspective of Eclipse

Cheers

On 9 juin, 08:14, Jean  wrote:
> Hi all,
>
>     I tried to retrieve user's gmail address on Android phone using
> AccountManager.get(this).getAccounts(), but got force close when
> running the code in emulator (platform 2.2, API level 8) and Motorola
> Droid handset...
>     Do I need any user-permission in manifest file? what else I might
> be missing?
>
> Thanks much!
> Jean

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

2010-06-09 Thread Dmitri Plotnikov
Hi Vikram,

The data structure in the contacts DB has three levels:
- Contact is an aggregate of RawContacts
- RawContact represents a specific contact data set from a particular source
(e.g. Gmail or Exchange)
- Data contains all contact data: emails, phone numbers, birthday, etc one
data element per row.

When you query the Data table, it is automatically joined with the
corresponding Contact so you can get the aggregate's name and photo ID.

Specifically,

- Lookup by email address: you can use either Email.CONTENT_LOOKUP_URI or
Email.CONTENT_FILTER_URI. Use the latter if you want to search by incomplete
email addresses. This is what email programs use for autocompletion.  In
either case  Email.CONTACT_ID will give you the _ID of the corresponding
aggregated contact.  The result will also include the contact name and photo
ID.

- Phone lookup.  Despite its name, PhoneLookup is not what you need.
 PhoneLookup is a special table used for caller ID in telephony. Try
Phone.CONTENT_FILTER_URI instead, appending the encoded phone number to that
URI.  It behaves just like Email.CONTENT_FILTER_URI.  Phone.CONTACT_ID will
give you the contact ID

- To do a lookup by name use Contacts.CONTENT_FILTER_URI.  In this case _ID
is the contact _ID.

Once you have the ID of the contact you needed, read Data for that Contact
and find rows for phone number, email etc.  This bit is a little tricky
because there might be several email addresses or none, and you will need to
handle all those cases.  If the user has chosen a default email or phone
number for that contact, the corresponding data row will
have IS_SUPER_PRIMARY=1.

I hope this helps.

Cheers,
- Dmitri

On Wed, Jun 9, 2010 at 9:06 AM, Vikram  wrote:

> My application user registers a phone number, name or an email ID with
> my application. Now given one of these, I want to lookup the
> ContactsContract provider and get the others.
>
> Given
> 1. the email: I am querying
> ContactsContract.CommonDataKinds.Email.CONTENT_LOOKUP_URI and getting
> {ContactsContract.CommonDataKinds.Email.CONTACT_ID,
> ContactsContract.Data.DISPLAY_NAME,
> ContactsContract.CommonDataKinds.Phone.NUMBER}. This works.
>
> 2. given the number, I want to use the PhoneLookup.CONTENT_FILTER_URI.
> I can get the name using DISPLAY_NAME, but I cant get the email, so
> I'll have to use the CONTACT_ID. So in this table, does _ID correspond
> to CONTACT_ID?
>
> 3. given the name, I have to use the DATA table, and I can get the
> number. For the email I have to get the CONTACT_ID and read the email
> from where?
>
> Is my assumption that CONTACT_ID can get us name, number, email and
> the contact's picture information correct? Do _IDs correspond to
> CONTACT_ID (of course not at all places, but if a record is about a
> user, can I assume that _ID = CONTACT_ID).
>
> Is there any better way to do this? I do it only once for the whole
> app's lifetime so I can compromise on efficiency for correctness: the
> phone numbers and name inputs to my app can be malformatted, and I
> want ContactsContract to help me out here.
>
> Any suggestions?
>
> --
> 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: Missing apps

2010-06-09 Thread Albert
Yes you are correct, as Froyo isn't and official release yet it blocks
all copy-protected apps...

http://developer.android.com/guide/appendix/market-filters.html

Forward-Locked Applications at the bottom.


On Jun 8, 4:33 pm, Mark  wrote:
> Hi everyone, I've read about copy-protected apps missing on FroYo. I
> think I'm having the same problem with Eclair on my Alltel HTC Hero.
> Some apps I've heard of like Square, The New York Times, etc, I can't
> find in the Market. Any ideas or ways to check?
>
> Thanks,
>
> Mark

-- 
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: .Net Web Service From Android

2010-06-09 Thread crusso
Thanks.  I downloaded the new JAR and imported it into my project.
However, I still get the error can't serialize: vperez.  vperez being
the username I typed in the username edit box.

What am I doing wrong?

On Jun 1, 11:56 pm, Reinhard Weidner 
wrote:
> Seems you used the wrong ksoap package, there is a modified one for
> android
>
> http://code.google.com/p/ksoap2-android/
>
> with that package it works fine.
>
> regards,
> Reinhard
>
> On 31 Mai, 23:03, crusso  wrote:
>
>
>
> > I am trying to call an asp.net web service hosted on our local network
> > from android.
>
> > The ip address and port of where the web service can be located is on
> > 12.102.122.137:5011.  The name of the Web Service Is
> > AppWebService.asmx.  The Web Method is called AuthenticateUser and
> > accepts 2 parameters of UserName and Password.  It returns XML file
> > with some user information such as first name and last name.
>
> > I have read dozens of post trying to get this to work and am still
> > having issues.  I have android 2.1 platform with the update to google
> > maps 4.2.  I also downloaded the KSoap2 file ksoap2-j2me-
> > core-2.1.2.jar.  Below is the code I have so far that I thought might
> > work.  Can anyone let me know where I am going wrong?
>
> > package com.paad.appmobile;
>
> > import java.io.IOException;
> > import java.net.HttpURLConnection;
> > import java.net.MalformedURLException;
> > import java.net.URL;
> > import java.net.URLConnection;
>
> > import android.app.Activity;
> > import android.os.Bundle;
> > import android.widget.*;
> > import android.view.View;
> > import android.view.View.OnClickListener;
> > import org.ksoap2.*;
> > import org.ksoap2.SoapEnvelope;
> > import org.ksoap2.serialization.SoapObject;
> > import org.ksoap2.serialization.SoapPrimitive;
> > import org.ksoap2.serialization.SoapSerializationEnvelope;
> > import org.ksoap2.transport.HttpTransport;
>
> > public class appmobile extends Activity {
> >     /** Called when the activity is first created. */
> >         private Button loginButton;
> >         private EditText userName;
> >         private EditText password;
> >         private TextView loginresults;
> >         private static final String SOAP_ACTION = 
> > "http://12.102.122.137:5011/
> > AppWebService.asmx?op=AuthenticateUser";
> >         private static final String METHOD_NAME = "AuthenticateUser";
> >         private static final String NAMESPACE="http://12.102.122.137:5011/";;
> >         private static final String URL="http://12.102.122.137:5011/
> > AppWebService.asmx";
> >         private Object resultRequestSOAP=null;
>
> >     @Override
> >     public void onCreate(Bundle savedInstanceState) {
> >         super.onCreate(savedInstanceState);
> > //        setContentView(R.layout.main);
> >         setContentView(R.layout.login);
>
> >         loginButton = (Button) findViewById(R.id.login);
>
> >         loginButton.setOnClickListener(new OnClickListener()
> >         {
> >                 public void onClick(View v)
> >                 {
> >                                 // TODO Auto-generated method stub
> >                         login();
>
> >                         }
> >         });
> >     }
>
> >     public void login()
> >     {
> >                 userName = (EditText) findViewById(R.id.username);
> >                 password = (EditText) findViewById(R.id.password);
> >                 loginresults = (TextView) findViewById(R.id.loginreults);
>
> >                 SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
> >         request.addProperty("userName", userName.getText());
> >         request.addProperty("password", password.getText());
>
> >         SoapSerializationEnvelope envelope = new
> > SoapSerializationEnvelope(SoapEnvelope.VER11);
> >         envelope.dotNet = true;
> >         envelope.setOutputSoapObject(request);
> >         HttpTransport androidHttpTransport = new HttpTransport(URL);
>
> >         try
> >         {
> >                 androidHttpTransport.call(SOAP_ACTION, envelope);
> >                 SoapPrimitive resultString =
> > (SoapPrimitive)envelope.getResponse();
> >                 //resultRequestSOAP = envelope.getResponse();
> >                 //String[] results = (String[]) resultRequestSOAP;
> >                 loginresults.setText("Status:" + resultString);
> >         }
> >         catch (Exception ae)
> >         {
> >                 ae.printStackTrace();
> >         }
> >     }
>
> > }
>
> > Any help would be massively appreciated.  I just can't seem to get the
> > correct configuration for the thing to work.
>
> > Thank you in advance.
>
> > crusso- 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 gro

[android-developers] Re: Submit Android form data to the web via POST

2010-06-09 Thread theSmith
I saw your entry on stackoverflow too.
http://stackoverflow.com/questions/245/submit-form-with-post-data-in-android-app

I would suggest using the Apache libraries (all the http client, get/
post, response stuff) and parsing the data your self. If they just
wanted a webview the user might as well just open the browser
initially.
On another note if you really want a webview make sure to enable
javascript manually (could be the problem of things not displaying
correctly)

Some pointers with the network communication on Android.
Use an AsyncTask to put the network comm on another thread (gets it
off the UI thread).
Make good use of try-catch blocks and let the user know whats going on
when things get ugly (very important to a good user experience)

If you need some more tips feel free to ask.

-Chris
---
Creator of My College Life
http://mycollegelife.org

On Jun 8, 1:54 pm, datguywhowanders 
wrote:
> I've been searching the web for a way to do this for about a week now,
> and I just can't seem to figure it out.
>
> I'm trying to implement an app that my college can use to allow users
> to log in to various services on the campus with ease. The way it
> works currently is they go to an online portal, select which service
> they want, fill in their user name and pwd, and click login. The form
> data is sent via post (it includes several hidden values as well as
> just the user name and pwd) to the corresponding login script which
> then signs them in and loads the service.
>
> I've been trying to come at the problem in two ways. I first tried a
> WebView, but it doesn't seem to want to support all of the html that
> normally makes this form work. I get all of the elements I need,
> fields for user and pwd as well as a login button, but clicking the
> button doesn't do anything. I wondered if I needed to add an onclick
> handler for it, but I can't see how as the button is implemented in
> the html of the webview not using a separate android element.
>
> The other possibility was using the xml widgets to create the form in
> a nice relative layout, which seems to load faster and looks better on
> the android screen. I used EditText fields for the input, a spinner
> widget for the service select, and the button widget for the login. I
> know how to make the onclick and item select handlers for the button
> and spinner, respectively, but I can't figure out how to send that
> data via POST in an intent that would then launch a browser. I can do
> an intent with the action url, but can't get the POST data to feed
> into it.
>
> Anyone have any suggestions?

-- 
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] LinearLayout/TextView sizing

2010-06-09 Thread TreKing
On Tue, Jun 8, 2010 at 10:26 PM, Matt (preinvent) wrote:

> The TextView on the right has variable width text, and I want the TextView
> on the left to adjust its size accordingly to as much width as possible.
>

This sounds like a job for weighs. Try setting the right textview weight to
0 ("take up the room you need") and the one on the left to 1 ("take the rest
of the available space").

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

-- 
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] Can webview support iframe.contentDocument

2010-06-09 Thread 岳倫
My Html file have one iframe just like below



I want to use javascript control this iframe.
My code like this

mWebView = (WebView) findViewById(R.id.webview01);
mWebView.setAlwaysDrawnWithCacheEnabled(false);
mWebView.setAnimationCacheEnabled(false);
mWebView.getSettings().setJavaScriptEnabled(true);

mWebView.loadUrl("http://index.html";);
mWebView.loadUrl("javascript:document.getElementById('msloginFrame').contentDocument;";

I want to get document object of ifram but it still alert null.
How can i get document of iframe use javascript?

many thanks in advance
Frank

-- 
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] Change background after an Orientation change

2010-06-09 Thread ChadS
I have an image set as my background and when it is vertical, the
image looks fine.  However, when the orentation is changed, the image
get streched out.  If there a way that I can change the image based on
the orentation of the device?

-- 
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] Source Download Issue

2010-06-09 Thread Andrew Brampton
Tell us what you have tried and what exactly you typed to get that
error message.

On 9 June 2010 16:47, HAROON RASEED  wrote:
> Hi
>
> I am new to android development. I try to download source code from
> "http://android.git.kernel.org/";. Its always through the error.
> fatal: The remote end hung up unexpectedly
>
> Please help me how to down load the code from repository.
>
> Thanks in Advance .
>
> Regards
> Haroon
>
> --
> 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: Unknown RPC while calling my ASE method in Python Script

2010-06-09 Thread Damon
You're better off asking ASE related questions on the ASE dedicated
list: http://groups.google.com/group/android-scripting

On Jun 4, 8:43 am, Shyam  wrote:
> HI,
> I facing difficulty in adding a contact in the contact book. The exact
> code that i gave in the python script is
>
> 1)
> import android
> import time
>
> receiver = android.Android("2")
> # Adding contacts to the Emulator
> receiver.addContact("Shyam","5554")
>
>        Here only the number is getting added but NOT the name.

That sounds like a bug. Please file an issue:
http://code.google.com/p/android-scripting/wiki/Issues?tm=3

> 2) And the second Query is i have created a method named
> addNewContact() in ContactsFacade.java.
>     When i try to invoke that method, i getting "Unknown RPC" while
> calling this method in Python Script.

Without seeing your new code, it's difficult to know why you're
receiving that error.

> Please guide me with the solution for the above two problems.

-- 
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] Validating PBAP server profile

2010-06-09 Thread vikram
Hi All,
I am trying to validate PBAP server profile on my dev board, i am
using PTS tool to validate.
I am using  Android Éclair  version. Actually  for PTS tool i am able
to search PBAP service ; "sdp tool browse local" also give PBAP
service record. But i am not able to connect to PBAP server ; OBEX
connection is getting error.
1) Is there any thing i have to add while compiling to support PBAP
service
2) How can i check whether PBAP server is running or not; in process
list i am able to see Bluetooth service

Please help me in enabling PBAP server for Éclair.

Thanks
Vikram

-- 
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] Accessing Dynamic TextView

2010-06-09 Thread Jeremy
Hi,
I'm new to this Android stuff (and to Java).

I have created a table with 2 rows in it. Each row has 5 TextViews
with a default text of 0.
There is also a button outside of the table.

I am trying to figure out how to update each of the TextViews in each
row on each successive press of the button.
So on the first press of the button the first TextView in the first
row should update to 1.
On the second press of the button the second TextView in the first row
should update to 2...etc.

I can't figure out how to do this programmatically without having to
code it all - is it possible?
Basically I guess I need to build up the ID of the TextView
dynamically.
So if the TextViews have ids as item1, item2, item3 etc.
Then I need to build up the findViewById(R.id.item + i);
Obviously this is not possible but is there a way to do this?

Thanks,

Jeremy

-- 
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] Maybe a bug In LauncherModel.java function bindWorkspace()

2010-06-09 Thread foxbei
Hi when we look into code LauncherModel.java function bindWorkspace()
for below code snap
// Wait until the queue goes empty.
mHandler.postIdle(new Runnable() {
public void run() {
if (DEBUG_LOADERS) {
Log.d(TAG, "Going to start binding widgets
soon.");
}
}
});
Can someone explain why we need this wait,I think this maybe cause bug
in qwerty phone.
Any help is appreciate.

-- 
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] Orientation sensor battery usage

2010-06-09 Thread Jeremy Statz
Hey there folks, I almost have to be doing something wrong here but
can't find any explanation so far...

Basically, I have a live wallpaper on the market that has an option to
make use of the orientation sensor for camera movement.  Battery usage
noticeably suffers when this option is turned on, and when my
attention was drawn to it I went to fix it.  I've been using the
battery usage screen for reference -- when this option is disabled, my
wallpaper doesn't even show as a blip.

The problem is it looks to me like things are in order... at onCreate
and onResume I register as a listener (with frequency set to normal).
At onPause I unregister.  I've wrapped the sensor setting into a
single function, and log prints in that location indicate that when
the wallpaper isn't visible I have unregistered, and that when the
phone's put to sleep I have unregistered.  This all seems like logical
behavior, as obviously if my wallpaper's not being rendered I've got
no interest in the sensor.

Despite that, my battery usage shows as enormous (90%+!), even if the
phone's done nothing but sit on the table asleep for 20 minutes... in
which case the listener should've been unregistered the whole time.
After a while I even put in a counter to make sure I'm not registering
more often than unregistering, and that seems to check out as well.

Is there something I need to do besides
sensorManager.unregisterlistener() to let go of the sensor?  Is there
some complexity to this besides registering/unregistering?  I'm
testing on an HTC Incredible.

(Sorry for the lack of code sample, I'm on the wrong machine right now)

-- 
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] Ubale to add artist to media provider

2010-06-09 Thread gadjou
I have succesfully added an audio file to the media provider. However,
I can't see it neither from "artists", "Albums" or "Songs from the
audio player". I can see and play it from the "recently added"
playlist. The album and artist tags are correct there.

To solve it I tryed to add a corresponding artist to the media
provider:

-
...
import android.provider.MediaStore.Audio.Artists;
...
ContentResolver contentResolver = mContext.getContentResolver();
ContentValues values = new ContentValues(1);
values.put(Artists.ARTIST, "test");
Uri urialbum = contentResolver.insert(Artists.INTERNAL_CONTENT_URI,
values);
---

Unfortunatly it result in "java.lang.UnsupportedOperationException:
Invalid URI content://media/internal/audio/artists".

What is wrong here? Is it the correct way to solve my problem?
Thanks
Jérô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] Raw file system access.

2010-06-09 Thread sohel Cuetian
HI all,

I am doing a feasibility study. I just need to know is there any way
(API) to get physical address of a file in the file system (memory
block) of the phone and write that memory block with different bytes?
Should I concern about YAFFS here? I also need to get the physical
address of db files. Please help me. Thanks in advance.

-- 
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] broken pipe exception

2010-06-09 Thread ravish mahajan
hii
  i am making a application based on remote desktop protocol
in that i am getting a error broken pipe exception
is this the error of emulator /network whther i have to port the code
in device
please guide 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] VirtualKeyboard not updating EditText

2010-06-09 Thread Gabriele Cardosi
Hi all,
hope not to post an already answered question, but i didn't find it
searching in the forum.
My problem is:
I have two edit text on an activity, the first does not have any
filter, the second is "inputType:"number".
When I click on this second, the virtualkeyboard appear, but when I
click on numbers only the first one appear on the edit text. Then,
when I hide the virtual keyboard, all the numbers I have clicked
appear.
The worst is that:
1) this does not happen when I use version 1.5, but only with
following version;
2) this does not happen with the other edittext;
3) when using the "real" keyboard, there is no problem;
4) I have also tried copying the same xml settings from the "working"
edittext, with no success.
5) my last try was to intercept the key pressed with OnKeyListener,
manually setting the text with the pressed char, but even with that
the edittext got updated only AFTER the virtualkeyboard disappear;
6) on some posts I read that maybe the problem is that virtual
keyboard events does not flows exactly like the "real" keyboard ones,
but I could not get further.
Any help will be GREATLY appreciated.
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] Android/Java Developers Wanted - Portland, OR

2010-06-09 Thread Brian Hochhalter
Android Developers,

I didn't see any rule against circulating job opportunities, so hope that I am 
OK doing this. I am a recruiter (been doing this for 30 years) and this is 
initially a  contract position. It could possibly convert to direct employment. 
Please contact me (contact info below) if you've any questions or would like to 
apply. Thank you.

ANDROID Application Developers/Architects
Multiple Openings
WORK LOCATION: Portland, OR
TYPE OF WORK/DURATION:Contract4-6 months (possible extension)

Description
Join a creative group of engineers and developers in Portland, Oregon that are 
leading the way in the development of mobile device applications. Experience 
developing complex Android apps that access remote web services and access 
large amounts of data is desired. For this position we are looking for an 
Android Mobile Application Architect (Java).

Skills/Experience:
* Java skills
* Experience building complex Android standalone client applications and user 
interfaces
* Web service technology and services expertise
* Expert knowledge of the Android SDK
* BS in Computing Science or related field preferred

Desired:
* Additional mobile application development experience (iPhone, Blackberry, 
Windows Mobile, Symbian, etc)
* One or more published Android application


Thank you,
Brian

Brian Hochhalter
Pacific NW Area Manager
Direct: (714) 986-5575
Mobile:(503)-349-4159
www.AmtecHC.com
Amtec Resource 
Center
[cid:image005.jpg@01CB07AF.049ADBC0][cid:image006@01cb07af.049adbc0]

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