Re: [android-developers] Separate design based on resolution. Android 2.3

2012-07-03 Thread Dianne Hackborn
Don't do it based on resolution.  Period.  Do it in dp units.

On Sun, Jun 24, 2012 at 5:28 AM, Dmitriy F midnight@gmail.com wrote:

 I'm implementing an application which must support multiple screens and
 provide devices with different layout designs. My task claims that layout
 design separation must be based on device resolution: for those devices
 with  1024x800 resolution use design a and for = 1024x800 - design b.
 I need to say that a and b differ not only in structure(listviews vs.
 gridviews) but also in resources they incorporate such as images. For
 instance, splash screens look completely different.

 I've been looking into multiple screens 
 guidehttp://developer.android.com/guide/practices/screens_support.htmland, 
 indeed, it says that a developer shouldn't base separation of design
 on resolution, but what if I have to ?
 At first, I was hoping that size-based separation is the same as
 resolution but it seems that it's not: there're handsets with high
 resolution and tablets with low.

 At this point I can only figure out resolution and use a layout for either
 of those designs. In each of those layouts I'd like to make references to
 appropriate design elements(images) like this:

 /main_480x800.xml
 ImageView
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:src=@drawable/IMAGE_480x800 /

  /main_HIGH_480x800.xml
 ImageView
 android:layout_width=wrap_content
 android:layout_height=wrap_content
 android:src=@drawable/IMAGE_480x800 /

 I hope there's a better way of implementing it - please, give me your
 suggestions.

 Best regards,
 Dmitriy F. midnight@gmail.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




-- 
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] Playing user specified YouTube Videos in MediaPlayer

2012-07-03 Thread Simon Giddings
My Android app uses data designed for my main Web Application.
Content providers are able to specify a presentation video hosted in 
YouTube for playback on the site.  This works just fine.

Does anyone know if there exists a means or an api which permits getting 
the correct URI for a given embedded code, which will enable playback in 
the MediaViewer ?

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

[android-developers] Re: App opens with nfc-tag only?

2012-07-03 Thread Dominik
Do not quite understand what you mean. If you do not add the application on 
the home screen (i.e. no intent-filter on the action MAIN in the category 
LAUNCHER) then it can only be started with the other intents defined. This 
could e.g. be an intent with action=NDEF_DISCOVERED. However, any 
application could throw this intent, so you never know whether you touched 
a tag or whether another application emulated such a touch.

- Dominik

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

[android-developers] Handler removecallback problem

2012-07-03 Thread B.Arunkumar
Hi,

 Sometimes, handler.removeCallbacks(runnable) does not remove the
callback after handler.postDelayed(runnables,millisecs) is executed
and the handler.postDelayed again gets executed after some time. Can
somebody let me know how to solve this problem?

Thank you,
B.Arunkumar

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


[android-developers] MediaPlayer.setNextMediaPlayer

2012-07-03 Thread Mirko Schenk
Hi,

is there any additional information about how to use setNextMediaPlayer in 
Jelly Bean?
I mean, it's fairly easy to start with, just prepare a new MediaPlayer and 
pass it to setNextMediaPlayer.
But some time in the future, my app still has the reference to the old 
MediaPlayer while the new one is playing, or maybe even both instances are 
playing during some kind of crossfade. So how to pause/continue, stop, etc. 
reliable? Is it enough/OK to set the current instance to the (previously) 
next one in an OnCompletionListener?

Regards
Mirko

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

2012-07-03 Thread skink


B.Arunkumar wrote:
 Hi,

  Sometimes, handler.removeCallbacks(runnable) does not remove the
 callback after handler.postDelayed(runnables,millisecs) is executed
 and the handler.postDelayed again gets executed after some time. Can
 somebody let me know how to solve this problem?


it just works ok. post your code how you call both methods

pskink

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

2012-07-03 Thread jean-francois garreau
I already saw that presentation and I can't use the ViewHolder pattern 
because i need a customView. 

So I'm looking for a way to optimize my CustomView because I don't know 
what I'm doing wrong with this view that causing thoses GC

