[android-developers] Re: Code of Home Screen

2010-08-19 Thread chetan
Thanks !!!

On Aug 20, 12:39 am, QR  wrote:
> Yes, the Launcher app is the default home screen application.
>
> On Aug 19, 7:42 am,chetan wrote:
>
> > Hi All,
> >   I want to see the code of Home Application and Menu in Android.
> > Actually i have downloaded the source code of Eclair 2.1 and looking
> > for Code of Home screen. In pacakage/apps/ , there is a Lancher App,
> > is it Home screen or some different application is there for Home
> > screen.
> > Can some body tell me, where i can look for home screen code.
>
> > Thanks in Advance.
>
> >ChetanChauhan

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

2010-08-19 Thread Android Development
Any pointers for this question will be really helpful..

Thanks in advance

Indodroid

On Fri, May 21, 2010 at 11:31 AM, Android Development
wrote:

> Hello,
>
> This is regarding the DATA_ROAMING property given here:
> http://developer.android.com/reference/android/provider/Settings.Secure.html#DATA_ROAMING
>
> What exactly does it mean to enable/disable data roaming ? If the user is
> roaming in the same access technology (say GSM), then handoffs will take
> place automatically.
>
> In which context is this property used ?
>
> Thanks in advance
>
> Best Regards
>
> Indodroid.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-19 Thread Seni Sangrujee
> Currently, I'm showing 1,168 DROID2's with that ANDROID_ID using my
> app.

John, have you had any complaints yet about conflicts from duplicate
unique ids?

-seni

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

2010-08-19 Thread Android Development
Hello developers/community.

I am making an internet telephony application based on a proprietary
protocol which connects to a web server for call setup.

As with other telephony applications this app also has three basic
requirements: The need for a call log, a contact book and the ability to
send/receive messages.

One option is for me to develop all these three capabilities from the
scratch. Another possibility is to leverage upon the built-in capabilities
of android and tie them up to my application using content resolvers and
Intents.

Let me explain my requirements below, and I welcome your comments regarding
their technical feasibility:

*A)) Call Log: *

I would like to maintain the call log of my application with the android
call log. This will make sure that the user has one view of all the calls
that were made (cellular or internet). Is there a way to read/write/delete
from the call log application from android? I believe this can be done using
content resolvers.

>From the call log, if the user wishes to call back a customer (internet
customer in my case) , then I wish to provide the user with an Intent
Chooser. If the user selects by application, then the call will be made from
my application and not a cellular call. How do I achieve this behavior ?

If I listen to the ACTION_CALL intent, will my application be available in
the intent chooser ? Or will android try to initiate a cellular call by
default?

*B)) Contact Book:*
*
*
The customers can save the internet user's address in the contact book.
There is an entry of a CUSTOM_PROTOCOL in the contact book of android. That
is where the address of the user can be stored who is using my application.
We already have choices of Yahoo, Gtalk and Skype in the contact book.
Similarly, we can also have a custom protocol entry over there. But this is
only half the issue.

When the user selects the address of the custom protocol from the contact
book, I wish to display a pop-up listing my application (maybe I can listen
to the intent which is emitted). Now, if the user selects my application
from the pop-up, I will make a call over the internet instead of the
cellular world (my broadcast receiver will gain control).

Again, I am not sure whether the above is possible and android will display
the intent chooser from the contact book if my custom protocol field is
selected.

*C)) SMS capabilities:*

When the user composes a SMS and tries to send it, I wish to intercept the
outgoing SMS and provide the user a choice - to send the SMS using my
application,or from android's native capabilities (GSM-SMS). I believe it is
possible to listen to outgoing messages by registering a content observer on
the SMS content resolver URI.

However, I would like to know whether an INTENT is fired when the user tries
to send a message ? It would make life much easier.

Secondly, I want to re-use the android SMS storage for the messages received
from my custom protocol over the internet. I wish to write to the android
sms database (using its content resolver) for this.

Thanks in advance

With Regards

Indodroid.

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

[android-developers] Dev phone linux (and Windows)

2010-08-19 Thread Davide
Hi,

as company we want buy some android phone. The phone will be used for
developers to test and run applications.

Which phone are the best for this?

We have both Windows and Linux system, which android mobile will work
on both system for developing?
What I mean is that adb and eclipse can connect to the phone, and,
when possible that the phone
uses the computer network.

For example I have tested the htc wildfire and I have seen  that in
windows the default usb drivers does
not works with adb and eclipse. Only work installing htc software ,
but this is only for windows.

Thanks in advance for the help!

-- 
  _|  _.    o  _|  _
 (_| (_| \/ | (_| (/_

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: enable/dissable fullscreen for lifetime of the app?

2010-08-19 Thread Kantesh
this may help u.. try it out..i am not sure..:)
getApplicationContext().setTheme(android.R.style.Theme_NoTitleBar_Fullscreen);

On Aug 20, 3:26 am, Moto  wrote:
> Currently my application allows the user to set the application to run
> in full screen.  I than check in every activity at onCreate() if the
> user has set to make the app run in full screen.  Is there a better
> way to do this?  I have many other settings that I do and I find this
> method a little bad in terms of code design.
>
> Is there a way to set full screen for the lifetime of app or until I
> set it back to not full screen?
>
> One way to do it would be to have a custom Activity class that does
> these checks and all my activities can just implement it?  would that
> be slow is it recommended?
>
> Thanks!
> -Moto

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Dynamic images slide show along with context menu and about smooth swipe event..Urgent suggestion/Idea needed..

2010-08-19 Thread sunrises
Hi,thanks for your suggestions
I have a lot of images to show as slide show,I did it using thread
concepts in which a slide show thread continuously updates the UI for
every 10 seconds(time interval between images) using handler, when
user touches and moves his finger(horizontally towards left/right ) on
the screen then the slide show should forward/backward images, I tried
to accomplish it by implementing onTouch() method in OnTouchListener .
But I did not get smooth swipe at all..please correct me...here is my
code..
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
firstX=event.getX();//firstX is instance variable
break;
case MotionEvent.ACTION_MOVE:
  if(firstX - event.getX() > SWIPE_DISTANCE){ //
SWIPE_DISTANCE value 120)
/*  here the code to show the next
image by updating UI using handler and stops the slide show
   thread for 10 secs after that the
slide show thread will starts again*/
 }else if( event.getX()-firstX  >
SWIPE_DISTANCE){
/*  here the code to show the previous image by
updating UI using handler and stops the slide show
thread for 10 secs after that the
slide show thread will starts again*/
   }
}
}//end of method
On Aug 19, 11:49 pm, TreKing  wrote:
> On Thu, Aug 19, 2010 at 6:46 AM, sunrises  wrote:
> > awaiting your Idea/suggestion
> On Thu, Aug 19, 2010 at 7:11 AM, sunrises  wrote:
> > No Solution?
>
> You expect someone to solve you problem in 25 minutes?
> It doesn't matter how "urgent" you think your problem is, it's really not -
> especially not to the rest of us.
>
> On Thu, Aug 19, 2010 at 6:46 AM, sunrises  wrote:
> > it forwards/ backwards more than one image,no smooth swipe
>
> That tells us exactly nothing. If you actually want help, you'll have to
> elaborate on the problem (like what you're doing now to swipe, and how
> you've tried to fix the problem).
>
> And do wait more than a half hour to bump your thread.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Chilling news: Oracle sues Google over Android

2010-08-19 Thread gosh
The Irony of Java's success on the device UI via Android

There's lots of irony in the successful use of the Java 'language'
within the phenomena that the Android OS has become. E.g.
Java began life at Sun as Oak which was meant to be a language for
small devices up to set-top boxes. It went on at Sun to become a whole
'platform' of APIs too, that technically challenged other OS's such as
Windows, and whole server stacks of all persuasions - to the point
where Microsoft had to then develop the .Net platform to stay ahead in
the game. (I use that unfolding Java scenario as the ultimate case of
'scope creep' to my students).
Ultimately Java made its name and market running server-side, away
from user-interfaces. Desktop-wise, Swing was too much too late.
Mobile-wise ME was too limited, too rigid, too early.
The Android user UI classes and widgets (which are nothing like Swing
or AWT - I know, as I tried to convert lots of swing code to them -
and a total rewrite was required), have hit a sweet-spot on mobile
devices, just when processing power, interactivity and screen
presentation can provide a 'user experience', that the modern user now
demands of their daily devices.
Java the language, via Android the GUI  OS, has finally fulfilled
Oak's original goal from way-back, of running on small devices and
attracting a huge market there-on, in the process. That's Irony with a
capital 'I'.

As for the originality of byte-code and virtual machines - the P-
System was doing all that with p-code, back in the days of 8-bit
micros, before some fool at IBM chose MD-DOS over it as their standard
OS for the new 16-bit Intel processor - and an eon before the
invention of 'software patents' themselves.

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

2010-08-19 Thread Webgenius
Hi,

How do I check the current radio state in my application? I'm
interested in the RadioState defined in CommandsInterface.

My application checks for the current radio state: The state would be
RADIO_OFF when Airplane mode is active, and NV_READY when radio us up.

Is there any other way to get the status of the fields that I'm
looking for?

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


Re: [android-developers] spinner

2010-08-19 Thread Rocky
yes, it is possible, fixed the width of text, if text length is more than
the text field width it comes in second line.


On Fri, Aug 20, 2010 at 2:58 AM, Jatin D Patel  wrote:

> Is it possible to put two lines of text in a single spinner entry?
>
> --
> Thanks,
> Jatin D N Patel
> Masters, Computer Sci.
> Suny Binghamton Univ, NY.
>
> You Got To Think HIGH to RISE.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thanks & Regards

Rakesh Kumar Jha
Consultant(Software Developer)
Symphony Services Corp (India) Pvt Ltd
Bangalore
(O) +918030273740
(R) +919886336619

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: AT&T Samsung Captivate > mExternalStorageAvailable == false;

2010-08-19 Thread Dianne Hackborn
For what it stands, the platform today does not support more than one
external storage directory.  Manufacturers who are adding an SD card in
addition to internal "external" storage are adding features that
applications written against the standard platform are not expected to
support -- they should be able to rely on there being one external storage
directory with one state and not need to care about others.

I realize this doesn't help when users are asking for support for whatever
extra stuff a manufacturer has added...  but please look at it as going
above and beyond the call of duty. :}  And since this is not a part of the
standard platform, unfortunately you'll find the way this stuff works to
vary across manufacturers.

It's possible there will be a standard API for this in the future...  but to
be honest, it is hard for me to imagine dealing with multiple external
storage locations as resulting in a decent user experience, so it may not
happen.  Just causing the user have to be aware that they have some pictures
in their internal storage and some in the external SD card, and how much
space they have on each, and what to do if one is full...  yuck.

On Thu, Aug 19, 2010 at 7:03 PM, john brown wrote:

> I do appreciate the comments and suggestions. They give me new things
> to try.
>
> The good news it the app is working on the Samsung SGH-i897 now. The
> bad news is I do not know why. Here is what happened:
>
> 1) I hard coded "/sdcard/sd" rather than getting the path
> programatically. (I did not have much time.)
> 2) I got the same error, something like "path not found"
> 3) I went back into the code and removed the hard coded path.
> 4) I added a System.out.println("ext storage is " + myPathVariable)
> 5) I ran it one more time just to check what the output path was
> again.
> 6) It ran, no errors.
> 7) The output was "ext storage is /sdcard/Android/data/lms/mp"
>
> That is the same path it printed when it got the error. A satisfactory
> explanation would be that my memory is wrong or I did not type what I
> thought I typed, but I cannot find the error.
>
> I do not know why. But it is working. :>)
>
> I will test some more tomorrow.
> I will stop using - Environment.getExternalStorageState()
> I will try - Environment.getExternalStoragePublicDirectory()
>
> Right now I am thinking it has more to do with the phase of the moon
> than with concrete facts. Like it does not work Friday through
> Wednesday. But it does work on Thursday!
>
> Again thanks for all the help. John Brown
>
> On Aug 19, 3:19 pm, Stephen Lau  wrote:
> > Best I've found is to look at the device model and see if it's the
> > Incredible or Galaxy.  If it is, then use /emmc or /sdcard/sd as a
> > special case, otherwise use getExternalStorageDirectory()
> >
> > Lame, but doesn't seem like there is much else to be done.
> >
> > cheers,
> > steve
> >
> >
> >
> >
> >
> > Indicator Veritatis wrote:
> > > The problem you are having is a good example of why this API,
> > > Environment.getExternalStorageState(), is deprecated. As the online
> > > reference says, "This call should be deprecated as it doesn't support
> > > multiple volumes. "
> >
> > > But this is exactly the problem you encountered: the Galaxy S has TWO
> > > volumes, which they happen to call '/sdcard' and /sdcard/sd' -- a
> > > regrettable choice.
> >
> > > Even more regrettable is that the same reference that says "should be
> > > deprecated", still shows sample code that matches yours very closely.
> > > Nor does it say what to use in place of the "should be deprecated"
> > > API, though it seems to suggest using
> > > Environment.getExternalStoragePublicDirectory() might help.
> >
> > > But see
> > >http://groups.google.com/group/android-developers/browse_thread/threa.
> ..
> > > also.
> >
> > > On Aug 18, 1:52 pm, john brown  wrote:
> > >> Hello,
> >
> > >> I have my application running on a Motorola droid. We have
> > >> successfully used it in the intended enviornment for 2 days collecting
> > >> 340 readings. The app is not full featured but it is running. The data
> > >> storage is complete and we store, create, delete... small data files
> > >> on the sdcard. Our design team prefers, in this application, the small
> > >> files on the external storage sdcard and does not want to use sqlLite.
> >
> > >> My beta tester purchased a AT&T Samsung Captivate (Samsung SGH-i897).
> > >> It seems to have two sdcards. In an earlier thread on this list, they
> > >> were referred to as an "internal sdcard" and an "external sdcard". Our
> > >> test unit has both installed. I am having trouble accessing the
> > >> external storage sdcard. I utilized the code fromhttp://
> developer.android.com/guide/topics/data/data-storage.htmlto
> > >> determine if the sdcard is installed and readable and writeable. The
> > >> code is:
> >
> > >>  public static boolean cksdcard(){
> > >>  boolean mExternalStorageAvailable = false;
> > >>  boolean mExternalStorageWrit

[android-developers] Which type of token should i get if i want to get Google contacts?

2010-08-19 Thread Vincent Tsao
hi there,

i can get a auth token from AccountManager.get(context).getAuthToken
method,  what's the value for authTokenType should be if i want to get
Google contacts?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 there a way to track my piracy rates for paid apps?

2010-08-19 Thread TreKing
On Thu, Aug 19, 2010 at 9:12 PM, Greg Siano  wrote:

> I was wondering if there was a way to track piracy rates of my app.
>

I think what people generally do is add analytics to their app to track
unique installs then compare that to how many Google Checkout orders you
get. Or something along those lines.

-
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] MenuItem with Spanned elements in their titles

