[android-developers] Changing the content of an activity runtime

2010-07-24 Thread Luca Carlon
Hi! I created an activity by using a layout written in a XML file. I
would like, in response to some events, to change the content of this
activity. I would like to show a VideoView over the content. In
response to some other event, I may want to go back to the first
content. Would it be possible to switch the content of the activity
this way without running another activity (I have another technical
difficult in doing that)?

I tried using setContentView(videoView), and then switching back with
setContentView(T.layout.main), but it seems that, when going back to
the main layout, all my buttons and text boxes are created again as
they were new. Would it be possible to go back to the last state of
all the controls?

Thanks for any advice!

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


[android-developers] How to get scroll position in a GridView? getScrollY always return 0

2010-07-24 Thread Alex Xin
Hi,

I have a GridView in my activity, and I want to save current scroll position
while user goes to another place and restore it while user comes back. I try
to use GridView.getScrollY and GridView.scrollTo methods, but getScrollY
method always return 0 instead of right scroll position. Am I using this
method in a wrong way?

Could anyone who can teach me how to retrieve the scroll position in a
GridView?

I searched the Internet found that someone said we can use
getSelectedItemPosition and setSelection methods, but this requires user to
select at least one item, how about the case that no items is selected?

Thanks a lot!

Alex

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

2010-07-24 Thread Robert Green
I'd consider just writing an svg importer and then rendering using
opengl in line mode.

On Jul 23, 11:09 pm, Eric erics...@gmail.com wrote:
 inkscape has a command line svg renderer I just bet you could find a
 way to use that code in your process to render in-memory.  (Say to
 render straight into the video buffer)

 But honestly this is mobile platform still even in 2010 you ought to
 prerender for performance's sake.

 On Jul 23, 8:33 am, RaksSVG raks...@gmail.com wrote:



  Hi All,

  I need to render SVG SMIL animations on an android device and I know
  that SVG is not supported till Android 2.2
  So I am looking for alternative ways to display my SVG SMIL file

  Can anyone help me with how I can process the SVG file to convert it
  into some other 2d graphics rendering apis to display the animations ?

  Do I need to convert my SVG file into opengl apis to render the
  graphics or is there a way to create the SVG into some kind of pixel
  buffer every animation interval

  Thanks in Advance

  Regards
  Raks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread sblantipodi
As subject.

This morning an email noticed me that the android market rules are
changed and that I must accept it within 30 days.
Now the prolblem is.

I have always distribuited (only on android market due to the lack of
dynamic licensing) a free trial,
customers who want to buy the product must buy it on our official
site.

Now rules are changed, we cannot distribuite freel trial on the market
and ask to the customers to buy the software on other place.
What do you think about that? I don't want to give to the market a non
secure version of my software, without dynamic licensing, no need to
argue, I can't give the unprotected binary...

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

2010-07-24 Thread YuviDroid
When you specify orientation in configChanges you are telling the OS not
to deal with orientation changes in your activity. Therefore, when you now
rotate the phone you activity will not be recreated and the layout file will
not be inflated again.

On Sat, Jul 24, 2010 at 2:56 AM, Alex Xin xinxi...@gmail.com wrote:

 Hi,

 I found that if I add

 android:configChanges=keyboardHidden|orientation

 in mainfest.xml for each activities, then everything works fine, no
 crashes, no reset. Does anyone know why?

 Thanks a lot

 On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote:

 Hi TreKing

 I stored in my layout file at Project Folder\res\layout\main.xml, I have
 only one layout for different orientations and screen densities.

 Thanks

  Alex


 On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote:

 On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote:

 Could someone help me? I really don't know how to start to solve this
 issue?


 Where are you storing the layout file? Which folder?
 Do you have different layouts for different orientations and / or
 different screen densities?


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




-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

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

2010-07-24 Thread Alex Xin
Hi YuviDroid

So this method is just a workround? I still need to find out why my app will
crash while orientation changes?

On Sat, Jul 24, 2010 at 5:02 PM, YuviDroid yuvidr...@gmail.com wrote:

 When you specify orientation in configChanges you are telling the OS not
 to deal with orientation changes in your activity. Therefore, when you now
 rotate the phone you activity will not be recreated and the layout file will
 not be inflated again.


 On Sat, Jul 24, 2010 at 2:56 AM, Alex Xin xinxi...@gmail.com wrote:

 Hi,

 I found that if I add

 android:configChanges=keyboardHidden|orientation

 in mainfest.xml for each activities, then everything works fine, no
 crashes, no reset. Does anyone know why?

 Thanks a lot

 On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote:

 Hi TreKing

 I stored in my layout file at Project Folder\res\layout\main.xml, I have
 only one layout for different orientations and screen densities.

 Thanks

  Alex


 On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote:

 On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote:

 Could someone help me? I really don't know how to start to solve this
 issue?


 Where are you storing the layout file? Which folder?
 Do you have different layouts for different orientations and / or
 different screen densities?


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




 --
 YuviDroid
 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget
 to quickly access your favorite apps and contacts!)
 http://android.yuvalsharon.net

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread Pent
 Now rules are changed, we cannot distribuite freel trial on the market
 and ask to the customers to buy the software on other place.
 What do you think about that? I don't want to give to the market a non
 secure version of my software, without dynamic licensing, no need to
 argue, I can't give the unprotected binary...

That was already the case for a long time.

Obviously (and reasonably) Google don't want you using market for
advertising your product and then they don't get any share of a
sale...

You can put your own licencing scheme in anything customers buy on the
market though.

Customers don't like it, of course.

Pent

p.s. this is all my reading of the conditions document, not legal
advice :)

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

2010-07-24 Thread YuviDroid
Well, if your app works fine with this then it should be ok ;)
Still, it would be interesting to understand what's causing the crash..


On Sat, Jul 24, 2010 at 11:11 AM, Alex Xin xinxi...@gmail.com wrote:

 Hi YuviDroid

 So this method is just a workround? I still need to find out why my app
 will crash while orientation changes?


 On Sat, Jul 24, 2010 at 5:02 PM, YuviDroid yuvidr...@gmail.com wrote:

 When you specify orientation in configChanges you are telling the OS not
 to deal with orientation changes in your activity. Therefore, when you now
 rotate the phone you activity will not be recreated and the layout file will
 not be inflated again.


 On Sat, Jul 24, 2010 at 2:56 AM, Alex Xin xinxi...@gmail.com wrote:

 Hi,

 I found that if I add

 android:configChanges=keyboardHidden|orientation

 in mainfest.xml for each activities, then everything works fine, no
 crashes, no reset. Does anyone know why?

 Thanks a lot

 On Sat, Jul 24, 2010 at 8:23 AM, Alex Xin xinxi...@gmail.com wrote:

 Hi TreKing

 I stored in my layout file at Project Folder\res\layout\main.xml, I have
 only one layout for different orientations and screen densities.

 Thanks

  Alex


 On Sat, Jul 24, 2010 at 3:03 AM, TreKing treking...@gmail.com wrote:

 On Fri, Jul 23, 2010 at 12:48 PM, Alex Xin xinxi...@gmail.com wrote:

 Could someone help me? I really don't know how to start to solve this
 issue?


 Where are you storing the layout file? Which folder?
 Do you have different layouts for different orientations and / or
 different screen densities?


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




 --
 YuviDroid
 Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget
 to quickly access your favorite apps and contacts!)
 http://android.yuvalsharon.net

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


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




-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget to
quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread Kostya Vasilyev

That's quite understandable.

But it would really help if Android Market supported more countries for 
buying and selling apps. The issue would just go away.


-- Kostya

24.07.2010 13:22, Pent пишет:

Obviously (and reasonably) Google don't want you using market for
advertising your product and then they don't get any share of a
sale...

   



--
Kostya Vasilev -- 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: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread Pent
 But it would really help if Android Market supported more countries for
 buying and selling apps. The issue would just go away.

For me, (and sounds like the original poster too) the issue is that
there's no non-trivial
copy protection for apps sold on the market, so I would have to
disagree with you.

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


Re: [android-developers] Changing the content of an activity runtime

2010-07-24 Thread Webnet Android
 I tried using setContentView(videoView), and then switching back with
 setContentView(T.layout.main), but it seems that, when going back to
 the main layout, all my buttons and text boxes are created again as

You have to handle this yourself, i.e. by using sharedpreferencs and
write/restore
UI state on onResume()/onPause() or onStart/onStop respectively.

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

2010-07-24 Thread Webnet Android
On 24 July 2010 00:43, Albert albert8...@googlemail.com wrote:
 The thing is that because the app is pre-installed it does not appear
 under the downloads section on the Android Market.

It makes no difference if app is preinstalled or downloaded. It will appear
in Downloads section of Market as long such package also exists
in Market (apps installed by hand will also pop up on that list if
the same condition is met).  So if you want to offer users any update to
preinstalled app, make sure package name is the same and bump
versionCode  to something higher. Voila. Of course, boths apps have
to be signed with the same key.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: RemoteViews and setEnabled - when is it supported ?

2010-07-24 Thread jarkman


On Jul 23, 6:39 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Jul 23, 2010 at 1:35 PM, jarkman jark...@gmail.com wrote:
  Mark - thanks.

  I can't find any documentation on when the annotation changed, or even
  anywhere that looks like it ought to contain that documentation. Is it
  really down to experiment or diffing the old code ?

 I suspect so -- sorry!


Ta. That is a bit shoddy, isn't it ?

I've submitted a bug report:
http://code.google.com/p/android/issues/detail?id=9983

Now, off to do some experiments...

Richard

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


[android-developers] tattoo apps on market

2010-07-24 Thread Martins Streņģis
Hi there!
in my manifest file i added

 supports-screens
android:largeScreens=true
android:normalScreens=true
android:smallScreens=true
android:anyDensity=true
/supports-screens
uses-sdk
android:minSdkVersion=3
android:targetSdkVersion=4
/uses-sdk

Problem is that i dont see my app in market with htc tatto (ldpi res) but i
see with my samsung (hdpi or mdpi res)

all drawable are in folders named drawable-mdpi drawable ldpi and drawable
hdpi in correct sizes 36px 48px and 72px

question is why my tattoo doesnt show my app ?

regards
-- 
Mārtiņš Streņģis

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

2010-07-24 Thread Webnet Android
On 22 July 2010 22:47, Shulbert hulbert.s...@gmail.com wrote:
 Hello I have noticed a flaw in Android,  When connecting to an IMAP

Android is OS. Problem you mention refers to stock Email application,
not the OS itself.

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

2010-07-24 Thread uday
Will android Backup Service provides the Backup Transport when
registering application with Android backup service for doing Data
backup??

On Jul 23, 9:58 pm, Dianne Hackborn hack...@android.com wrote:
 Currently there is no support for third party backup transports.

 On Mon, Jul 19, 2010 at 6:10 AM, david dber...@gmail.com wrote:
  Is it possible to create my own backup transport for my own cloud
  service I offer?

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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: Pulling specific information from XML files quickly

2010-07-24 Thread Capt Spaghetti
I will look into the Web service approach. I am creating the XML and
could generate 50 seperate SQLite files but I understand accessing
those across a network is iffy even though the hopefully large
number of users would only be reading them.

Thanks
Gene Augustine

On Jul 23, 3:12 pm, Mark Murphy mmur...@commonsware.com wrote:
 I'd build a smarter server, one that returns just the data you need,
 via a GET request. Even if, for whatever reason, you cannot make your
 current server smarter, you can create a separate Web service (e.g.,
 Google App Engine, Slicehost) that gets the data from the existing
 server, puts it in a database, and serves up what you need to the
 client.

 Or, if the data does not change frequently, have your smarter server
 generate a SQLite database that you download periodically and use
 locally on the device.

 Expecting a phone to be able to do bulk data parsing and processing
 quickly is unrealistic, even in today's Snapdragon-y world.

 On Fri, Jul 23, 2010 at 3:05 PM, Capt Spaghetti gene_august...@msn.com 
 wrote:
    I have 50 XML files located on a remote server, one formatted for
  each state. I am able to read each of the 50 files by selecting a
  state from a spinner and using a SAX parser but I cannot seem to find
  out how to pull out information from each file by city. I have tried
  unsuccessfully to pass a city variable to the characters method of the
  Handler.
    Each state has thousands of records and I am looking for a way to
  speed up the search since reading the entire file for a state takes
  several minutes. I used SAX since it was supposed to be the fastest
  way to read but it limits me in selecting specific information. If I
  understand things correctly I could use a DOM parser to find my state
  and city specific data but that would make retrieval even slower. Any
  suggestions would be appreciated.

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

 Android Development Wiki:http://wiki.andmob.org

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


[android-developers] Re: Pulling specific information from XML files quickly

2010-07-24 Thread Capt Spaghetti
I will take another look at XML pull parsing.

Thanks,
Gene Augustine

On Jul 23, 3:28 pm, DanH danhi...@ieee.org wrote:
 You might want to look into XML pull 
 parsing:http://www.xmlpull.org/v1/download/unpacked/doc/quick_intro.html

 There is support for it on the phone.

 On Jul 23, 2:05 pm, Capt Spaghetti gene_august...@msn.com wrote:



     I have 50 XML files located on a remote server, one formatted for
  each state. I am able to read each of the 50 files by selecting a
  state from a spinner and using a SAX parser but I cannot seem to find
  out how to pull out information from each file by city. I have tried
  unsuccessfully to pass a city variable to the characters method of the
  Handler.
     Each state has thousands of records and I am looking for a way to
  speed up the search since reading the entire file for a state takes
  several minutes. I used SAX since it was supposed to be the fastest
  way to read but it limits me in selecting specific information. If I
  understand things correctly I could use a DOM parser to find my state
  and city specific data but that would make retrieval even slower. Any
  suggestions would be appreciated.- Hide quoted text -

 - Show quoted text -

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


[android-developers] Re: Pulling specific information from XML files quickly

2010-07-24 Thread Capt Spaghetti
Mark,

   It just occurred to me that your second option have your smarter