Le lundi 2 juillet 2012 18:11:32 UTC+2, Daniel Drozdzewski a écrit :

 On 2 July 2012 12:20, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote:

 little Up beacause not fixed

 Le jeudi 28 juin 2012 16:12:35 UTC+2, jean-francois garreau a écrit :

 The problem is : as I'm creating my custom view heriting from View, I 
 don't have any findById so the pattent viewHolder won't be useFull for me :(

 And I'm already implemnting it with the view recycling view system. 
 Indeed, in my View I use some Paint elements that I keep in the instance of 
 my view.


 You have to refactor your code, so that you use all suggested 
 optimisations out there, but HolderPattern is a must. Recycling view 
 objects is build into the ListView, so use it, or be slow. Creating new 
 view object per item is going to hurt.

 Just read some articles, watch Romain Guy talks from Google IO and see 
 where you have gone wrong.
 http://www.youtube.com/watch?v=N6YdwzAvwOA 
 http://www.vogella.com/articles/AndroidListView/article.html 

 Daniel




  

 Le jeudi 28 juin 2012 15:58:53 UTC+2, MagouyaWare a écrit :

 Nope... 
 http://lmgtfy.com/?q=android+**viewholder+patternhttp://lmgtfy.com/?q=android+viewholder+pattern

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/**magouyawarehttp://sites.google.com/site/magouyaware


 On Thu, Jun 28, 2012 at 7:50 AM, jean-francois garreau 
 jean.francois.garreau@gmail.**com jean.francois.garr...@gmail.comwrote:

 You mean  : 



 public View getChildView(int groupPosition, int childPosition, boolean 
 isLastChild, View convertView, ViewGroup parent) {






   ObjectSubViewNew subView = null;



   if (convertView == null) {


   subView = new ObjectSubViewNew(mainContext, kmUnit);


   } else {


   subView = (ObjectSubViewNew) convertView;


   }


  
 }



 ?


 Le jeudi 28 juin 2012 14:27:14 UTC+2, jean-francois garreau a écrit :

 Hi everyone, 

 I have a problem for optimzing my application. More particulary, an 
 ExpandListView. I found the scroll animation pretty slow compare to what 
 I 
 can see on other application. I have done severals optimizations yet but 
 now I'm faced to a lack of idea for have a fluent scroll...

 What have done : 

1. First i start to create CustomView inherting from View
2. I saw that in log I have lots of GC 
3. I have use allocationTracket in DDMS in order to see what are 
the object created who could cause my GC
4. I identify lots of instanciations of String so I've modify my 
model in order to carry all the string i need in order to avoid new 
creations of String 
5. I also try to write a reusable object corresponding to a 
drawable instruction in order to skim throught all instruction during 
 the 
draw method


 In order to gives you all information for helping me with my code, 
 here is a litle piece of functionnal.

 My app is an application which gives you the movies showtimes near 
 your position. The expand list show thoses informations :

  *Name Cinema :   [Image]
 *
  distance  
 ----
 --
 *Movie Name 1 :* time
 passed time 1 | passed time 2 | *nearest time* | 
 futur time 1 | futur time 2 
 --
 ---
 *Movie Name 2 :* time
 passed time 1 | passed time 2 | *nearest time* | 
 futur time 1 | futur time 2 
 --
 ---


 etc.

 As you can see, on each movie I list all showtimes for the cinema and 
 I have a diferent display according to the current time

 In term of Model Object, I have this structure in my adapter : 

 ArrayListTheaterBean theaterList; // The list of my cinema
 HashMapString, Movie mapMovie; // An hashmap which gives me the 
 movie corresponding to an id


 The problem I'm facing now is that when i look at the log, I still 
 have lots of GC... and when i looked to the allocationTracker i see that 
 :

 In first position comes android.graphic.Bitmap from method 
 nativeCreate and it's corresponding stack is : 

 android.graphics.Bitmap nativeCreate Bitmap.java -2 true 
 android.graphics.Bitmap createBitmap Bitmap.java 477 false 
 android.view.View buildDrawingCache View.java 6599 false 
 android.view.View getDrawingCache View.java 6450 false 
 android.view.ViewGroup drawChild ViewGroup.java 1571 false 
 android.view.ViewGroup dispatchDraw 

[android-developers] Re: Handler removecallback problem

2012-07-03 Thread B.Arunkumar
Hi,

 Thank you for your reply. This is roughly the framework of code I
am using:

Main Thread :-

Handler handler = new Handler();
handler.postDelayed (runnable,miilisecs);

Another Thread :-

handler.removeCallbacks(runnable)

But I find that handler.postDelayed (runnable,miilisecs) still
executes after handler.removeCallbacks(runnable) is executed in the
other thread.

Thank you,
B.Arunkumar

On Jul 3, 3:49 pm, skink psk...@gmail.com wrote:
 B.Arunkumar wrote:
  Hi,

       Sometimes, handler.removeCallbacks(runnable) does not remove the
  callback after handler.postDelayed(runnables,millisecs) is executed
  and the handler.postDelayed again gets executed after some time. Can
  somebody let me know how to solve this problem?

 it just works ok. post your code how you call both methods

 pskink

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

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau
jean.francois.garr...@gmail.com wrote:
 I already saw that presentation and I can't use the ViewHolder pattern
 because i need a customView.

That makes absolutely no sense whatsoever.

- TextView inherits from View
- ImageView inherits from View
- CheckableTextView inherits from View
- your custom View subclass inherits from View

And:

- TextView works just fine with the ViewHolder pattern
- ImageView works just fine with the ViewHolder pattern
- CheckableTextView works just fine with the ViewHolder pattern

Hence, I am fairly comfortable that for any well-written custom View
subclass, the ViewHolder pattern can apply. There should be nothing
magic about  your particular subclass of View compared to any other.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Kostya Vasilyev
A custom view, assuming it's at the root of your item layout, is just as
good as a view holder.

Here is what you can do:

- Override onFinishInflate in your item layout root view
- Call this.findViewById to find children
- Store them as member variables
- Access in the adapter's getView, like itemView.mText1, itemView.mText2 --
rather than doing itemView.findViewById(...)

-- K

2012/7/3 jean-francois garreau jean.francois.garr...@gmail.com

 I already saw that presentation and I can't use the ViewHolder pattern
 because i need a customView.

 So I'm looking for a way to optimize my CustomView because I don't know
 what I'm doing wrong with this view that causing thoses GC



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

2012-07-03 Thread RichardC
Does this happen every time or only occasionally?
Does your code call handler.postDelayed (runnable,miilisecs) in other 
places or repeatedly?
What is the value of miilisecs?

And finally there is a small chance that the runnable will be started just 
as you call  removeCallbacks due to threading.

On Tuesday, July 3, 2012 12:17:27 PM UTC+1, B.Arunkumar wrote:

 Hi, 

  Thank you for your reply. This is roughly the framework of code I 
 am using: 

 Main Thread :- 

 Handler handler = new Handler(); 
 handler.postDelayed (runnable,miilisecs); 

 Another Thread :- 

 handler.removeCallbacks(runnable) 

 But I find that handler.postDelayed (runnable,miilisecs) still 
 executes after handler.removeCallbacks(runnable) is executed in the 
 other thread. 

 Thank you, 
 B.Arunkumar 

 On Jul 3, 3:49 pm, skink psk...@gmail.com wrote: 
  B.Arunkumar wrote: 
   Hi, 
  
Sometimes, handler.removeCallbacks(runnable) does not remove the 
   callback after handler.postDelayed(runnables,millisecs) is executed 
   and the handler.postDelayed again gets executed after some time. Can 
   somebody let me know how to solve this problem? 
  
  it just works ok. post your code how you call both methods 
  
  pskink

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

2012-07-03 Thread skink


B.Arunkumar wrote:
 Hi,

  Thank you for your reply. This is roughly the framework of code I
 am using:

 Main Thread :-

 Handler handler = new Handler();
 handler.postDelayed (runnable,miilisecs);

 Another Thread :-

 handler.removeCallbacks(runnable)

 But I find that handler.postDelayed (runnable,miilisecs) still
 executes after handler.removeCallbacks(runnable) is executed in the
 other thread.


what do you mean by:
But I find that
handler.postDelayed
(runnable,miilisecs) still
executes?

if you call postDelayed after removing runnable it is normal that your
runnable will be run

pskink

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

2012-07-03 Thread jean-francois garreau
Ok so can you please explain me how to do a view like this : 

--
*NameMovie*
1h20min
11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm
-

--
Text(in bold)
SubText(in gray)
Text1 (in gray) Text2 (in gray) Text3 (in bold) Text4 (normal)
-

I won't use viewHolder because my CustomView doesn't inherites from 
LinearLayout, I don't any xml file. I'm using a class that inherites from 
View.

Considerating that I don't know in advance how many Texts in gra, same 
thing for Text in bold and Text normal. AND I have to take care to cariage 
returns .

I first use this model : 

LinearLayout
  align:'vertical'

TextView id=movieName/
TextView id=timeMovie/
TextView id=showtimes/
/LinearLayout

And with the view holder pattern it works but I have low performance for 
the generation of the string : 11:00am | 2:00pm | *4:00pm* | 8:00pm | 
10:00pm because I need to use a HTML paint

So after talking with lots of people I decided to write my own View 
inheriting from View. The problem is : according to time of day, the view 
will show : 
11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm 
and after 11:00am | 2:00pm | 4:00pm | *8:00pm* | 10:00pm
etc.

And according to the couple movie / cinema, I don't have the same number of 
showtimes so I can't say that I will use 4 textView for the showtimes 
because it will be wrong for the next movie to print.

Or maybe I don't have understand how to use the ViewHolderPattern...
In my Adapter, I directly use the viewObjects. How can i use the 
viewHolderPattern if my view inherites from view and don't have any view 
element in it ?

regards


Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a 
écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote: 
  I already saw that presentation and I can't use the ViewHolder pattern 
  because i need a customView. 

 That makes absolutely no sense whatsoever. 

 - TextView inherits from View 
 - ImageView inherits from View 
 - CheckableTextView inherits from View 
 - your custom View subclass inherits from View 

 And: 

 - TextView works just fine with the ViewHolder pattern 
 - ImageView works just fine with the ViewHolder pattern 
 - CheckableTextView works just fine with the ViewHolder pattern 

 Hence, I am fairly comfortable that for any well-written custom View 
 subclass, the ViewHolder pattern can apply. There should be nothing 
 magic about  your particular subclass of View compared to any other. 

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 


Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a 
écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote: 
  I already saw that presentation and I can't use the ViewHolder pattern 
  because i need a customView. 

 That makes absolutely no sense whatsoever. 

 - TextView inherits from View 
 - ImageView inherits from View 
 - CheckableTextView inherits from View 
 - your custom View subclass inherits from View 

 And: 

 - TextView works just fine with the ViewHolder pattern 
 - ImageView works just fine with the ViewHolder pattern 
 - CheckableTextView works just fine with the ViewHolder pattern 

 Hence, I am fairly comfortable that for any well-written custom View 
 subclass, the ViewHolder pattern can apply. There should be nothing 
 magic about  your particular subclass of View compared to any other. 

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 


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

[android-developers] Re: Activity Animation

2012-07-03 Thread ala hammad
please more description and with example of code if you can ..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] My Developer account got suspended, how can I create a new one?

2012-07-03 Thread Francisco M. Marzoa Alonso
On 27/06/12 07:34, pierre1232 wrote:
 I have three apps got suspended,  a day after, my account was suspended too.
Einstein used to say that the solution to a problem was mainly in its
definition. And I think you are not defining the problem right. The
first question you should try to answer is:

WHY your apps and account have been suspended?

Best regards,



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


Re: [android-developers] How to: Free to Paid App and retain preference and db files?

2012-07-03 Thread Francisco M. Marzoa Alonso
On 30/06/12 11:22, Fred Niggle wrote:
 as long as the .apk has the same name, i.e. com.my.app, then you wont lose
 the preferences and database.
That's impossible, indeed. Two different applications may have different
package names. And the only way of having one per pay version and
another free, is with different apps.

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


Re: [android-developers] How to: Free to Paid App and retain preference and db files?

2012-07-03 Thread Francisco M. Marzoa Alonso
If you use a SQLite3 db or so for preferences, you cannot access it from
different packages, but in some cases you can implement an export/import
mechanism, saving the preferences in a file into the external SD card.

My first app uses just a plain text file written into the SDCard and for
having same preferences in free and in per pay versions I just need to
use the same name for that file.

Currently I use an SQLite database, so I cannot do that so direct. But
to be honest I do not care. At least in my case it is not so important.

Best regards,


On 30/06/12 11:01, Mystique wrote:
 Hi,

 I have a Ads supported app and I am planning to release a paid version 
 without Ads and extra features.

 My questions are how do I release the app so my user can purchase and use 
 with losing the preferences and db?
 Can I package it with the same name and upload into Google Play as new app 
 or how is it been normally done?

 Cheers.



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

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 7:48 AM, jean-francois garreau
jean.francois.garr...@gmail.com wrote:
 Ok so can you please explain me how to do a view like this :

 --
 NameMovie
 1h20min
 11:00am | 2:00pm | 4:00pm | 8:00pm | 10:00pm
 -

That is a single TextView, assuming your lines of dashes are supposed
to be the ListView row divider lines (and therefore are not part of
your actual row). Use SpannableStringBuilder, along with
ForegroundColorSpan and StyleSpan, to handle the color changes and
weight (bold vs. not) changes.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Daniel Drozdzewski
On 3 July 2012 12:48, jean-francois garreau jean.francois.garr...@gmail.com
 wrote:

 Ok so can you please explain me how to do a view like this :

 --
 *NameMovie*
 1h20min
 11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm
 -

 --
 Text(in bold)
 SubText(in gray)
 Text1 (in gray) Text2 (in gray) Text3 (in bold) Text4 (normal)
 -

 I won't use viewHolder because my CustomView doesn't inherites from
 LinearLayout, I don't any xml file. I'm using a class that inherites from
 View.


Your class inherits from View, therefore it has View.setTag() and
View.getTag(), to hold on to children Views within each list item. Each
list item has all those sub-views, but each of sub-views has a different
atributes (text, text color, ...) set durring each ListAdapter.getView().
This means that your convertView reference passed into getView will have
Tag object set with all your sub-views ready to be customised for the given
list element.


 Considerating that I don't know in advance how many Texts in gra, same
 thing for Text in bold and Text normal. AND I have to take care to cariage
 returns .


See Mark's comment. If you can get away with one View. If however each of
those times is clickable, then just set max number of TextViews in each
list element, as simply removing unused ones by calling
setVisibility(INVISIBLE) on each one.





 I first use this model :

 LinearLayout
   align:'vertical'
 
 TextView id=movieName/
 TextView id=timeMovie/
 TextView id=showtimes/
 /LinearLayout

 And with the view holder pattern it works but I have low performance for
 the generation of the string : 11:00am | 2:00pm | *4:00pm* | 8:00pm |
 10:00pm because I need to use a HTML paint

 So after talking with lots of people I decided to write my own View
 inheriting from View. The problem is : according to time of day, the view
 will show :
 11:00am | 2:00pm | *4:00pm* | 8:00pm | 10:00pm
 and after 11:00am | 2:00pm | 4:00pm | *8:00pm* | 10:00pm
 etc.

 And according to the couple movie / cinema, I don't have the same number
 of showtimes so I can't say that I will use 4 textView for the showtimes
 because it will be wrong for the next movie to print.

 Or maybe I don't have understand how to use the ViewHolderPattern...
 In my Adapter, I directly use the viewObjects. How can i use the
 viewHolderPattern if my view inherites from view and don't have any view
 element in it ?

 regards


 Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a
 écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau
 jean.francois.garreau@gmail.**com jean.francois.garr...@gmail.com
 wrote:
  I already saw that presentation and I can't use the ViewHolder pattern
  because i need a customView.

 That makes absolutely no sense whatsoever.

 - TextView inherits from View
 - ImageView inherits from View
 - CheckableTextView inherits from View
 - your custom View subclass inherits from View

 And:

 - TextView works just fine with the ViewHolder pattern
 - ImageView works just fine with the ViewHolder pattern
 - CheckableTextView works just fine with the ViewHolder pattern

 Hence, I am fairly comfortable that for any well-written custom View
 subclass, the ViewHolder pattern can apply. There should be nothing
 magic about  your particular subclass of View compared to any other.

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available!


 Le mardi 3 juillet 2012 13:20:55 UTC+2, Mark Murphy (a Commons Guy) a
 écrit :

 On Tue, Jul 3, 2012 at 7:16 AM, jean-francois garreau
 jean.francois.garreau@gmail.**com jean.francois.garr...@gmail.com
 wrote:
  I already saw that presentation and I can't use the ViewHolder pattern
  because i need a customView.

 That makes absolutely no sense whatsoever.

 - TextView inherits from View
 - ImageView inherits from View
 - CheckableTextView inherits from View
 - your custom View subclass inherits from View

 And:

 - TextView works just fine with the ViewHolder pattern
 - ImageView works just fine with the ViewHolder pattern
 - CheckableTextView works just fine with the ViewHolder pattern

 Hence, I am fairly comfortable that for any well-written custom View
 subclass, the ViewHolder pattern can apply. There should be nothing
 magic about  your particular subclass of View compared to any other.

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread jean-francois garreau
Ok I will try that thanks !

But I think the problem is somewhere else  because, I comment all the code 
of my adapter in order to return static string for fix number of child and 
group items and I still have lots of GC So the problem maybe doesn't 
comes finally from my CustomView

I will look deeper into that direction and after, i will look at your 
advice with SpannableStringBuilder

regards

Le mardi 3 juillet 2012 14:24:38 UTC+2, Mark Murphy (a Commons Guy) a 
écrit :

 On Tue, Jul 3, 2012 at 7:48 AM, jean-francois garreau 
 jean.francois.garr...@gmail.com wrote: 
  Ok so can you please explain me how to do a view like this : 
  
  -- 
  NameMovie 
  1h20min 
  11:00am | 2:00pm | 4:00pm | 8:00pm | 10:00pm 
  - 

 That is a single TextView, assuming your lines of dashes are supposed 
 to be the ListView row divider lines (and therefore are not part of 
 your actual row). Use SpannableStringBuilder, along with 
 ForegroundColorSpan and StyleSpan, to handle the color changes and 
 weight (bold vs. not) changes. 

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 


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

Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 8:37 AM, Daniel Drozdzewski
daniel.drozdzew...@gmail.com wrote:
 See Mark's comment. If you can get away with one View. If however each of
 those times is clickable, then just set max number of TextViews in each list
 element, as simply removing unused ones by calling setVisibility(INVISIBLE)
 on each one.

Or, conceivably, use a URLSpan for the clickable ones.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: Problem optimizing views for having a fast scroll

2012-07-03 Thread Daniel Drozdzewski
On 3 July 2012 13:40, Mark Murphy mmur...@commonsware.com wrote:

 On Tue, Jul 3, 2012 at 8:37 AM, Daniel Drozdzewski
 daniel.drozdzew...@gmail.com wrote:
  See Mark's comment. If you can get away with one View. If however each of
  those times is clickable, then just set max number of TextViews in each
 list
  element, as simply removing unused ones by calling
 setVisibility(INVISIBLE)
  on each one.

 Or, conceivably, use a URLSpan for the clickable ones.


Indeed! - much better choice and View hierarchy becomes much smaller, which
is what performance needs.



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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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




-- 
Daniel Drozdzewski

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

2012-07-03 Thread jean-francois garreau
Ok thank you

So first of all i think that as I didn't identify what's causing all my GC 
I will not solves this UI problem. But After, i will try your solutions.

regards

Le mardi 3 juillet 2012 14:45:22 UTC+2, Daniel Drozdzewski a écrit :


 On 3 July 2012 13:40, Mark Murphy mmur...@commonsware.com wrote:

 On Tue, Jul 3, 2012 at 8:37 AM, Daniel Drozdzewski
 daniel.drozdzew...@gmail.com wrote:
  See Mark's comment. If you can get away with one View. If however each 
 of
  those times is clickable, then just set max number of TextViews in each 
 list
  element, as simply removing unused ones by calling 
 setVisibility(INVISIBLE)
  on each one.

 Or, conceivably, use a URLSpan for the clickable ones.

  
 Indeed! - much better choice and View hierarchy becomes much smaller, 
 which is what performance needs.

  

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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




 -- 
 Daniel Drozdzewski


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

[android-developers] Getting action bar height while minSdkVersion is 7

2012-07-03 Thread limtc
I am faced with an issue - I need to know the action bar height when our 
app is running on Android 3/4.

However, ActionBar class might not exists as our minSdkVersion is 7, and it 
seems that the height is not standard. I tested on 2 tablets and they are 
both 56 - but on users reported that on Galaxy S2 our assumption is wrong!

What's the best way to get the action bar height in program when detected 
that we are running on Android 3/4? 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] Application Restarts Suddenly While trying to decode using speex ?

2012-07-03 Thread amit


*What my App does ?* The App I am developing is a typical client server App 
which talks to a windows server using Wifi. The Application has multiple 
Activities and really has heavy memory and CPU requirements i.e native 
calls for speex encoding / decoding.

*What my Problem is ?* The problem is the Application restarts suddenly 
while working absolutely fine. Sometimes while working normally suddenly I 
see (in logcat ) that the Constructor of Application class (Class which 
extends API's Application Class) is called. That crashes my App since all 
the global data is stored with in the Application class itself.

*What I have done ?* The first thing which struck my mind was that may be 
Android feels their is low memory so it terminates my App, and than 
restarts it automatically. So I implemented onLowMemory()of Application 
class. But to my surprise it is never called..

*What is the main problem ?* The main problem is that Nothing is printed on 
LogCat. It looks that even the Android itself is clueless about why it 
restarted my already running Application ?

What could be the possible reason of this sudden restart ? How can I avoid 
that ? 
++Expand this 
questionhttp://stackoverflow.com/questions/11190469/android-app-crashes-suddenly-while-running

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

[android-developers] Re: Is there is any method to completely come out/exit from application and not only from activity (call finish() of activity) ?

2012-07-03 Thread amit
No there is no such method, even if you try System.exit().. the App might 
be still active in background.. That is the normal behavior for the Android 
Apps

On Wednesday, June 27, 2012 5:37:02 PM UTC+5:30, SIVAKUMAR.J wrote:

 Is there is any way to exit completely from application.?

 For example i developed one application.It contains 1 activity.It contains 
 the form having a button.When user click the button it exit from app 
 (calling finish() method of activity).
 When i run the app in my phone.After i click the button .It will come out 
 of application.
 But when i click menu-settings-manage application-then i click my 
 application.It  shows my app is running.It shows 2 buttons enabled force 
 close ,uninstall.
 my assumtion is finish() only close the activity.
 Is there is any method to completely come out/exit from application?


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

2012-07-03 Thread RichardC
The action bar can also change size with custom (OEM) themes.  So I would 
take a different approach and find the size of the usable window left to 
your application.  This is just a case of calling getWidth and getHeight on 
the root object of your view hierarchy.

On Tuesday, July 3, 2012 2:12:26 PM UTC+1, limtc wrote:

 I am faced with an issue - I need to know the action bar height when our 
 app is running on Android 3/4.

 However, ActionBar class might not exists as our minSdkVersion is 7, and 
 it seems that the height is not standard. I tested on 2 tablets and they 
 are both 56 - but on users reported that on Galaxy S2 our assumption is 
 wrong!

 What's the best way to get the action bar height in program when detected 
 that we are running on Android 3/4? 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: Handler removecallback problem

2012-07-03 Thread B.Arunkumar
Hi,

   Thank you for your replies. The value of millisecs I am using is of
the order of 5000 millisecs. Actually, you may be right. There might
be cases where probably the removecallback executes in the secondary
thread faster than setting the handler postdelayed in the main thread.

Thank you,
B.Arunkumar

On Jul 3, 4:47 pm, skink psk...@gmail.com wrote:
 B.Arunkumar wrote:
  Hi,

       Thank you for your reply. This is roughly the framework of code I
  am using:

  Main Thread :-

  Handler handler = new Handler();
  handler.postDelayed (runnable,miilisecs);

  Another Thread :-

  handler.removeCallbacks(runnable)

  But I find that handler.postDelayed (runnable,miilisecs) still
  executes after handler.removeCallbacks(runnable) is executed in the
  other thread.

 what do you mean by:
 But I find that
 handler.postDelayed
 (runnable,miilisecs) still
 executes?

 if you call postDelayed after removing runnable it is normal that your
 runnable will be run

 pskink

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


[android-developers] Re: camera doesnt work

2012-07-03 Thread Viktor Brešan
You have to add the Hardware Property to your AVD:

Configures camera facing front or
Configures camera facing back

and assign webcam as it's value.

Kind regards, Viktor.


On Sunday, June 24, 2012 1:43:08 PM UTC+2, karan hans wrote:

 otherwise the camera works fine with skype
 On Sunday, June 24, 2012 4:28:33 PM UTC+5:30, karan hans wrote:

 actually iam working on windows 7 based system. i dont have an android 
 device. so like if and when i start the avd and click on the camera button 
 it just gives me a chequered background of black and white with a white 
 square bouncing off the walls.
  
 sometimes wheni start the emulator the camera on top of my laptop 
 screen/lid blinks with a blue light.however sometimes it doesnt. but in any 
 case the camera view doesnt open up in emulator. i wonder what the problem 
 could be.
 On Sunday, June 24, 2012 3:35:27 PM UTC+5:30, karan hans wrote:

 hi,
  
 when i try to open the camera in the emulator( api level 4,7,8,15). it 
 worked once when i started working with eclipse. actually iam using a face 
 detection app for which the camera is necessary
  
 please help
 regards
 Karan



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] HELP! Google removed my app with millions of users!

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 10:08 AM, CVP chri...@gmail.com wrote:
 I'm really looking for help from anyone, but I really need to get in contact
 with someone from google...

http://developer.android.com/support.html

 Without warning, a few days ago my long standing successful app was removed
 from the play store. The app has been around for over 2 years now and has
 around 1.5 million active users, and nearly 5 million downloads. It's been
 in the top 5 of its category for well over a year. It has over 65,000
 ratings with an average of 4.6/5.

What is the app?

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread brandall
It seems there is no answer here or on Stackoverflow for this behaviour, so 
I have to assume it's a notification from a service bug for a small number 
of Android devices.  Where do I report this as a bug? 


On Saturday, June 30, 2012 9:19:18 PM UTC+1, brandall wrote:

 The full error also contains:

 android.app.RemoteServiceException: Bad notification for startForeground:

 I've read other similar posts 
 herehttp://stackoverflow.com/questions/3112008/android-java-lang-illegalargumentexception-contentintent-required-error-cause,
  
 tried their suggestions and read their links, but a small number of users 
 are still reporting this error.

 *Overview*

 An activity is started by an external application. This activity starts a 
 custom speech recognition service. It *does not* use startForeground:

 this.startService(intent);

 The activity then calls finish();

 The service starts the custom speech recognition class and passes context 
 to it in a constructor. On 'beginning of speech detected' I display the 
 following notification:

 String notTitle = Hello;
 String notificationText = hello there;

 notificationManager = 
 (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
 myNotification = new Notification(
 android.R.drawable.ic_btn_speak_now, notTitle,
 System.currentTimeMillis());
 myNotification.flags |= Notification.FLAG_AUTO_CANCEL;

 Intent intent = new Intent();
 intent.setAction(com.android.settings.TTS_SETTINGS);
 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, 
 intent, 0);
 myNotification.contentIntent = pendingIntent;

 myNotification.setLatestEventInfo(mContext, notTitle,
 notificationText, pendingIntent);

 notificationManager.notify(MY_NOTIFICATION_ID, myNotification);

 The notification has no requirement to do anything 'onClick' as it's 
 cancelled as soon as the user stops talking. I was originally passing a 'null 
 intent', however, after reading many posts, I added in the random 
 intent/pendingIntent of displaying TTS Settings, just to rule this out as the 
 problem.

 99% of my users don't have an issue with either the above code or passing a 
 null intent. I need to solve this for the 1% though, as it's a very important 
 part of my application.

 Any suggestions would be very much appreciated.



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

[android-developers] Re: Getting action bar height while minSdkVersion is 7

2012-07-03 Thread limtc
Do you mind showing me a sample code on how this is done? (to get the 
action bar size)

在 2012年7月3日星期二UTC+8下午9时25分43秒,RichardC写道:

 The action bar can also change size with custom (OEM) themes.  So I would 
 take a different approach and find the size of the usable window left to 
 your application.  This is just a case of calling getWidth and getHeight on 
 the root object of your view hierarchy.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] HELP! Google removed my app with millions of users!

2012-07-03 Thread CVP
I've replied directly to the email, as well as requested support from the 
link you provided. I got another automated email from the same email 
address from filling out the support request.

For now I'd like to keep the name of the app private as I would rather work 
with Google to remedy this issue rather than posting all the details in a 
public forum where a blog/news site can make a story out of it.

On Tuesday, July 3, 2012 10:35:21 AM UTC-4, Mark Murphy (a Commons Guy) 
wrote:

 On Tue, Jul 3, 2012 at 10:08 AM, CVP wrote: 
  I'm really looking for help from anyone, but I really need to get in 
 contact 
  with someone from google... 

 http://developer.android.com/support.html 

  Without warning, a few days ago my long standing successful app was 
 removed 
  from the play store. The app has been around for over 2 years now and 
 has 
  around 1.5 million active users, and nearly 5 million downloads. It's 
 been 
  in the top 5 of its category for well over a year. It has over 65,000 
  ratings with an average of 4.6/5. 

 What is the app? 

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 


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

Re: [android-developers] Re: Getting action bar height while minSdkVersion is 7

2012-07-03 Thread Latimerius
On Tue, Jul 3, 2012 at 4:45 PM, limtc thyech...@gmail.com wrote:
 Do you mind showing me a sample code on how this is done? (to get the action
 bar size)

I'm afraid you misunderstand - if you are trying to find out the
action bar height just to subtract it from the screen height and see
how much space is left for your app to draw into, you can get that
directly by calling getWidth()  getHeight() on your root View.  Or
alternatively, if you're using GL with GLSurfaceView, you get the same
information as parameters of your Renderer's onSurfaceChanged().

Either way, you don't have to care what the action bar's geometry is,
or if there even is an action bar at all.  My minSdkVersion is 7, too,
so trust me, this works. :-)

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


Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 10:40 AM, brandall benrandal...@gmail.com wrote:
 It seems there is no answer here or on Stackoverflow for this behaviour

There should be an error message appearing to the right of the Bad
notification for startForeground: portion of your message, based upon
the source code that I am reading. Are you sure there is nothing
there? Posting the entire stack trace is considered a fairly
conventional step when you seek assistance for issues like this.

Also, have you tried switching to Notification.Builder or
NotificationCompat.Builder?

 so
 I have to assume it's a notification from a service bug for a small number
 of Android devices. Where do I report this as a bug?

com.android.settings.TTS_SETTINGS is not part of the Android SDK,
near as I can tell, so you should not be using it in the first place.
Moreover, few of the settings activities are guaranteed on any device
anyway, which is why you see the sentence In some cases, a matching
Activity may not exist, so ensure you safeguard against this for many
of the settings actions that *are* in the SDK. It is fairly safe to
assume that not all devices will offer an activity for this
undocumented and unsupported action.

So, first, create a test case that is:

1. Reproducible (otherwise, there's little anyone can do), and
2. Does not use things that you should not be using, like
TTS_SETTINGS, that may cause your test case to be ignored

Then, and only then, file an issue on http://b.android.com.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] Android 4.1 Jelly Bean GIF Images Not Showing?

2012-07-03 Thread Josh F.
I'm wondering if it is just me or not, but I have a game that has been 
out for years now that uses GIF files for some of the bigger images (many 
are PNG, but some are GIF).  In the latest Android 4.1 Jelly Bean release, 
the emulator continues to show these images without any problems in every 
configuration I have tried, but the devices that are running 4.1 right now 
(the Nexus 7 and Galaxy Nexus) both fail to show these images in the game. 
 There is no crash and no other failure and the game behaves as if the 
images are present (some you can select/touch/etc. and it works).

As I don't yet have a 4.1 device (unable to get tickets to Google I/O which 
is the only way to have a legitimate one right now) and I do not want to 
flash a hacked ROM on my own Galaxy Nexus test devices (we keep them stock 
for testing) I was hoping someone else in the community has seen this and 
has a recommendation.  Otherwise, it looks like I'll be doing a lot of GIF 
to PNG conversions for the next few days...

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

[android-developers] Java.Text.DateFormat returns wrong pattern for en-GB in Android 4.0.x

2012-07-03 Thread Edward Lin
Please help me with this date time localization issue. I am trying to use
Java.Text.DateFormat to get the default date format for different locale in
the following.

dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK);
String formattedDateString = dateFormatter.format(new
Date(System.currentTimeMillis()));

When I am trying to format the date using en-GB locale for the date - July,
3rd, 2012

Android 2.2.x.-2.3.x result: 03/07/2012  (Correct)
Android 4.0.x result: 07/03/2012  (Wrong)

Apparently, It is working at Android platform 2.2.x to 2.3.x, but in
devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not
work anymore. Why is this behavior different between the API level? And how
can I get the default date format for specific locale from now on?

Thanks,

Edward

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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.Text.DateFormat returns wrong pattern for en-GB in Android 4.0.x

2012-07-03 Thread RichardC
From:
http://developer.android.com/reference/java/util/Locale.html 

*Note that locale data is not necessarily available for any of the locales 
pre-defined as constants in this class except for en_US, which is the only 
locale Java guarantees is always available.*

*It is also a mistake to assume that all devices have the same locales 
available. A device sold in the US will almost certainly support en_US and 
es_US, but not necessarily any locales with the same language but different 
countries (such as en_GB or es_ES), nor any locales for other languages 
(such as de_DE). The opposite may well be true for a device sold in Europe.
*
It might be that the devices you are testing on does not support the 
Locale.  Can you enumerate the installed Locales or test to see if the 
Locale you want is installed?


On Tuesday, July 3, 2012 4:25:38 PM UTC+1, elin wrote:

 Please help me with this date time localization issue. I am trying to use 
 Java.Text.DateFormat to get the default date format for different locale in 
 the following. 

 dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK);
 String formattedDateString = dateFormatter.format(new 
 Date(System.currentTimeMillis()));

 When I am trying to format the date using en-GB locale for the date 
 - July, 3rd, 2012

 Android 2.2.x.-2.3.x result: 03/07/2012  (Correct)
 Android 4.0.x result: 07/03/2012  (Wrong)

 Apparently, It is working at Android platform 2.2.x to 2.3.x, but in 
 devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not 
 work anymore. Why is this behavior different between the API level? And how 
 can I get the default date format for specific locale from now on? 

 Thanks, 

 Edward



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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread brandall


 There should be an error message appearing to the right of the Bad 
 notification for startForeground: portion of your message, based upon 
 the source code that I am reading. Are you sure there is nothing 
 there? Posting the entire stack trace is considered a fairly 
 conventional step when you seek assistance for issues like this. 


Thanks for your response Mark. The rest of the stack trace is:

java.lang.IllegalArgumentException: contentIntent required: 
pkg=com.brandall.nutter id=1079820303 
notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x60)

There's nothing else relevant in the output. 


 Also, have you tried switching to Notification.Builder or 
 NotificationCompat.Builder? 


I'm targeting 2.2, so couldn't use Notification.Builder. Thank you for 
pointing out the Compat builder, I can't believe I hadn't come across that 
anywhere in my many hours of trying to resolve this...I'll try it. 


 com.android.settings.TTS_SETTINGS is not part of the Android SDK, 
 near as I can tell, so you should not be using it in the first place. 
 [SNIP] 

 It is fairly safe to 
 assume that not all devices will offer an activity for this 
 undocumented and unsupported action. 

 Then, and only then, file an issue on http://b.android.com. 


Point taken thanks - I should have clarified that I'd tried a null activity 
as well as an activity to open my application and eventually the TTS 
Settings. In all cases successful for 99% of my users. The remaining 1%, no 
joy...

Thanks for the link. 


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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 


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

Re: [android-developers] big bluetooth packets

2012-07-03 Thread bob
Hmmm…

I only see the problem on this ICS phone:

HTC EVO Design 4G

It has never happened with my Galaxy Tab.


On Monday, July 2, 2012 4:04:57 PM UTC-5, Latimerius wrote:

 On Mon, Jul 2, 2012 at 10:43 PM, bob b...@coolfone.comze.com wrote: 
  Has anyone seen the situation where you send out a large bluetooth 
 packet 
  (maybe like 2000 bytes?) and on the receiving end you only receive like 
 1100 
  bytes?  Seems like the rest of it got bit bucketed.  Is there an easy 
  workaround? 

 To my knowledge, that should not happen - RFCOMM is a reliable stream. 
  I've never seen anything like that happen, either. 

 I'd say, look for a bug in your code. 


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

[android-developers] Re: Java.Text.DateFormat returns wrong pattern for en-GB in Android 4.0.x

2012-07-03 Thread RichardC
Reading a bit further I found  getAvailableLocales ()

http://developer.android.com/reference/java/util/Locale.html#getAvailableLocales()

Try that and see what it returns.

On Tuesday, July 3, 2012 4:25:38 PM UTC+1, elin wrote:

 Please help me with this date time localization issue. I am trying to use 
 Java.Text.DateFormat to get the default date format for different locale in 
 the following. 

 dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK);
 String formattedDateString = dateFormatter.format(new 
 Date(System.currentTimeMillis()));

 When I am trying to format the date using en-GB locale for the date 
 - July, 3rd, 2012

 Android 2.2.x.-2.3.x result: 03/07/2012  (Correct)
 Android 4.0.x result: 07/03/2012  (Wrong)

 Apparently, It is working at Android platform 2.2.x to 2.3.x, but in 
 devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not 
 work anymore. Why is this behavior different between the API level? And how 
 can I get the default date format for specific locale from now on? 

 Thanks, 

 Edward



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

2012-07-03 Thread Justin Anderson
Seriously?

*[2012-06-26 16:51:25 - SplashScreen] You must perform a full uninstall of
 the application. WARNING: This will remove the application data!*

This doesn't provide enough information about what you need to do to fix
the problem?  What more do you want?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Jun 26, 2012 at 4:59 AM, Wang Ksy mailmen...@gmail.com wrote:

 Dear All,

 I am novice in Android Development field and i would like to seek
 solutions to following errors. I was able to run the android project
 before, but after importing few projects following errors prompts up,
 please provide me your valuable suggestions:

 *[2012-06-26 16:51:25 - SplashScreen] Re-installation failed due to
 different application signatures.
 [2012-06-26 16:51:25 - SplashScreen] You must perform a full uninstall of
 the application. WARNING: This will remove the application data!
 [2012-06-26 16:51:25 - SplashScreen] Please execute 'adb uninstall
 Ksy.wang.Directory' in a shell.
 [2012-06-26 16:51:25 - SplashScreen] Launch canceled!*

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

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

Re: [android-developers] Android SDK won't install, says can't find Java

2012-07-03 Thread Justin Anderson
First, what can't find Java?  Eclipse? The Android SDK installer?

Second, did you install the 32 or 64-bit version of the JDK?  After adding
the path variable, did you try restarting your computer?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Jun 27, 2012 at 6:37 AM, Legion6789 legion.rem...@gmail.com wrote:

 I've installed the Java 6 JDK but it can't see it for some reason.  I've
 added an environment variable called JAVA_HOME that points to the Java root
 directory and I've tried pointing to java.exe.  I've added Java to the PATH
 variable as well.  None of this works.  Is there an SDK download that
 doesn't involve using this installer?

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

2012-07-03 Thread Bryan Ashby
Part of my applications duties are to enumerate launcher activities -- to 
do this, I call PackageManger.queryIntentActivities(). On some devices this 
has resulted in a *TransactionTooLargeException*. Is there a way around 
this? 

*Example code:*

 final PackageManager pm = getPackageManager();
 Intent intent = new Intent(Intent.ACTION_MAIN, null);
 intent.addCategory(Intent.CATEGORY_LAUNCHER);
 final ListResolveInfo ri = pm.queryIntentActivities(intent, 0); 
 // TransactionTooLargeException


I saw a related post about 
getInstalledPackages()https://groups.google.com/forum/?fromgroups#!topic/android-developers/EK4eJPadabsbut
 it seemed to end with Don't do that which seems like an odd answer to 
just using the API. I'd expect that in this case if the underlying 
implementation is limited to 1M that the query is done in batches and 
hidden from the developer or that an API exists to do it in batches myself.

Any ideas? This works nearly all of the time (expected!) but it seems that 
every now and then I'm running into this exception in the wild on customer 
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: Android code to switch to vibrate

2012-07-03 Thread Ali
Hi Zohob,

Thanks for your response. I am able to vibrate the device. What I am 
looking is I want to happen it at certain date/time. You can think of 
setting reminders in calendars. Just in place of reminder I want the device 
to switch to Vibrate mode and once that time is over should come back to 
normal.

Hope this clarifies my requirement. Let me know if otherwise.

On Monday, July 2, 2012 2:55:27 PM UTC+3, Zohob wrote:

 This may help you: 
 http://android.konreu.com/developer-how-to/vibration-examples-for-android-phone-development/
 Third passage Example: Vibrate in a Given Pattern and the fourth one:

 Vibrator v = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
 long[] pattern = { 0, 200, 500 };
 v.vibrate(pattern, 0);

 Will start immediately (gap of zero milliseconds), then vibrate 200 ms, 
 then pause for 500 ms.

 Am Montag, 2. Juli 2012 13:43:18 UTC+2 schrieb Ali:

 Dear All,

 We are looking for code to switch the Android device to Vibrate and back 
 to normal for a given time. Can anyone share their findings/code 
 snippets/APIs if used to achieve the same.

 Thanks for your time.

 Cheers,
 Ali



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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 11:41 AM, brandall benrandal...@gmail.com wrote:
 Thanks for your response Mark. The rest of the stack trace is:

 java.lang.IllegalArgumentException: contentIntent required:
 pkg=com.brandall.nutter id=1079820303
 notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x60)

 There's nothing else relevant in the output.

Is that in your null Intent case? The message makes more sense for
that than with the TTS_SETTINGS scenario.

It looks like contentIntent used to be required, but no longer is, as
of October 2010 (in terms of source code updates). Do you see a
pattern in OS versions in the devices that are hitting this?

I would recommend using an Intent that points to one of your
activities -- that avoids the TTS_SETTINGS problem and avoids the null
contentIntent.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-07-03 Thread Francisco M. Marzoa Alonso
Hi,

Well, your point of view is not statistically relevant, but as android
developer what I want -and I think this is actually generalizable- is
the most income for my work.

And my limitated experience with just one app after two months of its
release in both forms, free with ads and payed without them, is that I
have got more than 35 times more income from the ads on the free version
than from purchased one.

I do not want to reveal the exactly income, but you can get the idea
from these numbers: for 10 dollars of income on payment version, I have
got 350 dollars from ads on the free one.

And for me it is pretty clear that after more than 100.000 installs on
the free version and less than 100 on the payed one, is that there is A
LOT of users out there that does not care a bit about the ads. And such
quantity of users are statistically relevant, indeed.

Though my app is a casual game and I am pretty sure that in other type
of apps things may work in a different way. For example, on a scientific
calculator ads will be really annoying and users of that kind of app are
not likely to click on the ads as casual game users does.

Best regars,



On 01/07/12 16:31, Kostya Vasilyev wrote:
 2012/7/1 Mystique joven.ch...@gmail.com

 Yes, I have additional features for the paid version but was thinking to
 maintain the Ads in the free version.
 So you are suggestion to completely remove the Ads for free and focus on
 the Paid version for incentive?

 My suggestion, as a fellow developer, is to give it some thought, rather
 than assuming that ads are some kind of Eleventh Commandment.

 In-app billing, or a separate unlocker app, seems like an easier
 free-to-premium migration path than two separate apps. So, losing some on
 the ads, you might gain some in the upsell conversion ratio.

 As an Android *user*, though, I really dislike apps with ads.

 The idea of irritate the user until he agrees to pay just seems wrong to
 me.

 -- K



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


Re: [android-developers] Re: Java.Text.DateFormat returns wrong pattern for en-GB in Android 4.0.x

2012-07-03 Thread Edward Lin
Thanks for the reply! Here is the results I got from this line of code:

Locale[] allLocales = Locale.getAvailableLocales();

[ar, ar_AE, ar_BH, ar_DZ, ar_EG, ar_IQ, ar_JO, ar_KW, ar_LB, ar_LY, ar_MA,
ar_OM, ar_QA, ar_SA, ar_SD, ar_SY, ar_TN, ar_YE, bg, bg_BG, ca, ca_ES, cs,
cs_CZ, da, da_DK, de, de_AT, de_BE, de_CH, de_DE, de_LI, de_LU, el, el_GR,
en, en_AU, en_BE, en_BW, en_BZ, en_CA, en_GB, en_HK, en_IE, en_IN, en_JM,
en_MH, en_MT, en_NA, en_NZ, en_PH, en_PK, en_RH, en_SG, en_TT, en_US,
en_US_POSIX, en_VI, en_ZA, en_ZW, es, es_AR, es_BO, es_CL, es_CO, es_CR,
es_DO, es_EC, es_ES, es_GT, es_HN, es_MX, es_NI, es_PA, es_PE, es_PR,
es_PY, es_SV, es_US, es_UY, es_VE, fa, fa_AF, fa_IR, fi, fi_FI, fil,
fil_PH, fr, fr_BE, fr_CA, fr_CH, fr_FR, fr_LU, fr_MC, iw, iw_IL, hi, hi_IN,
hr, hr_HR, hu, hu_HU, in, in_ID, it, it_CH, it_IT, ja, ja_JP, ko, ko_KR,
lt, lt_LT, lv, lv_LV, nb, nb_NO, nl, nl_BE, nl_NL, pl, pl_PL, ps, pt,
pt_BR, pt_PT, rm, ro, ro_RO, ru, ru_RU, ru_UA, sk, sk_SK, sl, sl_SI, sr,
sv, sv_FI, sv_SE, th, th_TH, tr, tr_TR, uk, uk_UA, vi, vi_VN, zh, zh_CN,
zh_HK, zh_HANS, zh_HANS_CN, zh_HANS_HK, zh_HANS_SG, zh_HANT, zh_HANT_HK,
zh_HANT_MO, zh_HANT_TW, zh_MO, zh_SG, zh_TW]



On Tue, Jul 3, 2012 at 10:43 AM, RichardC richard.crit...@googlemail.comwrote:

 Reading a bit further I found  getAvailableLocales ()


 http://developer.android.com/reference/java/util/Locale.html#getAvailableLocales()

 Try that and see what it returns.


 On Tuesday, July 3, 2012 4:25:38 PM UTC+1, elin wrote:

 Please help me with this date time localization issue. I am trying to use
 Java.Text.DateFormat to get the default date format for different locale in
 the following.

 dateFormatter = DateFormat.getDateInstance(**DateFormat.SHORT,
 Locale.UK);
 String formattedDateString = dateFormatter.format(new
 Date(System.currentTimeMillis(**)));

 When I am trying to format the date using en-GB locale for the date
 - July, 3rd, 2012

 Android 2.2.x.-2.3.x result: 03/07/2012  (Correct)
 Android 4.0.x result: 07/03/2012  (Wrong)

 Apparently, It is working at Android platform 2.2.x to 2.3.x, but in
 devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not
 work anymore. Why is this behavior different between the API level? And how
 can I get the default date format for specific locale from now on?

 Thanks,

 Edward

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

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 11:50 AM, Bryan  Ashby nuskoo...@gmail.com wrote:
 Part of my applications duties are to enumerate launcher activities -- to
 do this, I call PackageManger.queryIntentActivities(). On some devices this
 has resulted in a TransactionTooLargeException. Is there a way around this?

 Example code:

 final PackageManager pm = getPackageManager();
 Intent intent = new Intent(Intent.ACTION_MAIN, null);
 intent.addCategory(Intent.CATEGORY_LAUNCHER);
 final ListResolveInfo ri = pm.queryIntentActivities(intent, 0); //
 TransactionTooLargeException

Well, I'd at least consider adding MATCH_DEFAULT_ONLY on the
queryIntentActivities() call, if you are building a launcher-type app.

Beyond that, I'm not sure if by default you get everything in the GET_
series of flags -- if so, that might be the source of your woe, and
expressly listing the GET_ flags you really need might help.

Basically, TransactionTooLargeException means you're trying to
retrieve  1MB (IIRC) from a foreign process. In this case, the user
has too many apps installed, presumably.

 I'd
 expect that in this case if the underlying implementation is limited to 1M
 that the query is done in batches and hidden from the developer or that an
 API exists to do it in batches myself.

Yeah, I don't know how you would do page at a time type stuff here.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] Re: Android SDK won't install, says can't find Java

2012-07-03 Thread RichardC
JAVA_HOME should be set to the JKD dir not the JRE dir, such that both:
   %JAVA_HOME%\bin\java.exe
   %JAVA_HOME%\bin\javac.exe
will work

on my machine for example 
JAVA_HOME=C:\apps\Java\jdk1.6.0_32

If you still get problems then try this:
when you get to the page in the installer where it tells you it can't 
find Java
click [back]
click [next]
this sometimes clears the problem

On Wednesday, June 27, 2012 1:37:22 PM UTC+1, Legion6789 wrote:

 I've installed the Java 6 JDK but it can't see it for some reason.  I've 
 added an environment variable called JAVA_HOME that points to the Java root 
 directory and I've tried pointing to java.exe.  I've added Java to the PATH 
 variable as well.  None of this works.  Is there an SDK download that 
 doesn't involve using this installer?


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

2012-07-03 Thread RichardC
Do what it says:
*[2012-06-26 16:51:25 - SplashScreen] Please execute 'adb 
uninstall Ksy.wang.Directory' in a shell.* 


On Tuesday, June 26, 2012 11:59:17 AM UTC+1, Wang Ksy wrote:

 Dear All,

 I am novice in Android Development field and i would like to seek 
 solutions to following errors. I was able to run the android project 
 before, but after importing few projects following errors prompts up, 
 please provide me your valuable suggestions:

 *[2012-06-26 16:51:25 - SplashScreen] Re-installation failed due to 
 different application signatures.
 [2012-06-26 16:51:25 - SplashScreen] You must perform a full uninstall of 
 the application. WARNING: This will remove the application data!
 [2012-06-26 16:51:25 - SplashScreen] Please execute 'adb uninstall 
 Ksy.wang.Directory' in a shell.
 [2012-06-26 16:51:25 - SplashScreen] Launch canceled!*

 many many thanks in advance.


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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread brandall



  java.lang.IllegalArgumentException: contentIntent required: 
  pkg=com.brandall.nutter id=1079820303 
  
 notification=Notification(vibrate=null,sound=null,defaults=0x0,flags=0x60) 
  
  There's nothing else relevant in the output. 

 Is that in your null Intent case? The message makes more sense for 
 that than with the TTS_SETTINGS scenario. 


That is returned in all cases...null or activity. 


 It looks like contentIntent used to be required, but no longer is, as 
 of October 2010 (in terms of source code updates). Do you see a 
 pattern in OS versions in the devices that are hitting this? 

 I would recommend using an Intent that points to one of your 
 activities -- that avoids the TTS_SETTINGS problem and avoids the null 
 contentIntent. 


It's definitely replicated when using the main activity to launch the 
application. The stack did also contain:

W/19:27:15.560 ActivityManager(  220)
at 
com.android.server.NotificationManagerService.enqueueNotificationInternal(NotificationManagerService.java:888)
W/19:27:15.560 ActivityManager(  220)
Error showing notification for service

I haven't narrowed down which OS/Devices are having the problems - I will 
do though. A dev on StackOverflow commented on the linked post that he only 
found this issue on the Kindle Fire. I have LG devices reporting this 
though..

Can't help thinking that there's a glitch in the matrix on some devices 
where startforeground is 'expected' when firing a notification from a 
service... 

Thanks again for your replies. I'll continue to investigate.


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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 


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

Re: [android-developers] Re: How to: Free to Paid App and retain preference and db files?

2012-07-03 Thread Francisco M. Marzoa Alonso
On 01/07/12 16:45, John Coryat wrote:
 The idea of irritate the user until he agrees to pay just seems wrong 
 to me.

 In my opinion, it is far better to let users opt out of ads for free than 
 use advertising as some sort of black mail to push users into paying. In 
 our app, only 2.7% of users choose to opt out of banners. 
This is pretty interesting, but I think if you put the ads disabled by
default and puts an option to enable them, you will get the inverted
proportion... I know it is an elucidation, but my hypothesis is that
those numbers could be explain also for the laziness of the majority of
the users, not only for their interest on banners.
 The rest let them 
 display. We have premium users who choose not to opt out as well.
 A small percentage of users hate ads. Giving them the opportunity to just 
 remove them easily and freely increases the acceptance of your app and also 
 helps give it a positive image.
Now put that theory on measurable income numbers...
 One thing to keep in mind. By not allowing free opt out, all you are doing 
 is decreasing the CTR for your ads and that lowers revenue. 
:potatoes

That's not true, indeed. You get income for each click, whatever the CTR
is. Please, bear in mind that the CTR is the resulting proportion of
dividing clicks by impressions, not the other way. In other words: if
your clicks worths one cent each one, with 1000 clicks you will get 10
dollars, and it does not matter if the CTR, that may vary with the
number of impressions, is 1% or 2%.

Moreover, from my own experience with Admob I am pretty sure that they
penalize high CTR rates, considering more clicks non valid with high
CTRs than with lower ones.
 Part of secret 
 sauce for determining what you are paid is the CTR, so keeping that high 
 will increase your revenue. 
JMP potatoes

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


Re: [android-developers] Re: Java.Text.DateFormat returns wrong pattern for en-GB in Android 4.0.x

2012-07-03 Thread Edward Lin
The getAvailableLocales returned en-GB locale. So the en-GB should be
available on this Samsung device and I can switch it through Settings.
In addition, if I choose the other locale on the 4.0.x devices through the
Settings, such as Deutsch. It is working perfectly as date shown
03.07.2012, so what is wrong with en-GB?

Thanks,

Edward

On Tue, Jul 3, 2012 at 10:56 AM, Edward Lin edwardlinw...@gmail.com wrote:

 Thanks for the reply! Here is the results I got from this line of code:

 Locale[] allLocales = Locale.getAvailableLocales();

 [ar, ar_AE, ar_BH, ar_DZ, ar_EG, ar_IQ, ar_JO, ar_KW, ar_LB, ar_LY, ar_MA,
 ar_OM, ar_QA, ar_SA, ar_SD, ar_SY, ar_TN, ar_YE, bg, bg_BG, ca, ca_ES, cs,
 cs_CZ, da, da_DK, de, de_AT, de_BE, de_CH, de_DE, de_LI, de_LU, el, el_GR,
 en, en_AU, en_BE, en_BW, en_BZ, en_CA, en_GB, en_HK, en_IE, en_IN, en_JM,
 en_MH, en_MT, en_NA, en_NZ, en_PH, en_PK, en_RH, en_SG, en_TT, en_US,
 en_US_POSIX, en_VI, en_ZA, en_ZW, es, es_AR, es_BO, es_CL, es_CO, es_CR,
 es_DO, es_EC, es_ES, es_GT, es_HN, es_MX, es_NI, es_PA, es_PE, es_PR,
 es_PY, es_SV, es_US, es_UY, es_VE, fa, fa_AF, fa_IR, fi, fi_FI, fil,
 fil_PH, fr, fr_BE, fr_CA, fr_CH, fr_FR, fr_LU, fr_MC, iw, iw_IL, hi, hi_IN,
 hr, hr_HR, hu, hu_HU, in, in_ID, it, it_CH, it_IT, ja, ja_JP, ko, ko_KR,
 lt, lt_LT, lv, lv_LV, nb, nb_NO, nl, nl_BE, nl_NL, pl, pl_PL, ps, pt,
 pt_BR, pt_PT, rm, ro, ro_RO, ru, ru_RU, ru_UA, sk, sk_SK, sl, sl_SI, sr,
 sv, sv_FI, sv_SE, th, th_TH, tr, tr_TR, uk, uk_UA, vi, vi_VN, zh, zh_CN,
 zh_HK, zh_HANS, zh_HANS_CN, zh_HANS_HK, zh_HANS_SG, zh_HANT, zh_HANT_HK,
 zh_HANT_MO, zh_HANT_TW, zh_MO, zh_SG, zh_TW]



 On Tue, Jul 3, 2012 at 10:43 AM, RichardC 
 richard.crit...@googlemail.comwrote:

 Reading a bit further I found  getAvailableLocales ()


 http://developer.android.com/reference/java/util/Locale.html#getAvailableLocales()

 Try that and see what it returns.


 On Tuesday, July 3, 2012 4:25:38 PM UTC+1, elin wrote:

 Please help me with this date time localization issue. I am trying to
 use Java.Text.DateFormat to get the default date format for different
 locale in the following.

 dateFormatter = DateFormat.getDateInstance(**DateFormat.SHORT,
 Locale.UK);
 String formattedDateString = dateFormatter.format(new
 Date(System.currentTimeMillis(**)));

 When I am trying to format the date using en-GB locale for the date
 - July, 3rd, 2012

 Android 2.2.x.-2.3.x result: 03/07/2012  (Correct)
 Android 4.0.x result: 07/03/2012  (Wrong)

 Apparently, It is working at Android platform 2.2.x to 2.3.x, but in
 devices with 4.0.x (such as ASUS Eee Pad and Samsung Nexus 2), it does not
 work anymore. Why is this behavior different between the API level? And how
 can I get the default date format for specific locale from now on?

 Thanks,

 Edward

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




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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 12:14 PM, brandall benrandal...@gmail.com wrote:
 Can't help thinking that there's a glitch in the matrix on some devices
 where startforeground is 'expected' when firing a notification from a
 service...

Actually, I think that part of the message may be a fluke. There
appear to be two cases which call the postNotification() where that
exception is raised, and only one of those is for a startForeground()
scenario, if I am reading the source properly.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread brandall



 Actually, I think that part of the message may be a fluke. There 
 appear to be two cases which call the postNotification() where that 
 exception is raised, and only one of those is for a startForeground() 
 scenario, if I am reading the source properly. 


To clarify, I don't call startForeground() in any of the cases. The purpose 
of the notification is purely visual and not to make the service 
foreground. Perhaps you were referring to the Activity that would be 
started though?? 

  


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

[android-developers] Abnormal behavior of media scanner when I renamed a folder which have some media files.

2012-07-03 Thread Hyuck
Hi All,

I have develop a kind of file manager app. recently, I have met a strange 
behavior of media scanner.
There was a folder(A) with some media files in it. and I renamed the folder 
name to B. 
However, after a re-scanning , there is still folder A, and the folder have 
media files which have 0bytes.  
is there anyone who have this kind of problem? if so, please give me some 
advise. it would be much appreciated.

Hyuck.

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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 12:46 PM, brandall benrandal...@gmail.com wrote:
 Actually, I think that part of the message may be a fluke. There
 appear to be two cases which call the postNotification() where that
 exception is raised, and only one of those is for a startForeground()
 scenario, if I am reading the source properly.


 To clarify, I don't call startForeground() in any of the cases. The purpose
 of the notification is purely visual and not to make the service foreground.
 Perhaps you were referring to the Activity that would be started though??

No, I was referring to the error message. While it *says* Bad
notification for startForeground, it appears that this error might be
raised even if *nobody* called startForeground(). Hence, I am telling
you to not over-emphasize the Bad notification for startForeground
portion of the error, as it may be a red herring, fluke, or something
else fishy.

IMHO, the real question is: where is your contentIntent going?
Somehow, Android is winding up with a Notification object that has a
null contentIntent, and that appears to be unsupported, at least on
Android 1.x/2.x. In the cases where you are explicitly supplying a
contentIntent, it should no longer be null. Are you doing anything to
the Notification object after you call notify()?

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Abnormal behavior of media scanner when I renamed a folder which have some media files.

2012-07-03 Thread Mark Murphy
How did you do the re-scanning?

On Tue, Jul 3, 2012 at 12:53 PM, Hyuck hyuckmin.k...@gmail.com wrote:
 Hi All,

 I have develop a kind of file manager app. recently, I have met a strange
 behavior of media scanner.
 There was a folder(A) with some media files in it. and I renamed the folder
 name to B.
 However, after a re-scanning , there is still folder A, and the folder have
 media files which have 0bytes.
 is there anyone who have this kind of problem? if so, please give me some
 advise. it would be much appreciated.

 Hyuck.

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



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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread brandall


 No, I was referring to the error message. While it *says* Bad 
 notification for startForeground, it appears that this error might be 
 raised even if *nobody* called startForeground(). Hence, I am telling 
 you to not over-emphasize the Bad notification for startForeground 
 portion of the error, as it may be a red herring, fluke, or something 
 else fishy. 


I'm with you now. 


 IMHO, the real question is: where is your contentIntent going? 
 Somehow, Android is winding up with a Notification object that has a 
 null contentIntent, and that appears to be unsupported, at least on 
 Android 1.x/2.x. In the cases where you are explicitly supplying a 
 contentIntent, it should no longer be null. Are you doing anything to 
 the Notification object after you call notify()? 

 No, nothing... The notification says I'm listening and then is cancelled 
a few moments later 'on end of speech input'  from the service. First time 
I got the error using null contentIntent, I thought, okay, I'll just add in 
the content to suppress the error, but my headaches started when it appears 
to make no difference either-way or regardless of the actual contentIntent 
supplied...

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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 1:19 PM, brandall benrandal...@gmail.com wrote:
 No, nothing... The notification says I'm listening and then is cancelled a
 few moments later 'on end of speech input'  from the service.

Is it possible that you are canceling it before it actually gets
displayed? IOW, how short might a few moments be?

I'm just brainstorming possible things that you are doing differently
than the norm.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] GridView with images aligned bottom in a RelativeLayout

2012-07-03 Thread Justin Anderson
So, here is what I think is going on...  ImageView is basically a container
for your actual image.  The scaleType indicates how the image should be
scaled to fit inside the ImageView.  The alignParentBottom affects the
container, not the image.  That is why you are getting the results in your
attached image.

If you set the scaleType to fitXY I would guess that you wouldn't see the
blue anymore and all the images would be the same size.  Note that this is
not what you want to do, because that settings scales X and Y
independently, which will cause your images to get stretched and look funny.

You could try fitEnd, but I don't know if that will get you exactly what
you want:
http://developer.android.com/reference/android/graphics/Matrix.ScaleToFit.html#END

Ultimately, you might have to come up with your own scale matrix...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Jun 28, 2012 at 9:09 PM, Billy Bacon billy.ba...@gmail.com wrote:

 I've searched this forum up and down and found different solutions but
 none of them have worked as expected. I even tried looking at the Shelves
 project that's open sourced and that seemed much too involved for what I'm
 trying to achieve here.

 I have a screen with a bookcase/bookshelf background and have it scrolling
 as desired with the code below. My RelativeLayout height does not seem to
 be honored and changing it from 100dp to 200dp makes no difference. I
 basically need each row in the GridView to be the exact same height and
 vertically align the thumbnail image bottom so that the image sites on the
 bookshelf. I sort of achieved this by hardcoding the layout width/height
 for the ImageView itself. I've tried using a background color so that I can
 see what's going on but I still fail to achieve a consistent look. I'm also
 trying to scale the images down to a consistent size, let's say 100x100
 even though the images will be different shapes (some are squares and some
 are rectangles). I also can't seem to get the image to bottom align in the
 RelativeLayout which builds the cell even though I'm using the
 android:layout_alignParentBottom=true attribute.

 Can anyone tell me what I'm doing wrong? I think I'm close although what
 I've come up with may be a total hack :-/

 /res/layout/titles.xml

 com.alex.android.view.BookShelfView
 xmlns:android=http://schemas.android.com/apk/res/android;
 android:id=@+id/my_titles_grid_view
 android:cacheColorHint=@android:color/transparent
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:numColumns=auto_fit
 android:stretchMode=columnWidth
 android:verticalSpacing=25dp
 android:gravity=bottom/

 ImageAdapter

 class ImageAdapter extends BaseAdapter {
 private Context mContext;

 public ImageAdapter(Context c) {
 mContext = c;
 }

 public int getCount() {
 return borrowedAssets.size();
 }

 public Object getItem(int position) {
 return borrowedAssets.get(position);
 }

 public long getItemId(int position) {
 return borrowedAssets.get(position).getContentId();
 }

 // create a new ImageView for each item referenced by the Adapter
 public View getView(int position, View convertView, ViewGroup
 parent) {

 View cellView;

 if (convertView == null) {  // if it's not recycled,
 initialize some attributes
 cellView =
 getLayoutInflater().inflate(R.layout.title_cell, null);
 ImageView image = (ImageView)
 cellView.findViewById(R.id.title_thumbnail);
 new
 DownloadImageTask(image).execute(getString(R.string.thumbnails_server_url)+borrowedAssets.get(position).getThumbnail());
 } else {
 cellView = convertView;
 }

 return cellView;
 }
 }

 /res/layout/title_cell.xml


 RelativeLayout
 xmlns:android=http://schemas.android.com/apk/res/android;
 android:layout_width=100dp
 android:layout_height=100dp

 ImageView android:id=@+id/title_thumbnail
 android:layout_width=100dp
 android:layout_height=140dp
 android:paddingTop=25dp
 android:scaleType=fitStart
 android:layout_alignParentBottom=true
 android:layout_centerHorizontal=true
 android:background=@color/blue_color
 android:contentDescription=thumbnail/

 /RelativeLayout


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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread brandall



 Is it possible that you are canceling it before it actually gets 
 displayed? IOW, how short might a few moments be? 

 I'm just brainstorming possible things that you are doing differently 
 than the norm. 


The notification is there for at least as long as I set the 'pause before 
assume speech has ended' parameter to. The endOfSpeech can't be called 
until after that event (where the notification is cancelled), so we can 
rule that one out. I'll push out the NotificationCompat.Builder update 
later, but even if (hopefully) it solves the issue, perhaps I should still 
do the honourable thing and raise it as a possible bug? Or in your 
experience, are depreciated method bugs pushed to the bottom of a very 
large pile and therefore pointless...? 

I appreciate your help. 

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

Re: [android-developers] Is it possible?

2012-07-03 Thread Justin Anderson
No, it is not possible.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Jun 28, 2012 at 10:35 PM, Sandeep Venkat sand...@believecreative.in
 wrote:

 Hi all,

 I want to start an application which stores the downloaded items such as
 books,music,movies in my application since downloading an app from google
 play wont support with security constraints is it possible to approach?

 The Items like books,music,movies will be downloaded from GOOGLE
 PLAY..those should be stored in my application..Please suggest me is it
 possible or not?

 --
 ThanksRegards

 *Sandeep MNVVB*
 *
 *

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

2012-07-03 Thread Justin Anderson
This may seem like a silly question, but have you downloaded everything you
need?

And, Google is your friend:
http://lmgtfy.com/?q=The+import+android.support+cannot+be+resolved

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Sun, Jun 24, 2012 at 12:27 AM, gb gauravcham...@gmail.com wrote:


 I am new to android and imported the sample app from the following link:
 http://developer.android.com/training/basics/location/index.html

 i am getting error: The import android.support cannot be resolved
 The import android.connotation cannot be resolved

 How do i remove this error ??

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

2012-07-03 Thread bob
Is it possible to catch an error like this?

java.lang.NoSuchMethodError: 
android.bluetooth.BluetoothDevice.createInsecureRfcommSocketToServiceRecord

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

2012-07-03 Thread Sergey Tolkachov
No answer?

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

2012-07-03 Thread Justin Anderson
Google is your friend... You should try it sometime:
http://lmgtfy.com/?q=android+pull+to+refresh+tutorial

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Jun 28, 2012 at 6:53 AM, avinash shyam avinashsh...@gmail.comwrote:

 hi everyone, i m new here and have been developing in android for around
 5mnths...

 i really need help on how to pull to refresh in a scrollview..
 ank kind of help, suggestions and links would be highly appreciated.
 thnx :)


  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: HELP! Google removed my app with millions of users!

2012-07-03 Thread FiltrSoft
Wow, where exactly do you have your ads?  I have ads at the very bottom of 
my app, wonder if Google would consider that placement that would cause 
users to accidentally click on them, since they are near the phone's 
hardware buttons?

They really need to be more specific when they ban apps, because there's so 
much room for interpretation.  On top of that, it's extremely difficult to 
contact anyone at Google.

Sometimes I feel I should only develop web-based mobile apps.  Too much Big 
Brother with native apps.

On Tuesday, July 3, 2012 10:08:33 AM UTC-4, CVP wrote:

 I'm really looking for help from anyone, but I really need to get in 
 contact with someone from google...

 Without warning, a few days ago my long standing successful app was 
 removed from the play store. The app has been around for over 2 years now 
 and has around 1.5 million active users, and nearly 5 million downloads. 
 It's been in the top 5 of its category for well over a year. It has over 
 65,000 ratings with an average of 4.6/5.

 The email I received said that the app was removed because Google says 
 *Violation 
 of one or more of the following provisions of the Content Policy: 
 spamhttp://www.android.com/us/developer-content-policy.html#spam
 , intellectual 
 propertyhttp://www.android.com/us/developer-content-policy.html#IP, 
 and impersonation or deceptive 
 behaviorhttp://www.android.com/us/developer-content-policy.html#impersonation
 * and more specifically because *core features of your application 
 causes users to accidentally click on advertisements*

 First of all, the ads are hardly accidentally clicked... The highest 
 average click rate I've ever gotten was 0.8%. Even still I've read over the 
 Content 
 Policy http://www.android.com/us/developer-content-policy.html as well 
 as the Distribution 
 Agreementhttp://www.android.com/us/developer-distribution-agreement.html 
 and 
 neither call out specific ad placement rules, guidelines, or suggestions. 
 The ad placements are also similar to hundreds of other most popular apps...

 I'm more than happy to upload a compliant version of the application 
 putting the advertisements in whatever position is deemed acceptable by 
 Google. I'm not unethical or a con-artist, I'm a recent college grad from a 
 smaller town after all... Re-releasing the application under another 
 package name would be unfair to the 1.5 million active users out there as 
 they wouldn't get the update notification or keep their settings. 


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

Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 1:44 PM, brandall benrandal...@gmail.com wrote:
 Or in your experience, are depreciated
 method bugs pushed to the bottom of a very large pile and therefore
 pointless...?

Well, I don't see any deprecated methods in what you are doing.
However, bugs that cannot be reproduced tend to be problematic in all
software development.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] gotta be a catch?

2012-07-03 Thread Kristopher Micinski
Of course it is... Why don't you put a handler around the reflection call...

Or... where the heck are you calling this from?


kris

On Tue, Jul 3, 2012 at 1:53 PM, bob b...@coolfone.comze.com wrote:
 Is it possible to catch an error like this?

 java.lang.NoSuchMethodError:
 android.bluetooth.BluetoothDevice.createInsecureRfcommSocketToServiceRecord

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

2012-07-03 Thread Mark Murphy
 Why there is no read methods in NotificationManager?

Because an app can keep track of its own notifications, and an app
should not have access to other apps' notifications.

 Is it on purpose?

Most likely.

 Will it be added in future releases?

You will find out when the rest of us find out, when future releases
are released.

 If not, maybe somebody know how to get Intent object out of PendingIntent?

There is no API for that, sorry.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


Re: [android-developers] Re: java.lang.IllegalArgumentException: contentIntent required

2012-07-03 Thread brandall


 Well, I don't see any deprecated methods in what you are doing. 
 However, bugs that cannot be reproduced tend to be problematic in all 
 software development. 

 I'd assumed that the posted method had been depreciated in favour of 
NotificationBuilder. I see that it hasn't though. 

I'll get the list of device/OS combination where this occurs and go from 
there. 

Thanks again for your input

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

[android-developers] Dynamically switching text-to-speech engines under ICS?

2012-07-03 Thread blindfold
Has anyone had any success reliably switching among text-to-speech engines 
and languages on-the-fly under Android 4.03 (ICS)? Under Android 2.3.3 this 
worked great using the TextToSpeech method setEngineByPackageName(), but 
that method is now not only deprecated but for some reason it no longer 
reliably switches among installed speech engines. I use the Google 
Text-to-speech Engine that comes with ICS, the SVOX Classic TTS and eSpeak 
TTS on an HTC Desire ONE X running Android 4.03. 

I had no problems quickly and reliably switching among installed TTS 
engines and their languages on an old HTC Desire running Android 2.3.3. 
Whatever I try now under Android 4.03, results are erratic at best. The 
deprecated setEngineByPackageName() sometimes works and sometimes it 
doesn't - and I really do not mind not knowing when it finishes switching 
engines. Doing stop() and shutdown() on an active TextToSpeech instance 
before creating a new one for another engine via TextToSpeech(context, 
listener, engine) and then waiting for its listener to be invoked before 
testing with isLanguageAvailable() if a certain language is supported by 
that engine also proves unreliable. As far as I am concerned, Android 4.0 
appears a major step backwards as compared to Android 2.3.3 where it comes 
to dynamically switching TTS engines and languages, and after spending many 
hours I still have not found a reliable workaround that lets me 
programmatically switch between languages among multiple installed TTS 
engines that each support different subsets of languages. It should not 
have been hard to switch between, say, SVOX Classic TTS for Dutch and the 
Google TTS for German? Or are the third-party TTS engines to blame for 
still flawed ICS support?

Thanks!

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

[android-developers] How much time take for Google certification for apps

2012-07-03 Thread Srinivas Nainala
Hi,

I developed one application, I would like to place in the google play. How 
much google labs take the time for certify my application.

BR
Srinivas

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

Re: [android-developers] How much time take for Google certification for apps

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 3:57 PM, Srinivas Nainala srito...@gmail.com wrote:
 I developed one application, I would like to place in the google play. How
 much google labs take the time for certify my application.

Google does not certify your application. You are thinking of Apple,
or perhaps Amazon, who manually review each application. Google does
not.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] Re: HELP! Google removed my app with millions of users!

2012-07-03 Thread CVP
Pretty much the same place. Down by the bottom.

On Tuesday, July 3, 2012 2:19:19 PM UTC-4, FiltrSoft wrote:

 Wow, where exactly do you have your ads?  I have ads at the very bottom of 
 my app, wonder if Google would consider that placement that would cause 
 users to accidentally click on them, since they are near the phone's 
 hardware buttons?

 They really need to be more specific when they ban apps, because there's 
 so much room for interpretation.  On top of that, it's extremely difficult 
 to contact anyone at Google.

 Sometimes I feel I should only develop web-based mobile apps.  Too much 
 Big Brother with native apps.

 On Tuesday, July 3, 2012 10:08:33 AM UTC-4, CVP wrote:

 I'm really looking for help from anyone, but I really need to get in 
 contact with someone from google...

 Without warning, a few days ago my long standing successful app was 
 removed from the play store. The app has been around for over 2 years now 
 and has around 1.5 million active users, and nearly 5 million downloads. 
 It's been in the top 5 of its category for well over a year. It has over 
 65,000 ratings with an average of 4.6/5.

 The email I received said that the app was removed because Google says 
 *Violation 
 of one or more of the following provisions of the Content Policy: 
 spamhttp://www.android.com/us/developer-content-policy.html#spam
 , intellectual 
 propertyhttp://www.android.com/us/developer-content-policy.html#IP, 
 and impersonation or deceptive 
 behaviorhttp://www.android.com/us/developer-content-policy.html#impersonation
 * and more specifically because *core features of your application 
 causes users to accidentally click on advertisements*

 First of all, the ads are hardly accidentally clicked... The highest 
 average click rate I've ever gotten was 0.8%. Even still I've read over the 
 Content 
 Policy http://www.android.com/us/developer-content-policy.html as well 
 as the Distribution 
 Agreementhttp://www.android.com/us/developer-distribution-agreement.html 
 and 
 neither call out specific ad placement rules, guidelines, or suggestions. 
 The ad placements are also similar to hundreds of other most popular apps...

 I'm more than happy to upload a compliant version of the application 
 putting the advertisements in whatever position is deemed acceptable by 
 Google. I'm not unethical or a con-artist, I'm a recent college grad from a 
 smaller town after all... Re-releasing the application under another 
 package name would be unfair to the 1.5 million active users out there as 
 they wouldn't get the update notification or keep their settings. 



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: HELP! Google removed my app with millions of users!

2012-07-03 Thread Kristopher Micinski
You still haven't said the name of the app, if you're a fairly famous
app, I'd be surprised if the Google Play folks didn't respond quickly
to you!, At the very least, if you have millions of downloads, other
developers here will test your app and confirm or deny whether the ban
was completely unfounded...

kris

On Tue, Jul 3, 2012 at 4:14 PM, CVP chri...@gmail.com wrote:
 Pretty much the same place. Down by the bottom.


 On Tuesday, July 3, 2012 2:19:19 PM UTC-4, FiltrSoft wrote:

 Wow, where exactly do you have your ads?  I have ads at the very bottom of
 my app, wonder if Google would consider that placement that would cause
 users to accidentally click on them, since they are near the phone's
 hardware buttons?

 They really need to be more specific when they ban apps, because there's
 so much room for interpretation.  On top of that, it's extremely difficult
 to contact anyone at Google.

 Sometimes I feel I should only develop web-based mobile apps.  Too much
 Big Brother with native apps.

 On Tuesday, July 3, 2012 10:08:33 AM UTC-4, CVP wrote:

 I'm really looking for help from anyone, but I really need to get in
 contact with someone from google...

 Without warning, a few days ago my long standing successful app was
 removed from the play store. The app has been around for over 2 years now
 and has around 1.5 million active users, and nearly 5 million downloads.
 It's been in the top 5 of its category for well over a year. It has over
 65,000 ratings with an average of 4.6/5.

 The email I received said that the app was removed because Google says
 Violation of one or more of the following provisions of the Content Policy:
 spam, intellectual property, and impersonation or deceptive behavior and
 more specifically because core features of your application causes users to
 accidentally click on advertisements

 First of all, the ads are hardly accidentally clicked... The highest
 average click rate I've ever gotten was 0.8%. Even still I've read over the
 Content Policy as well as the Distribution Agreement and neither call out
 specific ad placement rules, guidelines, or suggestions. The ad placements
 are also similar to hundreds of other most popular apps...

 I'm more than happy to upload a compliant version of the application
 putting the advertisements in whatever position is deemed acceptable by
 Google. I'm not unethical or a con-artist, I'm a recent college grad from a
 smaller town after all... Re-releasing the application under another package
 name would be unfair to the 1.5 million active users out there as they
 wouldn't get the update notification or keep their settings.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: HELP! Google removed my app with millions of users!

2012-07-03 Thread John Coryat
If you would identify your app then people will take a look and give you 
their opinion as to why you were banned. Idle speculation without data is 
just that.

-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: activity looses ArrayList items

2012-07-03 Thread RichardC
I don't think Vector is thread safe in the way you expect did you read:

*This class is equivalent to 
ArrayListhttp://developer.android.com/reference/java/util/ArrayList.html with 
synchronized operations. This has a performance cost, and the 
synchronization is not necessarily meaningful to your application: 
synchronizing each call to get, for example, is not equivalent to 
synchronizing on the list and iterating over it (which is probably what you 
intended). If you do need very highly concurrent access, you should also 
consider 
CopyOnWriteArrayListhttp://developer.android.com/reference/java/util/concurrent/CopyOnWriteArrayList.html
. 
*
http://developer.android.com/reference/java/util/Vector.html 

The implication of the above is that your Vector change be changed from 
another thread whilst you are trying to serialize it.


On Monday, July 2, 2012 8:52:46 PM UTC+1, alex b wrote:

 I have an activity that contains a private Vectormyobject, thread safe 
 version of ArrayList.  The activity adds items to the ArrayList, and in 
 onSaveInstanceState() I save the data (see code below).  The problem is 
 that it looses items and it seems to have after the GC runs.  So what am I 
 missing?


 private static RecentItems _lstRecent;
 
 @Override
 public void onCreate(Bundle savedInstanceState) {
 
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 
  restoreRecents(savedInstanceState);
 }

 @Override
 protected void onSaveInstanceState(Bundle outState){
 super.onSaveInstanceState(outState);
 
 String s=serializeIt(_lstRecent);
 bundle.putString(lstRecent, s);
 }
 
 @Override
 protected void onRestoreInstanceState(Bundle outState){
 super.onSaveInstanceState(outState);
 
 this.restoreRecents(outState);
 }

 private void restoreRecents(Bundle bundle){
  if (bundle!=null){
  String s = bundle.getString(lstRecent);
 _lstRecent=deserializeIt(s);
 }
  
 if (_lstRecent ==null)
 _lstRecent=new RecentItems();//unt

 }



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: HELP! Google removed my app with millions of users!

2012-07-03 Thread CVP
Alarm Clock Plus (the free version). I also just called the user support 
line, which the tech couldn't really help, but said he would forward the 
information to the dev team email. Nothing I didn't do, but maybe it will 
carry more weight coming internally?

On Tuesday, July 3, 2012 4:18:36 PM UTC-4, Kristopher Micinski wrote:

 You still haven't said the name of the app, if you're a fairly famous 
 app, I'd be surprised if the Google Play folks didn't respond quickly 
 to you!, At the very least, if you have millions of downloads, other 
 developers here will test your app and confirm or deny whether the ban 
 was completely unfounded... 

 kris 

 On Tue, Jul 3, 2012 at 4:14 PM, CVP wrote: 
  Pretty much the same place. Down by the bottom. 
  
  
  On Tuesday, July 3, 2012 2:19:19 PM UTC-4, FiltrSoft wrote: 
  
  Wow, where exactly do you have your ads?  I have ads at the very bottom 
 of 
  my app, wonder if Google would consider that placement that would cause 
  users to accidentally click on them, since they are near the phone's 
  hardware buttons? 
  
  They really need to be more specific when they ban apps, because 
 there's 
  so much room for interpretation.  On top of that, it's extremely 
 difficult 
  to contact anyone at Google. 
  
  Sometimes I feel I should only develop web-based mobile apps.  Too much 
  Big Brother with native apps. 
  
  On Tuesday, July 3, 2012 10:08:33 AM UTC-4, CVP wrote: 
  
  I'm really looking for help from anyone, but I really need to get in 
  contact with someone from google... 
  
  Without warning, a few days ago my long standing successful app was 
  removed from the play store. The app has been around for over 2 years 
 now 
  and has around 1.5 million active users, and nearly 5 million 
 downloads. 
  It's been in the top 5 of its category for well over a year. It has 
 over 
  65,000 ratings with an average of 4.6/5. 
  
  The email I received said that the app was removed because Google says 
  Violation of one or more of the following provisions of the Content 
 Policy: 
  spam, intellectual property, and impersonation or deceptive behavior 
 and 
  more specifically because core features of your application causes 
 users to 
  accidentally click on advertisements 
  
  First of all, the ads are hardly accidentally clicked... The highest 
  average click rate I've ever gotten was 0.8%. Even still I've read 
 over the 
  Content Policy as well as the Distribution Agreement and neither call 
 out 
  specific ad placement rules, guidelines, or suggestions. The ad 
 placements 
  are also similar to hundreds of other most popular apps... 
  
  I'm more than happy to upload a compliant version of the application 
  putting the advertisements in whatever position is deemed acceptable 
 by 
  Google. I'm not unethical or a con-artist, I'm a recent college grad 
 from a 
  smaller town after all... Re-releasing the application under another 
 package 
  name would be unfair to the 1.5 million active users out there as they 
  wouldn't get the update notification or keep their settings. 
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Android Developers group. 
  To post to this group, send email to android-developers@googlegroups.com 
  To unsubscribe from this group, 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: MediaPlayer.setNextMediaPlayer

2012-07-03 Thread b0b
Related to setNextMediaPlayer it would great to have more info such as:

- for which codecs will it handle gapless ? Are there restrictions ?
- does it work with http URIs passed to setDataSource() ?




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

[android-developers] process.destroy() logging exceptions in ICS

2012-07-03 Thread elliotn
When I try to destroy the (short running) process in ICS the System logs 
the below exception. I'm very puzzled as the code runs fine on Honeycomb. 
Anybody else seeing this?

I/System  ( 2369): Failed to destroy process 2412
I/System  ( 2369): libcore.io.ErrnoException: kill failed: ESRCH (No such 
process)
I/System  ( 2369):  at libcore.io.Posix.kill(Native Method)
I/System  ( 2369):  at 
libcore.io.ForwardingOs.kill(ForwardingOs.java:77)
I/System  ( 2369):  at 
java.lang.ProcessManager$ProcessImpl.destroy(ProcessManager.java:257)


Here's what the code looks like:

Process process = null;

try {

  process = new ProcessBuilder().command(/system/bin/somecommand)
   .redirectErrorStream(true).start();

  ...

} catch (IOException e) {

// handle exception

} finally {
  if (process != null) {
 process.destroy();
  }
}


Thanks!
Elliot

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

2012-07-03 Thread limtc
I am doing a painting program and the MotionEvent getY() returns contains 
the height of action bar. I need to subtract the height away.

Any sample code or help will be appreciated!

在 2012年7月3日星期二UTC+8下午10时58分04秒,Latimerius写道:

 On Tue, Jul 3, 2012 at 4:45 PM, limtc thyech...@gmail.com wrote: 
  Do you mind showing me a sample code on how this is done? (to get the 
 action 
  bar size) 

 I'm afraid you misunderstand - if you are trying to find out the 
 action bar height just to subtract it from the screen height and see 
 how much space is left for your app to draw into, you can get that 
 directly by calling getWidth()  getHeight() on your root View.  Or 
 alternatively, if you're using GL with GLSurfaceView, you get the same 
 information as parameters of your Renderer's onSurfaceChanged(). 

 Either way, you don't have to care what the action bar's geometry is, 
 or if there even is an action bar at all.  My minSdkVersion is 7, too, 
 so trust me, this works. :-) 


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

2012-07-03 Thread Mark Murphy
On Tue, Jul 3, 2012 at 6:53 PM, limtc thyech...@gmail.com wrote:
 I am doing a painting program and the MotionEvent getY() returns contains
 the height of action bar. I need to subtract the height away.

Really? I would expect that the MotionEvent getY() would be with
respect to your View that is receiving the touch event.

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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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


[android-developers] Any way to prevent the Unfortunately, X has stopped message on ICS?

2012-07-03 Thread Keith Johnston
I have only seen this when running our application on ICS. When I bring up 
the list of running processes and swipe to kill our app, the message, 
Unfortunately, X has stopped comes up, sometimes twice (once for each 
service?). I do not see this with other applications, so I am thinking 
there is some way to prevent it?

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

[android-developers] Re: Any way to prevent the Unfortunately, X has stopped message on ICS?

2012-07-03 Thread Keith Johnston
I found the problem - I have a service in my AndroidManifest and ICS is 
trying to start it. It is throwing a NullPointerException.

On Tuesday, July 3, 2012 4:30:56 PM UTC-7, Keith Johnston wrote:

 I have only seen this when running our application on ICS. When I bring up 
 the list of running processes and swipe to kill our app, the message, 
 Unfortunately, X has stopped comes up, sometimes twice (once for each 
 service?). I do not see this with other applications, so I am thinking 
 there is some way to prevent it?

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

Re: [android-developers] Re: Getting action bar height while minSdkVersion is 7

2012-07-03 Thread limtc
No it does not - at least this is the result of my test.

I got an ICS and a Honeycomb devices - the getY() values are exactly 56 
pixels too low when the same app run on them. I have to subtract 56 from 
the getY() to get the correct position. Same code works fine on 2.x and 1.x 
device.

I am the author of some popular kids painting softwares, and this has been 
the issue I faced for quite some times.

在 2012年7月4日星期三UTC+8上午7时16分24秒,Mark Murphy (a Commons Guy)写道:

 On Tue, Jul 3, 2012 at 6:53 PM, limtc thyech...@gmail.com wrote: 
  I am doing a painting program and the MotionEvent getY() returns 
 contains 
  the height of action bar. I need to subtract the height away. 

 Really? I would expect that the MotionEvent getY() would be with 
 respect to your View that is receiving the touch event. 



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

[android-developers] Any Good UI books or online resource?

2012-07-03 Thread Michael Leung
Hi,
  I wish to improve my Android UI skills,Any Good UI books or online
resource you can recommend?
Thanks!

-- 
Regards,
Michael Leung
http://www.itblogs.info - My IT Blog
http://diary.skynovel.info - My Blog
http://www.michaelleung.info - My Homepage
https://play.google.com/store/apps/details?id=com.advgen.AdvNetInfoPro

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

2012-07-03 Thread Benedict

Thanks for your reply.
I have tried TraceView but there's no information about memory consumption 
or cpu usage.
what must i do to view memory consumption or cpu usage?



On Monday, July 2, 2012 6:34:07 AM UTC+7, TreKing wrote:

 On Sat, Jun 30, 2012 at 10:30 PM, Benedict benita.clari...@gmail.comwrote:

 when i tested the application, it was so slow.
 memory consumption and cpu usage was very high.

 is phonegap performance was so slow? why? how to solve it?


 Profile your application with TraceView.


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


On Monday, July 2, 2012 6:34:07 AM UTC+7, TreKing wrote:

 On Sat, Jun 30, 2012 at 10:30 PM, Benedict benita.clari...@gmail.comwrote:

 when i tested the application, it was so slow.
 memory consumption and cpu usage was very high.

 is phonegap performance was so slow? why? how to solve it?


 Profile your application with TraceView.


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


On Monday, July 2, 2012 6:34:07 AM UTC+7, TreKing wrote:

 On Sat, Jun 30, 2012 at 10:30 PM, Benedict benita.clari...@gmail.comwrote:

 when i tested the application, it was so slow.
 memory consumption and cpu usage was very high.

 is phonegap performance was so slow? why? how to solve it?


 Profile your application with TraceView.


 -
 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] Dynamically switching text-to-speech engines under ICS?

2012-07-03 Thread Nikolay Elenkov
On Wed, Jul 4, 2012 at 4:22 AM, blindfold seeingwithso...@gmail.com wrote:
 Has anyone had any success reliably switching among text-to-speech engines
 and languages on-the-fly under Android 4.03 (ICS)?

Yes. Use the new TextToSpeach constructor that takes an engine package name.
Create a new instance when switching engines.

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


[android-developers] Ping in android

2012-07-03 Thread Michael Leung
Hi all,
  I have  used  isReachable()   in InetAddress for Ping. But that is only
working in local network unless root my phone.
Does anyone work this problem out before?

-- 
Regards,
Michael Leung
http://www.itblogs.info - My IT Blog
http://diary.skynovel.info - My Blog
http://www.michaelleung.info - My Homepage

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

2012-07-03 Thread Dianne Hackborn
What you are claiming is happening is...  well, you probably need to
explain more.

If you have an action bar, then by default your content is placed below it,
and the coordinate space of events received by the view will be relative to
where it is placed.  This is true with all views in the hierarchy.  If it
wasn't, all of your presses on UI elements in a window that has an action
bar would be off.

I can't understand how you are doing things such that you have to subtract
an offset.  Your content is below the action bar...  that's where it is,
there is no offset to subtract.

If you *want* your content to go behind the action bar, you can request the
feature that the action bar be shown as an overlay on top of it:
http://developer.android.com/reference/android/view/Window.html#FEATURE_ACTION_BAR_OVERLAY

Using this does mean that the top of your content will be covered by the
action bar when the action bar is not hidden.

On Tue, Jul 3, 2012 at 4:51 PM, limtc thyech...@gmail.com wrote:

 No it does not - at least this is the result of my test.

 I got an ICS and a Honeycomb devices - the getY() values are exactly 56
 pixels too low when the same app run on them. I have to subtract 56 from
 the getY() to get the correct position. Same code works fine on 2.x and 1.x
 device.

 I am the author of some popular kids painting softwares, and this has been
 the issue I faced for quite some times.

 在 2012年7月4日星期三UTC+8上午7时16分24秒,Mark Murphy (a Commons Guy)写道:

 On Tue, Jul 3, 2012 at 6:53 PM, limtc thyech...@gmail.com wrote:
  I am doing a painting program and the MotionEvent getY() returns
 contains
  the height of action bar. I need to subtract the height away.

 Really? I would expect that the MotionEvent getY() would be with
 respect to your View that is receiving the touch event.

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




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

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

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

Re: [android-developers] Re: Getting action bar height while minSdkVersion is 7

2012-07-03 Thread limtc

OK, this is part of my code, very simple:

public boolean onTouchEvent(MotionEvent event) {

int count = event.getPointerCount();

...

 

int action = event.getAction();

int x = (int) event.getX();

int y = (int) event.getY() - absize;

...



return true;

}


The absize is the current Action Bar height I am using. If without it, 
event.getY() will works fine in Android 1/2 devices, but on my HTC 
Jetstream (Honeycomb) and Galaxy Note, the Y value is offset by 56 pixels 
(which is my current absize). In both cases, I tested them with finger and 
stylus.


Ideally it should be like what you say, event.getY() just works, but it 
does not. My minimum SDK level is 7 as I intend to support older devices 
but allows for Action Bar on Android 3/4 devices. I think this might be the 
issue (ie, getY() will works fine if my minimum Android version supports 
Action Bar by default).


在 2012年7月4日星期三UTC+8上午9时30分57秒,Dianne Hackborn写道:

 What you are claiming is happening is...  well, you probably need to 
 explain more.

 If you have an action bar, then by default your content is placed below 
 it, and the coordinate space of events received by the view will be 
 relative to where it is placed.  This is true with all views in the 
 hierarchy.  If it wasn't, all of your presses on UI elements in a window 
 that has an action bar would be off.

 I can't understand how you are doing things such that you have to subtract 
 an offset.  Your content is below the action bar...  that's where it is, 
 there is no offset to subtract.

 If you *want* your content to go behind the action bar, you can request 
 the feature that the action bar be shown as an overlay on top of it: 
 http://developer.android.com/reference/android/view/Window.html#FEATURE_ACTION_BAR_OVERLAY

 Using this does mean that the top of your content will be covered by the 
 action bar when the action bar is not hidden.



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

2012-07-03 Thread TreKing
On Tue, Jul 3, 2012 at 8:06 PM, Benedict benita.clari...@gmail.com wrote:

 I have tried TraceView but there's no information about memory consumption
 or cpu usage.
 what must i do to view memory consumption or cpu usage?


IDK about CPU usage, but this could help with memory:
http://developer.android.com/tools/debugging/ddms.html#heap

-
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] Abnormal behavior of media scanner when I renamed a folder which have some media files.

2012-07-03 Thread Hyuck
Thank you for your interest. 

after I renamed a folder. I did re-scanning by sending broadcast intent as 
below. 

 Context applicationContext = MyApplication.*getInstance*
().getApplicationContext();

 applicationContext.sendBroadcast(*new* Intent(Intent.*
ACTION_MEDIA_SCANNER_SCAN_FILE*, 

and then, delete former folder name in database as below. 

*public* *boolean* deleteFolder(String folderPath){

 

 *boolean* isSuccessful = *false*;

 Cursor cursor = *null*;

 String selection;

 

 DELETE_FOLDER : {

//1. Get folder '_id' list.(with duplicated one).

ArrayListInteger folderIdList = *new*ArrayListInteger();



   String[] projection = {

FileSchema.Columns.*_ID*

   };

selection = FileSchema.Columns.*DATA* +  = \ + 
folderPath + \;

cursor = SqliteWrapper.*query*(getContext(), 
getContentResolver(), FileSchema.*getContentUri*(external), projection, 
selection, *null*, *null*);

*if*(cursor != *null*  cursor.moveToFirst()  
cursor.getCount()  0){

  *int* dataIndex = cursor.getColumnIndex(FileSchema.Columns.*
_ID*);

   *do* {

   folderIdList.add(cursor.getInt(dataIndex));

   } *while* ( cursor.moveToNext() );

   cursor.close();

} *else* {

   isSuccessful = *false*;

   *break* DELETE_FOLDER;

}



//2. Delete folders in DB.

*while* ( folderIdList.isEmpty() == *false* ) {

   *int* folderId = folderIdList.remove(0);

 *int* numberOfDeleted = 
SqliteWrapper.*delete*(getContext(), 
getContentResolver(), FileSchema.*getContentUri*(external), _id=\
+Integer.*toString*(folderId)+\, *null*);

 *if* (numberOfDeleted  0) {

isSuccessful = *false*;

*break* DELETE_FOLDER;

 }

  }

//3. Delete files in DB.   

selection = FileSchema.Columns.*DATA* +  LIKE \ + 
folderPath + /%\;

*int* numberOfDeleted = 
SqliteWrapper.*delete*(getContext(), 
getContentResolver(), FileSchema.*getContentUri*(external), selection, *
null*);

*if*(numberOfDeleted  0){

   isSuccessful = *false*;

   *break* DELETE_FOLDER;

}



//4. Success!

isSuccessful = *true*;

*break* DELETE_FOLDER;

 }

 

 *return* isSuccessful;

}



On Wednesday, July 4, 2012 1:58:22 AM UTC+9, Mark Murphy (a Commons Guy) 
wrote:

 How did you do the re-scanning? 

 On Tue, Jul 3, 2012 at 12:53 PM, Hyuck hyuckmin.k...@gmail.com wrote: 
  Hi All, 
  
  I have develop a kind of file manager app. recently, I have met a 
 strange 
  behavior of media scanner. 
  There was a folder(A) with some media files in it. and I renamed the 
 folder 
  name to B. 
  However, after a re-scanning , there is still folder A, and the folder 
 have 
  media files which have 0bytes. 
  is there anyone who have this kind of problem? if so, please give me 
 some 
  advise. it would be much appreciated. 
  
  Hyuck. 
  
  -- 
  You received this message because you are subscribed to the Google 
  Groups Android Developers group. 
  To post to this group, send email to android-developers@googlegroups.com 
  To unsubscribe from this group, send email to 
  android-developers+unsubscr...@googlegroups.com 
  For more options, visit this group at 
  http://groups.google.com/group/android-developers?hl=en 



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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 


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

Re: [android-developers] Any Good UI books or online resource?

2012-07-03 Thread TreKing
On Tue, Jul 3, 2012 at 7:54 PM, Michael Leung michaelchi...@gmail.comwrote:

   I wish to improve my Android UI skills,Any Good UI books or online
 resource you can recommend?


http://developer.android.com/design/index.html

-
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] Broadcast receiver starts a new thread, do I need to kill it?

2012-07-03 Thread TreKing
On Fri, Jun 22, 2012 at 1:29 PM, Justin Robinson jrob09...@gmail.comwrote:

 Is this thread killed after 10 secs along with the broadcast receiver or
 do I need to kill it manually?


I don't know about after 10 secs (not sure where you got that number, but
yes, once the Thread is done executing, the system takes care of it. I'm
not even sure how you would kill it manually.

Besides that, the use of your thread in your snippet is quite useless. Your
two lines of code don't need to run in a separate thread.

-
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] Using ADT's layout editor from other tool

2012-07-03 Thread TreKing
On Fri, Jun 22, 2012 at 9:34 PM, Niseko jaakko.salmen...@gmail.com wrote:

 Is ADT designed only to be used with Eclipse or can I use it from my own
 tool. I would like to use ADT's layout editor that visual shows content of
 a layout. If this is possible where can I get the interface/API to call the
 editor.


Try contacting the tools devs from here:
http://tools.android.com/feedback

-
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] How to handle GPRS disconnection

2012-07-03 Thread Sumedh
Hi,

I have developed an application in which 
1. I am getting latitude-longitude values by using LocationListener. 
calling requestLocationUpdates() method for every 1 min
2. Storing the string got from above method into SQLite database
3. For every 5 min accessing those records from database and sending mail 
by using Java mail API

But if there is no GPRS connection my program works for 5 min (i.e. part 
where no GPRS required) and then stops (at point where GPRS required to 
send mail)

I have given internet, coarse and fine location, in my manifest file.

Program works fine when there is GPRS connection.

So, please tell me how should i handle GPRS disconnection in my application

Regards,
Sumedh

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