2010-08-19 Thread Greg Giacovelli
Hi I was just trying something and realized this doesn't seem possible
due to the debugging code in the android OS.

I register a context menu on an AdapterView, via
registerContextMenu(mAdapterView), and then implement the
onCreateContextMenu, like this:

CharSequence title = context.getString(R.string.txt, userName);
title = Html.fromHtml((String) title);
MenuItem item = menu.add(ContextMenu.NONE, ContextMenu.NONE,
ContextMenu.NONE, title);

The context menu displays correctly, however when it is clicked I get
an illegalArgumentException from the EventLog class when it tries to
print out the condensedTitle.

So I have found without setting the condensedTitle explicitly to
something that is a String this occurs. Why is this marked as a
CharSequence if it cannot handle 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: Cannot add gmail account to Accounts & Sync Settings -- Eclipse 3.5.2, SDK Platform Android 2.2, API 8, revision 2

2010-08-19 Thread Rob
Thanks, worked like a charm.

On Aug 19, 6:24 pm, Xavier Ducrohet  wrote:
> Use the "Google APIs" add-on (API8, rev2).
>
>
>
>
>
> On Thu, Aug 19, 2010 at 11:32 AM, Rob  wrote:
> > Using Eclipse 3.5.2, SDK Platform Android 2.2, API 8, revision 2
>
> > In Settings --> Accounts & Sync --> Add Account
>
> > I do not have the option to add anything but an Exchange Account in
> > the emulator.  I should be able to add a gmail account.  Am I being
> > stupid or is there a problem with the emulator?
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
>
> Please do not send me questions directly. 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] Is there a way to track my piracy rates for paid apps?

2010-08-19 Thread Greg Siano
This is the first time I've released a paid app.  I was wondering if
there was a way to track piracy rates of my app.  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: AT&T Samsung Captivate > mExternalStorageAvailable == false;

2010-08-19 Thread john brown
I do appreciate the comments and suggestions. They give me new things
to try.

The good news it the app is working on the Samsung SGH-i897 now. The
bad news is I do not know why. Here is what happened:

1) I hard coded "/sdcard/sd" rather than getting the path
programatically. (I did not have much time.)
2) I got the same error, something like "path not found"
3) I went back into the code and removed the hard coded path.
4) I added a System.out.println("ext storage is " + myPathVariable)
5) I ran it one more time just to check what the output path was
again.
6) It ran, no errors.
7) The output was "ext storage is /sdcard/Android/data/lms/mp"

That is the same path it printed when it got the error. A satisfactory
explanation would be that my memory is wrong or I did not type what I
thought I typed, but I cannot find the error.

I do not know why. But it is working. :>)

I will test some more tomorrow.
I will stop using - Environment.getExternalStorageState()
I will try - Environment.getExternalStoragePublicDirectory()

Right now I am thinking it has more to do with the phase of the moon
than with concrete facts. Like it does not work Friday through
Wednesday. But it does work on Thursday!

Again thanks for all the help. John Brown

On Aug 19, 3:19 pm, Stephen Lau  wrote:
> Best I've found is to look at the device model and see if it's the
> Incredible or Galaxy.  If it is, then use /emmc or /sdcard/sd as a
> special case, otherwise use getExternalStorageDirectory()
>
> Lame, but doesn't seem like there is much else to be done.
>
> cheers,
> steve
>
>
>
>
>
> Indicator Veritatis wrote:
> > The problem you are having is a good example of why this API,
> > Environment.getExternalStorageState(), is deprecated. As the online
> > reference says, "This call should be deprecated as it doesn't support
> > multiple volumes. "
>
> > But this is exactly the problem you encountered: the Galaxy S has TWO
> > volumes, which they happen to call '/sdcard' and /sdcard/sd' -- a
> > regrettable choice.
>
> > Even more regrettable is that the same reference that says "should be
> > deprecated", still shows sample code that matches yours very closely.
> > Nor does it say what to use in place of the "should be deprecated"
> > API, though it seems to suggest using
> > Environment.getExternalStoragePublicDirectory() might help.
>
> > But see
> >http://groups.google.com/group/android-developers/browse_thread/threa...
> > also.
>
> > On Aug 18, 1:52 pm, john brown  wrote:
> >> Hello,
>
> >> I have my application running on a Motorola droid. We have
> >> successfully used it in the intended enviornment for 2 days collecting
> >> 340 readings. The app is not full featured but it is running. The data
> >> storage is complete and we store, create, delete... small data files
> >> on the sdcard. Our design team prefers, in this application, the small
> >> files on the external storage sdcard and does not want to use sqlLite.
>
> >> My beta tester purchased a AT&T Samsung Captivate (Samsung SGH-i897).
> >> It seems to have two sdcards. In an earlier thread on this list, they
> >> were referred to as an "internal sdcard" and an "external sdcard". Our
> >> test unit has both installed. I am having trouble accessing the
> >> external storage sdcard. I utilized the code 
> >> fromhttp://developer.android.com/guide/topics/data/data-storage.htmlto
> >> determine if the sdcard is installed and readable and writeable. The
> >> code is:
>
> >>      public static boolean cksdcard(){
> >>          boolean mExternalStorageAvailable = false;
> >>          boolean mExternalStorageWriteable = false;
> >>          String state = Environment.getExternalStorageState();
> >>          if (Environment.MEDIA_MOUNTED.equals(state)) {
> >>                  // We can read and write the media
> >>                  System.out.println("in cksdcard, MEDIA_MOUNTED");
> >>                  mExternalStorageAvailable = true;
> >>                  mExternalStorageWriteable = true;
> >>          }
> >>          else if (Environment.MEDIA_MOUNTED_READ_ONLY.equals(state)) {
> >>                  // We can only read the media
> >>                  System.out.println("in cksdcard, 
> >> MEDIA_MOUNTED_READ_ONLY");
> >>                  mExternalStorageAvailable = true;
> >>                  mExternalStorageWriteable = false;
> >>                  }
> >>          else {
> >>                  // Something else is wrong. It may be one of many other 
> >> states,
> >> but all we need
> >>                  //  to know is we can neither read nor write
> >>                  System.out.println("in cksdcard, Something else is 
> >> wrong");
> >>                  mExternalStorageAvailable = false;
> >>                  mExternalStorageWriteable = false;
> >>          }
> >>          return mExternalStorageWriteable;
> >>      }
>
> >> This code returns False which means it is neither readable or
> >> writeable. It prints the else - "in cksdcard, Something else is
> >> wrong".
>
> >> Th

Re: [android-developers] Help Wanted!

2010-08-19 Thread Mark Murphy
On Thu, Aug 19, 2010 at 9:26 PM, Ahmad  wrote:
> What's
> the best way to unblock some of my problems with Android? Where should
> I post my question so that it would be more likely to get an answer.

A substantial percentage of questions posted to the android tag in
StackOverflow get at least one answer, within 24 hours:

http://stackoverflow.com/questions/tagged/android

Of course, whether any given question will get answered depends a lot
on the nature of the question. You neglected to provide us any
information about what sort of "fundamental issues of Android
programming" you are experiencing. There may be better resources for
certain classes of problems (e.g., NDK programming, firmware
programming).

-- 
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.1 Available!

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


[android-developers] Re: Paid vs Free, My Early Experience

2010-08-19 Thread Zsolt Vasvari
I would have loved to have been the fly on the wall in the meeting
where it was discussed that 320 characters are not enough and 330 is
too much...

On Aug 19, 5:09 pm, TreKing  wrote:
> On Thu, Aug 19, 2010 at 4:41 PM, Natalie Hooper <
>
> nataliehoo...@virginmedia.com> wrote:
> > This is a good point but doesn't it mean that rather than asking for a
> > longer description field, we should ask for other features, such as a
> > changelog, a way to respond to comments, a technical note field for example?
>
> No, it means that we should be asking for these other features AS WELL.
>
> > There is no point insulting me by saying my apps must be simple because I
> > can describe them in 3 sentences.
>
> I said your apps must not be very complicated - in no way was that meant as
> an insult. A simple app is *a good thing*.
>
> > My point is a DESCRIPTION should be short.
>
> My points are:
> * the Android Market "description" field is much, much more than just a
> description
> * users and developers should simply have the CHOICE of how much they want
> to say / read in these descriptions
> * even the clueless individuals running the Market should be able to handle
> incrementing this limit which would then *EASILY* solve many of the other
> complaints (changelog, technical stuff, quick response to comments, etc)
>
> You like the 325 character limit? Great. If we had more space, you wouldn't
> be forced to use it all, nor would you be forced to read all of the text a
> developer posted. So keep posting 325 character descriptions and only read
> that much. Some of us, though, would love the *option* to say and read a
> little more.
>
> Again why I suggested the "read more" idea. A 325 character DESCRIPTION,
> nice and short how you like, with the *option* to go into detail.
>
>  This is why there should be a "technical note" field (where you could also
>
> > describe hardware limitations for example) and I'd rather ask for that than
> > for a longer description field.
>
> What's the point of adding another, separate field for "technical notes"
> instead of just extending the description space and using that and saying:
> "Technical Note: Don't be a dumbass" (or whatever).
>
> ---­--
> 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] Supporting multiple screens

2010-08-19 Thread Dianne Hackborn
800x...@240dpi is definitely a normal screen.  If the device is reporting it
as large, it is broken.

On Wed, Aug 18, 2010 at 11:00 PM, Albert  wrote:

> Hi,
>
> My application will have two layouts, one for large screens and one
> for normal. For testing I'm working with one phone (800x480 240dpi)
> and one tablet (1024x600 240dpi) but both are detected as large screen
> hdpi and long aspect ratio, so I'm not able to assign different
> layouts.
>
> The only approach I think that can work is to create layout-large and
> layout-normal, get the resolution and programmatically set the layout
> folder. Is that possible?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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: OutOfResourcesException when using GLSurfaceView and VideoView

2010-08-19 Thread Dianne Hackborn
It is not documented.  Just don't make a lot of big windows/surfaces that
all need to be displayed at the same time. :}

On Thu, Aug 19, 2010 at 4:22 PM, Indicator Veritatis wrote:

> Since it varies from device to device, where is it documented for each
> device? Or which Android API will return this information?
>
> Since per application memory sounds like an OS issue, I would expect
> it in the android.os package, but I am not seeing it there.
>
> On Aug 18, 10:50 pm, Romain Guy  wrote:
> > An app can only use 16 or 24 MB of RAM, depending on the device. A
> > VideoView or a GLSurfaceView takes up a lot of RAM by the way (a
> > fullscreen surface view requires width*height*2*2 bytes of memory for
> > instance - if it's 16 bits.)
> >
> >
> >
> > On Wed, Aug 18, 2010 at 10:41 PM, Luca Carlon 
> wrote:
> > > Hi! I have an activity which uses a GLSurfaceView to render some
> > > graphics. Now, I created another activity, which is started from the
> > > first when pressing a button, which plays a video using a VideoView.
> > > The problem is that, for some reason, very often I get a
> > > OutOfResources exception from the Surface, and in the logs I even see
> > > some messages saying "Out of memory". I can hardly believe I have not
> > > enough memory to load everything... Does an application have any limit
> > > in size? Any other idea what can be causing this? Any help is really
> > > appreciated!
> > > Thanks!
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

[android-developers] Re: Camera Application Not Working When I Test on My Phone

2010-08-19 Thread Chris Maurer
I'm trying to test against 1.5 sdk 3.  I'm only trying to access the
camera and the sd card.

I don't see anything (or don't know how to use) in the Java Stack
Trace Console in the Eclipse debug move.

In the DDMS I keep getting the following