server generate a SQLite database that you download periodically and
use locally on the device. might be just the approach I need. I could
generate 50 seperate SQLite files. The question then becomes how to
incorporate these locally and access?

Thanks,
Gene

On Jul 23, 3:12 pm, Mark Murphy mmur...@commonsware.com wrote:
 I'd build a smarter server, one that returns just the data you need,
 via a GET request. Even if, for whatever reason, you cannot make your
 current server smarter, you can create a separate Web service (e.g.,
 Google App Engine, Slicehost) that gets the data from the existing
 server, puts it in a database, and serves up what you need to the
 client.

 Or, if the data does not change frequently, have your smarter server
 generate a SQLite database that you download periodically and use
 locally on the device.

 Expecting a phone to be able to do bulk data parsing and processing
 quickly is unrealistic, even in today's Snapdragon-y world.

 On Fri, Jul 23, 2010 at 3:05 PM, Capt Spaghetti gene_august...@msn.com 
 wrote:
    I have 50 XML files located on a remote server, one formatted for
  each state. I am able to read each of the 50 files by selecting a
  state from a spinner and using a SAX parser but I cannot seem to find
  out how to pull out information from each file by city. I have tried
  unsuccessfully to pass a city variable to the characters method of the
  Handler.
    Each state has thousands of records and I am looking for a way to
  speed up the search since reading the entire file for a state takes
  several minutes. I used SAX since it was supposed to be the fastest
  way to read but it limits me in selecting specific information. If I
  understand things correctly I could use a DOM parser to find my state
  and city specific data but that would make retrieval even slower. Any
  suggestions would be appreciated.

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

 Android Development Wiki:http://wiki.andmob.org

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


[android-developers] Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread sasq

I have an AsyncTask that scans the file system and publishes progress
through Notifications. To do this I need a reference to the current
Activity in the AsyncTask.

I also don't want to kill the task when the activity is destroyed. How
do I avoid leaking the activity and everything it references on each
configuration change?

One possibility is to remove the reference in OnPause() to be sure it
is gone when the Activity is destroyed, but that would mean
notifications stops coming as soon as you leave the activity which is
no good.

Isn't there a recommended way of dealing with AsyncTasks in this way?

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


[android-developers] Re: Strange or blank emails from users emailing from market

2010-07-24 Thread Flying Coder

I get these periodically.  I used to reply asking if they meant to
send something.  The ones who followed up all said that they had just
accidentally sent the message.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do you approach the various devices your application runs on?

2010-07-24 Thread nation-x
I can tell you from experience that just because an app will run in
the emulator... it doesn't mean it will run on the device. The rest of
your advice is stellar. :) I don't have 500k installs either.

On Jul 23, 3:18 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 1) Set a whole suit of AVD devices with all the possible screen-size/
 resolution/OS version combinations
 2) When developing, test on your main target devices and a few AVDs
 3) When you are nearing completion, do a full test of your app on all
 of your AVDs - automatic testing can help take a lot of the work out
 of this - see Hello 
 Testinghttp://developer.android.com/resources/tutorials/testing/helloandroid...
 4) It's initially difficult to get feedback, but hopefully these few
 pointers will help
 a) Put an email/support button in your info/about screen and make it
 obvious straight away - I usually use a ScrollView for my about
 content then have a strip at the bottom with two buttons - this way
 the buttons are always visible
 b) Implement an unhandled exception handler. When you get one, offer
 the user the option to email a report to you (you can then fill out
 all the details from the error)
 c) If your next version is bringing some much requested feature or
 something that will significantly improve the app. Delay the release a
 bit and offer it only as a beta through your site (let people in
 Market know). This way you generally get early adopters or people who
 are more technically proficient and therefore more likely to actually
 report errors.

 As for getting hold of devices: I'm afraid I doubt carriers will offer
 any kind of plan to small/individual developers, simply because they
 don't have to and to them the Android market appears to be growing at
 a pretty good rate (even if a lot of them are tat, carriers can still
 tout 80,000+ apps or whatever the number is these days).

 What I'd REALLY like to see is what Nokia provides for their developer
 forum - remote device 
 accesshttp://www.forum.nokia.com/Devices/Remote_device_access/
 Quite simply it's the only kind of solution that is going to work as
 the number of devices increases, especially if some of them mess with
 lower level APIs and code. User testing is all well and good, but most
 users won't test your app - they'll just use it. In order to test an
 app well, developers need to be able to test it themselves and be able
 to use automated unit tests.

 On Jul 23, 7:24 pm, Maps.Huge.Info (Maps API Guru)

 cor...@gmail.com wrote:
  You can post your apk to a website and just send a link. That's how I
  do it. The user must select menu button-settings-applications-unknown
  source for it to install. Users on ATT will be SOL though, ATT has
  disabled that feature from Android devices they sell. We all love
  ATT, this is another reason why.

  As far as beta testing, there are a couple of methods I've tried.

  My first idea was to advertise at the bottom of the help text that I'm
  looking for beta testers. That worked well at first but the problem is
  one of interest. I had over 200 people volunteer but at the last beta,
  only a dozen actually downloaded the app and only three gave me their
  feedback. I certainly can understand why: attrition. My second idea
  was simpler and worked out a lot better. When I have a beta to test, I
  advertise in the help that I have a beta ready and give a URL where
  they can download it. This resulted in over 200 tests and a few dozen
  responders with feedback.

  An official beta test community of regular users would be the ideal
  situation.

  -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: Pulling specific information from XML files quickly

2010-07-24 Thread DanH
The SQLite files will be larger than the XML and probably slower to
access, on a one-off basis.  If you insist on the 50 downloaded files,
I'd place the data in a flat file of some sort, with a dope vector at
the top to speed access.  Compact and fast to access.

On Jul 24, 7:03 am, Capt Spaghetti gene_august...@msn.com wrote:
 Mark,

    It just occurred to me that your second option have your smarter
 server generate a SQLite database that you download periodically and
 use locally on the device. might be just the approach I need. I could
 generate 50 seperate SQLite files. The question then becomes how to
 incorporate these locally and access?

 Thanks,
 Gene

 On Jul 23, 3:12 pm, Mark Murphy mmur...@commonsware.com wrote:

  I'd build a smarter server, one that returns just the data you need,
  via a GET request. Even if, for whatever reason, you cannot make your
  current server smarter, you can create a separate Web service (e.g.,
  Google App Engine, Slicehost) that gets the data from the existing
  server, puts it in a database, and serves up what you need to the
  client.

  Or, if the data does not change frequently, have your smarter server
  generate a SQLite database that you download periodically and use
  locally on the device.

  Expecting a phone to be able to do bulk data parsing and processing
  quickly is unrealistic, even in today's Snapdragon-y world.

  On Fri, Jul 23, 2010 at 3:05 PM, Capt Spaghetti gene_august...@msn.com 
  wrote:
     I have 50 XML files located on a remote server, one formatted for
   each state. I am able to read each of the 50 files by selecting a
   state from a spinner and using a SAX parser but I cannot seem to find
   out how to pull out information from each file by city. I have tried
   unsuccessfully to pass a city variable to the characters method of the
   Handler.
     Each state has thousands of records and I am looking for a way to
   speed up the search since reading the entire file for a state takes
   several minutes. I used SAX since it was supposed to be the fastest
   way to read but it limits me in selecting specific information. If I
   understand things correctly I could use a DOM parser to find my state
   and city specific data but that would make retrieval even slower. Any
   suggestions would be appreciated.

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

  Android Development Wiki:http://wiki.andmob.org

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


Re: [android-developers] Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Agus
you can use the application context

On Sat, Jul 24, 2010 at 5:28 AM, sasq jonas.minnb...@gmail.com wrote:

 I have an AsyncTask that scans the file system and publishes progress
 through Notifications. To do this I need a reference to the current
 Activity in the AsyncTask.

 I also don't want to kill the task when the activity is destroyed. How
 do I avoid leaking the activity and everything it references on each
 configuration change?

 One possibility is to remove the reference in OnPause() to be sure it
 is gone when the Activity is destroyed, but that would mean
 notifications stops coming as soon as you leave the activity which is
 no good.

 Isn't there a recommended way of dealing with AsyncTasks in this way?

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

2010-07-24 Thread DanH
Or at the very least you could use JSON vs XML.  Maybe half the space
overhead, and much faster to parse.

On Jul 24, 7:03 am, Capt Spaghetti gene_august...@msn.com wrote:
 Mark,

    It just occurred to me that your second option have your smarter
 server generate a SQLite database that you download periodically and
 use locally on the device. might be just the approach I need. I could
 generate 50 seperate SQLite files. The question then becomes how to
 incorporate these locally and access?

 Thanks,
 Gene

 On Jul 23, 3:12 pm, Mark Murphy mmur...@commonsware.com wrote:

  I'd build a smarter server, one that returns just the data you need,
  via a GET request. Even if, for whatever reason, you cannot make your
  current server smarter, you can create a separate Web service (e.g.,
  Google App Engine, Slicehost) that gets the data from the existing
  server, puts it in a database, and serves up what you need to the
  client.

  Or, if the data does not change frequently, have your smarter server
  generate a SQLite database that you download periodically and use
  locally on the device.

  Expecting a phone to be able to do bulk data parsing and processing
  quickly is unrealistic, even in today's Snapdragon-y world.

  On Fri, Jul 23, 2010 at 3:05 PM, Capt Spaghetti gene_august...@msn.com 
  wrote:
     I have 50 XML files located on a remote server, one formatted for
   each state. I am able to read each of the 50 files by selecting a
   state from a spinner and using a SAX parser but I cannot seem to find
   out how to pull out information from each file by city. I have tried
   unsuccessfully to pass a city variable to the characters method of the
   Handler.
     Each state has thousands of records and I am looking for a way to
   speed up the search since reading the entire file for a state takes
   several minutes. I used SAX since it was supposed to be the fastest
   way to read but it limits me in selecting specific information. If I
   understand things correctly I could use a DOM parser to find my state
   and city specific data but that would make retrieval even slower. Any
   suggestions would be appreciated.

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

  Android Development Wiki:http://wiki.andmob.org

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


[android-developers] Re: Play Sound File

2010-07-24 Thread Emmanuel
From what I understand : no...

This page :
http://developer.android.com/intl/fr/guide/topics/media/index.html
said :
...You cannot play sound files in the conversation audio...

In a sense, I think it's rather a good thing.

Hope it helps,

Emmanuel / Alocaly
http://androidblogger.blogspot.com/
http://www.alocaly.com/

On Jul 23, 11:27 am, Amit Mangal forum.amit.man...@gmail.com wrote:
 Hi
 I also want to play sound file while talking to some one on phone.
 is it possible ?



 On Fri, Jul 23, 2010 at 1:44 PM, Maxood maqs...@salsoft.net wrote:
  Look up in the documentation for android.media.MediaPlayer on the
  android website. Also go through this documentation as well:
 http://developer.android.com/reference/android/media/MediaPlayer.html

  Maqsood
 http://twitter.com/maxood

  On Jul 21, 11:57 pm, Monali jain.mon...@gmail.com wrote:
   Hi,

   can we play sound file in phone line (in background)??
   Please help me

   Thanks in Advance
   Monali

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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


[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread sasq
I need the activty to create a PendingIntent for the Notification.
I suspect there is a way to create a dummy Intent that doesn't refer
to the activity, but I'd prefer that clicking the notification brings
you back to the Activity.

But on that subject - how do you create a Notification with no (or an
empty) PendingIntent ?

On Jul 24, 2:36 pm, Agus agus.sant...@gmail.com wrote:
 you can use the application context



 On Sat, Jul 24, 2010 at 5:28 AM, sasq jonas.minnb...@gmail.com wrote:

  I have an AsyncTask that scans the file system and publishes progress
  through Notifications. To do this I need a reference to the current
  Activity in the AsyncTask.

  I also don't want to kill the task when the activity is destroyed. How
  do I avoid leaking the activity and everything it references on each
  configuration change?

  One possibility is to remove the reference in OnPause() to be sure it
  is gone when the Activity is destroyed, but that would mean
  notifications stops coming as soon as you leave the activity which is
  no good.

  Isn't there a recommended way of dealing with AsyncTasks in this way?

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

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


[android-developers] Re: How could I avoid others to get my used pictures in my application?

2010-07-24 Thread Emmanuel
I'm not sure other applications can have access to the resources, but
you still can copy the apk in any computer and unzip it to access
resources.
Activating the protection mode should prevent the copy, but it's far
from perfect and flawless.

Last point : any one can make a screen capture of their phone...

In a more general way, if you give people access to an application
where they can see things, then they can prevent them to extract what
they see !
But on a legal side, the pictures still belongs to you, and no one
should use them without your authorization.

Emmanuel / Alocaly
http://androidblogger.blogspot.com/
http://www.alocaly.com/

On Jul 23, 6:20 pm, Tom Gibara m...@tomgibara.com wrote:
 I don't think you are correct on 1. I believe all apps have access to the
 resources of any other app, though I'm not certain about this - I've
 certainly always assumed that the resources of my applications are public in
 this way.

 Tom.

 --
 Tom Gibara
 email: m...@tomgibara.com
 web:http://www.tomgibara.com
 blog:http://blog.tomgibara.com
 twitter: tomgibara

 On 23 July 2010 13:40, Joseph Earl joseph.w.e...@gmail.com wrote:



  1) If you store your images in your drawable folder, then they
  shouldn't be accessible outside of your application
  2) If you store images on the SD card then they will be available to
  all applications that know where they are

  On Jul 23, 12:04 am, Frank Weiss fewe...@gmail.com wrote:
   The way I look at it is that if you are going to use some pictures in
   your application, then the people using your application are going to
   have to get those pictures

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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


