[android-developers] Re: Custom List View

2010-12-02 Thread Doug


On Dec 1, 10:05 pm, Android Humanoid droid.hu...@gmail.com wrote:
 Hi All,

 I have custom list view in which each list item has
 1. an ImageView
 2. a TextView and
 3. a WebView

 I made webview invisible by default, when the list item got selected
 am making the web view visible of the corresponding list item but when
 am moving down the webview is not getting invisible of the previous
 list item that i have visited.

You'll probably want some member variable to hold the position of the
list item that needs to have its webview shown, update that on
whatever event that would require it to change, then notify the
adapter backing the listview every time this member variable changes.
Refreshing the adapter in this way will cause all your other visible
list item views to be rebuilt via the getView method on the adapter.
You will have to specifically set the visibility of the webview in for
each item in the view, especially if you are allowing views to be
recycled.

Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] After I added ACTION_SEND in my Activity intent-filter, how can I still use android build-in email app??

2010-12-02 Thread xi developer
I know I can use android build in email app when I use the intent with
ACTION_SEND, there is no problem for me. The problem comes after I
defined the ACTION_SEND in my AndroidManifest.xml like follows:

activity android:name=.activity.myActivity
intent-filter
action android:name=android.intent.action.SEND /
category
android:name=android.intent.category.DEFAULT /
data android:mimeType=image/png /
/intent-filter
/activity

Since I would like to see my own app to be added in the share option
list when user click share in the gallery, I have to define the
above intent-filter in my AndroidManifest.xml.

After I defined the above configuration in AndroidManifest.xml,
whenever I call Intent emailIntent = new
Intent(Intent.ACTION_SEND);, my android app will go to call
myActivity instead of calling android build in email app.

All of the above is understandable, my question is how to keep my
configuration in AndroidManifest.xml as above (that's keep my app
shown in the share option list when user click share in gallery),
MEANWHILE, I can call the android default email app???

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Displaying unicode in a TextView?

2010-12-02 Thread Bob Kerns
AIIY

You might want to check the documentation before you make such
statements: 
http://developer.android.com/intl/de/reference/java/lang/String.html#String(byte[])

Do *NOT*, under *ANY* circumstance, omit that second argument.

Just because it works, TODAY, on YOUR device, does not make this
correct programming.

Your conclusion, however, is correct - char-at-a-time conversion
cannot work in all cases, and byte-at-a-time is even worse. You really
do have to treat it as a byte stream. Just make sure you nail down the
encoding of that byte stream.

For more on this, see the last few items on my blog:

http://bobkerns.typepad.com/bob_kerns_thinking/2010/12/yet-more-about-utf-8-the-evils-of-platform-defaults.html

In addition to that article, note the subsequent link to the Oracle
site. Among many other topics, that article discusses the new (as of
Java 5) APIs to handle conversion of surrogate characters properly,
and this is an area where char-at-a-time encoding fails.

On Dec 1, 4:51 pm, HippoMan hippo.mail...@gmail.com wrote:
 I should clarify that I now don't need to do this:

     String content = new String(bytes, UTF-8);

 This is because java's default is unicode. I get the same result with
 or without the second argument to the String constructor.

 I now see that my original error resulted because I was converting to
 individual chars and appending them one-by-one, instead of dealing
 with a mass of bytes, which then could have been properly converted to
 unicode.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Localization: no compression... huge APK...

2010-12-02 Thread Pent
Thanks for the info.

Pent

On Dec 1, 9:45 pm, Dianne Hackborn hack...@android.com wrote:
 Fwiw, there is nothing that intrinsically requires the resource table to not
 be compressed.  This is done because it allows it to be mmapped instead of
 loaded into RAM, which can be a lot more efficient at run time.

 If you want to, you can massage the .apk with a zip tool so that
 resources.arsc is compressed instead of stored.  If the resource table is
 only 200k, the overhead of loading the whole thing into RAM for each app
 using it is not that significant...  but on the other hand, I don't see 200K
 as being all that big to get upset about either or go to extreme effort to
 avoid. :}

 And I generally wouldn't recommend people start compressing their resource
 table -- that part of your .apk is generally loaded into at least 3
 processes (your own, launcher, and the system), so being able to mmap it is
 a big win.

 Also if you target API level 7 or higher, resource strings are stored as
 UTF-8 instead of UTF-16 which will generally halve the space needed by them.



 On Wed, Dec 1, 2010 at 1:05 PM, Pent tas...@dinglisch.net wrote:
  Course, as soon as I post I solve it :-)

  The perl script to do all the munging wasn't outputting utf-8.

  Pent

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

 --
 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: App freezes when the power key is pressed

2010-12-02 Thread Eyvind Almqvist
Thanks Yahel! I removed the  call to setRunning(false) from onPause()
and this fixed the power key and USB cable problems. SonyEricsson
tested the app, but there was one remaining problem.

When they rotate the screen several times, the screen turns black and
sometimes the message “Sorry! Activity XXX(in application XXX) is not
responding” pops up. I can not reproduce this on my Samsung galaxy S,
but they say that it occurs on  SonyEricsson X10, X10 Mini, X10 Mini
Pro, X8. They say that it reproduced easier on Android 1.6 than 2.1.
Do you have any idea how I can fix this rotation problem?


On 30 Nov, 20:25, Eyvind Almqvist eyv...@mobile-visuals.com wrote:
 The only object I create in onCreate() is the view. I do this with

  mView = (MView) findViewById(R.id.mid);

 I found one thing with the drawing loop and the setRunning() method
 that maybe causes the  problem. I can't test onmySamsung device,
 since I can't reproduce the problem there, but I will send a new
 version of theappto SonyEricsson tomorrow so they can test it. Hope
 it works out this time

 On 30 Nov, 18:33, Yahel kaye...@gmail.com wrote:



  Ok that's weird.
  If you have nothing in your onStart and your onResume sets the loop as
  running for your drawing loop, then that is where you should have a
  look.

  Myguess would be that the restarting of your looping via setRunning
  doesn't do what you think and that it is just not restarting at all so
  that you don't have any drawing going on.

  Or maybe you are creating objects in your onCreate method that get
  destroyed when your apps looses focus and that are never recreated
  again because onCreate is only called the very first time you launch
  your activity.

  First thing would be to Log.e(drawing,I'm drawing) in your thread
  drawing loop.

  Yahel

  On Nov 30, 10:50 am, Eyvind Almqvist eyv...@mobile-visuals.com
  wrote:

   After I  insert the USB cable, there is three options “1. Connect your
   phone. 2. Install PC Companion. 3. Charge phone.” No matter which
   option I have selected, theappwill just freeze without any message.

   When I press thepowerkeyto go topowersave mode and then press it
   again to resume the application, theappwill just freeze without any
   message.

   I test by doing lots of screen orientation changes, like you
   recommended.But I can not replicate the freezing problem onmySamsung
   galaxy. I don't have the SonyEricsson X10 and X8 devices to test on. I
   try to simulate apowerkeypress on the emulator, by pressing the
  powerbutton. I debug and onKeyDown is called, but onpause() and
   onResume() is not called.
   Doesn't onpause() and onResume() get called when thepowerkeyis
  pressed? I can not simulate insertion of a USB cable on the emulator.

  MyonStart method only call the superclass, so I don't see how an
   exception could be raised here.MyonResume method also sets the
   graphics thread to setRunning(false), which means that the thread will
   continue, but it will not
   execute the drawing loop.

   On 29 Nov, 19:16, Dianne Hackborn hack...@android.com wrote:

What do you mean your appfreezes?  This is not a typical failure case
when pressing thepowerbutton. :}

On Mon, Nov 29, 2010 at 10:05 AM, Eyvind Almqvist 
eyv...@mobile-visuals.com

 wrote:
Myappfreezeswhen thepowerkeyispressed. This happens on
 SonyEricsson X10 and X8, but not on Samsung Galaxy S. This is what
 happens:

 1)Launch the application-Presspowerkey- Presspowerkeyagain to
 activeapp-Appfreeze.

 Theappalsofreezeswhen the USB cable is inserted, like this:

 2)Launch the application- Insert USB cable-Message pops up and click
 any option to continue-Appfreeze.

 I am distributing apps to SonyEricsson's Playnow appstore. They have
 reported this as error, so I have to fix this. Does anyone have an
 idea how to fix this? I have already followed all the advices in
 Designing for Responsiveness on

http://developer.android.com/guide/practices/design/responsiveness.html

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

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

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

- Visa citerad text -- Dölj citerad text -

  - Visa citerad text -- Dölj citerad text -

 - Visa citerad text -


Re: [android-developers] Cannot access SIM phonebook

2010-12-02 Thread zou chuanwei
Hi,
  you can check if you have added android.permission.READ_CONTACTS in the
AndroidManifest.xml.

2010/7/13 Fabrizio Gennari fabrizi...@gmail.com

  Hello.

 I am trying to read and write contacts on the SIM phonebook.

 First I tried writing a contact with GetContentResolver.insert(), passing
 RawContacts.CONTENT_URI as URI and ensuring the column
 RawContacts.ACCOUNT_NAME had the value SIM, and adding 2 lines (1 for4
 name and 1 for phone) to Data.CONTENT_URI, linked by contact ID. This seemed
 to work: the contacts showed in the contact list with the SIM logo next to
 them, but they wouldn't survive a reboot... apparently that's just a
 placeholder in memory, which is synced with the real SIM at startup and at
 every change.

 Then I tried reading the list of contacs on the SIM with