08-20 01:03:44.452: ERROR/jdwp(875): Failed sending reply to debugger:
Broken pipe
08-20 01:03:50.722: ERROR/MediaPlayer(554): Unable to to create media
player
08-20 01:03:50.722: ERROR/CameraService(554): Failed to load
CameraService sounds.
08-20 01:03:50.742: ERROR/MediaPlayer(554): Unable to to create media
player
08-20 01:03:50.742: ERROR/CameraService(554): Failed to load
CameraService sounds.
08-20 01:03:50.782: ERROR/Camera(882): _getParameters: picture-
format=jpeg;picture-size=213x350;preview-format=yuv422sp;preview-frame-
rate=15;preview-size=176x144
08-20 01:03:50.812: ERROR/Camera(882): setParameters()

Should I limit the features of my AVD?  Expand them?


On Aug 19, 12:32 am, "Tommy"  wrote:
> What is the OS version are you testing on? What features of the camera are
> you using. I had the same issue due to trying to call the flash feature on a
> 1.5 device. They don't support flash. So a list of the features would be
> helpful and the OS version your testing on. I had a few issues I had to
> figure out trying to work with the camera.
>
>
>
> -Original Message-
> From: android-developers@googlegroups.com
>
> [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
> Sent: Thursday, August 19, 2010 12:23 AM
> To: android-developers@googlegroups.com
> Subject: Re: [android-developers] Re: Camera Application Not Working When I
> Test on My Phone
>
> On Wed, Aug 18, 2010 at 8:51 PM, Chris Maurer  wrote:
> > When I step through the code I get an error in Looper.loop() line:124
> > after the onCreate function.
>
> That information is not especially useful. We would need the stack
> trace, at least to the point where your own code starts showing up.
>
> > i apologize for my ignorance, but what will the Java stack trace look
> > like in logcat
>
> Generally, it will look like a Java stack trace does everywhere else
> you do Java development.
>
> http://java.sun.com/developer/technicalArticles/Programming/Stacktrace/
>
> In DDMS, it will be colored red. Also, some Android stack traces are
> in two halves, the bottom half labeled "Caused by" -- that'd be the
> more relevant half.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Help Wanted!

2010-08-19 Thread Ahmad
I have been very frustrated with some fundamental issues of Android
programming. It seems to me that reliable knowledge about Android is
both scare volatile. I had imagined that Google people have a vested
interest in nurturing the developers aspiration to learn.

Alas, many of my questions have remained unanswered.

So I am looking for pointers from the good souls visiting here. What's
the best way to unblock some of my problems with Android? Where should
I post my question so that it would be more likely to get an answer.

I am even willing to hire a good soul who would assist me about an
hour a week. I am sure that just getting some of my key questions
answered will get me very far.

I live near Google in the Peninsula. If you feel like helping me and
at the same time making a bit of money, please contact me.

I really appreciate any help (even sympathy!) that anyone can  give me
over here!

best,

Ahmad

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


[android-developers] Re: How to get click position in TextView?

2010-08-19 Thread Sergey
> Override onTouchEvent(), find the coordinates of the screen tap,
> then run a bunch of text metric calculations to try to determine
> what word is at those coordinates. This is unlikely to be easy.

You are quite right "this is unlikely to be easy", and actually I have
tried to go this way before posting the question here.
There must be a better way.
I am going to look into Android's sources to find out if I can
overwrite something in TextView to make it work.
Thanks for the ideas Mark.

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


[android-developers] Re: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-19 Thread Andrew
Suzanne,
Is this reported in any public bug tracking system?

On Aug 19, 6:35 pm, "suzanne.alexandra"
 wrote:
> John, thanks for the number. I just filed a high-priority bug on this
> and will keep you updated.
>
> - Suzanne
>
> On Aug 19, 3:40 pm, "Maps.Huge.Info (Maps API Guru)"
>
>  wrote:
> > Suzanne,
>
> > All I can say is "Great" and "Bummer".
>
> > Currently, I'm showing 1,168 DROID2's with that ANDROID_ID using my
> > app.
>
> > -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: How to compile/run JUnit 4 tests in Android?

2010-08-19 Thread Eric
Ah, thank you very much.  That bit of information about the test
runner helped tremendously.  Believe it or not, I did some fairly
exhaustive searches on Google regarding this issue, but I always
referenced Android in some way. Had I just search on running JU 4 on
JU 3, I may have found the same answer you did.  I truly appreciate
your assistance, and I'll try out your suggestion right now.

Thank You,
Eric


On Aug 19, 7:46 pm, "A. Elk"  wrote:
> I have never tried to use vanilla JUnit 4 running under Android. I am
> not absolutely certain, but I predict that it won't work. To run any
> test, you need to use InstrumentationTestRunner, and it assumes JUnit
> 3, which is substantially different from JUnit 4. However, the
> documentation for JUnit 4 says:
>
> You make your JUnit 4 test classes accessible to a TestRunner designed
> to work with earlier versions of JUnit, declare a static method suite
> that returns a test.
>
>     public static junit.framework.Test suite() {
>         return new JUnit4TestAdapter(Example.class);
>     }
>
> I'd look at the Javadoc for junit.framework.*. When I Googled it, I
> saw that it included JUnit4TestAdapter. Better yet, search for help on
> running JUnit 4 tests under JUnit 3. InstrumentationTestRunner is
> designed to work with earlier versions of JUnit, so anything that can
> convert a JUnit 4 suite to JUnit 3 should work in Android. That the
> documentation for JUnit 4 includes instructions for running JUnit 4
> suites under an earlier test runner implies that it's a known
> situation, so I assume somebody else has written about it. Seems like
> nobody else writing for Android has encountered it (or bothered to
> reply), but at least for "vanilla" tests someone probably has done
> something.
>
> Sorry I can't help you any more.
>
> PS - I notice that the main differences between JUnit 3 and JUnit 4
> tests are a) JUnit 3 denotes a test suite by subclassing
> junit.framework.TestCase (JUnit 4 has no such requirement) b) JUnit 3
> test methods are denoted by the string "test" as the prefix of the
> method name, while JUnit 4 uses the @Test annotation. It doesn't seem
> to me that there are any other substantial differences, but as I have
> already said, I am not a JUnit 4 expert.
>
> On Aug 19, 3:33 pm, Eric  wrote:
>
>
>
> > I absolutely want my POJO JUnit 4 tests running on the Android
> > emulator VM, even if they do not reference Android APIs.  The reason
> > for this is fairly clear.  Android has a different implementation of
> > the base Java APIs, and it uses a special VM, so I want to know that
> > all of the shared code I will take advantage of beneath the Android UI
> > layer will run without fail on the emulator.
>
> > I hate to say this, but I am _still_ confused as to whether or not
> > this is possible.  Your eloquent answer didn't seem to answer the
> > question specifically.  Quite simply, is it even possible to run POJO
> > JUnit 4 test suites on the Android device itself, and if so, what is
> > the best/quickest way to achieve this from a configuration standpoint
> > in Eclipse?
>
> > On Aug 19, 4:27 pm, "A. Elk"  wrote:
>
> > > JUnit tests Plain Old Java Objects (POJOs). Basically, it loads your
> > > test class, runs a method, instantiates the class that you're testing,
> > > tests the methods, does the asserts, and outputs the results. It
> > > assumes that all the dependencies are built into the application
> > > or .jar file or are on the classpath.
>
> > > If you want to test a method in a class that subclasses an Android
> > > class or depends on an Android class, then you have to test within the
> > > Android framework, which is based on JUnit 3. This means that you have
> > > to use one of the test classes in android.test.*, and you have to use
> > > the instrumented test runner InstrumentationTestRunner (or one of its
> > > subclasses). Instructions for doing this are in the Android 2.2 SDK
> > > documentation under Testing and Instrumentation.
>
> > > If you run something "inside" the emulator, you're running it in
> > > Android, and the assumption is that it's dependent on the Android API.
> > > For this reason, you can't test it with test cases built for JUnit 4.
> > > However, I have to assume that since these tests are based on JUnit 4,
> > > you wrote them prior to starting with Android, and so the classes/
> > > methods they test do not depend on Android (or they didn't at some
> > > point in the past).
>
> > > For that reason, if you are *unit* testing these classes/methods, you
> > > shouldn't have to use the emulator. You should be able to construct
> > > the dependencies in the test fixture, run them with a JUnit 4 test
> > > runner, do the asserts, and look at the results. I doubt that this is
> > > possible within Android, because Android assumes that you're testing
> > > under Android. So you'd have to use something other than the Dalvik
> > > VM, which means you can't use the emulator (as far as I know). Seems
> > > to me tha

[android-developers] Re: How to compile/run JUnit 4 tests in Android?

2010-08-19 Thread A. Elk
I have never tried to use vanilla JUnit 4 running under Android. I am
not absolutely certain, but I predict that it won't work. To run any
test, you need to use InstrumentationTestRunner, and it assumes JUnit
3, which is substantially different from JUnit 4. However, the
documentation for JUnit 4 says:

You make your JUnit 4 test classes accessible to a TestRunner designed
to work with earlier versions of JUnit, declare a static method suite
that returns a test.

public static junit.framework.Test suite() {
return new JUnit4TestAdapter(Example.class);
}

I'd look at the Javadoc for junit.framework.*. When I Googled it, I
saw that it included JUnit4TestAdapter. Better yet, search for help on
running JUnit 4 tests under JUnit 3. InstrumentationTestRunner is
designed to work with earlier versions of JUnit, so anything that can
convert a JUnit 4 suite to JUnit 3 should work in Android. That the
documentation for JUnit 4 includes instructions for running JUnit 4
suites under an earlier test runner implies that it's a known
situation, so I assume somebody else has written about it. Seems like
nobody else writing for Android has encountered it (or bothered to
reply), but at least for "vanilla" tests someone probably has done
something.

Sorry I can't help you any more.

PS - I notice that the main differences between JUnit 3 and JUnit 4
tests are a) JUnit 3 denotes a test suite by subclassing
junit.framework.TestCase (JUnit 4 has no such requirement) b) JUnit 3
test methods are denoted by the string "test" as the prefix of the
method name, while JUnit 4 uses the @Test annotation. It doesn't seem
to me that there are any other substantial differences, but as I have
already said, I am not a JUnit 4 expert.

On Aug 19, 3:33 pm, Eric  wrote:
> I absolutely want my POJO JUnit 4 tests running on the Android
> emulator VM, even if they do not reference Android APIs.  The reason
> for this is fairly clear.  Android has a different implementation of
> the base Java APIs, and it uses a special VM, so I want to know that
> all of the shared code I will take advantage of beneath the Android UI
> layer will run without fail on the emulator.
>
> I hate to say this, but I am _still_ confused as to whether or not
> this is possible.  Your eloquent answer didn't seem to answer the
> question specifically.  Quite simply, is it even possible to run POJO
> JUnit 4 test suites on the Android device itself, and if so, what is
> the best/quickest way to achieve this from a configuration standpoint
> in Eclipse?
>
> On Aug 19, 4:27 pm, "A. Elk"  wrote:
>
> > JUnit tests Plain Old Java Objects (POJOs). Basically, it loads your
> > test class, runs a method, instantiates the class that you're testing,
> > tests the methods, does the asserts, and outputs the results. It
> > assumes that all the dependencies are built into the application
> > or .jar file or are on the classpath.
>
> > If you want to test a method in a class that subclasses an Android
> > class or depends on an Android class, then you have to test within the
> > Android framework, which is based on JUnit 3. This means that you have
> > to use one of the test classes in android.test.*, and you have to use
> > the instrumented test runner InstrumentationTestRunner (or one of its
> > subclasses). Instructions for doing this are in the Android 2.2 SDK
> > documentation under Testing and Instrumentation.
>
> > If you run something "inside" the emulator, you're running it in
> > Android, and the assumption is that it's dependent on the Android API.
> > For this reason, you can't test it with test cases built for JUnit 4.
> > However, I have to assume that since these tests are based on JUnit 4,
> > you wrote them prior to starting with Android, and so the classes/
> > methods they test do not depend on Android (or they didn't at some
> > point in the past).
>
> > For that reason, if you are *unit* testing these classes/methods, you
> > shouldn't have to use the emulator. You should be able to construct
> > the dependencies in the test fixture, run them with a JUnit 4 test
> > runner, do the asserts, and look at the results. I doubt that this is
> > possible within Android, because Android assumes that you're testing
> > under Android. So you'd have to use something other than the Dalvik
> > VM, which means you can't use the emulator (as far as I know). Seems
> > to me that chances are pretty slim that a test would pass in a non-
> > Dalvik VM and then fail in Android.
>
> > If the classes you want to test have any dependency on Android
> > classes, then you *have* to test them in Android. By the way, TFJ said
> > that you need to do dummy implementations of Bundle and Intent. What I
> > think he's saying is that you have to do this to run JUnit 4 tests in
> > Android. If you convert your tests to JUnit 3 style, then Android
> > itself provides testing implementations and environments. See the
> > Android 2.2 SDK that I mentioned previously.
>
> > Elk.
>
> > On Aug

[android-developers] Re: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-19 Thread suzanne.alexandra
John, thanks for the number. I just filed a high-priority bug on this
and will keep you updated.

- Suzanne


On Aug 19, 3:40 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> Suzanne,
>
> All I can say is "Great" and "Bummer".
>
> Currently, I'm showing 1,168 DROID2's with that ANDROID_ID using my
> app.
>
> -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