[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Joseph Earl
Yup. Use a service for long running background tasks that do not
require an Activity to be present.
Threads started by an Activity are killed anyway when your Activity is
destroyed (or at least that's how it seems to me).
You can bind to your service from your Activity to control it.

On Jul 24, 1:28 pm, sasq jonas.minnb...@gmail.com wrote:
 I have an AsyncTask that scans the file system and publishes progress
 through Notifications. To do this I need a reference to the current
 Activity in the AsyncTask.

 I also don't want to kill the task when the activity is destroyed. How
 do I avoid leaking the activity and everything it references on each
 configuration change?

 One possibility is to remove the reference in OnPause() to be sure it
 is gone when the Activity is destroyed, but that would mean
 notifications stops coming as soon as you leave the activity which is
 no good.

 Isn't there a recommended way of dealing with AsyncTasks in this way?

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


[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Joseph Earl
A notification has a contentIntent which is of type PendingIntent.
To launch your activity when the notification is pressed you need to
set the contentIntent with a PendingIntent pointing to your Activity.

On Jul 24, 2:05 pm, sasq jonas.minnb...@gmail.com wrote:
 I need the activty to create a PendingIntent for the Notification.
 I suspect there is a way to create a dummy Intent that doesn't refer
 to the activity, but I'd prefer that clicking the notification brings
 you back to the Activity.

 But on that subject - how do you create a Notification with no (or an
 empty) PendingIntent ?

 On Jul 24, 2:36 pm, Agus agus.sant...@gmail.com wrote:

  you can use the application context

  On Sat, Jul 24, 2010 at 5:28 AM, sasq jonas.minnb...@gmail.com wrote:

   I have an AsyncTask that scans the file system and publishes progress
   through Notifications. To do this I need a reference to the current
   Activity in the AsyncTask.

   I also don't want to kill the task when the activity is destroyed. How
   do I avoid leaking the activity and everything it references on each
   configuration change?

   One possibility is to remove the reference in OnPause() to be sure it
   is gone when the Activity is destroyed, but that would mean
   notifications stops coming as soon as you leave the activity which is
   no good.

   Isn't there a recommended way of dealing with AsyncTasks in this way?

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

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


[android-developers] Re: How do you approach the various devices your application runs on?

2010-07-24 Thread Joseph Earl
Yes you are right, it is just easier for to developers to test and for
most smaller developers unlikely they will ever be able to test on all
devices unless they have very deep pockets.
So I perhaps should add to the above list: testing on an emulator is
no substitute for testing on actual device (hence my want for Remote
Device Access).
Especially try and get hold of at least one device of each of the
various manufacturer customised versions of Android, as these are more
likely to encounter problems than stock Android (and you don't have an
emulator of them).

On Jul 24, 1:32 pm, nation-x shawn.payme...@gmail.com wrote:
 I can tell you from experience that just because an app will run in
 the emulator... it doesn't mean it will run on the device. The rest of
 your advice is stellar. :) I don't have 500k installs either.

 On Jul 23, 3:18 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  1) Set a whole suit of AVD devices with all the possible screen-size/
  resolution/OS version combinations
  2) When developing, test on your main target devices and a few AVDs
  3) When you are nearing completion, do a full test of your app on all
  of your AVDs - automatic testing can help take a lot of the work out
  of this - see Hello 
  Testinghttp://developer.android.com/resources/tutorials/testing/helloandroid...
  4) It's initially difficult to get feedback, but hopefully these few
  pointers will help
  a) Put an email/support button in your info/about screen and make it
  obvious straight away - I usually use a ScrollView for my about
  content then have a strip at the bottom with two buttons - this way
  the buttons are always visible
  b) Implement an unhandled exception handler. When you get one, offer
  the user the option to email a report to you (you can then fill out
  all the details from the error)
  c) If your next version is bringing some much requested feature or
  something that will significantly improve the app. Delay the release a
  bit and offer it only as a beta through your site (let people in
  Market know). This way you generally get early adopters or people who
  are more technically proficient and therefore more likely to actually
  report errors.

  As for getting hold of devices: I'm afraid I doubt carriers will offer
  any kind of plan to small/individual developers, simply because they
  don't have to and to them the Android market appears to be growing at
  a pretty good rate (even if a lot of them are tat, carriers can still
  tout 80,000+ apps or whatever the number is these days).

  What I'd REALLY like to see is what Nokia provides for their developer
  forum - remote device 
  accesshttp://www.forum.nokia.com/Devices/Remote_device_access/
  Quite simply it's the only kind of solution that is going to work as
  the number of devices increases, especially if some of them mess with
  lower level APIs and code. User testing is all well and good, but most
  users won't test your app - they'll just use it. In order to test an
  app well, developers need to be able to test it themselves and be able
  to use automated unit tests.

  On Jul 23, 7:24 pm, Maps.Huge.Info (Maps API Guru)

  cor...@gmail.com wrote:
   You can post your apk to a website and just send a link. That's how I
   do it. The user must select menu button-settings-applications-unknown
   source for it to install. Users on ATT will be SOL though, ATT has
   disabled that feature from Android devices they sell. We all love
   ATT, this is another reason why.

   As far as beta testing, there are a couple of methods I've tried.

   My first idea was to advertise at the bottom of the help text that I'm
   looking for beta testers. That worked well at first but the problem is
   one of interest. I had over 200 people volunteer but at the last beta,
   only a dozen actually downloaded the app and only three gave me their
   feedback. I certainly can understand why: attrition. My second idea
   was simpler and worked out a lot better. When I have a beta to test, I
   advertise in the help that I have a beta ready and give a URL where
   they can download it. This resulted in over 200 tests and a few dozen
   responders with feedback.

   An official beta test community of regular users would be the ideal
   situation.

   -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: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread sasq
Well even an AsyncTask that runs for only a few seconds will have time
to leak many Activity instances if you quickly do many configuration-
changes.
Although in that case onDestroy gets called so you could unregister
the Activity from the task there.

Anyway, I don't want to create another service just for this - and it
doesn't really solve anything since either the task has a reference to
an activity or it doesn't.

I tried using the Application context in the PendingIntent and it
seems to work - I think I'll do it that way...

On Jul 24, 3:10 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 Yup. Use a service for long running background tasks that do not
 require an Activity to be present.
 Threads started by an Activity are killed anyway when your Activity is
 destroyed (or at least that's how it seems to me).
 You can bind to your service from your Activity to control it.

 On Jul 24, 1:28 pm, sasq jonas.minnb...@gmail.com wrote:



  I have an AsyncTask that scans the file system and publishes progress
  through Notifications. To do this I need a reference to the current
  Activity in the AsyncTask.

  I also don't want to kill the task when the activity is destroyed. How
  do I avoid leaking the activity and everything it references on each
  configuration change?

  One possibility is to remove the reference in OnPause() to be sure it
  is gone when the Activity is destroyed, but that would mean
  notifications stops coming as soon as you leave the activity which is
  no good.

  Isn't there a recommended way of dealing with AsyncTasks in this way?

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


[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Paul Turchenko
Threads are not getting killed when activity is destroyed.

On Jul 24, 4:10 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 Yup. Use a service for long running background tasks that do not
 require an Activity to be present.
 Threads started by an Activity are killed anyway when your Activity is
 destroyed (or at least that's how it seems to me).
 You can bind to your service from your Activity to control it.

 On Jul 24, 1:28 pm, sasq jonas.minnb...@gmail.com wrote:

  I have an AsyncTask that scans the file system and publishes progress
  through Notifications. To do this I need a reference to the current
  Activity in the AsyncTask.

  I also don't want to kill the task when the activity is destroyed. How
  do I avoid leaking the activity and everything it references on each
  configuration change?

  One possibility is to remove the reference in OnPause() to be sure it
  is gone when the Activity is destroyed, but that would mean
  notifications stops coming as soon as you leave the activity which is
  no good.

  Isn't there a recommended way of dealing with AsyncTasks in this way?

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


[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Joseph Earl
Ah OK. My bad.

On Jul 24, 2:49 pm, Paul Turchenko paul.turche...@gmail.com wrote:
 Threads are not getting killed when activity is destroyed.

 On Jul 24, 4:10 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  Yup. Use a service for long running background tasks that do not
  require an Activity to be present.
  Threads started by an Activity are killed anyway when your Activity is
  destroyed (or at least that's how it seems to me).
  You can bind to your service from your Activity to control it.

  On Jul 24, 1:28 pm, sasq jonas.minnb...@gmail.com wrote:

   I have an AsyncTask that scans the file system and publishes progress
   through Notifications. To do this I need a reference to the current
   Activity in the AsyncTask.

   I also don't want to kill the task when the activity is destroyed. How
   do I avoid leaking the activity and everything it references on each
   configuration change?

   One possibility is to remove the reference in OnPause() to be sure it
   is gone when the Activity is destroyed, but that would mean
   notifications stops coming as soon as you leave the activity which is
   no good.

   Isn't there a recommended way of dealing with AsyncTasks in this way?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 could I avoid others to get my used pictures in my application?

2010-07-24 Thread DanH
You could always encrypt the pictures.  You'd have to use a security
by obscurity key scheme, of course, but that's usually good for all
but dedicated hackers.

On Jul 22, 12:02 am, ejo ejo...@gmail.com wrote:
 I'll use some pictures in my application.Is there any way to avoid
 others getting my pictures?

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

2010-07-24 Thread mah
When pulling in existing projects, I find that often I need to right-
click the project in the work bench, go to the Android Tools entry,
and select Fix Project Properties.

On Jul 20, 6:31 pm, Marc marc.d.pa...@gmail.com wrote:
 Hi.

 I'm an Android development newb, and I got a problem with Eclipse. I
 tried a few tutorials, but I can't run the tutorial-apps because it
 pops up with this error: R cannot be resolved .
 I've searched a lot of different fora, where people describes the same
 problem, but I just can't fix it.
 A lot of people recommend unchecking Build automatically, Cleaning
 and rechecking Build automatically, people also suggest that it's a
 line that says import R. that causes the problem, but it feels like
 I've tried everything and I still can't make it work...

 I use this SDK :http://developer.android.com/sdk/index.html
 along with 3 different versions of Eclipse, but it's the same error-
 message i get in every version.

 NB.: I don't have a .classpath file, nor do I have a .project file.
 Could that cause the problem ?

 Help is greatly appreciated.

 Thanks.

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


[android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread RichardC
Would using a WeakReference from your AsyncTask back to your activity
help in any way?

See discussion:
http://groups.google.com/group/android-developers/browse_thread/thread/0732e2ec0039e92c#


On Jul 24, 3:13 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 Ah OK. My bad.

 On Jul 24, 2:49 pm, Paul Turchenko paul.turche...@gmail.com wrote:

  Threads are not getting killed when activity is destroyed.

  On Jul 24, 4:10 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

   Yup. Use a service for long running background tasks that do not
   require an Activity to be present.
   Threads started by an Activity are killed anyway when your Activity is
   destroyed (or at least that's how it seems to me).
   You can bind to your service from your Activity to control it.

   On Jul 24, 1:28 pm, sasq jonas.minnb...@gmail.com wrote:

I have an AsyncTask that scans the file system and publishes progress
through Notifications. To do this I need a reference to the current
Activity in the AsyncTask.

I also don't want to kill the task when the activity is destroyed. How
do I avoid leaking the activity and everything it references on each
configuration change?

One possibility is to remove the reference in OnPause() to be sure it
is gone when the Activity is destroyed, but that would mean
notifications stops coming as soon as you leave the activity which is
no good.

Isn't there a recommended way of dealing with AsyncTasks in this way?

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

2010-07-24 Thread Raymond C. Rodgers

On 7/22/2010 4:47 PM, Shulbert wrote:

Hello I have noticed a flaw in Android,  When connecting to an IMAP
server Doesn't matter if it is Exhange or Unix the Android Email
client will not close the connection.  In order for IMAP to work
correctly a client makes a conneciton and gets updates. If a
connection to the IMAP server is left opened you will not see any new
updates.

Step by step on how it should work.

Example will be Exchange server:

Create a new connection point to your IMAP server (Exchange) port 143
(cleartext) or 993 (Secure)
add username: John Doe
Add Domain: *Optional with VPN
Password: **
SMTP server (Exchange)

How often to login and check 5 10 15 30 1hr
Logout after checking email YES/NO (Ding ding ding grand prize winner
option here)

This is a simple fix for Google engineers to fix, they should include
it in their next rev.

   
I'm not an expert on IMAP, though I'm some what familiar with it. It's 
my understanding that IMAP clients are supposed to stay connected to the 
mail server and receive live or periodic updates as they occur on the 
server, where all the action is happening. What you're describing sounds 
a lot more like POP3, where the client does all the work and the server 
acts more like a dumb storage facility, just retrieving and deleting the 
client's requests.


In any event, both the GMail and Email apps in Android seem to be 
working fine with IMAP for me on my G1 (1.6) and my Nexus One (2.2). 
When switching from WiFi to 3G or Edge, sometimes it does seem to take a 
few minutes for the connection to time out and get reestablished, but I 
haven't experienced any problems getting my mail on either phone in 
either app.


Raymond

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


[android-developers] Re: java.lang.IllegalStateException: Content has been consumed

2010-07-24 Thread Kumar Bibek
You can retrieve the content from the entity only once. If you have
already extracted the content somewhere, and you try to fetch it
again, it will throw this IllegalStateException. Check you code and
make sure that you make this call only once.

- Kumar Bibek
http://tech-droid.blogspot.com

On Jul 23, 1:23 pm, tarun agarwal tarun.2...@gmail.com wrote:
 hi all,

 I'm making a http get request like this:

 try {
    HttpClient client = new DefaultHttpClient();
          String getURL =
 http://busspur02.aseag.de/bs.exe?SID=5FC39ScreenX=1440ScreenY=900C...+day+DatumM=+month+DatumJ=+year+ZeitH=+hour+ZeitM=+min+Intervall=60Suchen=(S)uchenGT0=AachenT0=HHT0=+start_from+GT1=AachenT0=HHT1=+destination+;
          HttpGet get = new HttpGet(getURL);
          HttpResponse responseGet = client.execute(get);
          HttpEntity resEntityGet = responseGet.getEntity();
          if (resEntityGet != null) {
           //do something with the response
              Log.i(GET RESPONSE,EntityUtils.toString(resEntityGet));
              }
 

 ERROR:
 04-30 14:01:01.287: WARN/System.err(1088): java.lang.IllegalStateException:
 Content has been consumed
 04-30 14:01:01.297: WARN/System.err(1088):     at org.apache.http.entity.
 BasicHttpEntity.getContent(BasicHttpEntity.java:84)
 04-30 14:01:01.297: WARN/System.err(1088):     at org.apache.http.conn.
 BasicManagedEntity.getContent(BasicManagedEntity.java:100)
 04-30 14:01:01.307: WARN/System.err(1088):     at org.apache.http.util.
 EntityUtils.toString(EntityUtils.java:112)
 04-30 14:01:01.307: WARN/System.err(1088):     at org.apache.http.util.
 EntityUtils.toString(EntityUtils.java:146)
 04-30 14:01:01.307: WARN/System.err(1

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 override the ENTER key behaviour of the virtual keyboard in Android

2010-07-24 Thread Eelco
Thanks, this works, it does catch the enter key.

Just for the other curious, here is how I use it now. I have created
my own super dialog class that has 2 OnKeyListener objects and an
abstract submit method:

public abstract class MyAbstractDialog extends Dialog {

/**
 * OnKeyListener that puts the focus down when the ENTER key is
pressed
 */
protected View.OnKeyListener onEnterFocusDown = new
View.OnKeyListener() {

@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if ((event.getAction() == KeyEvent.ACTION_DOWN) 
(keyCode == KeyEvent.KEYCODE_ENTER)) {
v.requestFocus(View.FOCUS_DOWN);
return true;
}
return false;
}
};


/**
 * OnKeyListener that submits the page when the ENTER key is pressed
 */
protected View.OnKeyListener onEnterSubmitView = new
View.OnKeyListener() {

@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if ((event.getAction() == KeyEvent.ACTION_DOWN) 
(keyCode == KeyEvent.KEYCODE_ENTER)) {
submitView(v);
return true;
}
return false;
}
};
protected abstract void submitView(View v);
}

Now in the Dialog I can use these objects to set on my fields:


// make the ENTER key on passwordField1 put the focus on the next
field
passwordField1.setOnKeyListener(onEnterFocusDown);

// make the ENTER key on passwordField2 submit the page
passwordField2.setOnKeyListener(onEnterSubmitView);

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

2010-07-24 Thread gcstang
Thank you, I'll check this out

On Jul 23, 10:08 am, Brion Emde brione2...@gmail.com wrote:
 The Notebook sample application contains a simple ContentProvider and
 a list of Notes.

 That lives 
 here:http://developer.android.com/resources/samples/NotePad/index.html

 On Jul 23, 9:09 am, gcstang gcst...@gmail.com wrote:

  Does anyone have a easy example to setup the ContentProvider and a
  psuedo helper object for use with a ListView?

  I would be interested in seeing that.

  Thank you in advance

  On Jul 23, 1:50 am, Indicator Veritatis mej1...@yahoo.com wrote:

   Passing data from Activity to Activity is what ContentProviders are
   good at; they even let you pass from application to application.

   On Jul 22, 5:24 pm, Zsolt Vasvari zvasv...@gmail.com wrote:

You cannot pass a SQLiteDatabase object from activity to activity.
Perhaps you could store it in a global static, but I think that's not
a good idea.

On Jul 22, 11:18 pm, ecforu ecforus...@gmail.com wrote: But what's 
the reason for not keeping it open?  Or actually a better
 question is why do is my database dependent on an activity at all?  
 These
 are two totally different pieces to the puzzle (i.e. as in an MVC 
 pattern or
 similar design).

 On Wed, Jul 21, 2010 at 8:29 PM, Zsolt Vasvari zvasv...@gmail.com 
 wrote:
  I never keep an actualy SQLiteDatabase object around ever.  In all 
  my
  activities, I create a helper object and obtain the SQLDatabase 
  object
  which I keep around throwing away the helper object.  And I make 
  sure
  that I close the database in my activities' onDestroy method.

  On Jul 22, 4:07 am, ecforu ecforus...@gmail.com wrote:
   Do I need an instance of my SQLiteOpenHelper class for each 
   Activity I
  have?
    I have 1 currently that all activities access, but started 
   getting an
   exception

   illegal state exception SQLiteDatabase created and never closed 

   on simple a simple query and I can't seem to figure out why this 
   is
   happening.  I read online about this, and wanted to try to 
   understand why
   the SQLiteOpenHelper was dependent on an Activity.

   Is there a way to just have open SQLiteDatabase object without 
   the Helper
   and have it just exist within all activities?

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

 - Show quoted text -- Hide quoted text -

  - Show quoted text -

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


[android-developers] Re: ImageView setColorFilter, what to do for a bitmap?

2010-07-24 Thread Beth
Thanks Greg, I saw that.

There is no ImageView.  It's straight canvas and bitmaps, no
Drawables, no Views.
I may change that... The pixels to change could be one of several
bitmaps in an ImageView.  I don't know if the ImageView ColorFilter
call will work in this case.  The bitmap I want to change is on top of
another bitmap (background) that I do not want to fliter.

On Jul 23, 9:19 pm, greg sep...@eduneer.com wrote:
 Isn't your canvas associated with an ImageView?  (ImageView has a
 setColorFilter() method.)

 On Jul 23, 1:31 pm, Beth emez...@gmail.com wrote:



  Hi all,

  In my code there is a canvas drawing a bitmap created from a resource
  png.  It is not a Drawable.  If I want to take that bitmap and tint
  it, is there something similar to setColorFilter in the graphics
  package that I can use on the canvas and bitmap object?  To be clear,
  my goal is to change the brown pixels of my bitmap to blue, or from
  white to red.  Do you all have any suggestions?

  Regards,
  Beth

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
The recent apps display seems to function quite differently from
earlier versions on 2.2.

Try the following for instance:
1) Open an app
2) Click on something that takes you to another activity in the same
app
3) Press the home button
4) Press and hold the home button to get the recent list of apps -
select the app you chose in step 1
5) You'll be taken to whatever activity in that app is specified as
the main/launcher Activity, rather than the Activity on top of the
stack (as it was previously)

It makes it appear to the user that the application has exited when
the home screen button was pressed.

I don't have my app set to clear history on launch or anything like
that, and I can replicate it on the emulator and with any app on my
device (Contacts, Gmail, Engadget etc)

Anyone else notice this? Anyone know any reason for the changes? I
must admit I quite dislike the new method.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
Actually maybe I was dreaming about the way it worked on 2.1 and
earlier. Will go check.

On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 The recent apps display seems to function quite differently from
 earlier versions on 2.2.

 Try the following for instance:
 1) Open an app
 2) Click on something that takes you to another activity in the same
 app
 3) Press the home button
 4) Press and hold the home button to get the recent list of apps -
 select the app you chose in step 1
 5) You'll be taken to whatever activity in that app is specified as
 the main/launcher Activity, rather than the Activity on top of the
 stack (as it was previously)

 It makes it appear to the user that the application has exited when
 the home screen button was pressed.

 I don't have my app set to clear history on launch or anything like
 that, and I can replicate it on the emulator and with any app on my
 device (Contacts, Gmail, Engadget etc)

 Anyone else notice this? Anyone know any reason for the changes? I
 must admit I quite dislike the new method.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