Cursor cur = getContentResolver().query(
Uri.parse(content://icc/adn)
,null
,null
,null
,null
);

 This fails with a NullPointerException on a real phone. On the emulator, it
 returns a Cursor with 0 lines. This sounds likely.
 Strangely, accessing content://icc/fdn and content://icc/sdn both work,
 both on emulator and on phone.

 Finally, I tried writing a contact with

ContentValues values = new ContentValues();
values.put(name,Name Of Contact);
values.put(number, +7);
Uri uri = getContentResolver().insert(
Uri.parse(content://icc/adn)
, values)
;

 This returns a null URI and no contact is inserted.

 What's wrong there, and what's the right way of doing this?

 Regards,
 Fabrizio

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

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

[android-developers] Custom double-drawable button

2010-12-02 Thread Lukasz Mosdorf
Hi,

Im working in a project, where very often I have to use a button
containing two images and a text between them. The images and text are
ment to be set only from xml. How to design my own component so that
usage would look like this:

MyOwnButton
imageLeftSrc = @drawable/arow1
imageRightSrc = @drawable/arow2
text = some text /

Normally i just create an RelativeLayout with these elements and make
it clickable, but im shure theres a way to specify only the parameters
i want.

regards
Luke

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Dumping the results of DefaultHttpClient.execute()

2010-12-02 Thread Bob Kerns
Indeed so! Definitely more convincing.

But given the request made, you should be able to capture the XML
using wget or curl.

I'm just trying to offer you alternatives to getting there, hoping one
of my ideas might make things easier for you.

If it's a matter of not matching a spec, as opposed to not being able
to parse it, that eliminates several of my thoughts as to cause.

Does their spec indicate it makes use of XML namespaces? If so, have
you called setNamespaceAware(true) on the XmlPullParserFactory?

If this is a SOAP response, the data you expect may be buried down a
level (or two, I forget; I guess it's been a while since I dealt with
SOAP!).

On Dec 1, 4:46 pm, Bret Foreman bret.fore...@gmail.com wrote:
 Bob,

 The server side is enterprise stuff - code that has been around for at
 least a decade. I have no idea how the server-side engineers are
 generating their XML, nor do I want to know. But what I've observed is
 that the XML tree in the data I receive sometimes does not match the
 documentation. In those cases, I need the enterprise people to fix
 either the docs or their code. Either way, the best way to get them to
 do that is to show them the actual XML received by the phone.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 tablet downloading problem

2010-12-02 Thread Narendra Bagade
Hi All,

I am downloading content on my tablet using ftp  with wifi  connection  .
Once i download one content ,device wifi connection get disable.

Ianyone can help me how to persist wifi connection evene i am download
number of content.

-- 
Regards,
Narendra
.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] android tablet downloading problem

2010-12-02 Thread Kostya Vasilyev

Specifically for WiFi, hold a WiFi lock:

http://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock.html

Most likely, though, your device is going to sleep, which causes WiFi to 
be disabled after a certain time. To keep the device awake, hold a WakeLock:


http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

-- Kostya

02.12.2010 13:24, Narendra Bagade пишет:

Hi All,

I am downloading content on my tablet using ftp with wifi connection .
Once i download one content ,device wifi connection get disable.

Ianyone can help me how to persist wifi connection evene i am download 
number of content.


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



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

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


[android-developers] Re: lower EditText isn't panned to when opening the Virtual Keyboard

2010-12-02 Thread poohtbear
After playing around for 2 hours i narrowed it down to 2 items that
affect it:
1. android:gravity set to 'right' on the EditText
2. android:background set to anything that is NOT 9-patch
Since i know that 9-path drawables in mid-size give 27dp padding i
tried to set the left padding, failed... right padding, and it worked!
So i gave 1 padding to the style of all the EDitTexts and it worked.
Seems like an android bug:
if the EditTexts appear one after the other in seperate layouts inside
a single scrollview and their currsor on the right (right gravity +
EditText is right aligned + no background to give padding) then the
system cannot, for some reason pan to to that EditText.

On Dec 1, 5:15 pm, poohtbear eyaltg...@gmail.com wrote:
 Hi.
 I've made a tester to reproduce the issue:
 this is my layout:
 ?xml version=1.0 encoding=utf-8?
 LinearLayout
     xmlns:android=http://schemas.android.com/apk/res/android;
     android:layout_width=fill_parent
     android:layout_height=fill_parent
     android:orientation=vertical
     android:background=@drawable/flow_background
     ImageView android:layout_width=fill_parent
         android:layout_height=wrap_content android:src=@drawable/
 header
         android:scaleType=fitXY /
     TextView android:layout_width=fill_parent
 android:layout_height=wrap_content
               android:paddingRight=5dp
               style=@style/info_screens_title_text
               android:id=@+id/title/
     View android:layout_width=fill_parent
                         android:layout_height=@dimen/
 seperator_height
                         android:background=@color/seperator_color /
     ScrollView android:layout_width=fill_parent
                 android:layout_height=0dp
                 android:layout_weight=1.0 
                 LinearLayout android:layout_width=fill_parent
                     android:layout_height=fill_parent
                     android:orientation=vertical
                     android:id=@+id/root
                 /LinearLayout
     /ScrollView
     View android:layout_width=fill_parent
                         android:layout_height=@dimen/
 seperator_height
                         android:background=@color/seperator_color /
     include layout=@layout/lower_button_compound
                    android:id=@+id/booking_next_button /
 /LinearLayout

 under the scroll view root element (the LinearLayout) i add TextView
 (sub title) and Linear Layout that contains 12 children all of which
 are FrameLayout which is inflated from this xml:
 FrameLayout xmlns:android=http://schemas.android.com/apk/res/
 android
             android:layout_width=fill_parent
              android:layout_height=wrap_content
              style=@style/round_rect_line_style 
     TextView android:layout_width=wrap_content
               android:layout_height=fill_parent
               style=@style/text_style_in_coupound.left
               android:id=@+id/tv_lbl/
     EditText android:layout_width=wrap_content
               android:layout_height=fill_parent
               style=@style/text_style_in_coupound.right.edit_text
               android:id=@+id/edit_val
               android:imeOptions=actionNext
               android:maxLength=16/
 /FrameLayout

 i programatically inflate the  previous layout and add it line after
 line to create a single compound surrounded by round rectangle.

 if i try to open the keyboard on item  6 when the screen is NOT
 scrolled at all i get no panning on my layout! the virtual keyboard
 opens up and my screen remains as is :-( as far as i know the screen
 should pan to my field.
 I checked with both resize and pan options of the windows options and
 in both the field is totaly ignored, the screen remain as is.
 Any idea of why this happens ? is it the scrollView ? i can't
 rememmber reading about scrollView issues with IME...

 Any help would be appreciated!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Displaying unicode in a TextView?

2010-12-02 Thread HippoMan
Ah, yes. I see that I just happened to luck out, as the file.encoding
property on my device must be (currently!) set to utf-8.

Thanks.

This begs another, related question: how do I know what encoding to
use, in the first place ... for a TextView in the Android environment?

If I cannot count on the file.encoding property to always be set
correctly when using a TextView in Android, where do I query for the
correct encoding value?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 freezes when the power key is pressed

2010-12-02 Thread Eyvind Almqvist
I forgot to write that this only happens when the screen is rotated
many times. It doesn't happen if I just switch from portrait to
landscape mode one or two times.

On 2 Dec, 10:11, Eyvind Almqvist eyv...@mobile-visuals.com wrote:
 Thanks Yahel! I removed the  call to setRunning(false) from onPause()
 and this fixed thepowerkeyand USB cable problems. SonyEricsson
 tested theapp, but there was one remaining problem.

 When they rotate the screen several times, the screen turns black and
 sometimes the message “Sorry! Activity XXX(in application XXX) is not
 responding” pops up. I can not reproduce this onmySamsung galaxy S,
 but they say that it occurs on  SonyEricsson X10, X10 Mini, X10 Mini
 Pro, X8. They say that it reproduced easier on Android 1.6 than 2.1.
 Do you have any idea how I can fix this rotation problem?

 On 30 Nov, 20:25, Eyvind Almqvist eyv...@mobile-visuals.com wrote:



  The only object I create in onCreate() is the view. I do this with

   mView = (MView) findViewById(R.id.mid);

  I found one thing with the drawing loop and the setRunning() method
  that maybe causes the  problem. I can't test onmySamsung device,
  since I can't reproduce the problem there, but I will send a new
  version of theappto SonyEricsson tomorrow so they can test it. Hope
  it works out this time

  On 30 Nov, 18:33, Yahel kaye...@gmail.com wrote:

   Ok that's weird.
   If you have nothing in your onStart and your onResume sets the loop as
   running for your drawing loop, then that is where you should have a
   look.

   Myguess would be that the restarting of your looping via setRunning
   doesn't do what you think and that it is just not restarting at all so
   that you don't have any drawing going on.

   Or maybe you are creating objects in your onCreate method that get
   destroyed when your apps looses focus and that are never recreated
   again because onCreate is only called the very first time you launch
   your activity.

   First thing would be to Log.e(drawing,I'm drawing) in your thread
   drawing loop.

   Yahel

   On Nov 30, 10:50 am, Eyvind Almqvist eyv...@mobile-visuals.com
   wrote:

After I  insert the USB cable, there is three options “1. Connect your
phone. 2. Install PC Companion. 3. Charge phone.” No matter which
option I have selected, theappwill just freeze without any message.

When I press thepowerkeyto go topowersave mode and then press it
again to resume the application, theappwill just freeze without any
message.

I test by doing lots of screen orientation changes, like you
recommended.But I can not replicate the freezing problem onmySamsung
galaxy. I don't have the SonyEricsson X10 and X8 devices to test on. I
try to simulate apowerkeypress on the emulator, by pressing the
   powerbutton. I debug and onKeyDown is called, but onpause() and
onResume() is not called.
Doesn't onpause() and onResume() get called when thepowerkeyis
   pressed? I can not simulate insertion of a USB cable on the emulator.

   MyonStart method only call the superclass, so I don't see how an
exception could be raised here.MyonResume method also sets the
graphics thread to setRunning(false), which means that the thread will
continue, but it will not
execute the drawing loop.

On 29 Nov, 19:16, Dianne Hackborn hack...@android.com wrote:

 What do you mean your appfreezes?  This is not a typical failure 
 case
 when pressing thepowerbutton. :}

 On Mon, Nov 29, 2010 at 10:05 AM, Eyvind Almqvist 
 eyv...@mobile-visuals.com

  wrote:
 Myappfreezeswhen thepowerkeyispressed. This happens on
  SonyEricsson X10 and X8, but not on Samsung Galaxy S. This is what
  happens:

  1)Launch the application-Presspowerkey- Presspowerkeyagain to
  activeapp-Appfreeze.

  Theappalsofreezeswhen the USB cable is inserted, like this:

  2)Launch the application- Insert USB cable-Message pops up and 
  click
  any option to continue-Appfreeze.

  I am distributing apps to SonyEricsson's Playnow appstore. They have
  reported this as error, so I have to fix this. Does anyone have an
  idea how to fix this? I have already followed all the advices in
  Designing for Responsiveness on

 http://developer.android.com/guide/practices/design/responsiveness.html

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

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

 Note: please don't send private questions to me, as I don't have 

[android-developers] Re: Displaying unicode in a TextView?

2010-12-02 Thread HippoMan
PS: I am writing Android-specific code. The class I am using will
never work outside of the Android environment, for reasons that go
beyond the issue of character encoding.

So does this mean that in my case, I _should_ do the moral equivalent
of this?

String content = new String(bytes,
System.getProperty(file.encoding));

If so, this would indeed reduce to the following:

String content = new String(bytes);

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Displaying unicode in a TextView?

2010-12-02 Thread Kostya Vasilyev

02.12.2010 13:47, HippoMan пишет:

This begs another, related question: how do I know what encoding to
use, in the first place ... for a TextView in the Android environment?



You don't. This is not a TextView encoding issue.

TextView works with Java strings, which are always Unicode.


If I cannot count on the file.encoding property to always be set
correctly when using a TextView in Android, where do I query for the
correct encoding value?


The issue arose when constructing a Java String from a byte array.

As Bob pointed out, that's where you need to specify the encoding, (by 
always using the second argument to String(byte[], String)).


The encoding used here needs to match the encoding that was used to 
construct the byte array (first argument).


If those bytes came from a file, then you should somehow know the encoding.

Some Unicode files start with a marker (0xFEFF or 0xFFFE), but checking 
for this marker isn't reliable and shouldn't be necessary.


Here is some code that is a little more simple that using your own byte 
array:


InputStream stream = . can be a file input stream
InputStreamReader streamReader = new InputStreamReader(stream, UTF-8);
BufferedReader textReader = new BufferedReader(streamReader );

// read from textReader

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

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


Re: [android-developers] Re: Displaying unicode in a TextView?

2010-12-02 Thread Kostya Vasilyev

02.12.2010 13:54, HippoMan пишет:

PS: I am writing Android-specific code. The class I am using will
never work outside of the Android environment, for reasons that go
beyond the issue of character encoding.

So does this mean that in my case, I _should_ do the moral equivalent
of this?

 String content = new String(bytes,
 System.getProperty(file.encoding));



No, you shouldn't.

file.encoding is a system-wide property, and if it matches *your 
application's* content, it's only by pure luck.


These are your files, you should know what encoding they are in.

If they are UTF-8, go ahead and specify that encoding in your code.

A side note - perhaps every actual Android firmware sets file.encoding 
to UTF-8, but I don't see any guarantees to that in the SDK documentation.



If so, this would indeed reduce to the following:

 String content = new String(bytes);




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

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


[android-developers] Contact API problem with save datas Options

2010-12-02 Thread jef
I'm facing a basic problem but i didn't find any tutorial in order to
help me...

I'm writing an application with sort of backup contact options. I want
that my applications works for android phones since 1.5 to 2.2

So i write a two implementation of ContactApi, one for 1.5, 1.6 and an
other for new api version.

Here is the list of problem I'm facing with.

With new api, nothing. All works fine, backing up contacts works well.

But with older api I'm not able to backing up some datas :

Email Datas (able to read, but not able to save)
IM datas (able to read, but not able to save)
Notes (able to read the first note, if many notes, I lost datas, same
things for backup)
Here is the code I'm using :

===EMAIL===

 private ArrayListEmail getEmailAddresses(String id) {
ArrayListEmail emails = new ArrayListEmail();
Cursor emailCur =
this.contentResolver.query(Contacts.ContactMethods.CONTENT_EMAIL_URI,
null, Contacts.ContactMethods.PERSON_ID +  = ?, new String[] { id },
null);
Email email = null;
while (emailCur.moveToNext()) {
// This would allow you get several email
addresses
email = new Email();
 
email.setData(emailCur.getString(emailCur.getColumnIndex(Contacts.ContactMe
thods.DATA)));
 
email.setType(emailCur.getInt(emailCur.getColumnIndex(Contacts.ContactMetho
ds.TYPE)));
 
email.setLabel(emailCur.getString(emailCur.getColumnIndex(Contacts.PeopleCo
lumns.NAME)));
emails.add(email);
}
emailCur.close();
return emails;
}
private void saveEmailAddresses(ContentUris contactUri, ListEmail
emailList, String id) {
if (emailList != null  emailList.size()  0) {
ContentValues values = null;
ContentValues[] valueArray = new
ContentValues[emailList.size()];
int i = 0;
for (Email email : emailList) {
values = new ContentValues();
 
values.put(Contacts.ContactMethods.PERSON_ID, id); //
values.put(Contacts.ContactMethods.KIND,
Contacts.KIND_EMAIL); //
values.put(Contacts.ContactMethods.DATA,
email.getData()); //
values.put(Contacts.ContactMethods.TYPE,
email.getType()); //
values.put(Contacts.PeopleColumns.NAME,
email.getLabel()); //
valueArray[i] = values;
i++;
}
 
contentResolver.bulkInsert(Contacts.ContactMethods.CONTENT_EMAIL_URI,
valueArray);
}
}

 IM adress=


 private ArrayListIM getIM(Cursor cur, String id) {
ArrayListIM imList = new ArrayListIM();
String where = Contacts.ContactMethods.PERSON_ID + 
= ? AND  + Contacts.ContactMethods.KIND +  = ?;
String[] whereParameters = new String[] { id,
String.valueOf(Contacts.KIND_IM) };
Cursor imCur =
this.contentResolver.query(Contacts.ContactMethods.CONTENT_URI, null,
where, whereParameters, null);
IM im = null;
while (imCur.moveToNext()) {
try {
String imName =
imCur.getString(imCur.getColumnIndex(Contacts.ContactMethodsColumns.DATA));
im = new IM();
im.setName(imName);
im.setType(imCur.getInt(imCur.getColumnIndex(Contacts.ContactMethodsColumns 
.TYPE)));
im.setProtocol(cur.getString(imCur.getColumnIndex(Contacts.ContactMethods.A
UX_DATA)));
imList.add(im);
} catch (Exception e) {
Log.e(where, Error im : , e);
}
}
imCur.close();
return imList;
}
private void saveIM(ListIM imList, String id) {
if (imList != null  imList.size()  0) {
ContentValues values = null;
ContentValues[] valueArray = new
ContentValues[imList.size()];
int i = 0;
for (IM im : imList) {
values = new ContentValues();
 
values.put(Contacts.ContactMethods.PERSON_ID, id); //
 
values.put(Contacts.ContactMethods.KIND, Contacts.KIND_IM); //
 
values.put(Contacts.ContactMethodsColumns.DATA, im.getName()); //
 
values.put(Contacts.ContactMethods.AUX_DATA,
ContactMethods.encodeCustomImProtocol(im.getProtocol())); //
 
values.put(Contacts.ContactMethodsColumns.TYPE, im.getType()); //
valueArray[i] = values;
i++;
}
 
contentResolver.bulkInsert(Contacts.ContactMethods.CONTENT_URI,
valueArray);
}
}
==Notes ===