Re: [android-developers] Re: How to get click position in TextView?

2010-08-19 Thread Mark Murphy
On Thu, Aug 19, 2010 at 7:02 PM, Sergey  wrote:
>> Create one TextView per word.
> This wouldn't work for me as the text is very large and also it would
> create many other problems in my processing.
>
> Are there any other options?

Override onTouchEvent(), find the coordinates of the screen tap, then
run a bunch of text metric calculations to try to determine what word
is at those coordinates. This is unlikely to be easy.

I'm not strong enough with my DOM events to know if you could find out
the clicked-upon word if you put the text into a WebView instead of a
TextView.

Bear in mind that your current design assumes the existence of a
touchscreen. It remains to be seen how long that assumption will hold
true. Google TV, for example, might be more pointer-centric.

-- 
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.1 Available!

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


[android-developers] Re: OutOfResourcesException when using GLSurfaceView and VideoView

2010-08-19 Thread Indicator Veritatis
Since it varies from device to device, where is it documented for each
device? Or which Android API will return this information?

Since per application memory sounds like an OS issue, I would expect
it in the android.os package, but I am not seeing it there.

On Aug 18, 10:50 pm, Romain Guy  wrote:
> An app can only use 16 or 24 MB of RAM, depending on the device. A
> VideoView or a GLSurfaceView takes up a lot of RAM by the way (a
> fullscreen surface view requires width*height*2*2 bytes of memory for
> instance - if it's 16 bits.)
>
>
>
> On Wed, Aug 18, 2010 at 10:41 PM, Luca Carlon  wrote:
> > Hi! I have an activity which uses a GLSurfaceView to render some
> > graphics. Now, I created another activity, which is started from the
> > first when pressing a button, which plays a video using a VideoView.
> > The problem is that, for some reason, very often I get a
> > OutOfResources exception from the Surface, and in the logs I even see
> > some messages saying "Out of memory". I can hardly believe I have not
> > enough memory to load everything... Does an application have any limit
> > in size? Any other idea what can be causing this? Any help is really
> > appreciated!
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them

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


Re: [android-developers] Re: Round Thumbs in Seek Bar

2010-08-19 Thread Stephen Lau

Not really, it's a transparent .png -- not code.

cheers,
steve

Ranjan A R wrote:

Could you please give me some sample code.

On Aug 18, 2:31 pm, Stephen Lau  wrote:

Ranjan A R wrote:

How to change the rectangular thumb to round thumb in androidd seek
bar.

You can use a drawable with transparency for your thumb attribute.

cheers,
steve

--
stephen lau | st...@grommit.com |http://whacked.net| @stevel





--
stephen lau | st...@grommit.com | http://whacked.net | @stevel

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


[android-developers] Google Earth Api's

2010-08-19 Thread droidofdewm
Wondering if anyone knows if Google Earth Api's are out for android
2.2 or if it's in development.

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


[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-19 Thread Paul Turchenko
I am not saying it's hard, I just pointed out that WidgetExplorer from
"Unlocking Android" doesn't cover what Sergey is asking for

On Aug 16, 4:54 pm, Kostya Vasilyev  wrote:
>   Sereja & Pavel,
>
> It should be just a little bit more involved than writing a SQL-based one.
>
> For structured data, you'd need to create your own Cursor subclass, and
> return it from the provider's query method. If query results are small
> enough to fit in RAM, then it's easiest to use MatrixCursor.
>
> For stream-based data, ContentResolver.openStream seems to eventually
> call ContentProvider.openFile. This method returns a special
> helper class, ParcelFileDescriptor, which allows file descriptors to be
> passed across process boundaries.
>
> -- Kostya
>
> 16.08.2010 17:18, Paul Turchenko пишет:
>
>
>
> > They use Database! Sergey is asking about building content provider
> > around non-db storage.
>
> > On Aug 16, 4:29 am, Indicator Veritatis  wrote:
> >> Expect to override a lot more methods in ContentProvider and
> >> ContentResolver than other people do. You may want to look at the
> >> example WidgetExplorer from "Unlocking Android". Go to the book's
> >> website, download the sample code and look in the code for chapter 5.
>
> >> I suggest this example because here too, the authors override more
> >> methods than usual because they are making their own ContentProvider.
> >> But of course, the example will not be exactly the same as what you
> >> want.
>
> >> On Aug 12, 2:45 pm, Sergey  wrote:
>
> >>> Hi,
> >>> I need to write a ContentProvider to provide a dynamically generated
> >>> audio stream to be playable by MediaPlayer. That is MediaPlayer will
> >>> use ContentResolver.openInputStream() to play it.
> >>> I have read a lot of discussions about this problem but no one had a
> >>> solution yet.
> >>> The most recent one was in January 
> >>> 2010:http://groups.google.com/group/android-developers/browse_thread/threa...
> >>> Have anyone found a solution yet?
> >>> Any ideas are greatly appreciated.
> >>> Thanks a lot,
> >>> --Sergey
>
> --
> Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com

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


[android-developers] Re: Round Thumbs in Seek Bar

2010-08-19 Thread Ranjan A R
Could you please give me some sample code.

On Aug 18, 2:31 pm, Stephen Lau  wrote:
> Ranjan A R wrote:
> > How to change the rectangular thumb to round thumb in androidd seek
> > bar.
>
> You can use a drawable with transparency for your thumb attribute.
>
> cheers,
> steve
>
> --
> stephen lau | st...@grommit.com |http://whacked.net| @stevel

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 anyone's active install % dropping like a rock lately?

2010-08-19 Thread Indicator Veritatis
In introductory economics classes, whether at high school or
undergraduate level, we are taught to think of buyers and sellers as
perfectly rational. In good classes, we are told that this is only an
approximation. Unfortunately, people tend to soon forget that it is
only an approximation. Those of us who go on to study pricing in
business school learn just how poor an approximation it really is, as
your anecdote confirms!

That said, I can't help but wonder if the phenomenon you report is due
primarily to two factors: 1) when they are sold the expensive phone
and plan, one of the key selling points is "there are lots of free
apps" 2) after spending that much on the phone and realizing how much
they pay per month, they suffer from "buyer's remorse", which
encourages their hope to get something for free even more; they figure
they have already "paid their dues".

On Aug 17, 11:54 am, TreKing  wrote:
> On Tue, Aug 17, 2010 at 1:22 PM, Doug  wrote:
> > Perhaps it has a lot to do with the way it's crippled.  Many Android users
> > have this strange notion that everything should be really free!
>
> This in particular is very annoying. I have a few comment on my free version
> along the lines of "X should really be free", "Need feature Y but not enough
> to pay", or "very limited" ... when the description reads "Limited / Basic
> Version".
>
> People spend ~$200 for a phone, ~$50 / month for the plan and then bitch
> about spending less than $5 for an app. Amazing.
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: How to get click position in TextView?

2010-08-19 Thread Sergey
> Create one TextView per word.
This wouldn't work for me as the text is very large and also it would
create many other problems in my processing.

Are there any other options?

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

2010-08-19 Thread Priyank Maiya
I was able to fix the problem.
The issue was that i did not have the context instance in my callback class.

I created a constructor where I got the context from the service class.

Using that I was able to call the application activity class.
Also I had to use
myIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); for starting the task..

This was my constructor in the callback class
private VServiceCallBack(Context iContext)
{
context = iContext;
}

And according to the arguments received,

{
Intent appView = new Intent(context, AppView.class);
appView .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(appView );
}

Sorry for the confusion, and thanks for the help..

Priyank



On Thu, Aug 19, 2010 at 5:34 PM, Indicator Veritatis wrote:

> Treking is right: you are simply not posting enough information. And
> what you have posted is problematic and misleading: what do you MEAN
> the application 'closes'? Have you really missed all the heated
> discussions explaining why developers should not close/exit their own
> application components, but leave that to the system to do?
>
> On Aug 18, 12:58 pm, Priyank  wrote:
> > Hi,
> > I have an activity class(Application Class ) which calls a service
> > class(Service Class) and closes.
> > The service class takes about 5 seconds to complete its task and calls
> > a method which is present in another class(Callback Class). Now
> > according to the result, the callback needs to notify the Application
> > class.
> >
> > Once i get the callback from the service, I tried calling a method
> > defined in the Application class. In this method i create a new intent
> > of Application class and call startActivity(Application Class).
> > But this is not working. Can anyone tell where i am going wrong and
> > what can I do to solve this issue.
> >
> > Thanks,
> > Priyank
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Supporting multiple screens

2010-08-19 Thread Albert
Ok, thank you.

On 20 ago, 00:28, Mark Murphy  wrote:
> On Thu, Aug 19, 2010 at 2:00 AM, Albert  wrote:
> > My application will have two layouts, one for large screens and one
> > for normal. For testing I'm working with one phone (800x480 240dpi)
> > and one tablet (1024x600 240dpi) but both are detected as large screen
> > hdpi and long aspect ratio, so I'm not able to assign different
> > layouts.
>
> > The only approach I think that can work is to create layout-large and
> > layout-normal, get the resolution and programmatically set the layout
> > folder. Is that possible?
>
> AFAIK, you cannot programmatically set the layout folder.
>
> 1024x600 is not a supported screen resolution at this time. It seems
> likely that the upcoming Gingerbread release will add support for this
> resolution or similar ones. At that point, you should receive official
> instructions on how to best support such resolutions.
>
> In the meantime, use two different names for the layouts, use
> DisplayMetrics to figure out your screen size, and choose which layout
> to load by name.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 3.1 Available!

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


[android-developers] Re: OutOfResourcesException when using GLSurfaceView and VideoView

2010-08-19 Thread Indicator Veritatis
Good info. But he should also keep track of the direct buffers he
allocates w/ OpenGL: for as the docs warn: "A direct buffer will try
its best to take advantage of native memory APIs and it may not stay
in the Java heap, thus it is not affected by garbage collection."