I apologize. Seems I was dreaming about the way it worked having
changed, the emulator seems to function this way on earlier versions.
For some reason it just seemed to me like it had changed on my Nexus
One since the 2.2 update...

On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 The recent apps display seems to function quite differently from
 earlier versions on 2.2.

 Try the following for instance:
 1) Open an app
 2) Click on something that takes you to another activity in the same
 app
 3) Press the home button
 4) Press and hold the home button to get the recent list of apps -
 select the app you chose in step 1
 5) You'll be taken to whatever activity in that app is specified as
 the main/launcher Activity, rather than the Activity on top of the
 stack (as it was previously)

 It makes it appear to the user that the application has exited when
 the home screen button was pressed.

 I don't have my app set to clear history on launch or anything like
 that, and I can replicate it on the emulator and with any app on my
 device (Contacts, Gmail, Engadget etc)

 Anyone else notice this? Anyone know any reason for the changes? I
 must admit I quite dislike the new method.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
I'm now very tempted to revert my Nexus One to 2.1-update 1 just to
verify that I am indeed losing part of my sanity.
If anyone still has a Nexus One running 2.1 could you tell me quickly
how it behaves?

On Jul 24, 4:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 I apologize. Seems I was dreaming about the way it worked having
 changed, the emulator seems to function this way on earlier versions.
 For some reason it just seemed to me like it had changed on my Nexus
 One since the 2.2 update...

 On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  The recent apps display seems to function quite differently from
  earlier versions on 2.2.

  Try the following for instance:
  1) Open an app
  2) Click on something that takes you to another activity in the same
  app
  3) Press the home button
  4) Press and hold the home button to get the recent list of apps -
  select the app you chose in step 1
  5) You'll be taken to whatever activity in that app is specified as
  the main/launcher Activity, rather than the Activity on top of the
  stack (as it was previously)

  It makes it appear to the user that the application has exited when
  the home screen button was pressed.

  I don't have my app set to clear history on launch or anything like
  that, and I can replicate it on the emulator and with any app on my
  device (Contacts, Gmail, Engadget etc)

  Anyone else notice this? Anyone know any reason for the changes? I
  must admit I quite dislike the new method.

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

2010-07-24 Thread Agus
Don't use WeakReference, use SoftReference.

On Sat, Jul 24, 2010 at 7:48 AM, RichardC
richard.crit...@googlemail.com wrote:
 Would using a WeakReference from your AsyncTask back to your activity
 help in any way?

 See discussion:
 http://groups.google.com/group/android-developers/browse_thread/thread/0732e2ec0039e92c#


 On Jul 24, 3:13 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 Ah OK. My bad.

 On Jul 24, 2:49 pm, Paul Turchenko paul.turche...@gmail.com wrote:

  Threads are not getting killed when activity is destroyed.

  On Jul 24, 4:10 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

   Yup. Use a service for long running background tasks that do not
   require an Activity to be present.
   Threads started by an Activity are killed anyway when your Activity is
   destroyed (or at least that's how it seems to me).
   You can bind to your service from your Activity to control it.

   On Jul 24, 1:28 pm, sasq jonas.minnb...@gmail.com wrote:

I have an AsyncTask that scans the file system and publishes progress
through Notifications. To do this I need a reference to the current
Activity in the AsyncTask.

I also don't want to kill the task when the activity is destroyed. How
do I avoid leaking the activity and everything it references on each
configuration change?

One possibility is to remove the reference in OnPause() to be sure it
is gone when the Activity is destroyed, but that would mean
notifications stops coming as soon as you leave the activity which is
no good.

Isn't there a recommended way of dealing with AsyncTasks in this way?

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

2010-07-24 Thread Anton Persson
There is this library:
http://code.google.com/p/svg4mobile/

I haven't tried that but it seems to be directly written for Android, which
is good..

Then there is my port of libsvg.. libsvg-android.
https://launchpad.net/libsvg-android

I only ported libsvg-android since I couldn't find anything when I started
(svg4mobile was not available back then). My main focus is something
completely different, though.. So as long as libsvg-android works in my
application I'm not pursuing it actively..

   Best Regards
 Anton


On Sat, Jul 24, 2010 at 9:35 AM, Robert Green rbgrn@gmail.com wrote:

 I'd consider just writing an svg importer and then rendering using
 opengl in line mode.

 On Jul 23, 11:09 pm, Eric erics...@gmail.com wrote:
  inkscape has a command line svg renderer I just bet you could find a
  way to use that code in your process to render in-memory.  (Say to
  render straight into the video buffer)
 
  But honestly this is mobile platform still even in 2010 you ought to
  prerender for performance's sake.
 
  On Jul 23, 8:33 am, RaksSVG raks...@gmail.com wrote:
 
 
 
   Hi All,
 
   I need to render SVG SMIL animations on an android device and I know
   that SVG is not supported till Android 2.2
   So I am looking for alternative ways to display my SVG SMIL file
 
   Can anyone help me with how I can process the SVG file to convert it
   into some other 2d graphics rendering apis to display the animations ?
 
   Do I need to convert my SVG file into opengl apis to render the
   graphics or is there a way to create the SVG into some kind of pixel
   buffer every animation interval
 
   Thanks in Advance
 
   Regards
   Raks

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: ImageView setColorFilter, what to do for a bitmap?

2010-07-24 Thread greg
If there isn't an API approach (and I don't know if there is or isn't)
to filter colors in a region of an ImageView, have you considered
using the API to change individual pixels ... or reviewing the png
file format and changing the colormap of the png (assuming the png
file has a colormap)?

On Jul 24, 11:21 am, Beth emez...@gmail.com wrote:
 Thanks Greg, I saw that.

 There is no ImageView.  It's straight canvas and bitmaps, no
 Drawables, no Views.
 I may change that... The pixels to change could be one of several
 bitmaps in an ImageView.  I don't know if the ImageView ColorFilter
 call will work in this case.  The bitmap I want to change is on top of
 another bitmap (background) that I do not want to fliter.

 On Jul 23, 9:19 pm, greg sep...@eduneer.com wrote:

  Isn't your canvas associated with an ImageView?  (ImageView has a
  setColorFilter() method.)

  On Jul 23, 1:31 pm, Beth emez...@gmail.com wrote:

   Hi all,

   In my code there is a canvas drawing a bitmap created from a resource
   png.  It is not a Drawable.  If I want to take that bitmap and tint
   it, is there something similar to setColorFilter in the graphics
   package that I can use on the canvas and bitmap object?  To be clear,
   my goal is to change the brown pixels of my bitmap to blue, or from
   white to red.  Do you all have any suggestions?

   Regards,
   Beth

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

2010-07-24 Thread TreKing
On Sat, Jul 24, 2010 at 2:28 AM, Luca Carlon carlon.l...@gmail.com wrote:

 Would it be possible to switch the content of the activity this way


Sure. You can have one main layout that has two sub layouts and hide the one
you don't need when necessary. You could also look into ViewFlipper.


 without running another activity (I have another technical difficult in
 doing that)?