I have no idea how to get all notes ?

[android-developers] Update database

2010-12-02 Thread pramod.deore
Hi, I have a table with 5 columns.
1. RoomID
2. RoomName
3.RoomSuffix
4. SwitchID
5. SwitchName

I have some data in this table. Now I want to update database. How to
do this? I search for this but didn't get well answer

I had tried it like:

sampleDB =  this.openOrCreateDatabase(SAMPLE_DBNAME, MODE_PRIVATE,
null);

ContentValues args = new ContentValues();
args.put(SwitchName, switchRename);

Here I want to put SwitchName value as switchRename.
Now I execute method as:

sampleDB.update(SWITCH_TABLE_NAME, args, SwitchName
+'menuItemName',null);

But here second last argument (i.e where clause give me an error).In
where clause I want as SwitchName = 'xyz'   i.e where SwitchName is
xyz. How to write this where condition correctly?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Update database

2010-12-02 Thread Kumar Bibek
What is the error??

Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com



On Thu, Dec 2, 2010 at 4:54 PM, pramod.deore deore.pramo...@gmail.comwrote:

 Hi, I have a table with 5 columns.
 1. RoomID
 2. RoomName
 3.RoomSuffix
 4. SwitchID
 5. SwitchName

 I have some data in this table. Now I want to update database. How to
 do this? I search for this but didn't get well answer

 I had tried it like:

 sampleDB =  this.openOrCreateDatabase(SAMPLE_DBNAME, MODE_PRIVATE,
 null);

ContentValues args = new ContentValues();
args.put(SwitchName, switchRename);

 Here I want to put SwitchName value as switchRename.
 Now I execute method as:

 sampleDB.update(SWITCH_TABLE_NAME, args, SwitchName
 +'menuItemName',null);

 But here second last argument (i.e where clause give me an error).In
 where clause I want as SwitchName = 'xyz'   i.e where SwitchName is
 xyz. How to write this where condition correctly?

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

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

Re: [android-developers] Update database

2010-12-02 Thread Kostya Vasilyev
The next-to-last argument to db.update is the WHERE clause, but without 
the WHERE (look it up in a SQL reference).


So while in SQL you'd write WHERE SwitchName = value, with db.update 
you need to use SwitchName = value.


The last argument is used supply variable values to the conditions. This 
is more efficient as well as safer. Each value in the last argument 
(which is an array) replaces one ? placeholder in the condition.


The entire statement might look like this:

sampleDB.update(SWITCH_TABLE_NAME, args, SwitchName = ?, new String[] 
{ oldSwitchName} );


-- Kostya

02.12.2010 14:24, pramod.deore пишет:

Hi, I have a table with 5 columns.
1. RoomID
2. RoomName
3.RoomSuffix
4. SwitchID
5. SwitchName

I have some data in this table. Now I want to update database. How to
do this? I search for this but didn't get well answer

I had tried it like:

sampleDB =  this.openOrCreateDatabase(SAMPLE_DBNAME, MODE_PRIVATE,
null);

ContentValues args = new ContentValues();
args.put(SwitchName, switchRename);

Here I want to put SwitchName value as switchRename.
Now I execute method as:

sampleDB.update(SWITCH_TABLE_NAME, args, SwitchName
+'menuItemName',null);

But here second last argument (i.e where clause give me an error).In
where clause I want as SwitchName = 'xyz'   i.e where SwitchName is
xyz. How to write this where condition correctly?




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

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


Re: [android-developers] android tablet downloading problem

2010-12-02 Thread Narendra Bagade
do u have implementation of wifi lock .

On Thu, Dec 2, 2010 at 4:01 PM, Kostya Vasilyev kmans...@gmail.com wrote:

 Specifically for WiFi, hold a WiFi lock:


 http://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock.html

 Most likely, though, your device is going to sleep, which causes WiFi to be
 disabled after a certain time. To keep the device awake, hold a WakeLock:


 http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

 -- Kostya

 02.12.2010 13:24, Narendra Bagade пишет:

 Hi All,

 I am downloading content on my tablet using ftp with wifi connection .
 Once i download one content ,device wifi connection get disable.

 Ianyone can help me how to persist wifi connection evene i am download
 number of content.

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



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

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




-- 
Regards,
Narendra
.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Displaying unicode in a TextView?

2010-12-02 Thread HippoMan
Yes. I should have written this after drinking my morning coffee. On
my way to work, I woke up a little and remembered that this encoding
pertains to the _source_ (in my case, the epub bundle) and not the
_destination_ (the TextView).

Luckily, I know something about the source: epubs are supposed to be
encoded in UTF-8, so this will be the default encoding that I will
use. I can give the user an option to change this for epub books that
are encoded in a non-standard manner.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Displaying unicode in a TextView?

2010-12-02 Thread HippoMan
Yes. I should have written this after drinking my morning coffee. On
my way to work, I woke up a little and remembered that this encoding
pertains to the _source_ (in my case, the epub bundle) and not the
_destination_ (the TextView).

Luckily, I know something about the source: epubs are supposed to be
encoded in UTF-8, so this will be the default encoding that I will
use. I can give the user an option to change this for epub books that
are encoded in a non-standard manner.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 implement send text to windows(PC) via bluetooth

2010-12-02 Thread Chao stone
 Hi! all:

Did anyone try to implement android phone send text to windows(PC) via
bluetooth?
I have no idea if android bluetooth api can connect to microsoft bluetooth
stack(on PC).
The bluetoothchat sample in SDK is between 2 android device.

It seems to be very simular to some remote controller programs(such as
Gmote).
But I am not sure how to start.

Thanks for your comments.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Optical Mouse

2010-12-02 Thread Thiago Lopes Rosa
Hi,

Does anyone know how the optical mouse (example: HTC Incredible) is mapped?
Would it be a trackball? DPAD? Touch? Another key?

Thanks!



Thiago

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] android tablet downloading problem

2010-12-02 Thread Kostya Vasilyev

02.12.2010 14:41, Narendra Bagade пишет:

do u have implementation of wifi lock .


Might go like this:

WifiManager manager = (WifiManager) getSystemService(WIFI_SERVICE);
WifiManager.WifiLock lock = manager.createWifiLock(your tag string here);

Locking:

if (!lock.isHeld()) {
lock.acquire();
}

Unlocking:

if (lock.isHeld()) {
lock.release();
}

I believe one of these permissions, maybe both, are required:

uses-permission android:name=android.permission.ACCESS_WIFI_STATE /
uses-permission android:name=android.permission.CHANGE_WIFI_STATE /

WakeLock, which prevents the phone from going into sleep mode, is similar.

I would be a good idea to first check what actually happens - if the 
download stops because the device goes to sleep, you need a WakeLock.


-- Kostya


On Thu, Dec 2, 2010 at 4:01 PM, Kostya Vasilyev kmans...@gmail.com 
mailto:kmans...@gmail.com wrote:


Specifically for WiFi, hold a WiFi lock:


http://developer.android.com/reference/android/net/wifi/WifiManager.WifiLock.html

Most likely, though, your device is going to sleep, which causes
WiFi to be disabled after a certain time. To keep the device
awake, hold a WakeLock:

http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

-- Kostya

02.12.2010 13:24, Narendra Bagade пишет:

Hi All,

I am downloading content on my tablet using ftp with wifi
connection .
Once i download one content ,device wifi connection get disable.

Ianyone can help me how to persist wifi connection evene i am
download number of content.

-- 
Regards,

Narendra
.
-- 
You received this message because you are subscribed to the Google

Groups Android Developers group.
To post to this group, send email to
android-developers@googlegroups.com
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



-- 
Kostya Vasilyev -- WiFi Manager + pretty widget --

http://kmansoft.wordpress.com

-- 
You received this message because you are subscribed to the Google

Groups Android Developers group.
To post to this group, send email to
android-developers@googlegroups.com
mailto:android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
mailto:android-developers%2bunsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en




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



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

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

[android-developers] Intercept Incoming Message with Looper,MessageQueue and IdleHandler

2010-12-02 Thread muhammad mahmood
Hi
I would like to say, i want to get what message come inside queueidle.