(from http://developer.android.com/reference/java/nio/Buffer.html).

Now if only the same doc were as informative about how to deallocate
it in the case it is not affected by garbage collection:(

On Aug 19, 1:44 pm, Dianne Hackborn  wrote:
> The OutOfResources you see in the log is actually from the graphics system,
> which on many devices has a global pool of memory for window surfaces,
> typically around 16MB.
>
> First, that message can be normal, if the system is just finding it needs
> more memory for the foreground and is hunting for background things to kill.
>  If you really are running out of such memory in your app, you are using a
> pretty excessive amount of surface memory, and should check to make sure you
> aren't leaking a large number of windows and such.  "adb shell dumpsys
> window" can be your friend for this.
>
>
>
> On Thu, Aug 19, 2010 at 12:00 PM, Luca Carlon  wrote:
> > So no way of increasing it. And what about the option of separating
> > into different applications? I mean, if I have one application using
> > the GLSurfaceView and another with the VideoView, and I make the
> > second start when a specific intent is broadcasted from the first,
> > would I have two different spaces each 16MB or 24MB?
> > Thanks you very much for the information you provided!
>
> > On 19 Ago, 18:26, Romain Guy  wrote:
> > > If you don't have enough memory in your app you must modify it to work
> > > with this limit.
>
> > > On Thu, Aug 19, 2010 at 2:03 AM, Luca Carlon 
> > wrote:
> > > > And would it be possible to increase the amount of RAM available?
> > > > Would creating a different application which receives intents from the
> > > > first one be a solution to the problem of insufficient RAM for a
> > > > process?
> > > > Thanks for your answer!
>
> > > > On Aug 19, 7:50 am, Romain Guy  wrote:
> > > >> An app can only use 16 or 24 MB of RAM, depending on the device. A
> > > >> VideoView or a GLSurfaceView takes up a lot of RAM by the way (a
> > > >> fullscreen surface view requires width*height*2*2 bytes of memory for
> > > >> instance - if it's 16 bits.)
>
> > > >> On Wed, Aug 18, 2010 at 10:41 PM, Luca Carlon 
> > wrote:
> > > >> > Hi! I have an activity which uses a GLSurfaceView to render some
> > > >> > graphics. Now, I created another activity, which is started from the
> > > >> > first when pressing a button, which plays a video using a VideoView.
> > > >> > The problem is that, for some reason, very often I get a
> > > >> > OutOfResources exception from the Surface, and in the logs I even
> > see
> > > >> > some messages saying "Out of memory". I can hardly believe I have
> > not
> > > >> > enough memory to load everything... Does an application have any
> > limit
> > > >> > in size? Any other idea what can be causing this? Any help is really
> > > >> > appreciated!
> > > >> > Thanks!
>
> > > >> > --
> > > >> > You received this message because you are subscribed to the Google
> > > >> > Groups "Android Developers" group.
> > > >> > To post to this group, send email to
> > android-developers@googlegroups.com
> > > >> > To unsubscribe from this group, send email to
> > > >> > android-developers+unsubscr...@googlegroups.com
> > > >> > For more options, visit this group at
> > > >> >http://groups.google.com/group/android-developers?hl=en
>
> > > >> --
> > > >> Romain Guy
> > > >> Android framework engineer
> > > >> romain...@android.com
>
> > > >> Note: please don't send private questions to me, as I don't have time
> > > >> to provide private support.  All such questions should be posted on
> > > >> public forums, where I and others can see and answer them
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > romain...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http

[android-developers] Re: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-19 Thread Maps.Huge.Info (Maps API Guru)
Suzanne,

All I can say is "Great" and "Bummer".

Currently, I'm showing 1,168 DROID2's with that ANDROID_ID using my
app.

-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: Starting an Activity from a callback class

2010-08-19 Thread Indicator Veritatis
Treking is right: you are simply not posting enough information. And
what you have posted is problematic and misleading: what do you MEAN
the application 'closes'? Have you really missed all the heated
discussions explaining why developers should not close/exit their own
application components, but leave that to the system to do?

On Aug 18, 12:58 pm, Priyank  wrote:
> Hi,
> I have an activity class(Application Class ) which calls a service
> class(Service Class) and closes.
> The service class takes about 5 seconds to complete its task and calls
> a method which is present in another class(Callback Class). Now
> according to the result, the callback needs to notify the Application
> class.
>
> Once i get the callback from the service, I tried calling a method
> defined in the Application class. In this method i create a new intent
> of Application class and call startActivity(Application Class).
> But this is not working. Can anyone tell where i am going wrong and
> what can I do to solve this issue.
>
> Thanks,
> Priyank

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


[android-developers] Re: How to compile/run JUnit 4 tests in Android?

2010-08-19 Thread Eric
I absolutely want my POJO JUnit 4 tests running on the Android
emulator VM, even if they do not reference Android APIs.  The reason
for this is fairly clear.  Android has a different implementation of
the base Java APIs, and it uses a special VM, so I want to know that
all of the shared code I will take advantage of beneath the Android UI
layer will run without fail on the emulator.

I hate to say this, but I am _still_ confused as to whether or not
this is possible.  Your eloquent answer didn't seem to answer the
question specifically.  Quite simply, is it even possible to run POJO
JUnit 4 test suites on the Android device itself, and if so, what is
the best/quickest way to achieve this from a configuration standpoint
in Eclipse?


On Aug 19, 4:27 pm, "A. Elk"  wrote:
> JUnit tests Plain Old Java Objects (POJOs). Basically, it loads your
> test class, runs a method, instantiates the class that you're testing,
> tests the methods, does the asserts, and outputs the results. It
> assumes that all the dependencies are built into the application
> or .jar file or are on the classpath.
>
> If you want to test a method in a class that subclasses an Android
> class or depends on an Android class, then you have to test within the
> Android framework, which is based on JUnit 3. This means that you have
> to use one of the test classes in android.test.*, and you have to use
> the instrumented test runner InstrumentationTestRunner (or one of its
> subclasses). Instructions for doing this are in the Android 2.2 SDK
> documentation under Testing and Instrumentation.
>
> If you run something "inside" the emulator, you're running it in
> Android, and the assumption is that it's dependent on the Android API.
> For this reason, you can't test it with test cases built for JUnit 4.
> However, I have to assume that since these tests are based on JUnit 4,
> you wrote them prior to starting with Android, and so the classes/
> methods they test do not depend on Android (or they didn't at some
> point in the past).
>
> For that reason, if you are *unit* testing these classes/methods, you
> shouldn't have to use the emulator. You should be able to construct
> the dependencies in the test fixture, run them with a JUnit 4 test
> runner, do the asserts, and look at the results. I doubt that this is
> possible within Android, because Android assumes that you're testing
> under Android. So you'd have to use something other than the Dalvik
> VM, which means you can't use the emulator (as far as I know). Seems
> to me that chances are pretty slim that a test would pass in a non-
> Dalvik VM and then fail in Android.
>
> If the classes you want to test have any dependency on Android
> classes, then you *have* to test them in Android. By the way, TFJ said
> that you need to do dummy implementations of Bundle and Intent. What I
> think he's saying is that you have to do this to run JUnit 4 tests in
> Android. If you convert your tests to JUnit 3 style, then Android
> itself provides testing implementations and environments. See the
> Android 2.2 SDK that I mentioned previously.
>
> Elk.
>
> On Aug 19, 8:36 am, Eric  wrote:
>
>
>
> > On Aug 19, 9:57 am, "The.French.DJ"  wrote:
>
> > > It depends on what parts you want to test. If you need the android
> > > test framework classes for testing activities and services in a valid
> > > android context then i am not sure if you can make junit 4 work with
> > > it.
>
> > > However, if you extract your app logic into android independant
> > > classes then you can test them by having junit 4 in the classpath
> > > before the android jar.
>
> > Thank you for the info.  However, what I don't understand is, will the
> > JUnit 4 tests be run INSIDE the Android emulator, or outside the
> > emulator on my Mac in a separate Java VM?  Ideally I want the JUnit 4
> > tests to be run INSIDE the Android emulator so that I know my code
> > will be 'ok' when run on an Android device.
>
> > - Eric

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


[android-developers] Re: Any procedure available for Overlaying one video playback on top of another video

2010-08-19 Thread Aamer
Hi Pilu,
I am also looking for dat. When we use VideoView to play video, it
causes delay to play 2nd file after finishing first file on reaching
OnCOmpletionListener,

Anyone with the solution??
THX

On Aug 13, 3:34 pm, Pilu  wrote:
> Hello All,
>
> Does android support overlaying of one video playback on top of
> another video ?
>
> For example, let's say one media is getting played in android player
> in full screen and on top of this i want to overlay another video.
>
> Any suggestion/poniter will be helpful.
>
> Thanks.

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


Re: [android-developers] Can android OS be edited?

2010-08-19 Thread Mark Murphy
On Wed, Aug 18, 2010 at 5:06 PM, Salman  wrote:
> friends i am working on a project that includes some editing in
> android
> can anyone please tell me that is it possible to edit Android source
> code
> i want to edit its SIM Card access.

http://source.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.1 Available!

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


Re: [android-developers] Supporting multiple screens

2010-08-19 Thread Mark Murphy
On Thu, Aug 19, 2010 at 2:00 AM, Albert  wrote:
> My application will have two layouts, one for large screens and one
> for normal. For testing I'm working with one phone (800x480 240dpi)
> and one tablet (1024x600 240dpi) but both are detected as large screen
> hdpi and long aspect ratio, so I'm not able to assign different
> layouts.
>
> The only approach I think that can work is to create layout-large and
> layout-normal, get the resolution and programmatically set the layout
> folder. Is that possible?

AFAIK, you cannot programmatically set the layout folder.

1024x600 is not a supported screen resolution at this time. It seems
likely that the upcoming Gingerbread release will add support for this
resolution or similar ones. At that point, you should receive official
instructions on how to best support such resolutions.

In the meantime, use two different names for the layouts, use
DisplayMetrics to figure out your screen size, and choose which layout
to load by name.

-- 
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.1 Available!

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


[android-developers] Re: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-19 Thread suzanne.alexandra
Got it, thanks, my mistake. My DROID 2 here is returning the same
ANDROID_ID. Checking into it.

- Suzanne



On Aug 19, 2:44 pm, "Maps.Huge.Info (Maps API Guru)"
 wrote:
> Perhaps Suzanne was thinking about another country... it certainly is
> out in the USA.
>
> -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] enable/dissable fullscreen for lifetime of the app?

2010-08-19 Thread Moto
Currently my application allows the user to set the application to run
in full screen.  I than check in every activity at onCreate() if the
user has set to make the app run in full screen.  Is there a better
way to do this?  I have many other settings that I do and I find this
method a little bad in terms of code design.

Is there a way to set full screen for the lifetime of app or until I
set it back to not full screen?

One way to do it would be to have a custom Activity class that does
these checks and all my activities can just implement it?  would that
be slow is it recommended?

Thanks!
-Moto

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

2010-08-19 Thread Indicator Veritatis
This sounds all find and good, but I still haven't heard anything
about the far more common cause of delay: the garbage collector
locking up the thread or pre-empting the CPU. Or has Amit already
solved this problem?

As for alignment, OpenGL as implemented by JSR-239 (therefore
available on Android) solves this problem by using the JSR-239
java.nio Buffer classes. If you use one of these, you are guaranteed
word-alignment on the ARM.

NB: I say "jsr-239 java.nio" because there may be subtle
implementation differences between those and the original java.nio
classes. For example, JSR-239 does not expect flip() to be useful, nor
is supporting Mark required.

NB: the online docs for Android's java.nio do not mention alignment: I
found this info in one of the OpenGL ES specs (I forget which one): I
forget whether or not the Buffer must be allocated Direct or not to
get this benefit.

On Aug 19, 12:40 pm, Marc  wrote:
> I have spent a lot of time optimizing signal processing algorithms
> using both arm assembly and memory optimizations. The memory
> optimizations can be huge. I remember one project the speed more than
> doubled once we only using cache memory. That is the entire working
> data set was less than 8k.
>
> The process is fairly straight forward: Determine the size of your
> cache, then use only that much memory. This typically requires doing
> tricks like making the output buffer overlap the input buffer.
> Basically you need to know exactly where every byte of memory is being
> used. Java tends to be allocate as you need memory model, but for
> cache optimizations you need tighter control of memory usage.
>
> On Aug 19, 11:47 am, DanH  wrote:
>
> > "Hate to sound like I'm harping on the same stuff, but then (assuming
> > that the JVM/JIT compiler is doing good enough), the memory bottleneck
> > still remains."
>
> > Yep, much of our effort on iSeries went into the memory bottleneck
> > area.  Eg, we got fairly astounding improvements (ca 20%) when we
> > "packed" objects so that the fields of "SubclassOfA" filled in the
> > "holes" left from aligning the fields of "A".  And even more
> > improvement by packing the Char array owned by a String into the
> > String and arranging it so that the two shared a single header.
>
> > (BTW, with regard to alignment, note that most processors can handle,
> > eg, unaligned ints and longs, but often the storage accesses are
> > several times longer if unaligned, so alignment may be very important,
> > even if "unnecessary".)
>
> > On Aug 19, 12:54 pm, Amit  wrote:
>
> > > Hi Dan,
>
> > > Thanks for the response
>
> > > > In general, JITed Java code is as fast as or faster than the
> > > > equivalent native code, if the JIT is reasonably good, and if the
> > > > specific application can be coded efficiently in Java.  
>
> > > I was actually banking on this. I don't know too much of the hairy
> > > details (am not really a compiler person), but from what I have read
> > > recent improvements by Google to the Dalvik VM make it *comparable* if
> > > not equal in performance to native code ...
>
> > > Hate to sound like I'm harping on the same stuff, but then (assuming
> > > that the JVM/JIT compiler is doing good enough), the memory bottleneck
> > > still remains.
>
> > > Thanks,
> > > Amit
>
> > > On Aug 19, 10:11 pm, DanH  wrote:
>
> > > > In general, JITed Java code is as fast as or faster than the
> > > > equivalent native code, if the JIT is reasonably good, and if the
> > > > specific application can be coded efficiently in Java.  The problem is
> > > > that some specific data processing patterns are not easy to code
> > > > efficiently in Java, and I suspect that certain of the bit-bashing
> > > > algorithms used in image processing fall into this category.
>
> > > > In such cases the most efficient approach is "native Java", but I only
> > > > know of one JVM (the IBM iSeries "classic" JVM) that permits this, and
> > > > then only for system code.  Otherwise it's a bit of a tradeoff to get
> > > > the right partitioning between Java and native, since crossing the
> > > > Java/native boundary tends to be relatively expensive.
>
> > > > On Aug 19, 7:03 am, Fabrizio Giudici 
> > > > wrote:
>
> > > > > -BEGIN PGP SIGNED MESSAGE-
> > > > > Hash: SHA1
>
> > > > > On 8/19/10 13:35 , Amit wrote:
>
> > > > > > Now, I know that native code will *not* yield any significant
> > > > > > performance improvement over Java code
>
> > > > > Well, specifically for image processing this won't be true, for sure
> > > > > up to 2.1 included (as the bytecode is purely interpreted); in 2.2 we
> > > > > have JIT, but can't speak as I haven't seen it yet.
>
> > > > > - --
> > > > > Fabrizio Giudici - Java Architect, Project Manager
> > > > > Tidalwave s.a.s. - "We make Java work. Everywhere."
> > > > > java.net/blog/fabriziogiudici -www.tidalwave.it/people
> > > > > fabrizio.giud...@tidalwave.it
> > > > > -BEGIN PGP SIGNATURE-
> > > > > Version: GnuPG/MacGPG2 v2.0.1

Re: [android-developers] Cannot add gmail account to Accounts & Sync Settings -- Eclipse 3.5.2, SDK Platform Android 2.2, API 8, revision 2

2010-08-19 Thread Xavier Ducrohet
Use the "Google APIs" add-on (API8, rev2).

On Thu, Aug 19, 2010 at 11:32 AM, Rob  wrote:
> Using Eclipse 3.5.2, SDK Platform Android 2.2, API 8, revision 2
>
> In Settings --> Accounts & Sync --> Add Account
>
> I do not have the option to add anything but an Exchange Account in
> the emulator.  I should be able to add a gmail account.  Am I being
> stupid or is there a problem with the emulator?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

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


Re: [android-developers] Reading Cause Codes after call

2010-08-19 Thread Mark Murphy
On Thu, Aug 19, 2010 at 3:30 PM, bastlaca  wrote:
> I have a big problem. I have this task: "... recognise dropped calls,
> and get information about cause of the drop...". Use these
>
> For example: If in a phone call the called partner presses the red end
> call button, the Call Controll sends the following message to me:  "
> Cause No.17 "user busy" " (3GPP 24.008)
>
> So, I would like to read cause codes ( exit codes in Symbian) when the
> call is ended. I can use Java or C++ (JNI).