If running another activity is what you want to do, that's what you should
do. What's the technical difficult you're having doing that?


 I tried using setContentView(videoView), and then switching back with
 setContentView(T.layout.main), but it seems that, when going back to
 the main layout, all my buttons and text boxes are created again as
 they were new.


That's because they are. When you use setContentView, as you have seen,
you're basically loading the default version of the layout.


 Would it be possible to go back to the last state of all the controls?


Sure, but you would have to save the state yourself and restore it on
switching. This sounds like overkill given the other options at your
disposal.

-
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: How to update pre-installed apps

2010-07-24 Thread TreKing
On Sat, Jul 24, 2010 at 5:01 AM, Webnet Android webnet.andr...@gmail.comwrote:

 It makes no difference if app is preinstalled or downloaded. It will
 appear in Downloads section of Market as long such package also exists in
 Market


Are you sure about that? Because I had Google Maps pre-installed on my G1
before they began releasing it on the Market. When they did, I found the
Market version of Maps on the Market and did not have the option to update,
nor did it show up in the downloads section. It was only after downloading
the new version from Market (and replacing the existing copy) that it began
showing up.

-
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: Getting a FileDescriptor from a Socket

2010-07-24 Thread Joseph Earl
For accessing a private member you'd have to use Reflection.
Can't help you on the first point though I'm afraid.

On Jul 23, 4:39 pm, Alexandre Ferrieux alexandre.ferri...@gmail.com
wrote:
 Hi,

 The documentation for FileDescriptor says it is The lowest-level
 representation of a file, device, or socket.
 I see that some classes like FileOutputStream and LocalSocket expose a
 getFD(), but Socket doesn't.

 How do you get at a true (INET) socket's fd ?

 Alternatively, how do you get at the (private) SocketImpl member of
 Socket named impl (this one exposes the fd) ?

 TIA,

 -Alex

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

2010-07-24 Thread Pedro Teixeira
Hi,

I have a class to make a transparent panel to overlay in any view of
my application which I found the tutorial on the internet.  The thing
is.. it's not painting with transparency .. just gray... does it have
to do with this element? How can I change this values to make it be
transparent?

innerPaint = new Paint();
innerPaint.setARGB(255, 75, 75, 75); //gray
innerPaint.setAntiAlias(true);

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

2010-07-24 Thread Kostya Vasilyev

24.07.2010 18:58, Raymond C. Rodgers пишет:
I'm not an expert on IMAP, though I'm some what familiar with it. It's 
my understanding that IMAP clients are supposed to stay connected to 
the mail server and receive live or periodic updates as they occur on 
the server, where all the action is happening.

This is true if the server supports IMAP IDLE command. Not all servers do.

--
Kostya Vasilev -- 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] Is it possible for my Activity to be notified when the external storage state changes?

2010-07-24 Thread Joseph Earl
I would like my Activity to be informed when the SD card is removed,
since it relies on files from the SD card (to keep apk size down) but
for compatibility reasons is not targeted at Froyo.

I'd like to close the application when the SD card is removed/mounted
(giving the user a dialog message to inform them of course) so that I
don't get IOExceptions etc (I'd quite like to not have to check
everytime I load a file to see if the external storage is available, I
already do a check on application launch).

There doesn't seem to be any attribute in the manifest for this (like
configChanges) that I can find.

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

2010-07-24 Thread Webnet Android
 Are you sure about that? Because I had Google Maps pre-installed on my G1

Not 100% sure now as it was a while ago I played with it, but this can
be easily verified.
Assuming you got rooted device put i.e. your old version of your app's
APK in /system/apps
or /data/apps and then launch Market to see if it will appear in and
update will be offered
(assuming newer one is on Market, of course :)

As for Maps - I got a feeling that i.e. Milestone comes with number of
preinstalled
apps (incl. Maps) and there was no problem with the updates (Market app reported
and downloaded w/o problem). Got no G1 to check that but it maybe some other
factor too - maybe others will be more handy.

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


[android-developers] How do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Mark Nuetzmann
I have a gallery that displays TextViews where the background of each
view is the following:

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item
android:state_pressed=true
android:drawable=@drawable/item_pressed /
item
android:state_selected=true
android:drawable=@drawable/item_selected /
item
android:drawable=@drawable/item_idle /
/selector

This selector work just fine for the state_pressed and default (idle)
states, but the selected item state is never displayed.  I REALLY do
not want to force the background of the selected item by changing the
background of the view when the onItemSelected event is called.  What
is the correct state or correct way to get the TextView background to
be set properly.  Is the selected (center) view in the gallery not
really selected?  Is there some other state I should put in the
selector drawable xml?

Thanks, Mark.

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


Re: [android-developers] Changing the content of an activity runtime

2010-07-24 Thread Webnet Android
 Would it be possible to go back to the last state of all the controls?

 Sure, but you would have to save the state yourself and restore it on
 switching. This sounds like overkill given the other options at your
 disposal.

For some odd reasons I managed to forgot onSaveInstanceState() /
onRestoreInstanceState()
methods available for that purpose. In general see Saving activity
state there:

http://developer.android.com/guide/topics/fundamentals.html#lcycles

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Storing data on the SD card in Froyo - files deleted when upgrading

2010-07-24 Thread Joseph Earl
I have an application which resides on the phone memory but downloads
large data to the SD card on first launch (the app needs to be able to
work without an internet connection most of the time)

When using the recommend directory given in Froyo it seems all files
on the SD card are deleted when I install a newer version of the .apk.
I'd preferably like the files removed on uninstall, but not on upgrade
since the files on the SD card aren't going to change between
application versions, and forcing the user to re-download a large file
that is independent of the application version does not seem
reasonable.

At the moment it seems I'm forced to use a different directory to the
recommended one in order to stop Froyo deleting all the files when the
application is upgraded.

Am I doing something wrong, or is this how it is supposed to work (I'm
guessing it is)? (Or perhaps I misunderstood what getExternalFilesDir
is for)

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

2010-07-24 Thread Webnet Android
On 24 July 2010 18:41, Pedro Teixeira pedroteixeir...@gmail.com wrote:

        innerPaint = new Paint();
                innerPaint.setARGB(255, 75, 75, 75); //gray

first value of setARGB is alpha channel (transparency). Set it to i.e.
128 (half the
scale) instead of 255 as alpha ranges between 0..255 with 0 meaning no
contribution
of color value while 255 meaning 100% contribution (hence your results)

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

2010-07-24 Thread Bret Foreman
Try Drawable.setAlpha where a value of 0 is fully transparent and 255
is fully occulting.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Joseph Earl
Try moving your state_selected statement above your state_pressed item
and see if it works.

On Jul 24, 6:07 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:
 I have a gallery that displays TextViews where the background of each
 view is the following:

 ?xml version=1.0 encoding=utf-8?
 selector xmlns:android=http://schemas.android.com/apk/res/android;
     item
         android:state_pressed=true
         android:drawable=@drawable/item_pressed /
     item
         android:state_selected=true
         android:drawable=@drawable/item_selected /
     item
         android:drawable=@drawable/item_idle /
 /selector

 This selector work just fine for the state_pressed and default (idle)
 states, but the selected item state is never displayed.  I REALLY do
 not want to force the background of the selected item by changing the
 background of the view when the onItemSelected event is called.  What
 is the correct state or correct way to get the TextView background to
 be set properly.  Is the selected (center) view in the gallery not
 really selected?  Is there some other state I should put in the
 selector drawable xml?

 Thanks, Mark.

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


[android-developers] How to use my contact list

2010-07-24 Thread S_F_H
Hi,
i want application to send an sms to one of my contacts.the problem
consists is getting the phone number,not the name.
using this code
public void onActivityResult(int reqCode, int resultCode, Intent data)
{
  super.onActivityResult(reqCode, resultCode, data);
  switch (reqCode) {
case (PICK_CONTACT) :
  if (resultCode == Activity.RESULT_OK) {
Uri contactData = data.getData();
Cursor c =  managedQuery(contactData, null, null, null,
null);
if (c.moveToFirst()) {
   String number =
c.getString(c.getColumnIndexOrThrow(People.NUMBER));
   String name=
c.getString(c.getColumnIndexOrThrow(People.NAME));
   txtPhoneNo.setText(number++name);
}
  }
it returns null for number with the correct name,so i've tried to
get the number as int and use a cast later but get strange thing:
always number 6 instead of the phone number and always with the
correct name.
how can i fix it?
Thank you for 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] Maps don't show in my app

2010-07-24 Thread coy
Hi,
I'm just trying to run MapsDemo who is in 'samples' of the SDK, but
consider this:
http://i.imagehost.org/0829/mapss_don_t_show.png

the google maps is working perfectly
http://j.imagehost.org/0640/google_maps.png
):

any ideas?

thanks!


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


[android-developers] Re: Maps don't show in my app

2010-07-24 Thread Joseph Earl
Have you obtained a maps API key?

On Jul 24, 6:30 pm, coy cawe...@gmail.com wrote:
 Hi,
 I'm just trying to run MapsDemo who is in 'samples' of the SDK, but
 consider this:http://i.imagehost.org/0829/mapss_don_t_show.png

 the google maps is working 
 perfectlyhttp://j.imagehost.org/0640/google_maps.png
 ):

 any ideas?

 thanks!

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


[android-developers] Re: Set a panel transparent

2010-07-24 Thread Joseph Earl
You are using innerPaint.setARGB(255, 75, 75, 75); //gray

Since you are setting the Alpha to 255 you will have an opaque image.
If you want some transparency change that value to somewhere between 0
and 255.

On Jul 24, 5:41 pm, Pedro Teixeira pedroteixeir...@gmail.com wrote:
 Hi,

 I have a class to make a transparent panel to overlay in any view of
 my application which I found the tutorial on the internet.  The thing
 is.. it's not painting with transparency .. just gray... does it have
 to do with this element? How can I change this values to make it be
 transparent?

         innerPaint = new Paint();
                 innerPaint.setARGB(255, 75, 75, 75); //gray
                 innerPaint.setAntiAlias(true);

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Maps don't show in my app

2010-07-24 Thread coy
Yes!
But, perhaps my MD5 was wrong when I generated the API Key. Can it be
the problem?

On 24 jul, 14:32, Joseph Earl joseph.w.e...@gmail.com wrote:
 Have you obtained a maps API key?

 On Jul 24, 6:30 pm, coy cawe...@gmail.com wrote:



  Hi,
  I'm just trying to run MapsDemo who is in 'samples' of the SDK, but
  consider this:http://i.imagehost.org/0829/mapss_don_t_show.png

  the google maps is working 
  perfectlyhttp://j.imagehost.org/0640/google_maps.png
  ):

  any ideas?

  thanks!

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


[android-developers] Re: tattoo apps on market

2010-07-24 Thread Joseph Earl
Have you got any other market filters in your manifest that might be
preventing the Tattoo from seeing it?

On Jul 24, 11:03 am, Martins Streņģis martin...@draugiem.lv wrote:
 Hi there!
 in my manifest file i added

      supports-screens
         android:largeScreens=true
         android:normalScreens=true
         android:smallScreens=true
         android:anyDensity=true
     /supports-screens
     uses-sdk
         android:minSdkVersion=3
         android:targetSdkVersion=4
     /uses-sdk

 Problem is that i dont see my app in market with htc tatto (ldpi res) but i
 see with my samsung (hdpi or mdpi res)

 all drawable are in folders named drawable-mdpi drawable ldpi and drawable
 hdpi in correct sizes 36px 48px and 72px

 question is why my tattoo doesnt show my app ?

 regards
 --
 Mārtiņš Streņģis

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Joseph Earl
I use something like:

selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:state_selected=true android:drawable=@drawable/
frame_gallery_thumb_selected /
item android:state_focused=true android:state_pressed=true
android:drawable=@drawable/frame_gallery_thumb_pressed /
item android:state_focused=false android:state_pressed=true
android:drawable=@drawable/frame_gallery_thumb_pressed /
item android:drawable=@drawable/frame_gallery_thumb /
/selector

as a background for views in my gallery which seems to work perfectly.
I should note that when the selected item is pressed it maintains the
selected state drawable (it was how I wanted it) but you could show
the default press state when the selected item is pressed.

On Jul 24, 6:23 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 Try moving your state_selected statement above your state_pressed item
 and see if it works.

 On Jul 24, 6:07 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:

  I have a gallery that displays TextViews where the background of each
  view is the following:

  ?xml version=1.0 encoding=utf-8?
  selector xmlns:android=http://schemas.android.com/apk/res/android;
      item
          android:state_pressed=true
          android:drawable=@drawable/item_pressed /
      item
          android:state_selected=true
          android:drawable=@drawable/item_selected /
      item
          android:drawable=@drawable/item_idle /
  /selector

  This selector work just fine for the state_pressed and default (idle)
  states, but the selected item state is never displayed.  I REALLY do
  not want to force the background of the selected item by changing the
  background of the view when the onItemSelected event is called.  What
  is the correct state or correct way to get the TextView background to
  be set properly.  Is the selected (center) view in the gallery not
  really selected?  Is there some other state I should put in the
  selector drawable xml?

  Thanks, Mark.

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


[android-developers] Re: Maps don't show in my app

2010-07-24 Thread Joseph Earl
The API key could possibly be the problem. Try generating a new one to
check, but if you got your MD5 from keytool it should be correct.
Otherwise are you sure you have included the correct libraries in your
manifest file?

On Jul 24, 6:36 pm, coy cawe...@gmail.com wrote:
 Yes!
 But, perhaps my MD5 was wrong when I generated the API Key. Can it be
 the problem?

 On 24 jul, 14:32, Joseph Earl joseph.w.e...@gmail.com wrote:

  Have you obtained a maps API key?

  On Jul 24, 6:30 pm, coy cawe...@gmail.com wrote:

   Hi,
   I'm just trying to run MapsDemo who is in 'samples' of the SDK, but
   consider this:http://i.imagehost.org/0829/mapss_don_t_show.png

   the google maps is working 
   perfectlyhttp://j.imagehost.org/0640/google_maps.png
   ):

   any ideas?

   thanks!

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