public class ApplicationController extends Application
{
  @Override
  public void onCreate()
  {
super.onCreate();

MessageQueue queue =
Looper.getMainLooper().myQueue();
IdleHandler  ih = new IdleHandler() {
@Override
public boolean queueIdle() {
  // TODO Auto-generated method stub
//Here i want to know/intercept what message is coming 
from main
thread.
// So i want to filter
some specific messages(UI Events only and what that
// event)  and run
code here
//on behalf of that.
i.e to run code whenever a ui event happens.

  return true;
}
};
queue.addIdleHandler(ih);

}

My goal is to know what an ui event comes at this point whenever it
happened in application.

Or is there any other way to know whenever a ui event happens in app.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Opening a recently written file using Intents

2010-12-02 Thread Samuh
We are downloading a file from a server and writing it to folder on
sdcard. As soon as the write finishes, we perform a Media Scan on that
folder. When the user tries to open the file for viewing, we try to
leverage upon the Intent mechanism of Android and raise an Intent as
follows:

Intent myIntent = new
Intent(Intent.ACTION_VIEW,Uri.fromFile(tempFile));
// MIME_TYPE could be either of: image/*, video/*, audio/*, text/*
myIntent.setType(MIME_TYPE);
startActivity(Intent.createChooser(myIntent, Open file using...));

On emulator, the camera Application is launched for this Intent but
the application crashes with NPE. And on MOTOROLA Milestone, we are
getting a Toast which says: No image to show. Note that the photo is
actually displayed in Media Gallery of both emulator and phone as soon
as the scan finishes.

Not sure what has been missed here; please help.

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


Re: [android-developers] Opening a recently written file using Intents

2010-12-02 Thread Mark Murphy
I would start by using a real MIME type. The ones in your comment are
not real MIME types.

On Thu, Dec 2, 2010 at 8:05 AM, Samuh samuh.va...@gmail.com wrote:
 We are downloading a file from a server and writing it to folder on
 sdcard. As soon as the write finishes, we perform a Media Scan on that
 folder. When the user tries to open the file for viewing, we try to
 leverage upon the Intent mechanism of Android and raise an Intent as
 follows:

 Intent myIntent = new
 Intent(Intent.ACTION_VIEW,Uri.fromFile(tempFile));
 // MIME_TYPE could be either of: image/*, video/*, audio/*, text/*
 myIntent.setType(MIME_TYPE);
 startActivity(Intent.createChooser(myIntent, Open file using...));

 On emulator, the camera Application is launched for this Intent but
 the application crashes with NPE. And on MOTOROLA Milestone, we are
 getting a Toast which says: No image to show. Note that the photo is
 actually displayed in Media Gallery of both emulator and phone as soon
 as the scan finishes.

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

_Android Programming Tutorials_ Version 3.0.1 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] TabHost Activity

2010-12-02 Thread pedr0
Hi at all,

I develop an Tab based application, and I add activity in my tab in
this way:


mTabHost.addTab(mTabHost.newTabSpec(tab_test2).setIndicator(TAB
1).setContent(intent1));
mTabHost.addTab(mTabHost.newTabSpec(tab_test3).setIndicator(TAB
2).setContent(intent2));
mTabHost.addTab(mTabHost.newTabSpec(tab_test4).setIndicator(TAB
3).setContent(intent3));
mTabHost.addTab(mTabHost.newTabSpec(tab_test5).setIndicator(TAB
4).setContent(intent4));

mTabHost.setCurrentTab(1);


where mTabHost is an object of TabHost  type.

I discovered that this way start ALL intents at the same time!

I have some issues in my code or exists a way to configure TabHost to
start new intent when user click on a Tab?

Thanks a lot.

pedr0

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 freezes when the power key is pressed

2010-12-02 Thread Yahel
  When they rotate the screen several times,

This is usually a symptom of a memory leak.

Try to read this article from Romain Guy :
http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/

It explains how they can happen from a single handle to the context.

The fact that you do not have crash but again this black screen(no
drawing being done) probably means that you actually handle this
exception with a try catch somewhere. If my guess is correct then you
simply have to put a Log.e(error,error happens here : xxx); in
every catch of your app and you'll find where it happens. Again the
difficulty is to be able to reproduce the problem.

Again you should implement something like the android-remote-
stacktrace so that when it happens on someone devices you get the
stacktrace from their session which will give you good clues on what's
happening.

“Sorry! Activity XXX(in application XXX) is not responding” happens
when you have a very long operation that hangs the main UI thread so
that the user can't use it anymore. Maybe this is a clue for you to
what is happening. Do you have a long calcultation, double buffering
drawing, loading of a big bitmap or something similar in the main
thread ?

If you tell me which game it is I can try to reproduce the problem on
my HTC Hero which is an older phone so might be more sensitive to the
problem.

Yahel

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 behavior getting content from Gallery on Droid X - sets wallpaper when it shouldn't

2010-12-02 Thread Warren
I had a user report this issue.  The app is designed to have the user
pick an image from the Gallery that gets put on the SD card for later
use.

However, the user reported that the app instead sets the picture as
the wallpaper! Any ideas why this might happen?



The code for calling the gallery is below:

void galleryCapture(){
Intent intent = new Intent(Intent.ACTION_GET_CONTENT, null);
intent.setType(image/*);
intent.putExtra(crop, true);

intent.putExtra(aspectX, 4);
intent.putExtra(aspectY, 3);

// We should always get back an image that is no larger than
these dimensions
intent.putExtra(outputX, 480);
intent.putExtra(outputY, 360);

// Scale the image down to 480 x 360
intent.putExtra(scale, true);

// Tell the picker to write its output to this URI
//SD_CARD_FILE_PATH is the full path to a file on the SD card
intent.putExtra(output, Uri.fromFile(new
File(SD_CARD_FILE_PATH)));
intent.putExtra(outputFormat, JPEG);

intent.putExtra(noFaceDetection, true);

startActivityForResult(intent, RESULT_GALLERY_CAPTURE);
}

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


[android-developers] What is Process Name for mediaserver e.g. com.android.phone is for phone app.

2010-12-02 Thread Atul Raut
Hi,

*What is Process Name for mediaserver e.g. com.android.phone is for phone
app
like same I want for mediaserver.

Wanted to start mediaserver through process name
I have tool which uses such naming convention.
*
--
Atul Raut
 Android Telephony Engineer
http://rautatul.weebly.com/
http://rautatul.wordpress.com/
Mobile : 9581819292
atulrau...@gmail.com hack...@android.com

hack...@android.com

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

[android-developers] Attach debugger to app that is already running

2010-12-02 Thread Leigh McRae
When I use eclipse to launch a debug session on my device it takes 2-3
minutes just to load the game.  I would like to be able to run my
game, get to the point I'm interested in and then attach the
debugger.  Is this possible?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Voice search/Record Error

2010-12-02 Thread Satya
Hi,

I am new to Audio module and new to Android.
I am getting the following error when I start Voice Search
application.

#
W/InputManagerService(  965): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$S8
D/dalvikvm( 1196): GC_EXPLICIT freed 1145 objects / 53992 bytes in
80ms
I/ActivityManager(  965): Starting activity: Intent
{ act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] }
I/ActivityManager(  965): Displayed activity
com.google.android.voicesearch/.RecognitionActivity: 539 ms (total 539
ms)
I/AudioService(  965):  AudioFocus  requestAudioFocus() from
android.media.audiomana...@43f1eb48
I/MicrophoneInputStream( 1196): Starting voice recognition with audio
source VOICE_RECOGNITION
W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
16000
D/ALSAModule(  919): open called for devices 0004 in mode 0...
E/ALSALib (  919): external/alsa-lib/src/pcm/pcm.c:2210:
(snd_pcm_open_noupdate) Unknown PCM AndroidCapture
I/ALSAModule(  919): Initialized ALSA CAPTURE device default
D/AcousticsModule(  919): Acoustics set_params stub called with 0.
W/AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
16000
E/AudioRecord( 1196): Recording parameters are not supported:
sampleRate 16000, channelCount 1, format 1
E/AudioRecord-JNI( 1196): Error creating AudioRecord instance:
initialization check failed.
E/AudioRecord-Java( 1196): [ android.media.AudioRecord ] Error code
-20 when initializing native AudioRecord object.
W/GoogleRecognitionService( 1196): Audio problem
W/GoogleRecognitionService( 1196): java.lang.IllegalStateException:
not open
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.endpointer.MicrophoneInputStream.init(Microphone)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.setupMicrophoneInputStrea)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.setupMicrophone(GoogleRec)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.startRecognitionInternal()
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService.access
$000(GoogleRecognit)
W/GoogleRecognitionService( 1196):  at
com.google.android.voicesearch.GoogleRecognitionService
$1.handleMessage(GoogleRec)
W/GoogleRecognitionService( 1196):  at
android.os.Handler.dispatchMessage(Handler.java:99)
W/GoogleRecognitionService( 1196):  at
android.os.Looper.loop(Looper.java:123)
W/GoogleRecognitionService( 1196):  at
android.os.HandlerThread.run(HandlerThread.java:60)
W/AudioPolicyManagerBase(  919): getOutput() could not find output for
stream 3, samplingRate 0, format 0, channels c, flags0
E/MediaPlayer( 1196): error (-19, 0)
E/MediaPlayer( 1196): Error (-19,0)
D/dalvikvm( 1040): GC_EXPLICIT freed 1822 objects / 107272 bytes in
89ms
#

As per my understanding, the sample rate that the Voicesearch
Application is trying to set is not being supported by the
AudioHardwareInterface module:

AudioHardwareInterface(  919): getInputBufferSize bad sampling rate:
16000

Even in the code the function(in AudioHardwareInterface.cpp) is
returning error if the sample rate any other value other than 8000:


##
size_t AudioHardwareBase::getInputBufferSize(uint32_t sampleRate, int
format, int channelCount)
{
if (sampleRate != 8000) {
LOGW(getInputBufferSize bad sampling rate: %d, sampleRate);
return 0;
}
if (format != AudioSystem::PCM_16_BIT) {
LOGW(getInputBufferSize bad format: %d, format);
return 0;
}
if (channelCount != 1) {
LOGW(getInputBufferSize bad channel count: %d,
channelCount);
return 0;
}

return 320;
}



Not able to understand why this restriction on SampleRate/channelCount
is there in the hardware Interface layer
Are we expected to change this code to suit our hardwares.Can some one
help me in resolving this error.

Thanks in Advance.

Regards,
Satya

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] seekto is not displaying the video frame on mediaplayer, any help?

2010-12-02 Thread genxsol
Hi Dear,

i made a simple application to play a video from position1 untill
position2

when mediaplayer reaches at position2, i pause the mediaplayer and
seek it to position1 again.

now the problem is, mediaplayer still displays position2 video frame

how can i set the mediaplayer back to frame position 1

any help?



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


[android-developers] How to make glow effect around a bitmap?

2010-12-02 Thread Hongbo

The following code is what I got so far. However, there are 2 issues:

1. I want both inner and outer glow effects, which looking similar to
the Photoshop's blending options. But I only managed to make the outer
glow, if I set BlurMaskFilter.Blur.INNER or other value, the whole
image is blocked, instead of just edges.

2. Despite I set FF as alpha value, the glow color is still very
dark.

  Bitmap alpha = origin.extractAlpha();
  BlurMaskFilter blurMaskFilter = new BlurMaskFilter(5,
BlurMaskFilter.Blur.OUTER);


  Paint paint = new Paint();
  paint.setMaskFilter(blurMaskFilter);
  paint.setColor(0x);


  Canvas canvas = new Canvas(origin);
  canvas.drawBitmap(alpha, 0, 0, paint);


  return origin;

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] App will not Install/Move to SD Card on HTC Desire HD

2010-12-02 Thread lloyd1949
Hi Folks:

A user of my app has reported the following:

Phone: HTC Desire HD with Android 2.2 with lots of room on the card.
Android version 2.2
Baseband version: 12.28b.60.140eU_26.03.02.26_M
Kernal version 2.6.32.21-g66cfb7a
ht-ker...@and18-2 #1
Tue Oct 26 15:58:17 CST 2010
Build number: 1.35.762.2 CL277020 release-keys
Software number: 1.35.762.2
Browser version: WebKit 3.1

My App is set up to be installed to the SD Card if possible via my use
of the preferExternal setting in the manifest file and is installed
on the SD card for many of my users. However this is the second time
that someone with the HTC Desire has reported that they cannot get my
app to be installed or moved to the SD Card.

Can anyone shed some light on what might be happening here?

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] Attach debugger to app that is already running

2010-12-02 Thread Kostya Vasilyev

Yes:

- Run your game.
- In Eclipse, switch to DDMS perspective (green Android, top-right toolbar).
- In the Devices window (top-left), select your process.
- Click the green bug icon in the toolbar above.

-- Kostya

02.12.2010 18:41, Leigh McRae пишет:

When I use eclipse to launch a debug session on my device it takes 2-3
minutes just to load the game.  I would like to be able to run my
game, get to the point I'm interested in and then attach the
debugger.  Is this possible?




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

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


[android-developers] Upload picture to php server

2010-12-02 Thread zeeshan mirza
I am trying to upload a picture to my php server from android
application. Both are developed by me. I am getting error when i try
to upload picture from my android app to php server.
The error is 11-28 05:37:55.310: DEBUG/SntpClient(59): request time
failed: java.net.SocketException: Address family not supported by
protocol

and the code for my android app and php server is as follows

PHP SERVER
?php
 $target_path = uploads/;
 $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
 if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo The file . basename( $_FILES['uploadedfile']['name']).
 has been uploaded;
 }
 else{
  echo There was an error uploading the file, please try again!;
   }
?

Android App
import java.io.FileInputStream;
import android.app.Activity;
import android.os.Bundle;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import android.util.Log;

public class uploadfile extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
doFileUpload();
}

private void doFileUpload(){
HttpURLConnection conn =null;
DataOutputStream dos = null;
DataInputStream inStream = null;
String exsistingFileName = /sdcard/def.jpg;

// Is this the place are you doing something wrong.
String lineEnd = rn;
String twoHyphens = --;
String boundary =  *;

int bytesRead, bytesAvailable, bufferSize;
byte[] buffer;
int maxBufferSize = 1*1024*1024;
String responseFromServer = ;
String urlString = http://192.168.1.6/index.php;;

try
{
//-- CLIENT REQUEST
Log.e(MediaPlayer,Inside second Method);
FileInputStream fileInputStream = new FileInputStream(new
File(exsistingFileName) );

// open a URL connection to the Servlet
URL url = new URL(urlString);

// Open a HTTP connection to the URL
conn = (HttpURLConnection)
url.openConnection();

// Allow Inputs
conn.setDoInput(true);

// Allow Outputs
conn.setDoOutput(true);

// Don't use a cached copy.
conn.setUseCaches(false);

// Use a post method.
conn.setRequestMethod(POST);

conn.setRequestProperty(Connection, Keep-Alive);

conn.setRequestProperty(Content-Type,
multipart/form-data;boundary=+boundary);

dos = new DataOutputStream(
conn.getOutputStream() );
dos.writeBytes(twoHyphens +
boundary + lineEnd);

dos.writeBytes(Content-Disposition: form-data;
name=\uploadedfile\;filename=\
+
exsistingFileName + \ + lineEnd);
dos.writeBytes(lineEnd);
Log.e(MediaPlayer,Headers
are written);

// create a buffer of maximum size
bytesAvailable =
fileInputStream.available();
bufferSize =
Math.min(bytesAvailable, maxBufferSize);
buffer = new byte[bufferSize];

// read file and write it into form...
bytesRead =
fileInputStream.read(buffer, 0, bufferSize);

while (bytesRead  0){

dos.write(buffer, 0, bufferSize);

bytesAvailable = fileInputStream.available();

bufferSize = Math.min(bytesAvailable, maxBufferSize);

bytesRead = fileInputStream.read(buffer, 0, bufferSize);
}

// send multipart form data
necesssary after file data...
dos.writeBytes(lineEnd);
dos.writeBytes(twoHyphens +
boundary + twoHyphens + lineEnd);

// close streams
Log.e(MediaPlayer,File is written);
fileInputStream.close();
dos.flush();
dos.close();

}

  catch (MalformedURLException ex)

 {

   Log.e(MediaPlayer, error:  + ex.getMessage(), ex);

  }



  catch 

[android-developers] Why on earth do the Android Ant tools use javac with encoding=ascii?

2010-12-02 Thread Matt Quigley
First of all, I find it odd that the encoding is even specified at
all.  Why not just leave it as the default system encoding?

Secondly, if one is going to specify an encoding, then it should NOT
be ascii.  It should be UTF-8.  After all, the files themselves are
not ascii, they are UTF-8 (or Cp1252).

Thirdly, the Eclipse compiler does not use ascii.  This is why you see
tons of warning: unmappable character for encoding ascii when using
ant to compile your project, but you don't see that with Eclipse.

I believe this isn't just a nuance, I believe it to be a bug.  If you
use a non-ascii character, such as a vowel with an accent in any .java
or .xml file, the compiler may not interpret those PERFECTLY VALID
characters correctly.

One can, of course, change it yourself, by looking in sdk.dir/tools/
ant, and removing all occurrences of encoding=ascii, but if you have
to do this to make your programs correct, then this indicates a bug in
the toolset.  (At the very least, it should be a changeable property,
such as ${java.encoding}.

But, I would like to know if there is a good reason for overriding the
default Java encoding.

Thanks,
-Matt

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Attach debugger to app that is already running

2010-12-02 Thread Leigh McRae

And there was much rejoicing...

Thank you!

On 12/2/2010 11:58 AM, Kostya Vasilyev wrote:

Yes:

- Run your game.
- In Eclipse, switch to DDMS perspective (green Android, top-right 
toolbar).

- In the Devices window (top-left), select your process.
- Click the green bug icon in the toolbar above.

-- Kostya

02.12.2010 18:41, Leigh McRae пишет:

When I use eclipse to launch a debug session on my device it takes 2-3
minutes just to load the game.  I would like to be able to run my
game, get to the point I'm interested in and then attach the
debugger.  Is this possible?






--
Leigh McRae
www.lonedwarfgames.com

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


[android-developers] Proposal to Market Place

2010-12-02 Thread Leon Moreyn-Android Development
As a developer I find it difficult to understanding ratings sometime.
1 to 5 is a good scale. But here is the problem with scale you can
have people give you a five for the sake of giving you a five or a
person give you one just because they want to be jerks. I would like
to propose a change to the market rating system where a rate of 1 or 5
must include comments. If I am receiving a one due to technical
problems or display problems I would want to know and not search my
code for hours trying to find what may be the reason for the one rate.
Also with the 5 I would like to know what is working so very good on
my app that I could continue to use it in future developments. This
way as we develop more apps we can get a better sense as what the
rating really mean and the ppl who are rating the apps really think
about them. 1 and 5 the extremes should require feedback as the 2 to 4
are mostly middle ground and could be left alone for the average jerk
to rate.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Proposal to Market Place

2010-12-02 Thread Kostya Vasilyev
Maybe it's just me, but I sometimes see 1-star ratings that do include 
well written, thoughtful, long, helpful, descriptive comments.


Some are like dis suxx.

Some are like Doesn't work on device XYZ (right above a 5-star that 
says Perfect on device XYZ).


/sarcasm

You can submit your proposal here so it doesn't get lost:

http://code.google.com/p/android/issues/list

-- Kostya

02.12.2010 21:06, Leon Moreyn-Android Development пишет:

As a developer I find it difficult to understanding ratings sometime.
1 to 5 is a good scale. But here is the problem with scale you can
have people give you a five for the sake of giving you a five or a
person give you one just because they want to be jerks. I would like
to propose a change to the market rating system where a rate of 1 or 5
must include comments. If I am receiving a one due to technical
problems or display problems I would want to know and not search my
code for hours trying to find what may be the reason for the one rate.
Also with the 5 I would like to know what is working so very good on
my app that I could continue to use it in future developments. This
way as we develop more apps we can get a better sense as what the
rating really mean and the ppl who are rating the apps really think
about them. 1 and 5 the extremes should require feedback as the 2 to 4
are mostly middle ground and could be left alone for the average jerk
to rate.




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

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


[android-developers] Missing instance state when restoring dialogs

2010-12-02 Thread Olivier Guilyardi
Hi,

in my app, certain dialogs need some instance data when onPrepareDialog() is
called. I am saving this data in onSaveInstanceState() and restoring it in
onCreate(). This works fine according to my tests: I received the saved data in
the bundle passed to onCreate(), and then the dialogs get automatically restored
properly.

However, I get some crashes on the market console where it really seems like the
dialogs are being restored whereas onCreate() did not receive any saved state. I
have never reproduced that bug.

The console doesn't say which Android version that is, it only mentions Droid
and OTHER. Droid should be 2.1 or 2.2 I guess.

Any clue?

--
  Olivier

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Proposal to Market Place

2010-12-02 Thread Yahel
 person give you one just because they want to be jerks. I would like
 to propose a change .

Good luck proposing, nobody's listening :s


  to the market rating system where a rate of 1 or 5
 must include comments

What you'll get is : 1 star ratings with the following very
helpful(but short to type) comments :
- lame
- wt wrk
- awful
- meh

Even worst : Upset that they can't post their one star rating without
a comment they'll make it count by being even meaner :s

And for the 5 stars ratings they'll be the same as now but a lot fewer
since they require more work.

So you'll have the worst of both world :D

If you really want feedback on your app, you should probably simply
implement it in your app and ask for it when people press your Quit
button(that you really shouldn't have because it's against android
policy...but anyway :)

Not sure if this advice applies to you but this type of rating system
exists since arpanet or so and works very well. In the long term, 1
star-jerk rating are just overwhelmed with the 4 and 5 stars of people
who took time to actually test your app and understood it. So wait a
few weeks and it won't matter anymore

And one last thought, even though it is tough to see them appear in
the comment list, 1 star-jerk rating means nothing about your app if
they are not the norm in your ratings. They just give you a clue about
the lazyness and attention span of the 1 star-jerker :D

Oh and one last-last thought : If your last comment out of 3 comments
in total is this 1 star-jerk rating, did you know you can download
your app, rate it and comment it under your google market account ?
Every time you change your comment it will come back to the top.

Take care.

Yahel




On Dec 2, 7:06 pm, Leon Moreyn-Android Development
lmor...@earthcam.com wrote:
 As a developer I find it difficult to understanding ratings sometime.
 1 to 5 is a good scale. But here is the problem with scale you can
 have people give you a five for the sake of giving you a five or a
 If I am receiving a one due to technical

 Also with the 5 I would like to know what is working so very good on
 my app that I could continue to use it in future developments. This
 way as we develop more apps we can get a better sense as what the
 rating really mean and the ppl who are rating the apps really think
 about them. 1 and 5 the extremes should require feedback as the 2 to 4
 are mostly middle ground and could be left alone for the average jerk
 to rate.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] I'm using onSensorChanged(). What should I specify in uses-feature ?

2010-12-02 Thread TreKing
On Tue, Nov 30, 2010 at 9:54 PM, Kakyoin lgmc...@gmail.com wrote:

 Which one do I need to specify in my manifest? Or both?


If nothing else, try none, either, then both, and see which way makes it
work.

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

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

[android-developers] Re: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread kiros88
Okay like where do u gets getView I dont see that function in the
Listview class or the adapterView class so im not really sure where im
suppose to be able to call getView.


On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:
 My 2c - you are over-complicating this.The getView is ONLY to give back the
 view for the item that is requested. If you want this item to be colored X
 then do it here. If you want another item to be colored Y then do it when
 getView is called for that item. The state maintenance, i.e. what is X or Y
 is done independent of the code within getView which needs to just return
 the View...

 As for the specific text, if you are returning a TextView t, then t.setText
 would work.







 On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:
  Okay i dont want to get to many ppl confused so im going to try to ask
  this very simply. When android goes to this function when a user
  clicks on a item on your listview. basically u get a parent who im
  assuming is the array of textview that was set up during the
  setAdapter phase and view which the the corresponding View to which
  the user touched.   My main and only questions is i know i can adjust
  the view of View by saying stuff like

  (TextView)view = setText(hello)

  during the same time i want to beable to change another TextView in
  the AdapterView like the View after the View view so i guess view
  +1   i want to also be able to change that view into another word.

  Please dont ask me y im doing this just that im doing it for a reason
  I just really need help and i hope this explains that During the
  onItemClick listener function basically I want to adjust 2 different
  Views in the arrays of Views but i have no idea how to access the any
  other view then the given View view thats the argument they give you

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

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


Re: [android-developers] Re: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread Mark Murphy
On Thu, Dec 2, 2010 at 2:06 PM, kiros88 ghui...@gmail.com wrote:
 Okay like where do u gets getView I dont see that function in the
 Listview class or the adapterView class so im not really sure where im
 suppose to be able to call getView.

Generally, you do not call getView(). You implement getView() in a
custom ArrayAdapter, for example.

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

_Android Programming Tutorials_ Version 3.0.1 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: What is Process Name for mediaserver e.g. com.android.phone is for phone app.

2010-12-02 Thread Dianne Hackborn
You can't start a Android/Dalvik process through a process name.  Nor should
you rely on these names, which are implementation details.

On Thu, Dec 2, 2010 at 6:41 AM, Atul Raut atul.dr...@gmail.com wrote:

 Hi,

 *What is Process Name for mediaserver e.g. com.android.phone is for phone
 app
 like same I want for mediaserver.

 Wanted to start mediaserver through process name
 I have tool which uses such naming convention.
 *

 --
 Atul Raut
  Android Telephony Engineer
 http://rautatul.weebly.com/
 http://rautatul.wordpress.com/
 Mobile : 9581819292
 atulrau...@gmail.com hack...@android.com

 hack...@android.com

 --
 You received this message because you are subscribed to the Google Groups
 android-platform group.
 To post to this group, send email to android-platf...@googlegroups.com.
 To unsubscribe from this group, send email to
 android-platform+unsubscr...@googlegroups.comandroid-platform%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/android-platform?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: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread kiros88
Okay wait so i get the concept tthat u do a getView from an
ArrayAdapter but what i tried this before during the

i called the adapter i used
ArrayAdapter adapt = new
ArrayAdapterString(this,android.R.layout.simple_list_item_1 ,
songs);

then after its already created i do


public void onItemClick(AdapterView? parent, View view,
int position, long id) {

((TextView)adapt.getView(position+1,null,parent)).setText(hello);

And this doesnt work it crashes the app


On Dec 2, 11:06 am, kiros88 ghui...@gmail.com wrote:
 Okay like where do u gets getView I dont see that function in the
 Listview class or the adapterView class so im not really sure where im
 suppose to be able to call getView.

 On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:







  My 2c - you are over-complicating this.The getView is ONLY to give back the
  view for the item that is requested. If you want this item to be colored X
  then do it here. If you want another item to be colored Y then do it when
  getView is called for that item. The state maintenance, i.e. what is X or Y
  is done independent of the code within getView which needs to just return
  the View...

  As for the specific text, if you are returning a TextView t, then t.setText
  would work.

  On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:
   Okay i dont want to get to many ppl confused so im going to try to ask
   this very simply. When android goes to this function when a user
   clicks on a item on your listview. basically u get a parent who im
   assuming is the array of textview that was set up during the
   setAdapter phase and view which the the corresponding View to which
   the user touched.   My main and only questions is i know i can adjust
   the view of View by saying stuff like

   (TextView)view = setText(hello)

   during the same time i want to beable to change another TextView in
   the AdapterView like the View after the View view so i guess view
   +1   i want to also be able to change that view into another word.

   Please dont ask me y im doing this just that im doing it for a reason
   I just really need help and i hope this explains that During the
   onItemClick listener function basically I want to adjust 2 different
   Views in the arrays of Views but i have no idea how to access the any
   other view then the given View view thats the argument they give you

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

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


Re: [android-developers] Listview with section headers shows same data under each of the them.

2010-12-02 Thread TreKing
On Wed, Dec 1, 2010 at 12:34 AM, umakantpatil umakantpat...@gmail.comwrote:

 Can some one help me out please?


What does you adapter look like? My guess is you're returning the same view
for each row.

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

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

Re: [android-developers] Re: Proposal to Market Place

2010-12-02 Thread Frank Weiss
Good ideas, but as has been said, good luck with that.

Some observations, if I may:

1) A developer shouldn't rely so much on ratings for feedback. Built-in bug
reporting, email, a user network, a marketing site with user comments all
provide a better dialog than the market's half-ass rating system.

2) How much do ratings really influence users? Users are either looking for
ratings that support their prejudice (these are not your best users) or they
are looking for a consistent pattern. Your best users understand how ratings
can be gamed and can usually see through the nonsense. Also note that your
pitch in the Android Market is likely going to influence users as much as
the ratings. Do you have computer progammers write that, or do you hire
(read: invest in) an experienced copywriter?

3) Ratings are just a half-assed way of letting potential users sort out
apps on the market. Few, if any are actually objective. Imagine if the auto
industry relied on a rating system like that.

4) I might also note that eBay uses ratings entirely differently. They don't
rate the product. Perhaps that would be a better direction for the Android
Market.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread Mark Murphy
Of course. Again, ordinarily, you do not call getView().

You are going about your problem in the wrong way. You are attempting
to change your UI directly by grabbing some row out of a ListView and
changing it. That's not going to be reliable at all, since that row
might not exist. Rather, you need to change your data model (whatever
you have an Adapter on), then update the ListView from the revised
model. The way you would update the ListView varies by your type of
Adapter, and it may be automatic.

On Thu, Dec 2, 2010 at 2:18 PM, kiros88 ghui...@gmail.com wrote:
 Okay wait so i get the concept tthat u do a getView from an
 ArrayAdapter but what i tried this before during the

 i called the adapter i used
 ArrayAdapter adapt = new
 ArrayAdapterString(this,android.R.layout.simple_list_item_1 ,
 songs);

 then after its already created i do


 public void onItemClick(AdapterView? parent, View view,
                        int position, long id) {

 ((TextView)adapt.getView(position+1,null,parent)).setText(hello);

 And this doesnt work it crashes the app


 On Dec 2, 11:06 am, kiros88 ghui...@gmail.com wrote:
 Okay like where do u gets getView I dont see that function in the
 Listview class or the adapterView class so im not really sure where im
 suppose to be able to call getView.

 On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:







  My 2c - you are over-complicating this.The getView is ONLY to give back the
  view for the item that is requested. If you want this item to be colored X
  then do it here. If you want another item to be colored Y then do it when
  getView is called for that item. The state maintenance, i.e. what is X or Y
  is done independent of the code within getView which needs to just return
  the View...

  As for the specific text, if you are returning a TextView t, then t.setText
  would work.

  On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:
   Okay i dont want to get to many ppl confused so im going to try to ask
   this very simply. When android goes to this function when a user
   clicks on a item on your listview. basically u get a parent who im
   assuming is the array of textview that was set up during the
   setAdapter phase and view which the the corresponding View to which
   the user touched.   My main and only questions is i know i can adjust
   the view of View by saying stuff like

   (TextView)view = setText(hello)

   during the same time i want to beable to change another TextView in
   the AdapterView like the View after the View view so i guess view
   +1   i want to also be able to change that view into another word.

   Please dont ask me y im doing this just that im doing it for a reason
   I just really need help and i hope this explains that During the
   onItemClick listener function basically I want to adjust 2 different
   Views in the arrays of Views but i have no idea how to access the any
   other view then the given View view thats the argument they give you

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

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




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

_Android Programming Tutorials_ Version 3.0.1 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


Re: [android-developers] Re: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread Frank Weiss
Admittedly, I haven't read this thread in detail. It seems to me, that using
an MVC approach is called for. The controller (the click handler) shouldn't
be calling the view directly. The controller should call the model. The
model will update the view accordingly.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread Prakash Iyer
You need to do setText in your implementation of getView. In the item
clicked, store your state and call notifyDatasetChanged (check the exact
name). Do not call getView...
On Dec 2, 2010 2:18 PM, kiros88 ghui...@gmail.com wrote:
 Okay wait so i get the concept tthat u do a getView from an
 ArrayAdapter but what i tried this before during the

 i called the adapter i used
 ArrayAdapter adapt = new
 ArrayAdapterString(this,android.R.layout.simple_list_item_1 ,
 songs);

 then after its already created i do


 public void onItemClick(AdapterView? parent, View view,
 int position, long id) {

 ((TextView)adapt.getView(position+1,null,parent)).setText(hello);

 And this doesnt work it crashes the app


 On Dec 2, 11:06 am, kiros88 ghui...@gmail.com wrote:
 Okay like where do u gets getView I dont see that function in the
 Listview class or the adapterView class so im not really sure where im
 suppose to be able to call getView.

 On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:







  My 2c - you are over-complicating this.The getView is ONLY to give back
the
  view for the item that is requested. If you want this item to be
colored X
  then do it here. If you want another item to be colored Y then do it
when
  getView is called for that item. The state maintenance, i.e. what is X
or Y
  is done independent of the code within getView which needs to just
return
  the View...

  As for the specific text, if you are returning a TextView t, then
t.setText
  would work.

  On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:
   Okay i dont want to get to many ppl confused so im going to try to
ask
   this very simply. When android goes to this function when a user
   clicks on a item on your listview. basically u get a parent who im
   assuming is the array of textview that was set up during the
   setAdapter phase and view which the the corresponding View to which
   the user touched.   My main and only questions is i know i can adjust
   the view of View by saying stuff like

   (TextView)view = setText(hello)

   during the same time i want to beable to change another TextView in
   the AdapterView like the View after the View view so i guess view
   +1   i want to also be able to change that view into another word.

   Please dont ask me y im doing this just that im doing it for a reason
   I just really need help and i hope this explains that During the
   onItemClick listener function basically I want to adjust 2 different
   Views in the arrays of Views but i have no idea how to access the any
   other view then the given View view thats the argument they give
you

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

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

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

[android-developers] Re: Proposal to Market Place

2010-12-02 Thread Maps.Huge.Info (Maps API Guru)
...did you know you can download your app, rate it and comment it
under your google market account ?

A far better use for this tactic is to answer negative comments with a
preface like Developer Comment: I've tested the app completely on the
XYZ and it works perfectly. or something to that effect. That way you
show any potential users that you care about the comments and are
actively engaged, plus the obvious fact that the thing does in fact
work on the XYZ in spite of the 1 star jerk's comment.

As for feedback from users, I suggest making it very easy for them by
supplying a method for them to simply click a button/link/whatever in
side the app to contact you directly. That's what I do and have
received extremely valuable suggestions and bug reports and questions
from people having some sort of difficulty. The easier you make it for
your users to interact with you, the better their experience will be.
Isn't that the entire point?

-John Coryat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Selling app from own website

2010-12-02 Thread mot12
Are you still in need for an answer?

1) Updates
I have a simple file on my website just containing the current version
number and then the apk itself. By checking against the version
number, the app determines if an update is available and, if the user
wants to update, downloads this file in the background. When the
download is finished, the app is installed via a simple intent. I can
give you the code for that if you need it.

2) Piracy,
I am just starting to do something about it and don't know yet if it
is worth it. But like many others, I am frustrated by the high piracy
rate on Android. For users downloading via the market, I use a heavily
modified version of LVL. For users downloading from my website, I use
some of the same LVL for obfuscating locally cashed parameters. The
app asks users for their email address which they used to purchase via
Paypal. Since I have that email address from Paypal, this serves as a
license key. I warn users that passing a copy to others will
invalidate the license key and from time to time I check if the same
email address has been used by different devices. So far so good. I
also have a safety mode; if the app finds a specific file on the web,
the license will be good for the next 30 days. This way, if there ever
is a problem and users flood me with authorization proplems, I can
simply upload that file and all will be fine.

Martin
mobitobi
Gentle Alarm, Sleep 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] Re: App freezes when the power key is pressed

2010-12-02 Thread Eyvind Almqvist
Thanks, I read the article. Then I saw that I had a global reference
to a context, which I didn't need. I removed it and then it worked
much smoother. I think this fixed the leak. I don't have any reference
to a context at all now. I mailed you my app. Hope it works like it
should on your HTC!

On 2 Dec, 14:48, Yahel kaye...@gmail.com wrote:
   When they rotate the screen several times,

 This is usually a symptom of a memory leak.

 Try to read this article from Romain Guy 
 :http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-andr...

 It explains how they can happen from a single handle to the context.

 The fact that you do not have crash but again this black screen(no
 drawing being done) probably means that you actually handle this
 exception with a try catch somewhere. Ifmyguess is correct then you
 simply have to put a Log.e(error,error happens here : xxx); in
 every catch of yourappand you'll find where it happens. Again the
 difficulty is to be able to reproduce the problem.

 Again you should implement something like the android-remote-
 stacktrace so that when it happens on someone devices you get the
 stacktrace from their session which will give you good clues on what's
 happening.

 “Sorry! Activity XXX(in application XXX) is not responding” happens
 when you have a very long operation that hangs the main UI thread so
 that the user can't use it anymore. Maybe this is a clue for you to
 what is happening. Do you have a long calcultation, double buffering
 drawing, loading of a big bitmap or something similar in the main
 thread ?

 If you tell me which game it is I can try to reproduce the problem onmyHTC 
 Hero which is an older phone so might be more sensitive to the
 problem.

 Yahel

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Missing instance state when restoring dialogs

2010-12-02 Thread Frank Weiss
Use the onRestoreInstanceState() callback, not just onCreate().

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 i prevent RecognizerIntent to prompt user to Retry or Abort in case of RESULT_NO_MATCH, and handle the error myself ?

2010-12-02 Thread mrqzzz
Hi, I am developing a hands-free app that uses Google's Voice
recognition intent.

In case of RESULT_NO_MATCH error, the Voice Recognition dialog prompts
the user if he wants to retry or abort and that breaks the hands-
free rule.

Is there a way to call the intent and eventually handle any errors
myself?

Thank you,
Marcus.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread kiros88
Okay so i guess this kinda makes sense I'm not really sure how am i
suppose to change my data model. I did
((TextView)adapt.getView(0, null, parent)).setText(hello);
adapt.notifyDataSetChanged();

but nothing changed ?


On Dec 2, 11:28 am, Mark Murphy mmur...@commonsware.com wrote:
 Of course. Again, ordinarily, you do not call getView().

 You are going about your problem in the wrong way. You are attempting
 to change your UI directly by grabbing some row out of a ListView and
 changing it. That's not going to be reliable at all, since that row
 might not exist. Rather, you need to change your data model (whatever
 you have an Adapter on), then update the ListView from the revised
 model. The way you would update the ListView varies by your type of
 Adapter, and it may be automatic.









 On Thu, Dec 2, 2010 at 2:18 PM, kiros88 ghui...@gmail.com wrote:
  Okay wait so i get the concept tthat u do a getView from an
  ArrayAdapter but what i tried this before during the

  i called the adapter i used
  ArrayAdapter adapt = new
  ArrayAdapterString(this,android.R.layout.simple_list_item_1 ,
  songs);

  then after its already created i do

  public void onItemClick(AdapterView? parent, View view,
                         int position, long id) {

  ((TextView)adapt.getView(position+1,null,parent)).setText(hello);

  And this doesnt work it crashes the app

  On Dec 2, 11:06 am, kiros88 ghui...@gmail.com wrote:
  Okay like where do u gets getView I dont see that function in the
  Listview class or the adapterView class so im not really sure where im
  suppose to be able to call getView.

  On Dec 1, 7:54 pm, Prakash Iyer thei...@gmail.com wrote:

   My 2c - you are over-complicating this.The getView is ONLY to give back 
   the
   view for the item that is requested. If you want this item to be colored 
   X
   then do it here. If you want another item to be colored Y then do it when
   getView is called for that item. The state maintenance, i.e. what is X 
   or Y
   is done independent of the code within getView which needs to just return
   the View...

   As for the specific text, if you are returning a TextView t, then 
   t.setText
   would work.

   On Wed, Dec 1, 2010 at 9:14 PM, kiros88 ghui...@gmail.com wrote:
Okay i dont want to get to many ppl confused so im going to try to ask
this very simply. When android goes to this function when a user
clicks on a item on your listview. basically u get a parent who im
assuming is the array of textview that was set up during the
setAdapter phase and view which the the corresponding View to which
the user touched.   My main and only questions is i know i can adjust
the view of View by saying stuff like

(TextView)view = setText(hello)

during the same time i want to beable to change another TextView in
the AdapterView like the View after the View view so i guess view
+1   i want to also be able to change that view into another word.

Please dont ask me y im doing this just that im doing it for a reason
I just really need help and i hope this explains that During the
onItemClick listener function basically I want to adjust 2 different
Views in the arrays of Views but i have no idea how to access the any
other view then the given View view thats the argument they give you

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

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

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

 _Android Programming Tutorials_ Version 3.0.1 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


Re: [android-developers] how to zoom camera through code

2010-12-02 Thread TreKing
On Wed, Dec 1, 2010 at 5:59 AM, Atik atik0...@gmail.com wrote:

 but what exactly should i need to do to achieve the same.


Setting the zoom change listener will tell you when the zoom has changed, it
won't change it.
Look at the other methods for camera - one of them apparently does exactly
this.

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

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

Re: [android-developers] Missing instance state when restoring dialogs

2010-12-02 Thread Olivier Guilyardi
The onRestoreInstanceState() doc does not say that:
http://developer.android.com/intl/fr/reference/android/app/Activity.html#onRestoreInstanceState%28android.os.Bundle%29

From what I read, onCreate() is all what is needed. Implementing
onRestoreInstanceState() doesn't seem necessary in my case. IIUC correctly, if
there's any state to restore it is always passed to onCreate(), and before
onRestoreInstanceState() gets called.

Olivier

On 12/02/2010 08:44 PM, Frank Weiss wrote:
 Use the onRestoreInstanceState() callback, not just onCreate().
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Strange Issue..Fail to set top app changed..Please help

2010-12-02 Thread Tommy
Hi everyone,

I have a strange issue that I can't seem to find a resolution to. I am
working on an app using Eclipse Galileo on my laptop Windows 7 64bit.
I decided to break my app down and pull out a specific section along
with the activity's and services that went with that section. I moved
them over to my desktop Eclipse Helios Windows 7 64 bit (but more than
double the memory) I changed all the package names and what not to
match the new project name. I am able to start the app and get my
splash screen but as soon as it is time to load the first screen my
app closes to the home screen and gives me a fail to set top app
changed in the logcat. No others errors appear in the logcat. After
spending a lot of time stepping though the code with the debugger to
verify no errors I decided to copy this project back over to my
laptop. I kept everything the same as far as naming and package
declarations. I plugged my phone up and started to debug from my
laptop and it works correctly.

Why does it crash when I try to run it from my desktop with the exact
same code and naming? Could any give me any ideas of what to look for
or any possible fixes. It seems like its a system problem not a code
problem but I am totally lost here.

Thanks for your time, help, and suggestions

Tommy

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Strange Issue..Fail to set top app changed..Please help

2010-12-02 Thread Kostya Vasilyev

Tommy,

Since it works when you move the project to another computer (the 
notebook), you could try and do the same on your desktop.


Copy the contents of src, res, assets (if you use them) and the manifest 
to a safe location.


Delete the project, including the old directory.

Create a new Android project with the same name and copy your saved 
files over.


-- Kostya

02.12.2010 23:16, Tommy пишет:

Hi everyone,

I have a strange issue that I can't seem to find a resolution to. I am
working on an app using Eclipse Galileo on my laptop Windows 7 64bit.
I decided to break my app down and pull out a specific section along
with the activity's and services that went with that section. I moved
them over to my desktop Eclipse Helios Windows 7 64 bit (but more than
double the memory) I changed all the package names and what not to
match the new project name. I am able to start the app and get my
splash screen but as soon as it is time to load the first screen my
app closes to the home screen and gives me a fail to set top app
changed in the logcat. No others errors appear in the logcat. After
spending a lot of time stepping though the code with the debugger to
verify no errors I decided to copy this project back over to my
laptop. I kept everything the same as far as naming and package
declarations. I plugged my phone up and started to debug from my
laptop and it works correctly.

Why does it crash when I try to run it from my desktop with the exact
same code and naming? Could any give me any ideas of what to look for
or any possible fixes. It seems like its a system problem not a code
problem but I am totally lost here.

Thanks for your time, help, and suggestions

Tommy




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

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


[android-developers] Re: Drawing a circle on a MapView to mark the accuracy of the location estimation ?

2010-12-02 Thread Dennis R .
 Is using GPolygon() the only way ?
 
 
 No, you can just use this: Canvas.drawCircle().

Canvas.drawCircle is completely different from GPolygon. 
GPolygon draw the polygon with different sizes taking into account zoom level.
I think that GPolygon it is not available on Android :(

Anyone can help with this?

Regards,
Dennis


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Strange Issue..Fail to set top app changed..Please help

2010-12-02 Thread Tommy
I tried thatDidn't workBUT I am now having the issue on both 
computers...

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of Kostya Vasilyev
Sent: Thursday, December 02, 2010 3:23 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Strange Issue..Fail to set top app 
changed..Please help

Tommy,

Since it works when you move the project to another computer (the notebook), 
you could try and do the same on your desktop.

Copy the contents of src, res, assets (if you use them) and the manifest to a 
safe location.

Delete the project, including the old directory.

Create a new Android project with the same name and copy your saved files over.

-- Kostya

02.12.2010 23:16, Tommy пишет:
 Hi everyone,

 I have a strange issue that I can't seem to find a resolution to. I am 
 working on an app using Eclipse Galileo on my laptop Windows 7 64bit.
 I decided to break my app down and pull out a specific section along 
 with the activity's and services that went with that section. I moved 
 them over to my desktop Eclipse Helios Windows 7 64 bit (but more than 
 double the memory) I changed all the package names and what not to 
 match the new project name. I am able to start the app and get my 
 splash screen but as soon as it is time to load the first screen my 
 app closes to the home screen and gives me a fail to set top app 
 changed in the logcat. No others errors appear in the logcat. After 
 spending a lot of time stepping though the code with the debugger to 
 verify no errors I decided to copy this project back over to my 
 laptop. I kept everything the same as far as naming and package 
 declarations. I plugged my phone up and started to debug from my 
 laptop and it works correctly.

 Why does it crash when I try to run it from my desktop with the exact 
 same code and naming? Could any give me any ideas of what to look for 
 or any possible fixes. It seems like its a system problem not a code 
 problem but I am totally lost here.

 Thanks for your time, help, and suggestions

 Tommy



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

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

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


Re: [android-developers] Re: onItemClick(AdapterView? parent, View view,

2010-12-02 Thread Mark Murphy
On Thu, Dec 2, 2010 at 3:05 PM, kiros88 ghui...@gmail.com wrote:
 Okay so i guess this kinda makes sense I'm not really sure how am i
 suppose to change my data model. I did
 ((TextView)adapt.getView(0, null, parent)).setText(hello);
 adapt.notifyDataSetChanged();

 but nothing changed ?

You did not change your data model. Your data model is whatever is
wrapped by your adapter.

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

_Android Programming Tutorials_ Version 3.0.1 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] Free version to Paid version

2010-12-02 Thread Brill Pappin
I've got a situation a lot of us do, where I have released a free
version and now need to make a Paid version of the same app.

As those who have tried will know, you can't change an app from Free
to Paid (a silly feature of the Market).

So, what I'm planning to do is release a Plus version that has more
features.

What are others doing to help direct users to their paid versions from
their Free versions?
I'n my case its an input method, so I have to be careful about how I
tell the user about the paid version with more features.

Comments?

- Brill Pappin

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


[android-developers] Re: System Font Files

2010-12-02 Thread burton miller
Ping.

I know there are some brainiacs that can answer this with two lines of
code:)

I have already spent a couple of hours on it - or I wouldn't have
posted:)

On Nov 30, 4:41 pm, burton miller burton.mil...@gmail.com wrote:
 Anybody know how to get to thesystemfontfilesprogramatically?

 I am building an app that needs thefilesto render it's own bitmaps,
 and I want access to whatever is installed on the device by default
 (in addition to some fonts that i will package with it).

 I know I get the ones from the SDK, but my app is already fairly
 large, andfontfilesare heavy - plus, this doesn't help for
 localized fonts...

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Drawing a circle on a MapView to mark the accuracy of the location estimation ?

2010-12-02 Thread TreKing
On Thu, Dec 2, 2010 at 12:34 PM, Dennis R. danielrodrigues6...@gmail.comwrote:

 Anyone can help with this?


Help with what?

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

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

[android-developers] Re: Listview array adapter gives me Null pointer exception.

2010-12-02 Thread Brion Emde
You still have a bug in your code.

The convertView variable may contain a recycled view, as described in
the documentation. You are inflating a view every time, even when
convertView is non-null.

Please review the documentation for the ArrayAdapter and only inflate
a new view when convertView == null


On Dec 1, 10:11 pm, umakantpatil umakantpat...@gmail.com wrote:
 Found the bug.

 In my code. android.R was included. I removed it and then problem got
 solved.
 thanks

 On Dec 2, 11:06 am, umakantpatil umakantpat...@gmail.com wrote:







  I'm extending ArrayAdapter. But it gives me Null pointer exception.

  Get view is written as follows

          @Override
          public View getView(int position, View convertView, ViewGroup 
  parent)
  {
                  View view;
                  TextView title;
                  TextView desc;
                  //final ImageView image;

                  view = inflater.inflate(resId, parent, false);

                  try{
                          title = (TextView)view.findViewById(R.id.text1);
                          desc = (TextView)view.findViewById(R.id.text2);
                          //image = (ImageView)view.findViewById(R.id.icon);
                  }catch(ClassCastException e){
                          throw e;
                  }
                 MapString,? item = listitem.get(position);
                 title.setText(item.get(title).toString());

  It gives me error at line here. I'm setting the text on title. It says
  Null pointer exception. I know its because findViewById cant find
  title.
  In my XML i have clearly written text1 as id.
  TextView
                  android:id=@+id/text1
                  android:layout_width=fill_parent
                  android:layout_height=wrap_content
                  android:textAppearance=@style/articles_row_title
                  /

  Then findViewById cant find it ?

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


[android-developers] Right value getRefreshRate in android devices ..

2010-12-02 Thread Dan Raaka
What is the expected value for this API on android devices ?
http://developer.android.com/reference/android/view/Display.html#getRefreshRate()

Should it match the claimed screen display refresh rate or 60 ?

-Dan

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 communicating from tabActivity to Child Activity

2010-12-02 Thread TreKing
On Wed, Dec 1, 2010 at 8:21 AM, cool.manish mannishga...@gmail.com wrote:

 Please help me in doing it.


In doing what? You've outlined quite a few different things there.

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

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

Re: [android-developers] Re: Restricted location in publisher GUI is not working on some devices

2010-12-02 Thread dan raaka
I am seeing this disappearing issue on some of my apps as well.

-Dan


On Thu, Nov 25, 2010 at 4:28 AM, Chister Nordvik cnord...@gmail.com wrote:

 I changed location to All countries and it appeared... so something
 is amiss here. But now I have all the other problems with apps
 disappearing, paging not working, screenshots disappearing so guess
 this issue is low on their list...

 On 13 Nov, 02:21, dan raaka danra...@gmail.com wrote:
  market filtering goes beyond geo-restriction
  go through this onehttp://
 developer.android.com/guide/appendix/market-filters.html
 
  -Dan
 
  On Wed, Nov 10, 2010 at 1:20 PM, Chister Nordvik cnord...@gmail.com
 wrote:
   We have an application that is restricted to one country (Norway). But
   I am sitting here with multiple devices, HTC Wildfire, SE XP10 (after
   2.1 upgrade) and SE XP 10 Mini (after 2.1 upgrade) that fails to find
   the application even though they are registered on a Norwegian network
   (Tele2). The SE devices found the application before they got the 2.1
   upgrade, and I have lots of other devices (Nexus One, HTC Desire, HTC
   Tattoo, Galaxy Tab) that finds the app without any problems.
 
   This is very important for us since we can't enable the app worldwide
   due to copyright issues, so is there any way to resolve this issue? Is
   it the operator or the Android device that fails to report the correct
   country here?
 
   Any help would be greatly appreciated.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com
 
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 

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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] NullPointerExeption during addTab to TabHost

2010-12-02 Thread Vladyslav Namashko
Hi all.

I have TabActivity, whose tabs are added during onCreateMethod.
Something like this:

tabHost = getTabHost();
tabHost.addTab(tabHost.newTabSpec(main_tab1).setIndicator(...));
...

It works fine, but sometimes I get NullPointerExeption when trying to
add tab using addTab. This problems reproduced very rarely, so I can't
find, where I'm wrong.

Somewhere I've read, that setting first tab as current
(tabHost.setCurrentTab(0)) before adding tabs (using addTab) can fix
this problem, but no luck :(

So, many thanks for any help.

--
Regards

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


RE: [android-developers] FIXED But 1 question: Strange Issue..Fail to set top app changed..Please help

2010-12-02 Thread Tommy
It turns out that for some reason when I do a
myTextView.setText(Html.fromhtml()) it errors out BUT ONLY on the new
application. On the old application (where I copied the source code exactly
from) the FromHtml method works just fine. In order to fix this I had to add
this: myTextView.setText(String.valueOf(Html.fromHtml()));

WHY? I am targeting the same os platform in both applications its just one
application has less activities and services because it is just a subset of
another app that I wanted to break out... 

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Tommy
Sent: Thursday, December 02, 2010 3:16 PM
To: Android Developers
Subject: [android-developers] Strange Issue..Fail to set top app
changed..Please help

Hi everyone,

I have a strange issue that I can't seem to find a resolution to. I am
working on an app using Eclipse Galileo on my laptop Windows 7 64bit.
I decided to break my app down and pull out a specific section along with
the activity's and services that went with that section. I moved them over
to my desktop Eclipse Helios Windows 7 64 bit (but more than double the
memory) I changed all the package names and what not to match the new
project name. I am able to start the app and get my splash screen but as
soon as it is time to load the first screen my app closes to the home screen
and gives me a fail to set top app changed in the logcat. No others errors
appear in the logcat. After spending a lot of time stepping though the code
with the debugger to verify no errors I decided to copy this project back
over to my laptop. I kept everything the same as far as naming and package
declarations. I plugged my phone up and started to debug from my laptop and
it works correctly.

Why does it crash when I try to run it from my desktop with the exact same
code and naming? Could any give me any ideas of what to look for or any
possible fixes. It seems like its a system problem not a code problem but I
am totally lost here.

Thanks for your time, help, and suggestions

Tommy

--
You received this message because you are subscribed to the Google Groups
Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Restlet api

2010-12-02 Thread biokys
So I make another step,
I can succesfully call this method from client:

 User user = resource.getUser(Test);



On the server side it looks like:

@Put
public User getUser(String msg) {
return new User(John + msg, Locke + msg);
}


So I can pass String param to method getUser and receive object User.
BUT I need to pass to method object User as well. So it should look
like this:
@Put
public User getUser(User oldUser)
{
...
}



BUT this is not working :-(

Anyone can help me? I spent 2 evenings when i was trying to solve this
issue.

PS: Is possible in one method to pass nonprimitive object and receive
another nonprimitive object?
Thx Honza
On 2 pro, 05:24, creativepragmatic creativepragma...@gmail.com
wrote:
 I have been working with Restlet for a couple of months.  To me, while
 it is a REST web service, it seems to work more like a remote
 procedure call in code.  If I am not mistaken, custom data types
 should be serialized before being sent.  I hope that helps.  I will
 watch this thread for any further questions.

 On Dec 1, 4:53 pm, biokys mulle...@gmail.com wrote:







  Hi, I am little bit confused about using of restlet framework. Can
  someone explain me, if restlet api works similarly as a classic web
  services (JAX-WS)? I cant figure out, how to transfer to server my
  custom data type and in the same call to return any value or another
  custom data type like

  long id = resource.createUser(User);

  Maybe i m doing anything wrong, but what is working until now for me
  is just simple call

  String s = getString();

  where method getString() is implemented on server side like this:
  @Get
  public String getString() { return Hello world;}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Passing objects to new intents

2010-12-02 Thread John C. Bland II
Just reporting back. It works perfectly. I had a couple glitches but that
was bad coding. :-D

Thx guys!

---
John C. Bland II
Blog: http://www.johncblandii.com
Company: http://www.katapultmedia.com
Twitter: @johncblandii


On Tue, Nov 30, 2010 at 11:22 AM, John C. Bland II
johncblan...@gmail.comwrote:

 Ok...I'll look into it. Thx dude!

 ---
 John C. Bland II
 Blog: http://www.johncblandii.com
 Company: http://www.katapultmedia.com
 Twitter: @johncblandii


 On Mon, Nov 29, 2010 at 9:42 PM, TreKing treking...@gmail.com wrote:

 On Mon, Nov 29, 2010 at 9:29 PM, John C. Bland II johncblan...@gmail.com
  wrote:

 So you return a Bundle and receive a bundle then expand it to the
 properties?


 Yup, basically. It's like extending the Parcelable interface ... only
 without the headaches.



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

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




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

[android-developers] Loading external images with basic auth and url redirects

2010-12-02 Thread John C. Bland II
http://mysite.com/imageslug

It redirects to: http://mysite.com/path/to/some/image.jpg.

I also need to use basic auth.

I'm using the Apache HttpUrlConnection and Base64.

Any tips?

---
John C. Bland II
Blog: http://www.johncblandii.com
Company: http://www.katapultmedia.com
Twitter: @johncblandii

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

[android-developers] Intent filter targeting specific SDK version

2010-12-02 Thread Kwisatz
Problem:
I have an Activity with an Intent-Filter that must be always active,
but only when the application is running on devices above Froyo,

Is there a way to:

1. Permanently add Intent-Filters?

or

2. Permanently remove Intent-Filters?

or

3. Make the intent-filter target specifically an SDK version?

Any help is appreciated. 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] Attach debugger to app that is already running

2010-12-02 Thread if05041
Yes. You can select the process from ddms and then attach the debugger to 
process. 
Powered by Telkomsel BlackBerry®

-Original Message-
From: Leigh McRae leigh.mc...@lonedwarfgames.com
Sender: android-developers@googlegroups.com
Date: Thu, 2 Dec 2010 07:41:30 
To: Android Developersandroid-developers@googlegroups.com
Reply-To: android-developers@googlegroups.com
Subject: [android-developers] Attach debugger to app that is already running

When I use eclipse to launch a debug session on my device it takes 2-3
minutes just to load the game.  I would like to be able to run my
game, get to the point I'm interested in and then attach the
debugger.  Is this possible?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Custom Drawable Type refrerenced from XML

2010-12-02 Thread Greg Giacovelli
Hi I was wondering if something like this is possible {

public class Foo extends Drawable {
 public void draw(Canvas canvas) {
... custom draw routine
 }
}

...

some_layout.xml
...
View
   android:id=@+id/view1
   android:background=@drawable/Foo
/
...

I know the second syntax doesn't work. However is such a concept
possible? Like can I reference a custom drawable class implementation
and ask for it to be used in place of a drawable made through an XML
layout?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Detect when the screen is locked

2010-12-02 Thread Peter Eastman
How can I detect when the screen is locked?  I'm writing a game, and
have found that sometimes users will pause the game by just hitting
the power button to turn off the screen.  onPause() gets called then
as expected.  But onResume() gets called as soon as they turn the
screen back on, causing my game to start running again, even though
it's hidden behind the lock screen.  Calling getVisibility() on the
View also returns VISIBLE, even though it isn't.  How can I tell when
my activity is actually visible, not hidden by the lock screen?

Peter

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Free version to Paid version

2010-12-02 Thread Leon Moreyn-Android Development
pretty much thats the general method being used. One thing to consider
is unpublishing the app and releasing a paid version in its place. But
users may find that kinda a slap in the face. I would say do as your
doing, add features to the app and call it app Plus and charge money
for it. Remember though those feature need to be worth the price you
apply to the app though. What you can do is remove features in an
update to your free app and keep them in your paid version.

On Dec 2, 3:42 pm, Brill Pappin br...@pappin.ca wrote:
 I've got a situation a lot of us do, where I have released a free
 version and now need to make a Paid version of the same app.

 As those who have tried will know, you can't change an app from Free
 to Paid (a silly feature of the Market).

 So, what I'm planning to do is release a Plus version that has more
 features.

 What are others doing to help direct users to their paid versions from
 their Free versions?
 I'n my case its an input method, so I have to be careful about how I
 tell the user about the paid version with more features.

 Comments?

 - Brill Pappin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Detect when the screen is locked

2010-12-02 Thread Mark Murphy
On Thu, Dec 2, 2010 at 5:44 PM, Peter Eastman peter.east...@gmail.com wrote:
 How can I detect when the screen is locked?

Watch for ACTION_SCREEN_OFF broadcasts -- it's the closest thing, AFAIK.

 I'm writing a game, and
 have found that sometimes users will pause the game by just hitting
 the power button to turn off the screen.  onPause() gets called then
 as expected.  But onResume() gets called as soon as they turn the
 screen back on, causing my game to start running again, even though
 it's hidden behind the lock screen.  Calling getVisibility() on the
 View also returns VISIBLE, even though it isn't.  How can I tell when
 my activity is actually visible, not hidden by the lock screen?

To find out when the user gets past the lock screen or keyguard, watch
for ACTION_USER_PRESENT broadcasts.

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

_Android Programming Tutorials_ Version 3.0.1 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


Re: [android-developers] Intent filter targeting specific SDK version

2010-12-02 Thread Mark Murphy
On Thu, Dec 2, 2010 at 5:29 PM, Kwisatz rui.mtd.ro...@gmail.com wrote:
 I have an Activity with an Intent-Filter that must be always active,
 but only when the application is running on devices above Froyo,

 Is there a way to:

 1. Permanently add Intent-Filters?

 or

 2. Permanently remove Intent-Filters?

 or

 3. Make the intent-filter target specifically an SDK version?

#2 can be achieved via an activity alias, PackageManager, and
setComponentEnabledSetting(), I think.

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

_Android Programming Tutorials_ Version 3.0.1 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] Buttons supported in notification expanded view?

2010-12-02 Thread CrazyH
Hi,

I am trying to get buttons to work in notification expanded view.  The
goal is to use the buttons to launch activities from the notification
view.  Is this even supported?  Here is a very simple outline with
irrelevant details omitted:

1.  Create a RemoteView object using a layout with some ImageButtons.
2.  Create pending intent for each button and set them using
RemoteView.setOnClickPendingIntent(...)
3.  Create a Notification object and set it's contentView as the
RemoteView created in step 1.
4.  Set Notification object's contentIntent.
5.  Send the Notification.

This works beautifully on my Droid X.  I can click on each button and
launch it's associated activity successfully.

This works on my pal's Evo 4G as well, except that it launches the
button's intent plus the notification's content intent.  So two
intents launched.  But I can deal with that.

This also works on HTC Incredible.

Unfortunately, it doesn't work on most other phones:  Vibrant, Hero,
Vision, WildFire, MIleStone, Droid 1.  These are the ones I know so
far based on user feedback.  On these phones, only the notification
contentIntent is being launched.  It appears the button's click events
aren't being captured/detected.

I am at my wit's end trying to work around this.  I am beginning to
think it's impossible, but it works on some phones!  Any suggestion/
help is 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


Re: [android-developers] Re: Free version to Paid version

2010-12-02 Thread TreKing
On Thu, Dec 2, 2010 at 4:46 PM, Leon Moreyn-Android Development 
lmor...@earthcam.com wrote:

 What you can do is remove features in an update to your free app and keep
 them in your paid version.


That is an awesome way to piss people off. :-)

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

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

[android-developers] Re: How to make a backwards compatible aidl?

2010-12-02 Thread Rohan
Bump.
Any tips for me?

On Nov 26, 2:25 pm, ANT rohan.martin@gmail.com wrote:
 I want to support multiple applications communicating with my service
 through aidl, but I will need to add IPC functions in the future while
 still supporting the old applications.  Adding a new function to the
 service aidl, but not updating the application, causes the wrong
 remote function to be called - and I get no indication of an error.

 I can add a version check, so that new applications will know not to
 use functions which don't exist, but is there an approach to keep
 using the same aidl with new functions added on the service side?

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


Re: [android-developers] Re: How to make a backwards compatible aidl?

2010-12-02 Thread Mark Murphy
On Thu, Dec 2, 2010 at 6:23 PM, Rohan rohan.martin@gmail.com wrote:
 Bump.
 Any tips for me?

I don't think what you literally asked for (make a backwards
compatible AIDL) is possible.

What should be possible, though, is to support two different AIDL versions.

I have not tried this, so your kilometerage may vary, but here is what
I would try:

Step #1: Create a new AIDL file with a new name to go along with your
existing AIDL file.

Step #2: Create a distinct Intent format for use with bindService() to
request the new AIDL. For example, if you are presently using action
android:name=com.myfirm.SERVICE / to identify your service to other
apps, add a second element like action
android:name=com.myfirm.SERVICE_V2 /.

Step #3: Create .Stub implementations for each of the two AIDL files,
routing to some common implementation where needed.

Step #4: In onBind(), examine the Intent you get, and based on the
discriminator you introduced in Step #2, return the corresponding
IBinder from Step #3.

This extends indefinitely, so you can be backwards-compatible as long
as you want, deprecating the older AIDL. If you have analytics in your
app, you might consider logging the usage of each AIDL version -- once
an old one becomes unused, announce you are dropping it, then drop it
sometime thereafter, to reduce your code maintenance burden.

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

_Android Programming Tutorials_ Version 3.0.1 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: Listview array adapter gives me Null pointer exception.

2010-12-02 Thread Doug
On Dec 2, 12:52 pm, Brion Emde brione2...@gmail.com wrote:
 The convertView variable may contain a recycled view, as described in
 the documentation. You are inflating a view every time, even when
 convertView is non-null.

I'm not aware of any documentation that says you are obliged to use
convertView if it's non-null.  It's a great practice, but is this
really a bug or just a lack of the usual optimizations?

Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] SyncAdapter questions: monitoring sync status; getting sync settings; sync icon

2010-12-02 Thread focuser
Hi,

I am experiementing with SyncAdatpers and have a few questions that I
could not find answers either in the documentation or this group
yet.

- How to monitor the status of sync after requesting it via
ContentResolver.requestSync?  For example, I need to refresh the UI
when the requested sync finishes.

The javadoc of the method talks about SyncObserver which does not
actually exist.  The ContentResolver.addSyncStatusListener method
seems not useful since it notifies SyncStatusObserver when the sync
status of any SyncAdapter changes, not the particular sync identified
by an account+authority combination.  The current method I use is to
spawn a thread which checks the result of ContentResolver.isSyncActive/
isSyncPending continuously.  But it's quick and dirty solution.  I
guess one could also extends AbstractThreadedSyncAdapter and write a
new binder but it seems overkill.  I assume there are better
solutions?

- How to check if a SyncAdatper is CHECKED in the Accounts  Sync
settings?  ContentResolver.getIsSyncable only checks if a SyncAdapter
is available for a given account.  It will always return true no
matter if that checkbox is checked or not, as long as the checkbox
exists in the settings.

- The sync icon on the status bar seems only visible when calling
requestSync with SYNC_EXTRAS_MANUAL set to true.  Without that extra,
a sync would be succesfully requested and executed, but the icon does
not appear at all.  Is this by design?  And why?

Thanks for your help!

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


[android-developers] Re: Restlet api

2010-12-02 Thread Brill Pappin

Try it with a Post instead of a Put.
Put isn't supposed to return anything but the request status.

- Brill Pappin
On Dec 2, 5:08 pm, biokys mulle...@gmail.com wrote:
 So I make another step,
 I can succesfully call this method from client:

  User user = resource.getUser(Test);

 On the server side it looks like:

 @Put
 public User getUser(String msg) {
 return new User(John + msg, Locke + msg);

 }

 So I can pass String param to method getUser and receive object User.
 BUT I need to pass to method object User as well. So it should look
 like this:
 @Put
 public User getUser(User oldUser)
 {
 ...

 }

 BUT this is not working :-(

 Anyone can help me? I spent 2 evenings when i was trying to solve this
 issue.

 PS: Is possible in one method to pass nonprimitive object and receive
 another nonprimitive object?
 Thx Honza
 On 2 pro, 05:24, creativepragmatic creativepragma...@gmail.com
 wrote:



  I have been working with Restlet for a couple of months.  To me, while
  it is a REST web service, it seems to work more like a remote
  procedure call in code.  If I am not mistaken, custom data types
  should be serialized before being sent.  I hope that helps.  I will
  watch this thread for any further questions.

  On Dec 1, 4:53 pm, biokys mulle...@gmail.com wrote:

   Hi, I am little bit confused about using of restlet framework. Can
   someone explain me, if restlet api works similarly as a classic web
   services (JAX-WS)? I cant figure out, how to transfer to server my
   custom data type and in the same call to return any value or another
   custom data type like

   long id = resource.createUser(User);

   Maybe i m doing anything wrong, but what is working until now for me
   is just simple call

   String s = getString();

   where method getString() is implemented on server side like this:
   @Get
   public String getString() { return Hello world;}

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 with section headers shows same data under each of the them.

2010-12-02 Thread Doug
On Nov 30, 10:34 pm, umakantpatil umakantpat...@gmail.com wrote:
 I have been facing the problem.

 I tried posting on stackoverflow too. Below is the 
 link.http://stackoverflow.com/questions/4321329/listview-with-section-head...

 I have listview with headers. But it shows same list under each
 header. Dont know why. On the link of stackoverflow, I have shared it
 in detail.

 Can some one help me out please?

I think you have a programming error in the way you're dealing with
your section object.  The constructor for SimpleAdapter is mostly
likely not making a deep copy of the section you are passing in each
time that it's called.  Every SimpleAdapter is probably just holding a
reference to the same section you created at the top of the loop.
Since you end up repeatedly accumulating and clearing the contents of
section, you are actually modifying the same section used in each
SimpleAdapter you create.

Make a whole new section object each time you pass one to a
SimpleAdapter instead of reusing the same one.

Doug

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


[android-developers] Re: How to detect FPS (frame per second) in video ?

2010-12-02 Thread Doug
On Dec 1, 10:41 pm, Paddy Yao ispa...@gmail.com wrote:
 I use VideoView to play video .
 I can use getCurrentPosition() to get current run time .
 But I don`t know how to detect how many frames has play.

 Or I should use the other class but not VideoView ?

 Does anyone know this issue?

You can't know the frame rate with VideoView or the underlying
MediaPlayer object that powers it.  The Android API doesn't expose
that information.  If you want to know what is possible with media on
Android, look at MediaPlayer.  It's not much to go with and is only
good for simple playback function.

Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 update an ArrayAdapter

2010-12-02 Thread kiros88
Okay So im basically come to a problem and a question im trying to
search online for. I know your going to have to notifyDataSetChanged
to update your listView but im having a hard time finding an example
of how to update my arrayAdapter when data would change is there and
example of how to do this. I know i see ppl talking about doing it
with a thread or something and using a handler but Im not using a
thread to do the notifyDataSetChanged so im not sure if i need it?

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


[android-developers] Re: Attach debugger to app that is already running

2010-12-02 Thread fadden
On Dec 2, 8:58 am, Kostya Vasilyev kmans...@gmail.com wrote:
 - Run your game.
 - In Eclipse, switch to DDMS perspective (green Android, top-right toolbar).
 - In the Devices window (top-left), select your process.
 - Click the green bug icon in the toolbar above.

Also, if you want to wait at a specific point, you can use
android.os.Debug.waitForDebugger() to have the app pause until the
debugger connects.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Intent filter targeting specific SDK version

2010-12-02 Thread Kwisatz
Wow! Thank you so much, Mark. You really guided me to the right place.
Here is what I come up with:

In the manifest, I have my Activity, let's call it
com.test.disable.TargetActivity, and it is set with one or more intent
filters.

So, during the app execution, somewhere in the code, I can see if the
conditions for the Activity are met, so that it can be launched, and
if the conditions don't met:

PackageManager pm =
getApplicationContext().getPackageManager();
pm.setComponentEnabledSetting(
new ComponentName(com.test.disable,
TargetActivity.class.getName()),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);

This disables the Activity, and thus, the intent filters. The Activity
is disabled forever, even after a reboot, and can only be activated on
reinstalling the app or by running the same code with the flag
COMPONENT_ENABLED_STATE_ENABLED.

Well, at least it works on the emulator. It's past midnight in here,
so I'll test this on a bunch of devices tomorrow at work.

Thank you again, 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


  1   2   >