AFAIK, you will need to write custom firmware to get access to this
information. I am not aware of this information being available to SDK
or NDK applications. 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.1 Available!

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


Re: [android-developers] Spinner in Android

2010-08-19 Thread Mark Murphy
On Thu, Aug 19, 2010 at 11:35 AM, Jatin D Patel  wrote:
> Is it possible to include Multiple rows of data with different font in
> single row of spinner.

Yes. You will need to define your own layout for the rows. Depending
on your choice of adapter you may also need to subclass the adapter
class to handle mapping your data into those rows.

-- 
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.1 Available!

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


Re: [android-developers] Intent from gmail app once contacts are synced.

2010-08-19 Thread Mark Murphy
On Thu, Aug 19, 2010 at 4:21 AM, Droid_bhai  wrote:
> Once logging in into the google account after all the contacts from
> google server is synced is there any intent being broadcasted by the
> google mail app which tells
> that the google contacts are synced from the server?
> Could someone provide some info on this...

There are no documented and supported Intents of any kind related to
the Gmail application, 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.1 Available!

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


[android-developers] Regarding Storing of data in the database in android.

2010-08-19 Thread AAJ
Hello,
I am working on some sample programs, where i have to take the value
from the user and store it in the database. I have used DroidDraw to
create the XML code for UI.For now, I have just started with a
textbox. So, I have to take the value from this textbox and store it
in a database. I am using SQlite browser to create tables. I read in
some forums, that one way of doing this -
1. Copy the db file in the asset folder of the android project and use
the AssetManager class. But i am not able to figure out how to use the
asset manager class here.

Or if I could get some simpler suggestions on how to store the value
from user into the database, it would be great.

Thanks
AAJ.

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


[android-developers] Spinner in Android

2010-08-19 Thread Jatin D Patel
Hello friends,

Is it possible to include Multiple rows of data with different font in
single row of spinner.

-- 
Thanks,
Jatin D N Patel
Masters, Computer Sci.
Suny Binghamton Univ, NY.

You Got To Think HIGH to RISE.

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

[android-developers] full screen issues.

2010-08-19 Thread Onomp
I'm using a fullscreen theme and when my application starts, my layout
isn't centered correctly unless I move setcontentview farther into the
oncreate, It seems there is some sort of animation being called which
gradually removes the status bar and my layout comes to the front
before the status bar is gone, which leaves the top of my activity
exactly where ever the bottom of the status bar was. There also
appears to be issues with my layout adjusting and losing it's correct
position, when I am working with a virtual keyboard. and another note.
when calling the getview for listview that is embedded within a
dialog, the status bar reappears and disappears 3 times in a row.

Other application I use that are full screen, they work solidly, I
never see the layout getting jerked around or the status bar appearing
and disappearing...

How are they doing 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] Difference between Android Service and Content Provider

2010-08-19 Thread Lily Zhang
I am developing an app and get confused about the idea of Service and
Content Provider in Android. In practice, what will be the difference
between them?

Content Provider
is a facade and it defines a way to share data among applications. You
many attach a local database to your app or create Content Provider
mapped to a universal database so that all the application on the same
device can share it.

Service
is long running processes that need to be decoupled from main
activity. It has local and remote service. local service is like the
local database, and remote service is like Content Provider sharing
the database info.

What My App is doing?
downloads info. from multiple internet resource in the background (I
suppose this will be Service) and store the info. into database, and
multiple applications will need to retrieve the data, format them and
output them to user (I guess it will be a Content Provider).

What will be the fine line between Service and Content Provider?
Newbie in Android, and any suggestion is welcome.

Lily

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

2010-08-19 Thread authorwjf
Like you I had similar problems getting my Motroloa DROID to show up
as a device in Android Device Chooser dialog under Eclipse. I am
running the 32-bit version of Windows 7. I found a number of forums
that tried to address this issue, but no one seemed exactly sure what
was happening, and a number of the sites suggested re-installing
Windows.

It just so happens that prior to doing Android development I wrote
device drivers for Windows. So I am at a bit of an advantage here. USB
drivers can be touchy, but you shouldn't have to re-install your OS
and the idea of a "driver boost" app from a third party makes me
shudder. More than likely what is happening is the OS has associated
your DROID with the generic driver that comes with the Windows Android
SDK.

You can verify this by bringing up the Windows Device Manager. If in
your root node you see, ANDROID PHONE instead of ADB INTERFACE, this
post should solve your problem. Obviously, if you have not already
gone out to the Motorola website and downloaded the 32 or 64 bit
drivers for the DROID, this needs to be your first step.

After you run the MSI you downloaded from Motorola, reboot your
machine, bring up your old friend the device manager again, and
reconnect your DROID. As mentioned in other posts on this thread, you
need to have the USB debugging turned on from the DROID's application
menu.

Expand the ANDROID PHONE node, right click, and choose UPDATE DRIVER
SOFTWARE. You will be presented with two options, the one you want is
BROWSE MY COMPUTER FOR DRIVER SOFTWARE. When the next dialog comes up,
select LET ME PICK FROM A LIST OF DEVICE DRIVERS ON MY COMPUTER.

As long as you have the SHOW COMPATIBLE HARDWARE box checked, you
should see a couple options. Ideally, you are looking for MOT
COMPOSITE ADB INTERFACE. However, in some cases only ANDROID COMPOSITE
ADB INTERFACE shows up. This *should* work as well. The one thing you
don't want is the generic ANDROID ADB INTERFACE, which seems to be the
default (thus the problem to begin with).

Click NEXT and the driver will install. Its possible at this point (in
fact likely), Windows will force you to do a reboot. Once that is
complete you should be good to go. Hope this was helpful!

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


[android-developers] spinner

2010-08-19 Thread Jatin D Patel
Is it possible to put two lines of text in a single spinner entry?

-- 
Thanks,
Jatin D N Patel
Masters, Computer Sci.
Suny Binghamton Univ, NY.

You Got To Think HIGH to RISE.

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

[android-developers] Greedy Pirates - My First Android Game

2010-08-19 Thread Trevor Boyle
Last week I put my first Android Game onto the market, 'Greedy
Pirates'.

I would love it if you could have a play and give me some feedback.
http://greedypirates.trevorboyle.com/

I had some initial problems with the OpenGL (which were quickly
fixed), but I received a number of bad ratings as a result. Things are
beginning to slowly pick-up now though.

I have a few improvements in mind, most obviously a high-scores table.
I am also considering implementing 'user activated' power-ups, any
suggestions?

Thanks,
Trevor

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


[android-developers] Re: How to convert .swf to .apk ?

2010-08-19 Thread confused
Hi,

http://blog.omarfouad.com/?p=312#more-312



On 5 Jul., 10:15, VENU GOPAL  wrote:
> Hi Freinds,
>
> I created a application using ADOBE AIR and now i want this
> application to deployed in ANDROID OS enabled mobile phone but i am
> not able to convert .swf file to .apk
>
> Can any one please help me out how i can convert .swf to .apk
>
> Best Regards
> Venu Gopal V

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


[android-developers] Scrolling in a ListView

2010-08-19 Thread Sebastian Muehr
In one of my projects I've got a ListView with hundreds of elements.
But when scrolling through this list I get the following error:

08-19 18:58:57.269: ERROR/AndroidRuntime(261):
java.lang.NullPointerException
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
355)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.AbsListView.obtainView(AbsListView.java:1256)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.ListView.measureHeightOfChildren(ListView.java:1147)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.ListView.onMeasure(ListView.java:1060)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.View.measure(View.java:7964)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
888)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.LinearLayout.measureVertical(LinearLayout.java:350)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.View.measure(View.java:7964)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.View.measure(View.java:7964)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.LinearLayout.measureVertical(LinearLayout.java:464)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:278)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.View.measure(View.java:7964)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3023)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.View.measure(View.java:7964)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.ViewRoot.performTraversals(ViewRoot.java:763)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.os.Handler.dispatchMessage(Handler.java:99)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.os.Looper.loop(Looper.java:123)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
android.app.ActivityThread.main(ActivityThread.java:4363)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
java.lang.reflect.Method.invokeNative(Native Method)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
java.lang.reflect.Method.invoke(Method.java:521)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
08-19 18:58:57.269: ERROR/AndroidRuntime(261): at
dalvik.system.NativeStart.main(Native Method)


Can anyone help me with this issue?
I'm glad about any hint that you can give me.

- Sebastian Muehr -

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


[android-developers] Always show notification bar

2010-08-19 Thread Will
I am compiling from source but I alway need my status bar to be shown
which some applications hide.

Do I have to edit the STATUS_BAR.xml file or what?

Thanks,
Will

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


[android-developers] Reading Cause Codes after call

2010-08-19 Thread bastlaca
Hello.

I have a big problem. I have this task: "... recognise dropped calls,
and get information about cause of the drop...". Use these

For example: If in a phone call the called partner presses the red end
call button, the Call Controll sends the following message to me:  "
Cause No.17 "user busy" " (3GPP 24.008)

So, I would like to read cause codes ( exit codes in Symbian) when the
call is ended. I can use Java or C++ (JNI).

Thank.

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

2010-08-19 Thread VEC
I'm very excited about the Tablet version of the Android coming to
market and need to know  whether its a viable alternative to using the
costly Handhands running Windows Mobile to achieve the same
functionality.

My concept is having a Salesperson visit a customer's site, whip out
the tablet, connect to the office server thru a Terminal Server
session cellularly and issue an invoice thru a portable printer they
carry.

I've acquired an Android Phone (Sony Xperia-10 w/ Android 1.6),
installed the popular Remote RDP 3.01 and am able to get onto the
company server and run our EDP software.  What I can;t figure out is
how to get a printer to install on my phone so that I can print to
it.

Are there any printers that work with the Android as they do with
Windows?  Could someone help me with this please?

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


[android-developers] Cannot add gmail account to Accounts & Sync Settings -- Eclipse 3.5.2, SDK Platform Android 2.2, API 8, revision 2

2010-08-19 Thread Rob
Using Eclipse 3.5.2, SDK Platform Android 2.2, API 8, revision 2

In Settings --> Accounts & Sync --> Add Account

I do not have the option to add anything but an Exchange Account in
the emulator.  I should be able to add a gmail account.  Am I being
stupid or is there a problem with the emulator?

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


[android-developers] Minor typo in http://source.android.com/source/git-repo.html

2010-08-19 Thread Frédéric
in "Installing Repo"

repo init command should be :
repo init -u git://android.git.kernel.org/platform/manifest.git
(space missing between 'init' and '-u')

I wasn't sure whom to send this, so I use the group.

Frédéric

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

2010-08-19 Thread Sunrain
> hi,
>
>   android how to calibrate touch screen? ?
>

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

[android-developers] Looking for a simple example

2010-08-19 Thread Donna
I would like a simple example of displaying text and a picture on the
same screen at the same time while background music is playing.  Does
someone have an example piece of code or access to a simplistic
tutorial?

Thanks in advance for your reply,
Donna

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


[android-developers] Client Certificates?

2010-08-19 Thread Sam Walker
Does Android support client certificates?

What I think I have to do, but not sure if its supported:
1. Install custom certificate authority (CA)
2. Install my client certificate
3. Use the client certificate for all communication with restricted
websites.

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

2010-08-19 Thread Konstantin
When SMS with 'special SMS message indication' identifier (bearing
'voice message waiting' and discard) arrives to Android phone, message
waiting indicator appears in status bar.
I have to get rid of this somehow.

Such SMS, however, is not dispatched to regular SMS broadcast
receiver.

Is there any other way to cancel MWI?

Thanks in advance

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


[android-developers] DOMStorage and application upgrade

2010-08-19 Thread ff
Hi I'm saving data in the DOMStorage of a WebView, but it seems that
after any application upgrade the storage is deleted. Is there a way
to make it persistent?

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

2010-08-19 Thread Nikkea

 Hi guys,
If choose eng as BUILD_VARIANT, it will install modules tagged 
with: |eng|, |debug|, |user|, and/or |development|.

Does anyone know how to check module's tag and what's the tag function?

Thanks,
Nikkea

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

[android-developers] calibrate touch screen

2010-08-19 Thread 符加
hi,

  android how to calibrate touch screen? ?

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

[android-developers] How do the font rendering work on android? Working on Indian keyboard app.

2010-08-19 Thread Sridhar
I am using Sony xperia x10 mini, android device. and i am an android
developer.

I am planning build keyboard/input app for Indian languages for the
android.

By default, android doesn't render Indian text.

I started with little R&D. I replaced DranSansFallback.ttf with a font
having Indian glyphs.

This worked but there is rendering is not perfect.

Indian languages are complex combination of vowels and consonants. And
it fails to render correctly.
For example:

"ಕ ನ್ನ ಡ"  is rendered as "ಕ ನ್ ನ ಡ".
It is readable but it should be "ಕನ್ನಡ"

I am not sure why this is happening.

Thanks for help in advance:)

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


[android-developers] Re: LVL, ServerManagedPolicy...

2010-08-19 Thread Kevin
Have you uploaded the app to market?  You don't need to publish, just
upload.

Kevin