[android-developers] Log in a file

2010-07-24 Thread ReyLith
Hi,

I'm developing an image editor application for Android. I have a big
problem: I haven't a mobile with Android. I found a person that helps
me to test the application and I found many problems. The application
works in the emulator perfectly but in the mobile the application
constantly mistakenly ends. I want to print a log similar that the
show in ddms in a file on the SDCard. I did it with a FileWriter but
it isn't the same that I can see in ddms.

Is it possible to show the same output as ddms in a file?

If not possible I would like to get as much information as possible.
The person who has the mobile don't have knowledge of programming and
I have not got close.

I need help urgently please. Thank you very much in advance. Thanks,

JESÚS

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Maps don't show in my app

2010-07-24 Thread coy
I included it, yes
Oh, I get a new correct API Key and so maps is showing now!
Thank you for reminding me of the API Key
:D

On 24 jul, 14:51, Joseph Earl joseph.w.e...@gmail.com wrote:
 The API key could possibly be the problem. Try generating a new one to
 check, but if you got your MD5 from keytool it should be correct.
 Otherwise are you sure you have included the correct libraries in your
 manifest file?

 On Jul 24, 6:36 pm, coy cawe...@gmail.com wrote:



  Yes!
  But, perhaps my MD5 was wrong when I generated the API Key. Can it be
  the problem?

  On 24 jul, 14:32, Joseph Earl joseph.w.e...@gmail.com wrote:

   Have you obtained a maps API key?

   On Jul 24, 6:30 pm, coy cawe...@gmail.com wrote:

Hi,
I'm just trying to run MapsDemo who is in 'samples' of the SDK, but
consider this:http://i.imagehost.org/0829/mapss_don_t_show.png

the google maps is working 
perfectlyhttp://j.imagehost.org/0640/google_maps.png
):

any ideas?

thanks!

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


[android-developers] Re: How do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Mark Nuetzmann
I changed my selector to be exactly what you have (but using my
drawables ;) and it still behaves the same way; no selected state.
How are you setting the items that are being returned by the adapter?
Are you setting anything interesting on those views that might result
in it working for you?

On Jul 24, 12:45 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 I use something like:

 selector xmlns:android=http://schemas.android.com/apk/res/android;
     item android:state_selected=true android:drawable=@drawable/
 frame_gallery_thumb_selected /
     item android:state_focused=true android:state_pressed=true
 android:drawable=@drawable/frame_gallery_thumb_pressed /
     item android:state_focused=false android:state_pressed=true
 android:drawable=@drawable/frame_gallery_thumb_pressed /
     item android:drawable=@drawable/frame_gallery_thumb /
 /selector

 as a background for views in my gallery which seems to work perfectly.
 I should note that when the selected item is pressed it maintains the
 selected state drawable (it was how I wanted it) but you could show
 the default press state when the selected item is pressed.

 On Jul 24, 6:23 pm, Joseph Earl joseph.w.e...@gmail.com wrote:



  Try moving your state_selected statement above your state_pressed item
  and see if it works.

  On Jul 24, 6:07 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:

   I have a gallery that displays TextViews where the background of each
   view is the following:

   ?xml version=1.0 encoding=utf-8?
   selector xmlns:android=http://schemas.android.com/apk/res/android;
       item
           android:state_pressed=true
           android:drawable=@drawable/item_pressed /
       item
           android:state_selected=true
           android:drawable=@drawable/item_selected /
       item
           android:drawable=@drawable/item_idle /
   /selector

   This selector work just fine for the state_pressed and default (idle)
   states, but the selected item state is never displayed.  I REALLY do
   not want to force the background of the selected item by changing the
   background of the view when the onItemSelected event is called.  What
   is the correct state or correct way to get the TextView background to
   be set properly.  Is the selected (center) view in the gallery not
   really selected?  Is there some other state I should put in the
   selector drawable xml?

   Thanks, Mark.

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


[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread RichardC
It's documented to do that (go to the base activity on the stack)
after a period of time (unspecified) in the background as the user has
probably forgotten what they were doing.

Now all I need to do is to find the reference so you know I am not
making this up :)

...



On Jul 24, 4:41 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 I'm now very tempted to revert my Nexus One to 2.1-update 1 just to
 verify that I am indeed losing part of my sanity.
 If anyone still has a Nexus One running 2.1 could you tell me quickly
 how it behaves?

 On Jul 24, 4:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  I apologize. Seems I was dreaming about the way it worked having
  changed, the emulator seems to function this way on earlier versions.
  For some reason it just seemed to me like it had changed on my Nexus
  One since the 2.2 update...

  On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

   The recent apps display seems to function quite differently from
   earlier versions on 2.2.

   Try the following for instance:
   1) Open an app
   2) Click on something that takes you to another activity in the same
   app
   3) Press the home button
   4) Press and hold the home button to get the recent list of apps -
   select the app you chose in step 1
   5) You'll be taken to whatever activity in that app is specified as
   the main/launcher Activity, rather than the Activity on top of the
   stack (as it was previously)

   It makes it appear to the user that the application has exited when
   the home screen button was pressed.

   I don't have my app set to clear history on launch or anything like
   that, and I can replicate it on the emulator and with any app on my
   device (Contacts, Gmail, Engadget etc)

   Anyone else notice this? Anyone know any reason for the changes? I
   must admit I quite dislike the new method.

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

2010-07-24 Thread ReyLith
First of all thank you very much everyone for your help.

I continue with a problem. I use Runtime.getRuntime().freeMemory() for
obtain the free memory and compare it with the real Bitmap memory.
Sometimes I get a free memory less than that occupied by the image.
However, if I remove the restriction on the size of the image, I can
work with it without any problem. Am I using an incorrect function to
get the free memory?. Should I use another function?

Thank you very much in advance.

On 23 jul, 20:40, DanH danhi...@ieee.org wrote:
 Close as I can tell, you use a BitmapFactory.Options and put a
 BitmapConfig constant in that that specifies the type of internal
 representation you want.  If you use ARGB_ then each pixel will be
 64 bits.  ARGB_ -- 32 bits, RGB_565 -- 16 bits.

 On Jul 23, 12:21 pm, ReyLith jesus...@gmail.com wrote:



  Thanks Nathan.

  With this option I can obtain the image characteristics but I don't
  know the option that indicates me the depth of the pixel. Width and
  Height are in outWidth and outHeight but I don't know where is the
  depth. I thought use the getRowBytes() of Bitmap and product it with
  getHeight() of Bitmap, but I don't know if there is correct.

  On 23 jul, 18:52, Nathan nathan.d.mel...@gmail.com wrote:

   If you can get the width and height for the image without completely
   opening it, then use the width*height*depth.

   You probably have to use this option:

  http://developer.android.com/intl/de/reference/android/graphics/Bitma...

   Nathan

   On Jul 23, 9:30 am, ReyLith jesus...@gmail.com wrote:

So, how can I obtain the depth for know if I can work with the image?

On 23 jul, 18:18, DanH danhi...@ieee.org wrote:

 The size of an image file depends greatly on the compression
 techniques used to create it.  Virtually all image formats involve
 some sort of compression such that the total number of bits in the
 file is considerably less than the (width * height * depth) number
 that represents the raw image.

 On Jul 23, 7:27 am, ReyLith jesus...@gmail.com wrote:

  Hi again,

  I'm trying to put a message when the image is so big. For this I 
  think
  to obtain the size of the file and compare it with the free memory
  Runtime.getRuntime().getFreeMemory()). It works well but I have a 
  new
  problem. The application show an error message with some images
  because they are so big and the application dont't detect the 
  problem.
  I research in other posts and the problem is that the file size is
  different from the size of the image in memory. To get the size of 
  the
  image in memory I use the product getHeight () * getRowBytes () of 
  the
  Bitmap class, but with some images not previously had problems, I 
  get
  very large sizes, so often I get the message erroneously.

  Does anyone know how could solve this problem?

   Thank you very much in advance.

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


[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread RichardC
Found it:

http://developer.android.com/guide/topics/fundamentals.html

read down to:
Clearing the stack

If the user leaves a task for a long time, the system clears the task
of all activities except the root activity. When the user returns to
the task again, it's as the user left it, except that only the initial
activity is present. The idea is that, after a time, users will likely
have abandoned what they were doing before and are returning to the
task to begin something new.


On Jul 24, 7:01 pm, RichardC richard.crit...@googlemail.com wrote:
 It's documented to do that (go to the base activity on the stack)
 after a period of time (unspecified) in the background as the user has
 probably forgotten what they were doing.

 Now all I need to do is to find the reference so you know I am not
 making this up :)

 ...

 On Jul 24, 4:41 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  I'm now very tempted to revert my Nexus One to 2.1-update 1 just to
  verify that I am indeed losing part of my sanity.
  If anyone still has a Nexus One running 2.1 could you tell me quickly
  how it behaves?

  On Jul 24, 4:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

   I apologize. Seems I was dreaming about the way it worked having
   changed, the emulator seems to function this way on earlier versions.
   For some reason it just seemed to me like it had changed on my Nexus
   One since the 2.2 update...

   On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

The recent apps display seems to function quite differently from
earlier versions on 2.2.

Try the following for instance:
1) Open an app
2) Click on something that takes you to another activity in the same
app
3) Press the home button
4) Press and hold the home button to get the recent list of apps -
select the app you chose in step 1
5) You'll be taken to whatever activity in that app is specified as
the main/launcher Activity, rather than the Activity on top of the
stack (as it was previously)

It makes it appear to the user that the application has exited when
the home screen button was pressed.

I don't have my app set to clear history on launch or anything like
that, and I can replicate it on the emulator and with any app on my
device (Contacts, Gmail, Engadget etc)

Anyone else notice this? Anyone know any reason for the changes? I
must admit I quite dislike the new method.

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


[android-developers] Re: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread sblantipodi
Yes the problem is this, I'm neither thinking of distributing my
software without any kind of protection.
So,I'm not authorized to put on the market a FREE trial version,
and ask customers who want the full version to buy it on my official
site?

Someone some months ago told me that all developers done this, I
thought that this was legal

On Jul 24, 11:50 am, Pent tas...@dinglisch.net wrote:
  But it would really help if Android Market supported more countries for
  buying and selling apps. The issue would just go away.

 For me, (and sounds like the original poster too) the issue is that
 there's no non-trivial
 copy protection for apps sold on the market, so I would have to
 disagree with you.

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


[android-developers] Electro Magnetic Radiation Sensor with Android

2010-07-24 Thread Jaan
Hi ,

i am  a student who is very new to Android platform. I am working on a
project which has to sense the EMR (Electro magnetic radiation )
signals and notify the intensity of the EMR signals on the Android
phone.

1. Are there any available external EMR sensor devices which can be
connected to the Android smartphones  to get the intensity of EMR ?

2.   Or is it feasible to develop/implement  a sensor app on Android.
TO do so, the ANdroid phone should consist of a built-in Sensor. ( I
am not sure how this is going to work).

thanks in advance.

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


[android-developers] Re: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread Pent
 So,I'm not authorized to put on the market a FREE trial version,
 and ask customers who want the full version to buy it on my official
 site?

3.3 ...Such free trials for Products are encouraged. However, if you
want to collect fees after the free trial expires, you must collect
all fees for the full version of the Product through the Payment
Processor on the Market

Seems quite clear.

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


Re: [android-developers] Log in a file

2010-07-24 Thread Kostya Vasilyev
There are applications in Market that can show logcat (the log output you
see in DDMS) and make emailing it really easy.

Perhaps you can ask your user to install one of these apps and email you the
log.

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

24.07.2010 21:52 пользователь ReyLith jesus...@gmail.com написал:

Hi,

I'm developing an image editor application for Android. I have a big
problem: I haven't a mobile with Android. I found a person that helps
me to test the application and I found many problems. The application
works in the emulator perfectly but in the mobile the application
constantly mistakenly ends. I want to print a log similar that the
show in ddms in a file on the SDCard. I did it with a FileWriter but
it isn't the same that I can see in ddms.

Is it possible to show the same output as ddms in a file?

If not possible I would like to get as much information as possible.
The person who has the mobile don't have knowledge of programming and
I have not got close.

I need help urgently please. Thank you very much in advance. Thanks,

JESÚS

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
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] Re: tattoo apps on market

2010-07-24 Thread Martins Streņģis
it seems that uses-feature autofocus
was preventing it thanks for advice :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
Thanks for the pointer.

On Jul 24, 7:03 pm, RichardC richard.crit...@googlemail.com wrote:
 Found it:

 http://developer.android.com/guide/topics/fundamentals.html

 read down to:
 Clearing the stack

 If the user leaves a task for a long time, the system clears the task
 of all activities except the root activity. When the user returns to
 the task again, it's as the user left it, except that only the initial
 activity is present. The idea is that, after a time, users will likely
 have abandoned what they were doing before and are returning to the
 task to begin something new.

 On Jul 24, 7:01 pm, RichardC richard.crit...@googlemail.com wrote:

  It's documented to do that (go to the base activity on the stack)
  after a period of time (unspecified) in the background as the user has
  probably forgotten what they were doing.

  Now all I need to do is to find the reference so you know I am not
  making this up :)

  ...

  On Jul 24, 4:41 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

   I'm now very tempted to revert my Nexus One to 2.1-update 1 just to
   verify that I am indeed losing part of my sanity.
   If anyone still has a Nexus One running 2.1 could you tell me quickly
   how it behaves?

   On Jul 24, 4:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

I apologize. Seems I was dreaming about the way it worked having
changed, the emulator seems to function this way on earlier versions.
For some reason it just seemed to me like it had changed on my Nexus
One since the 2.2 update...

On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

 The recent apps display seems to function quite differently from
 earlier versions on 2.2.

 Try the following for instance:
 1) Open an app
 2) Click on something that takes you to another activity in the same
 app
 3) Press the home button
 4) Press and hold the home button to get the recent list of apps -
 select the app you chose in step 1
 5) You'll be taken to whatever activity in that app is specified as
 the main/launcher Activity, rather than the Activity on top of the
 stack (as it was previously)

 It makes it appear to the user that the application has exited when
 the home screen button was pressed.

 I don't have my app set to clear history on launch or anything like
 that, and I can replicate it on the emulator and with any app on my
 device (Contacts, Gmail, Engadget etc)

 Anyone else notice this? Anyone know any reason for the changes? I
 must admit I quite dislike the new method.

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