On Aug 17, 5:51 pm, JavAnd  wrote:
> Hi John,
> I tried to test the licensing for the sample application,
> I set the public key with my publishers account's provided key.
> each time i launch the app with google apis 8 target avd I  get
>
> Error: not Market Managed,  after few tries it says dont allow the
> user to access.
>
> Can any one who over come this, help me with it asap.
> I am not sure whats going wrong.
>
> Thanks
> JavAnd
>
> On Aug 2, 1:24 pm, Trevor Johns  wrote:
>
>
>
> > If you use a test response (in other words, you're using a developer/test
> > account and have the Market publisher console set to something other than
> > "Respond Normally" for licensing requests), the server doesn't send any
> > response "extras".
>
> > This means that your local cache will expire after 1 minute -- which is the
> > minimum cache lifetime as enforced by ServerManagedPolicy.
>
> > --
> > Trevor Johns
> > Google Developer Programs, Androidhttp://developer.android.com
>
> > On Sat, Jul 31, 2010 at 3:17 PM, sblantipodi
> > wrote:
>
> > > How can we use ServerManagedPolicy in the emulator and fastly switch
> > > from licensed to unlicensed to something else?
>
> > > The first time I got the licensed message, than I'll continue to get
> > > the licensed
> > > message also if I set UNLICENSED from my developer console after I
> > > deleted and reinstalled the app on the emulator.
>
> > > Thanks.
>
> > > On Jul 31, 4:23 pm, sblantipodi  wrote:
> > > > Hi,
> > > > I'm using the ServerManagedPolicy implementation from the LVL code
> > > > sample (MainActivity.class) but I haven't understood how it manage
> > > > cache.
>
> > > > The first time application start it needs internet to validate the
> > > > license, if it is validated, how much time should pass before a second
> > > > check is needed?
>
> > > > 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 > >  ­cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en-Hide quoted text -
>
> > - Show quoted text -

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


[android-developers] Supporting multiple screens

2010-08-19 Thread Albert
Hi,

My application will have two layouts, one for large screens and one
for normal. For testing I'm working with one phone (800x480 240dpi)
and one tablet (1024x600 240dpi) but both are detected as large screen
hdpi and long aspect ratio, so I'm not able to assign different
layouts.

The only approach I think that can work is to create layout-large and
layout-normal, get the resolution and programmatically set the layout
folder. Is that possible?

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


[android-developers] How to save in SIM from an Android Application?

2010-08-19 Thread Lidy
Hello guys,

I am working on an android project and i have to save a phone number
from my application into a SIM card.
Can someone tell me if this is possible and how ?

Please help me with someone.
Lidy

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


[android-developers] Can android OS be edited?

2010-08-19 Thread Salman
Hi
friends i am working on a project that includes some editing in
android
can anyone please tell me that is it possible to edit Android source
code
i want to edit its SIM Card access.
please if anyone can help do reply me as soon as possible
my email id is
salman.invinci...@gmail.com
feathersoffree...@yahoo.com
please this is a very critical stage for me
i would really appreciate your help
Thanks
Salman 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


[android-developers] Filtering the camera preview

2010-08-19 Thread Julio Faerman
I am trying to display a filtered version of the camera preview.
The code runs without errors but the device is showing the preview
instead of the generated bitmap.

This is the code for my (very small) Activity:
http://code.google.com/p/ruellia/source/browse/ruellia/src/br/com/ximp/ruellia/RuelliaActivity.java

I suspect the view layering and the surface holder type, but so far no
luck... anyone?

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


[android-developers] Creating new calendar event not setting OnActivityResult params

2010-08-19 Thread Kris Flyer
I am trying to use the built-in Calendar Activity to create a new
event.

The code i use to start a new calendar event activity is below.

 Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setType("vnd.android.cursor.item/event");
startActivityForResult(intent, PICK_OR_CREATE_EVENT);

 The problem i am having is that the OnActivityResult method called
after saving the event has a resultcode of Activity.CANCELLED even
though the Save button was clicked and a new event was created. Also,
the Intent data param is null, which should have been the Uri to the
newly created event.


Does anyone know why the OnActivityResult behaves this way?


Thanks
Kris

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


[android-developers] Facing problem on Opening Audio device

2010-08-19 Thread Tejas
Hello All,
I am beginner to android development area. I have created
one simple application which reads pcm raw data from file and write it
to device. But when i try to open device through "default" or "hw:0,0"
it gives me following error.

"
ALSA lib external/alsa-lib/src/dlmisc.c:126:(snd_dlsym_verify) unable
to verify
version for symbol snd_config_hook_load
ALSA lib external/alsa-lib/src/conf.c:2703:(snd_config_hooks_call)
symbol snd_co
nfig_hook_load is not defined inside (null)
ALSA lib external/alsa-lib/src/conf.c:3079:(snd_config_update_r) hooks
failed, r
emoving configuration"

 My android.mk file is as folllowed.

LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES:=   \
audio_renderer_test.c   \
../src/picus_audio_renderer.c \

LOCAL_SHARED_LIBRARIES :=   \

LOCAL_MODULE:= audio_test

LOCAL_STATIC_LIBRARIES :=  asound\

LOCAL_C_INCLUDES := \
$(LOCAL_PATH)   \
$(LOCAL_PATH)/../include\

LOCAL_CFLAGS := \

include $(BUILD_EXECUTABLE)

   Please guide me and correct me if i am wrong at any
where.


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


[android-developers] rule based routing on Android

2010-08-19 Thread Tarun
Hi


Could someone please suggest how can we do rule based routing on
android?

I'm using multiple interfaces on android (so multiiple possible source
ips)  and I want packets with different source ip to have different
defaul gw.

On linux it can be done as follows:

create an entry for new table in rt_tables file
add a route to this table: ip route add default via xx.xx.xx.xx dev
eth0 table new_table
and add rule that directs to this table in certain scenario: ip rule
add from xx.xx.xx.xx table new_table

however android allows me to do the first step and gives no error in
second step. But the route is not added to new_table and instead added
to default table. If default table already contains a default route
(which it mostly does) an attempt is made to add default route to it
which fails with error "File exists".

 I know that ip route add command does read the table name because if
i give a table name that is not in rt_tables file, it gives error. But
if i give a valid table name, route is not added to it.

could u please suggest how i can add route to my new_table so i can
make rules based on it.

Thanks

Tarun

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


[android-developers] Intent from gmail app once contacts are synced.

2010-08-19 Thread Droid_bhai
Once logging in into the google account after all the contacts from
google server is synced is there any intent being broadcasted by the
google mail app which tells
that the google contacts are synced from the server?
Could someone provide some info on this...

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


[android-developers] Retransmissions from PBX after disconnecting from emulator (charging) using sipdroid

2010-08-19 Thread Ken Cross
Hi,

I'm a newbie to Android development but a very experienced developer
in the area of telephony applications.  I am working on a sip client
for Android, currently working with the Nexus One, Android 2.2 and
sipdroid 1.5.  Connectivity is via Wifi to our PBX.  I am using UDP
protocol.

My problem is this.  When the application starts, it of course
registers with the PBX (via wifi).  The REGISTER is responded with a
200 OK from the PBX and the phone is registered.  This works fine when
the phone is connected to the PC and charging.  However, as soon as I
disconnect from the PC (now running on battery), the first 200 OK for
REGISTER appears to be never received by the phone.  This causes a
retransmission of the REGISTER after 2 seconds, to which the PBX again
responds with a 200 OK which is now seen and the phone registers.

I have gone fairly deep into debugging this but as of yet have found
only dead ends.  Any help or advice would be appreciated.

I hope this is the right place to post this.  If there is a better
place, please let me know.

Thanks,

 - Ken

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


[android-developers] Can't access proximity sensor on Droid X

2010-08-19 Thread Dmitry
I'm writing an app that uses the proximity sensor, but
registerListener keeps returning false whenever I try to register to
the sensor. getDefaultSensor returns null, getSensorList returns an
empty list, but the sensor works fine during calls and according to
the log, SensorManager actually finds the sensor:

08-18 18:14:38.276  2077  2077 D SensorManager: found sensor: KXTF9 3-
axis Accelerometer, handle=0
08-18 18:14:38.276  2077  2077 D SensorManager: found sensor: AK8973 3-
axis Magnetic field sensor, handle=1
08-18 18:14:38.284  2077  2077 D SensorManager: found sensor: AK8973
Temperature sensor, handle=3
08-18 18:14:38.284  2077  2077 D SensorManager: found sensor: SFH7743
Proximity sensor, handle=4
08-18 18:14:38.284  2077  2077 D SensorManager: found sensor:
Orientation sensor, handle=2
08-18 18:14:38.284  2077  2077 D SensorManager: found sensor: Ambient
Light sensor, handle=5

I had my phone replaced due to a dead pixel and the app ran fine on
the old one, so am I missing something simple or is this a hardware
issue?

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

2010-08-19 Thread Indicator Veritatis
They have committed to including a JIT in 2.2.

On Aug 19, 11:42 am, DanH  wrote:
> Actually, I haven't seen confirmation that Dalvik even has a JIT, much
> less a "reasonably good" one.  I know it's been "talked about".
>
> But I haven't really caught up to the latest yet.
>
> On Aug 19, 12:54 pm, Amit  wrote:
>
> > Hi Dan,
>
> > Thanks for the response
>
> > > In general, JITed Java code is as fast as or faster than the
> > > equivalent native code, if the JIT is reasonably good, and if the
> > > specific application can be coded efficiently in Java.  
>
> > I was actually banking on this. I don't know too much of the hairy
> > details (am not really a compiler person), but from what I have read
> > recent improvements by Google to the Dalvik VM make it *comparable* if
> > not equal in performance to native code ...
>
> > Hate to sound like I'm harping on the same stuff, but then (assuming
> > that the JVM/JIT compiler is doing good enough), the memory bottleneck
> > still remains.
>
> > Thanks,
> > Amit
>
> > On Aug 19, 10:11 pm, DanH  wrote:
>
> > > In general, JITed Java code is as fast as or faster than the
> > > equivalent native code, if the JIT is reasonably good, and if the
> > > specific application can be coded efficiently in Java.  The problem is
> > > that some specific data processing patterns are not easy to code
> > > efficiently in Java, and I suspect that certain of the bit-bashing
> > > algorithms used in image processing fall into this category.
>
> > > In such cases the most efficient approach is "native Java", but I only
> > > know of one JVM (the IBM iSeries "classic" JVM) that permits this, and
> > > then only for system code.  Otherwise it's a bit of a tradeoff to get
> > > the right partitioning between Java and native, since crossing the
> > > Java/native boundary tends to be relatively expensive.
>
> > > On Aug 19, 7:03 am, Fabrizio Giudici 
> > > wrote:
>
> > > > -BEGIN PGP SIGNED MESSAGE-
> > > > Hash: SHA1
>
> > > > On 8/19/10 13:35 , Amit wrote:
>
> > > > > Now, I know that native code will *not* yield any significant
> > > > > performance improvement over Java code
>
> > > > Well, specifically for image processing this won't be true, for sure
> > > > up to 2.1 included (as the bytecode is purely interpreted); in 2.2 we
> > > > have JIT, but can't speak as I haven't seen it yet.
>
> > > > - --
> > > > Fabrizio Giudici - Java Architect, Project Manager
> > > > Tidalwave s.a.s. - "We make Java work. Everywhere."
> > > > java.net/blog/fabriziogiudici -www.tidalwave.it/people
> > > > fabrizio.giud...@tidalwave.it
> > > > -BEGIN PGP SIGNATURE-
> > > > Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
> > > > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org/
>
> > > > iEYEARECAAYFAkxtHakACgkQeDweFqgUGxe83wCfSDP1NEN+TLD0iOCZ/zSvQDRw
> > > > I5cAoJOEoC7eREU5KuPU7m93/GDj9VUr
> > > > =2ZDf
> > > > -END PGP SIGNATURE-
>
>

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

2010-08-19 Thread Indicator Veritatis
I leave it as an exercise for the reader to establish whether it is
efficient or convenient to do so, but the graphics.Matrix class
certainly can be used to implement linear filtering operations (e.g,
IIR, FIR). I am also sure that the class would be much more convenient
if it would support arbitrary matrices instead of only 3x3!

That said, clearly the graphics.Matrix class was not designed for
this: it was designed for the linear transformations most commonly
used in 2D graphics, that is, those of homogeneous coordinates for a
two-dimensional space (so that all geometric transformations can be
represented by linear transformations).

On Aug 19, 9:26 am, Daniel Drozdzewski 
wrote:
> On Aug 19, 4:20 pm, Amit  wrote:
>
>
>
> > Hi Daniel,
>
> > Thanks for the response.
>
> > You are correct about the pitfalls of using the NDK.
>
> > However, the primary reason that I am using the NDK is pretty much the
> > same as is mentioned in the NDK documentation. That is, legacy code.
>
> > Well, not quite, but the thing is that I have two development
> > branches: for the PC and for the actual Android target. What I am
> > doing is that since the debugging support is better on the PC, I try
> > in new features (or algorithm optimizations) on the PC branch, and
> > then on the Android branch. What the NDK helps me to do is to
> > essentially use the same source for the Android branch. I do this by
> > restricting myself to the headers for which support is stable (libc,
> > math, etc. as documented by Google) and using #define switches for X86
> > and ARM code.
>
> > So your point is well taken, but using the NDK is helping me cut down
> > on development time.
>
> > About the operations, the operations are basically filtering kind of
> > operations. But my guess is that the processor stalls are causing the
> > overall application to drag. Not in terms of responsiveness, as the
> > computation runs as separate thread (not on the UI thread). But I
> > would like the results of the processing to be available in a certain
> > time due to UX constraints.
>
> > However, I will check out your suggestion about the Matrix class/
> > package. Haven't used it before, so I'll check it out.
>
> Matrix can be used in conjunction with Bitmap class to do coordinates
> transformations (perspective changes, skew, scale, ...) so no
> filtering unfortunately.
>
> Thanks for explaining further the nature of the problem. I don't think
> I will be able to help (only basic graphical transformations done so
> far), but I will definately keep eye on this thread as it is very
> intresesting.
> The only things that I can think of now are:
> - Are you calling native code with each iteration, or is the whole of
> that loop in native code? Crossing Java <-> JNI boundaries costs time.
> - Also did you look at DDMS for memory alocations and garbage
> collections on both emulator and the actual platform? With any
> alocations within the loop and the number of pixels in a modest
> picture, it will cost.
> - Lastly: would you find use for Flyweight Java pattern that avoids
> exactly allocations/dealocations?
>
> Good luck and please keep us posted!
>
> Daniel

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

2010-08-19 Thread TreKing
On Thu, Aug 19, 2010 at 4:41 PM, Natalie Hooper <
nataliehoo...@virginmedia.com> wrote:

> This is a good point but doesn't it mean that rather than asking for a
> longer description field, we should ask for other features, such as a
> changelog, a way to respond to comments, a technical note field for example?
>

No, it means that we should be asking for these other features AS WELL.


> There is no point insulting me by saying my apps must be simple because I
> can describe them in 3 sentences.
>

I said your apps must not be very complicated - in no way was that meant as
an insult. A simple app is *a good thing*.


> My point is a DESCRIPTION should be short.
>

My points are:
* the Android Market "description" field is much, much more than just a
description
* users and developers should simply have the CHOICE of how much they want
to say / read in these descriptions
* even the clueless individuals running the Market should be able to handle
incrementing this limit which would then *EASILY* solve many of the other
complaints (changelog, technical stuff, quick response to comments, etc)

You like the 325 character limit? Great. If we had more space, you wouldn't
be forced to use it all, nor would you be forced to read all of the text a
developer posted. So keep posting 325 character descriptions and only read
that much. Some of us, though, would love the *option* to say and read a
little more.

Again why I suggested the "read more" idea. A 325 character DESCRIPTION,
nice and short how you like, with the *option* to go into detail.

 This is why there should be a "technical note" field (where you could also
> describe hardware limitations for example) and I'd rather ask for that than
> for a longer description field.
>

What's the point of adding another, separate field for "technical notes"
instead of just extending the description space and using that and saying:
"Technical Note: Don't be a dumbass" (or whatever).

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Change Update Time of MyLocationOverlay

2010-08-19 Thread Taylor Perkins
At this point, its probably just easier to make my own MyLocationOverlay
class -- open source it -- and then let google just patch their own code
with mine.



On Thu, Aug 19, 2010 at 14:47, TreKing  wrote:

> On Thu, Aug 19, 2010 at 4:40 PM, Taylor Perkins wrote:
>
>> For future users, it seems that disableMyLocation removes the overlay from
>> the map -- and then proceeds to stop the locationManager from updaing.
>
>
> In that case you could probably manually re-insert the overlay into the
> MapView after calling disableMyLocation. This is of course way into hack-job
> land, but I think you crossed that border a few posts ago =P
>
>
> -
> 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
>

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

[android-developers] Server error on checkout for paid app via Google Checkout

2010-08-19 Thread Chris Stewart
I've been getting more and more reports of this issue.  While my experience
is limited, I've found nothing but troubles with Google Checkout.  I'm
beyond shocked that so many people are having this problem and are unable to
buy applications from the Market.

Support Forum Thread:
http://www.google.com/support/forum/p/Android+Market/thread?tid=33dbf92eca99b2b7&hl=en

Google Code Issue: Issue 10261: Multiple users getting Server Error when
purchasing apps in Android Market
http://code.google.com/p/android/issues/detail?id=10261

--
Chris Stewart
http://chriswstewart.com

Fantasy 
Football-
Android app for fantasy football fanatics and MFL owners
Social Updater-
An easy way to send your status blast to multiple social networks

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

2010-08-19 Thread String
Absolutely agree, and that's kind of my point. If the Market was more
full featured, 325 chars for just the "description" would probably be
fine. As it stands, though, it's woefully inadequate.

I can imagine that there might be obstacles to adding tags, or comment
replies, or most of the other features. I CAN'T imagine that
increasing the description size could be very difficult, and that
would be a short-term solution.

Oh, and I forgot one in my earlier list:
- The obligatory "Any bugs? Please EMAIL me!", because users seem to
think that I can debug from a comment like "Force closes on Droid.
1*"  o_O

String

On Aug 19, 10:41 pm, Natalie Hooper 
wrote:
> 2010/8/19 String 
>
> > It's also that, with the other shortcomings of the Market, you need to
> > use your 325 characters to:
> > - describe what's new in the latest version
> > - respond to comments
> > - give special instructions that users may need the first time they
> > run your app
> > - mention hardware limitations
> > - describe this app's relationship to other apps you sell
> >  ...and more.
>
> This is a good point but doesn't it mean that rather than asking for a
> longer description field, we should ask for other features, such as a
> changelog, a way to respond to comments, a technical note field for example?
>
> As I said, I think the market needs improving. I, for one, would like
> tagging because categories are too restrictive. There is no point insulting
> me by saying my apps must be simple because I can describe them in 3
> sentences. My point is a DESCRIPTION should be short. However, we need other
> features to be able to convey all the information we want to/have to for
> users to be able to fully enjoy the app (technical stuff, changelog etc) and
> to be able to interact with users (responding to comments, changelog etc).
>
> For example, one of my apps is a soft keyboard and I have to use one
> sentence to explain to people how to select it as their default soft
> keyboard (not all users understand how all the settings work). This is why
> there should be a "technical note" field (where you could also describe
> hardware limitations for example) and I'd rather ask for that than for a
> longer description field.
>
> As for other languages, yes, I agree, Google should adapt to local
> particularities of languages and if 325 characters is too low a limit in
> russian, then they should set another limit for it. It's all part of
> localization.

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

2010-08-19 Thread TreKing
On Thu, Aug 19, 2010 at 4:40 PM, Taylor Perkins  wrote:

> For future users, it seems that disableMyLocation removes the overlay from
> the map -- and then proceeds to stop the locationManager from updaing.


In that case you could probably manually re-insert the overlay into the
MapView after calling disableMyLocation. This is of course way into hack-job
land, but I think you crossed that border a few posts ago =P

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-19 Thread Maps.Huge.Info (Maps API Guru)
Perhaps Suzanne was thinking about another country... it certainly is
out in the USA.

-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


Re: [android-developers] Re: Paid vs Free, My Early Experience

2010-08-19 Thread Natalie Hooper
2010/8/19 String 

> It's also that, with the other shortcomings of the Market, you need to
> use your 325 characters to:
> - describe what's new in the latest version
> - respond to comments
> - give special instructions that users may need the first time they
> run your app
> - mention hardware limitations
> - describe this app's relationship to other apps you sell
>  ...and more.
>
>
>
>
This is a good point but doesn't it mean that rather than asking for a
longer description field, we should ask for other features, such as a
changelog, a way to respond to comments, a technical note field for example?

As I said, I think the market needs improving. I, for one, would like
tagging because categories are too restrictive. There is no point insulting
me by saying my apps must be simple because I can describe them in 3
sentences. My point is a DESCRIPTION should be short. However, we need other
features to be able to convey all the information we want to/have to for
users to be able to fully enjoy the app (technical stuff, changelog etc) and
to be able to interact with users (responding to comments, changelog etc).

For example, one of my apps is a soft keyboard and I have to use one
sentence to explain to people how to select it as their default soft
keyboard (not all users understand how all the settings work). This is why
there should be a "technical note" field (where you could also describe
hardware limitations for example) and I'd rather ask for that than for a
longer description field.

As for other languages, yes, I agree, Google should adapt to local
particularities of languages and if 325 characters is too low a limit in
russian, then they should set another limit for it. It's all part of
localization.

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

2010-08-19 Thread Taylor Perkins
For future users, it seems that disableMyLocation removes the overlay from
the map -- and then proceeds to stop the locationManager from updaing.




On Thu, Aug 19, 2010 at 14:11, Taylor Perkins  wrote:

>
> Try not calling super. If it still doesn't work, drawMyLocation might be
> checking if it's enabled before drawing, in which case you're SOL. At that
> point it's time to draw the overlay yourself.
>
> Seems like I'm SOL. This is the final code I tested on -- and it did not
> redraw the overlay .
>
>
>
>
>
> On Thu, Aug 19, 2010 at 13:08, TreKing  wrote:
>
>> On Thu, Aug 19, 2010 at 2:52 PM, Taylor Perkins wrote:
>>
>>> Specifically look at the draw method -- I think thats what is supposed to
>>> be going on right?
>>
>>
>> Try not calling super. If it still doesn't work, drawMyLocation might be
>> checking if it's enabled before drawing, in which case you're SOL. At that
>> point it's time to draw the overlay yourself.
>>
>>
>> -
>> 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
>>
>
>

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

2010-08-19 Thread Fabrizio Giudici

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/19/10 18:12 , TreKing wrote:
>
> I also respond to user comments in the app itself. Not much more
> you can do.
BTW, does this mean that you reply to the comments in the Market? I'm
only aware that I can post a single comment after giving some stars -
are there other ways?


- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkxtpMoACgkQeDweFqgUGxd2jgCeO1awq36tTvOLQlaoqy8hW0ey
nuUAnRfS89yRDRZcf9BTHSDb1M+jZfxo
=Zgfl
-END PGP SIGNATURE-

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


[android-developers] Sending EMAIL

2010-08-19 Thread lloyd1949
Hi guys:
I have a situation where I allow the user to email a number of
documents from my app. The problem is that one request may result in
the sending of 3 or 4 emails. Ideally I would like to get all the SEND
info at the beginning and at a minimum populate all the fields so that
all the user has to do is hit SEND for the 2nd, 3rd, 4th etc email.

All is fine except that the email client seems to accept the email
address only when typed in manually: Below is a snippet of my email
routine:

private boolean emailInfo(File filename, String subject, String
body) {
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TITLE, "Extra Title");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "subject");
sendIntent.putExtra(Intent.EXTRA_EMAIL, "theem...@comcast.net");
sendIntent.putExtra(Intent.EXTRA_TEXT, "body");
sendIntent.setType("text/csv");
sendIntent.putExtra(Intent.EXTRA_STREAM,
Uri.fromFile(filename));
sendIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
//startActivityForResult(Intent.createChooser(sendIntent, "Select
Mail Client"),101);
startActivityForResult(sendIntent,101);
return true;
}


The email address that I pass via:
sendIntent.putExtra(Intent.EXTRA_EMAIL, "theem...@comcast.net");
is always ignored and so it has to be manually entered on each email.


Any solution? Thanks in advance.

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


[android-developers] How to manipulate order of views in a viewgroup using drag'n'drop

2010-08-19 Thread Per-Jarle Sæther
Hi all
I want to develop an application that contains 4 views in one viewgroup

The following interactions shall be possible:

   1. change ordering
  - When you drag a finger from one view to another, the two views shall
  swap
   2. maximize one view
  - When you click on one view, it shall maximize (remove other 3 views)
  - when maximized, a single touch shall give back the quad view
  3. Start rotation between maximized views
  - When push and hold, it shall start rotation between all views
  showing one maximized at a time in the same order as the views are
  organized.
  - When rotation running, a single touch should give back the quad view

I would be thankful if someone can give me some hints how to accomplish
this. If possible with some sample code

Best regards
Per-Jarle

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Settings.Secure.ANDROID_ID not unique on DROID2?

2010-08-19 Thread String
On Aug 19, 9:54 pm, "suzanne.alexandra"
 wrote:

> To confirm, the DROID 2 is not yet released.

Excuse me? By all accounts, the Droid 2 was released last week.

"the Droid 2 is now up for sale on Verizon" (Aug 11)
http://www.engadget.com/2010/08/11/verizon-droid-2-sales-begin/

"the Droid 2, which recently launched on Verizon's network"
http://arstechnica.com/gadgets/reviews/2010/08/hands-on-motorolas-droid-sequel-is-a-worthy-update.ars

And here it is, available now at VZW:
http://www.verizonwireless.com/b2c/store/controller?item=phoneFirst&action=viewPhoneDetail&selectedPhoneId=5429&capId=142&phoneTopRated=

String

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

2010-08-19 Thread Mark Murphy
On Thu, Aug 19, 2010 at 5:00 PM, Sergey  wrote:
> I need to process words on which user clicked (touched) in the
> TextView.

Create one TextView per word.

> But there seems to be no way to figure out which word was
> clicked.

That's probably correct.

> TextView.getSelectionStart() always returns 0 even if I use
> setMovementMethod(ScrollingMovementMethod.getInstance());

TextView does not support selection, AFAIK.

-- 
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.1 Available!

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


  1   2   3   >