2010-07-24 Thread Pedro Teixeira

I've tried lowering the first attribute to different values and nothing.
I also tried the setAlpha and nothing.. maybe something in the xml ?
I'm not sure if something is impeding from the alpha to work..in some  
other part of the code..


On Jul 24, 2010, at 6:34 PM, Joseph Earl wrote:


You are using innerPaint.setARGB(255, 75, 75, 75); //gray

Since you are setting the Alpha to 255 you will have an opaque image.
If you want some transparency change that value to somewhere between 0
and 255.

On Jul 24, 5:41 pm, Pedro Teixeira pedroteixeir...@gmail.com wrote:

Hi,

I have a class to make a transparent panel to overlay in any view of
my application which I found the tutorial on the internet.  The thing
is.. it's not painting with transparency .. just gray... does it have
to do with this element? How can I change this values to make it be
transparent?

innerPaint = new Paint();
innerPaint.setARGB(255, 75, 75, 75); //gray
innerPaint.setAntiAlias(true);


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


Pedro Teixeira

www.pedroteixeira.org

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


[android-developers] Did selected tab background colors change in 2.1 ?

2010-07-24 Thread GJTorikian
Howdy—

My app was built on the Android 1.5 platform. I'm in the process of
bumping the APIs used to 2.1 . I am still leaving minSdkVersion=3 /
targetSdkVersion = 7 in order to support older platforms.

I've made the required drawbles-hdpi / -mdpi - ldpi-v4 folders.
Everything is looking great across various AVDs of HVGA/WVGA shapes
and sizes.

Everything, except my tabs.

In AVDs running Android 1.5 and 1.6, my tab background colors are
appropriate: http://www.shelvesforandroid.com/1p6below.png

However, for platforms running 2.1 and above, something seems to have
gone awry: http://www.shelvesforandroid.com/2p1above.png

Notice that the unselected tab color is correct, but the selected tab
looks like it's just bleeding the same color as my images.

What can I do to fix this? Enforce the background color to be the same
as 1.6-era ? What is causing this tab color change?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Did selected tab background colors change in 2.1 ?

2010-07-24 Thread Joseph Earl
Quite possibly.
You should import the desired drawables from the SDK/platforms folder
into your own drawables folder and reference those in order to ensure
a consistent look.

Remember carriers also modify their own versions which means the
default styles can be quite different to the ones on the emulator.

On Jul 24, 8:02 pm, GJTorikian gjtorik...@gmail.com wrote:
 Howdy—

 My app was built on the Android 1.5 platform. I'm in the process of
 bumping the APIs used to 2.1 . I am still leaving minSdkVersion=3 /
 targetSdkVersion = 7 in order to support older platforms.

 I've made the required drawbles-hdpi / -mdpi - ldpi-v4 folders.
 Everything is looking great across various AVDs of HVGA/WVGA shapes
 and sizes.

 Everything, except my tabs.

 In AVDs running Android 1.5 and 1.6, my tab background colors are
 appropriate:http://www.shelvesforandroid.com/1p6below.png

 However, for platforms running 2.1 and above, something seems to have
 gone awry:http://www.shelvesforandroid.com/2p1above.png

 Notice that the unselected tab color is correct, but the selected tab
 looks like it's just bleeding the same color as my images.

 What can I do to fix this? Enforce the background color to be the same
 as 1.6-era ? What is causing this tab color change?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Dianne Hackborn
Actually switching from recent tasks will *never* reset the task;
relaunching from launcher will reset after the time as indicated.  (This is
actually controlled by an intent flag, which launcher sets, and recent tasks
does not.)

Recent tasks should definitely not be resetting tasks.  If it appears to be
behaving that way, be sure your activities are actually all in the same
task.  You can look at the activity stack with adb shell dumpsys activity.

On Sat, Jul 24, 2010 at 11:03 AM, RichardC
richard.crit...@googlemail.comwrote:

 Found it:

 http://developer.android.com/guide/topics/fundamentals.html

 read down to:
 Clearing the stack

 If the user leaves a task for a long time, the system clears the task
 of all activities except the root activity. When the user returns to
 the task again, it's as the user left it, except that only the initial
 activity is present. The idea is that, after a time, users will likely
 have abandoned what they were doing before and are returning to the
 task to begin something new.


 On Jul 24, 7:01 pm, RichardC richard.crit...@googlemail.com wrote:
  It's documented to do that (go to the base activity on the stack)
  after a period of time (unspecified) in the background as the user has
  probably forgotten what they were doing.
 
  Now all I need to do is to find the reference so you know I am not
  making this up :)
 
  ...
 
  On Jul 24, 4:41 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 
   I'm now very tempted to revert my Nexus One to 2.1-update 1 just to
   verify that I am indeed losing part of my sanity.
   If anyone still has a Nexus One running 2.1 could you tell me quickly
   how it behaves?
 
   On Jul 24, 4:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 
I apologize. Seems I was dreaming about the way it worked having
changed, the emulator seems to function this way on earlier versions.
For some reason it just seemed to me like it had changed on my Nexus
One since the 2.2 update...
 
On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 
 The recent apps display seems to function quite differently from
 earlier versions on 2.2.
 
 Try the following for instance:
 1) Open an app
 2) Click on something that takes you to another activity in the
 same
 app
 3) Press the home button
 4) Press and hold the home button to get the recent list of apps -
 select the app you chose in step 1
 5) You'll be taken to whatever activity in that app is specified as
 the main/launcher Activity, rather than the Activity on top of the
 stack (as it was previously)
 
 It makes it appear to the user that the application has exited when
 the home screen button was pressed.
 
 I don't have my app set to clear history on launch or anything like
 that, and I can replicate it on the emulator and with any app on my
 device (Contacts, Gmail, Engadget etc)
 
 Anyone else notice this? Anyone know any reason for the changes? I
 must admit I quite dislike the new method.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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: How do I set the selected state of an item in a gallery (the correct way)

2010-07-24 Thread Joseph Earl
Not setting anything interesting that I'm aware of.

My getView in my adapter looks like:

public View getView(int position, View convertView, ViewGroup parent)
{
ImageView i;

if (convertView == null) {
i = (ImageView) View.inflate(mContext, R.layout.gallery_item,
null);
}
else {
i = (ImageView) convertView;
}
i.setImageDrawable(R.drawable.image);
// some other stuff

   return i;
}

And in the gallery_item layout XML file there is just an ImageView
with the selector in my earlier post as the background.

On Jul 24, 6:59 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:
 I changed my selector to be exactly what you have (but using my
 drawables ;) and it still behaves the same way; no selected state.
 How are you setting the items that are being returned by the adapter?
 Are you setting anything interesting on those views that might result
 in it working for you?

 On Jul 24, 12:45 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  I use something like:

  selector xmlns:android=http://schemas.android.com/apk/res/android;
      item android:state_selected=true android:drawable=@drawable/
  frame_gallery_thumb_selected /
      item android:state_focused=true android:state_pressed=true
  android:drawable=@drawable/frame_gallery_thumb_pressed /
      item android:state_focused=false android:state_pressed=true
  android:drawable=@drawable/frame_gallery_thumb_pressed /
      item android:drawable=@drawable/frame_gallery_thumb /
  /selector

  as a background for views in my gallery which seems to work perfectly.
  I should note that when the selected item is pressed it maintains the
  selected state drawable (it was how I wanted it) but you could show
  the default press state when the selected item is pressed.

  On Jul 24, 6:23 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

   Try moving your state_selected statement above your state_pressed item
   and see if it works.

   On Jul 24, 6:07 pm, Mark Nuetzmann mark.nuetzm...@gmail.com wrote:

I have a gallery that displays TextViews where the background of each
view is the following:

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
    item
        android:state_pressed=true
        android:drawable=@drawable/item_pressed /
    item
        android:state_selected=true
        android:drawable=@drawable/item_selected /
    item
        android:drawable=@drawable/item_idle /
/selector

This selector work just fine for the state_pressed and default (idle)
states, but the selected item state is never displayed.  I REALLY do
not want to force the background of the selected item by changing the
background of the view when the onItemSelected event is called.  What
is the correct state or correct way to get the TextView background to
be set properly.  Is the selected (center) view in the gallery not
really selected?  Is there some other state I should put in the
selector drawable xml?

Thanks, Mark.

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


[android-developers] Re: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread sblantipodi
ok... but how do you do?
do you put your full unprotected binary as is on the market?


On Jul 24, 8:19 pm, Pent tas...@dinglisch.net wrote:
  So,I'm not authorized to put on the market a FREE trial version,
  and ask customers who want the full version to buy it on my official
  site?

 3.3 ...Such free trials for Products are encouraged. However, if you
 want to collect fees after the free trial expires, you must collect
 all fees for the full version of the Product through the Payment
 Processor on the Market

 Seems quite clear.

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


Re: [android-developers] Re: How to update pre-installed apps

2010-07-24 Thread Dianne Hackborn
Current states:

As of 1.6 Market allows installing updates to apps that already exist
pre-installed on the system image.  Currently however it does not know about
these apps until the user explicitly installs an update, so for the initial
case where the app only exists pre-installed it will not be listed as
downloaded nor will the user be told about updates.

In the future I know the market team is working on being able to discover
these pre-installed apps and prompt the user when there are updates, but I
don't know when that will appear.  (When it does, though, I think it should
eventually be available across all devices, since as of 1.6 Market can also
self-update itself.)

On Sat, Jul 24, 2010 at 10:04 AM, Webnet Android
webnet.andr...@gmail.comwrote:

  Are you sure about that? Because I had Google Maps pre-installed on my G1

 Not 100% sure now as it was a while ago I played with it, but this can
 be easily verified.
 Assuming you got rooted device put i.e. your old version of your app's
 APK in /system/apps
 or /data/apps and then launch Market to see if it will appear in and
 update will be offered
 (assuming newer one is on Market, of course :)

 As for Maps - I got a feeling that i.e. Milestone comes with number of
 preinstalled
 apps (incl. Maps) and there was no problem with the updates (Market app
 reported
 and downloaded w/o problem). Got no G1 to check that but it maybe some
 other
 factor too - maybe others will be more handy.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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

Re: [android-developers] Storing data on the SD card in Froyo - files deleted when upgrading

2010-07-24 Thread Dianne Hackborn
Ergh...  that may be a bug. :(  To be clear, when doing the update your
internal data is not being erased, but the data on the SD card is?

On Sat, Jul 24, 2010 at 10:11 AM, Joseph Earl joseph.w.e...@gmail.comwrote:

 I have an application which resides on the phone memory but downloads
 large data to the SD card on first launch (the app needs to be able to
 work without an internet connection most of the time)

 When using the recommend directory given in Froyo it seems all files
 on the SD card are deleted when I install a newer version of the .apk.
 I'd preferably like the files removed on uninstall, but not on upgrade
 since the files on the SD card aren't going to change between
 application versions, and forcing the user to re-download a large file
 that is independent of the application version does not seem
 reasonable.

 At the moment it seems I'm forced to use a different directory to the
 recommended one in order to stop Froyo deleting all the files when the
 application is upgraded.

 Am I doing something wrong, or is this how it is supposed to work (I'm
 guessing it is)? (Or perhaps I misunderstood what getExternalFilesDir
 is for)

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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

Re: [android-developers] Re: Problem: Long running AsyncTask with reference to Activity

2010-07-24 Thread Dianne Hackborn
Er no for this scenario a weak reference is appropriate.  You want the
reference to remain valid only as long as someone else as a reference on the
activity.  With a weak reference, the reference will be cleared on the next
GC after all other references on the activity are gone.  With a soft
reference, it can continue to hold the reference for some arbitrary time
after that.

On Sat, Jul 24, 2010 at 8:55 AM, Agus agus.sant...@gmail.com wrote:

 Don't use WeakReference, use SoftReference.

 On Sat, Jul 24, 2010 at 7:48 AM, RichardC
 richard.crit...@googlemail.com wrote:
  Would using a WeakReference from your AsyncTask back to your activity
  help in any way?
 
  See discussion:
 
 http://groups.google.com/group/android-developers/browse_thread/thread/0732e2ec0039e92c#
 
 
  On Jul 24, 3:13 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
  Ah OK. My bad.
 
  On Jul 24, 2:49 pm, Paul Turchenko paul.turche...@gmail.com wrote:
 
   Threads are not getting killed when activity is destroyed.
 
   On Jul 24, 4:10 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 
Yup. Use a service for long running background tasks that do not
require an Activity to be present.
Threads started by an Activity are killed anyway when your Activity
 is
destroyed (or at least that's how it seems to me).
You can bind to your service from your Activity to control it.
 
On Jul 24, 1:28 pm, sasq jonas.minnb...@gmail.com wrote:
 
 I have an AsyncTask that scans the file system and publishes
 progress
 through Notifications. To do this I need a reference to the
 current
 Activity in the AsyncTask.
 
 I also don't want to kill the task when the activity is destroyed.
 How
 do I avoid leaking the activity and everything it references on
 each
 configuration change?
 
 One possibility is to remove the reference in OnPause() to be sure
 it
 is gone when the Activity is destroyed, but that would mean
 notifications stops coming as soon as you leave the activity which
 is
 no good.
 
 Isn't there a recommended way of dealing with AsyncTasks in this
 way?
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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




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

Re: [android-developers] Re: Regarding the new BackupManager

2010-07-24 Thread Dianne Hackborn
On Sat, Jul 24, 2010 at 3:53 AM, uday uday.pic...@gmail.com wrote:

 Will android Backup Service provides the Backup Transport when
 registering application with Android backup service for doing Data
 backup??


Sorry, I'm not sure what you are asking here.  The app doesn't talk directly
with the backup service.  It says that its data is dirty, and the backup
service (if there is one) will pull the data from the app later.

-- 
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: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread Pent
 ok... but how do you do?
 do you put your full unprotected binary as is on the market?

No, I use the same validation process for both versions.

Some users grumble and give 1 star on the market but most don't
mention it.

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


[android-developers] Re: OutOfMemoryError with Bitmap

2010-07-24 Thread DanH
freeMemory() is only really accurate immediately after a GC cycle.
You can call gc() to force a GC cycle, but it's a little expensive,
and many platforms (don't know about Android) ignore the call since
it's so often abused.

Better for you to find out the partition size (don't know how you do
this on Android but it may be a parameter you specify in your app's
config parms) and then subtract off what you know to be your
overhead.

On Jul 24, 1:03 pm, ReyLith jesus...@gmail.com wrote:
 First of all thank you very much everyone for your help.

 I continue with a problem. I use Runtime.getRuntime().freeMemory() for
 obtain the free memory and compare it with the real Bitmap memory.
 Sometimes I get a free memory less than that occupied by the image.
 However, if I remove the restriction on the size of the image, I can
 work with it without any problem. Am I using an incorrect function to
 get the free memory?. Should I use another function?

 Thank you very much in advance.

 On 23 jul, 20:40, DanH danhi...@ieee.org wrote:

  Close as I can tell, you use a BitmapFactory.Options and put a
  BitmapConfig constant in that that specifies the type of internal
  representation you want.  If you use ARGB_ then each pixel will be
  64 bits.  ARGB_ -- 32 bits, RGB_565 -- 16 bits.

  On Jul 23, 12:21 pm, ReyLith jesus...@gmail.com wrote:

   Thanks Nathan.

   With this option I can obtain the image characteristics but I don't
   know the option that indicates me the depth of the pixel. Width and
   Height are in outWidth and outHeight but I don't know where is the
   depth. I thought use the getRowBytes() of Bitmap and product it with
   getHeight() of Bitmap, but I don't know if there is correct.

   On 23 jul, 18:52, Nathan nathan.d.mel...@gmail.com wrote:

If you can get the width and height for the image without completely
opening it, then use the width*height*depth.

You probably have to use this option:

   http://developer.android.com/intl/de/reference/android/graphics/Bitma...

Nathan

On Jul 23, 9:30 am, ReyLith jesus...@gmail.com wrote:

 So, how can I obtain the depth for know if I can work with the image?

 On 23 jul, 18:18, DanH danhi...@ieee.org wrote:

  The size of an image file depends greatly on the compression
  techniques used to create it.  Virtually all image formats involve
  some sort of compression such that the total number of bits in the
  file is considerably less than the (width * height * depth) number
  that represents the raw image.

  On Jul 23, 7:27 am, ReyLith jesus...@gmail.com wrote:

   Hi again,

   I'm trying to put a message when the image is so big. For this I 
   think
   to obtain the size of the file and compare it with the free memory
   Runtime.getRuntime().getFreeMemory()). It works well but I have a 
   new
   problem. The application show an error message with some images
   because they are so big and the application dont't detect the 
   problem.
   I research in other posts and the problem is that the file size is
   different from the size of the image in memory. To get the size 
   of the
   image in memory I use the product getHeight () * getRowBytes () 
   of the
   Bitmap class, but with some images not previously had problems, I 
   get
   very large sizes, so often I get the message erroneously.

   Does anyone know how could solve this problem?

    Thank you very much in advance.

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


[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
Ahh I think I've got it, my main activity has launchMode=singleTask
which seems to cause all other activities above it in the stack to be
destroyed.
A post on StackOverflow seems to suggest setting
FLAG_ACTIVITY_CLEAR_TOP|FLAG_ACTIVITY_SINGLE_TOP every time I use an
intent to my main activity, so I'll try that.

It would be nice if the effect of singleTask on the Recent apps
function was made clear in the docs for android:launchMode. I think
this will be important to people.

Your own messaging app seems to do it (am unable to use recent apps to
return to the message I was last looking at) and so does the Dialer
(can't use recent apps to get back to my call log) and from a user
perspective it makes it seem like the recent apps function is broken.
Maybe I'm just picky.

Alternatively my carrier possibly could have borked something in their
2.2 firmware update (I'll fire up an emulator or dig out another
device in a bit and look at that)

For me anyway, the following is replicable every time on my Nexus One
running 2.2:

1) Reboot
2) Open calculator
3) Press back to exit calculator
4) Open messaging app
5) View any message
6) Press and hold home and select calculator to switch to that
7) Press and hold home and select messaging to switch that
8) End up looking at my list of messages, not the message I was
viewing in step 5.

And it doesn't happen on my Hero running 1.5 (the closest one I had
lying around), but that is running Sense so who knows what HTC did
with that.

On Jul 24, 8:33 pm, Dianne Hackborn hack...@android.com wrote:
 Actually switching from recent tasks will *never* reset the task;
 relaunching from launcher will reset after the time as indicated.  (This is
 actually controlled by an intent flag, which launcher sets, and recent tasks
 does not.)

 Recent tasks should definitely not be resetting tasks.  If it appears to be
 behaving that way, be sure your activities are actually all in the same
 task.  You can look at the activity stack with adb shell dumpsys activity.

 On Sat, Jul 24, 2010 at 11:03 AM, RichardC
 richard.crit...@googlemail.comwrote:



  Found it:

 http://developer.android.com/guide/topics/fundamentals.html

  read down to:
  Clearing the stack

  If the user leaves a task for a long time, the system clears the task
  of all activities except the root activity. When the user returns to
  the task again, it's as the user left it, except that only the initial
  activity is present. The idea is that, after a time, users will likely
  have abandoned what they were doing before and are returning to the
  task to begin something new.

  On Jul 24, 7:01 pm, RichardC richard.crit...@googlemail.com wrote:
   It's documented to do that (go to the base activity on the stack)
   after a period of time (unspecified) in the background as the user has
   probably forgotten what they were doing.

   Now all I need to do is to find the reference so you know I am not
   making this up :)

   ...

   On Jul 24, 4:41 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

I'm now very tempted to revert my Nexus One to 2.1-update 1 just to
verify that I am indeed losing part of my sanity.
If anyone still has a Nexus One running 2.1 could you tell me quickly
how it behaves?

On Jul 24, 4:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

 I apologize. Seems I was dreaming about the way it worked having
 changed, the emulator seems to function this way on earlier versions.
 For some reason it just seemed to me like it had changed on my Nexus
 One since the 2.2 update...

 On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  The recent apps display seems to function quite differently from
  earlier versions on 2.2.

  Try the following for instance:
  1) Open an app
  2) Click on something that takes you to another activity in the
  same
  app
  3) Press the home button
  4) Press and hold the home button to get the recent list of apps -
  select the app you chose in step 1
  5) You'll be taken to whatever activity in that app is specified as
  the main/launcher Activity, rather than the Activity on top of the
  stack (as it was previously)

  It makes it appear to the user that the application has exited when
  the home screen button was pressed.

  I don't have my app set to clear history on launch or anything like
  that, and I can replicate it on the emulator and with any app on my
  device (Contacts, Gmail, Engadget etc)

  Anyone else notice this? Anyone know any reason for the changes? I
  must admit I quite dislike the new method.

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  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 

[android-developers] Re: Recent Apps change in 2.2 - Brings main Activity to foreground, not the last visible one

2010-07-24 Thread Joseph Earl
Maybe my above post could have been a little clearer for anyone who
comes back to look at this later:

1) The StackOverflow post
http://stackoverflow.com/questions/2417468/android-bug-in-launchmodesingletask-activity-stack-not-preserved
suggests using the FLAG_ACTIVITY_CLEAR_TOP|FLAG_ACTIVITY_SINGLE_TOP
flags every-time you make an Intent to the activity you would like to
work as a 'singleTask' and NOT using the launchMode=singleTask
attribute in your manifest
2) The behaviour that is replicable on my N1, and not on my Hero, was
tested using only the Calculator and Messaging apps (and HTC have
changed theirs so this is probably expected)

On Jul 24, 9:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:
 Ahh I think I've got it, my main activity has launchMode=singleTask
 which seems to cause all other activities above it in the stack to be
 destroyed.
 A post on StackOverflow seems to suggest setting
 FLAG_ACTIVITY_CLEAR_TOP|FLAG_ACTIVITY_SINGLE_TOP every time I use an
 intent to my main activity, so I'll try that.

 It would be nice if the effect of singleTask on the Recent apps
 function was made clear in the docs for android:launchMode. I think
 this will be important to people.

 Your own messaging app seems to do it (am unable to use recent apps to
 return to the message I was last looking at) and so does the Dialer
 (can't use recent apps to get back to my call log) and from a user
 perspective it makes it seem like the recent apps function is broken.
 Maybe I'm just picky.

 Alternatively my carrier possibly could have borked something in their
 2.2 firmware update (I'll fire up an emulator or dig out another
 device in a bit and look at that)

 For me anyway, the following is replicable every time on my Nexus One
 running 2.2:

 1) Reboot
 2) Open calculator
 3) Press back to exit calculator
 4) Open messaging app
 5) View any message
 6) Press and hold home and select calculator to switch to that
 7) Press and hold home and select messaging to switch that
 8) End up looking at my list of messages, not the message I was
 viewing in step 5.

 And it doesn't happen on my Hero running 1.5 (the closest one I had
 lying around), but that is running Sense so who knows what HTC did
 with that.

 On Jul 24, 8:33 pm, Dianne Hackborn hack...@android.com wrote:

  Actually switching from recent tasks will *never* reset the task;
  relaunching from launcher will reset after the time as indicated.  (This is
  actually controlled by an intent flag, which launcher sets, and recent tasks
  does not.)

  Recent tasks should definitely not be resetting tasks.  If it appears to be
  behaving that way, be sure your activities are actually all in the same
  task.  You can look at the activity stack with adb shell dumpsys activity.

  On Sat, Jul 24, 2010 at 11:03 AM, RichardC
  richard.crit...@googlemail.comwrote:

   Found it:

  http://developer.android.com/guide/topics/fundamentals.html

   read down to:
   Clearing the stack

   If the user leaves a task for a long time, the system clears the task
   of all activities except the root activity. When the user returns to
   the task again, it's as the user left it, except that only the initial
   activity is present. The idea is that, after a time, users will likely
   have abandoned what they were doing before and are returning to the
   task to begin something new.

   On Jul 24, 7:01 pm, RichardC richard.crit...@googlemail.com wrote:
It's documented to do that (go to the base activity on the stack)
after a period of time (unspecified) in the background as the user has
probably forgotten what they were doing.

Now all I need to do is to find the reference so you know I am not
making this up :)

...

On Jul 24, 4:41 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

 I'm now very tempted to revert my Nexus One to 2.1-update 1 just to
 verify that I am indeed losing part of my sanity.
 If anyone still has a Nexus One running 2.1 could you tell me quickly
 how it behaves?

 On Jul 24, 4:30 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

  I apologize. Seems I was dreaming about the way it worked having
  changed, the emulator seems to function this way on earlier 
  versions.
  For some reason it just seemed to me like it had changed on my Nexus
  One since the 2.2 update...

  On Jul 24, 4:21 pm, Joseph Earl joseph.w.e...@gmail.com wrote:

   The recent apps display seems to function quite differently from
   earlier versions on 2.2.

   Try the following for instance:
   1) Open an app
   2) Click on something that takes you to another activity in the
   same
   app
   3) Press the home button
   4) Press and hold the home button to get the recent list of apps -
   select the app you chose in step 1
   5) You'll be taken to whatever activity in that app is specified 
   as
   the main/launcher Activity, rather than the Activity on top of the
   

[android-developers] Re: Android market rules are changed, you must accept it within 30 days but...

2010-07-24 Thread sblantipodi
what do you mean for same validation process for both versions?


On Jul 24, 10:16 pm, Pent tas...@dinglisch.net wrote:
  ok... but how do you do?
  do you put your full unprotected binary as is on the market?

 No, I use the same validation process for both versions.

 Some users grumble and give 1 star on the market but most don't
 mention it.

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


[android-developers] Re: How to update pre-installed apps

2010-07-24 Thread Xenplex
Well I don't think pre-installed apps are the best way to get apps on
the phone.
Very often, users simply don't keep those pre-installed apps or they
don't want to use them at least but normally those
apps are hard, sometimes impossible, to remove without taking big
changes in the system itself.
And most of the times, the apps are already outdated when they're
chipped so every new device has to update itself immediately after
first boot.
That's to much Windows like where you install Windows for 40 Min (Max.
for me) and you're doing updates for at least 3 hours.

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

2010-07-24 Thread AlanLawrence
I wonder about the reverse question: if I have an Android app, is
there an easy way to get it running on J2ME? (I don't feel J2ME is
worth the effort of rewriting, put it that way!).

Even a tool that only converted code _not_using_Android_libraries_
would be handy, but all my logic is full of Java1.5 generics, not to
mention enums and so on - and whilst tools like declawer will remove
some of this, it's far from a hands-off process (i.e. much fiddling to
get it to compile IME!)...

--Alan

On Jul 23, 3:28 pm, michal.g...@gmail.com michal.g...@gmail.com
wrote:
 You can use a service of J2ME to Android conversion by UpOnTek.

 Give it a try - send me a midlet in jar format, and I will return a
 apk for your eval.

 Michal

 On Jul 23, 7:13 am, perumal316 perumal...@gmail.com wrote:



  Hi All,

  Is there any way to convert J2ME applications into Android
  applications?

  The only way I have come across is using microemulator which if I used
  to convert J2ME app that uses Camera or Bluetooth APIs doesn't work.

  Is there any other way?

  Regards,
  Perumal

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


[android-developers] use of fadeScrollbars

2010-07-24 Thread Mark Nuetzmann
I am using android:fadeScrollbars=true to show the scrollbar only
while scrolling.  Works great.  The only issue I seem to be having is
that the view still allocates the space on the right side to display
the scrollbar when I do scroll.  I really wish this worked like iPhone
where the scrollbar appeared over the top of the rest of the view and
still allowed the view to use all available space when not actually
scrolling.

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