Re: [android-developers] Re: Progress dialog question/problem (API Demos example)

2010-04-04 Thread ~ TreKing
On Sat, Apr 3, 2010 at 9:39 PM, Kumar Bibek coomar@gmail.com wrote:

 So, before orientation change and after orientation change, you need to
 save the state of your dialog and then recreate it.


If you use showDialog(), which it looks like the OP is using, you don't have
to save the dialog's state - this is handled by the Activity.

OP - where are you setting up and calling your handler? My guess it's not
being re-initialized or, if it is, whatever is posting messages to it isn't
restarted.

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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: How to Launch Contact application displaying multiple phone numbers?

2010-04-04 Thread AJ
Any help is really appreciated

Thanks
AJ

On Apr 3, 7:00 pm, AJ ajeet.invinci...@gmail.com wrote:
 Hi group

 Now I am able to insert 3 phone numbers.

 But There does not looks a way that How can I enter other phone
 numbers like :- Work Fax, Home Fax, Pager etc.

 Any clue please.

 Here is the code what I have done:-

   1- How can I show multiple phone number [like Home, Mobile, Work etc]
   when I am launching contact application. How can I do that?

 
 i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE,
 22);
 i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE,ContactsContract.CommonDataKinds.Phone.TYPE_HOME);

 i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE,  33);
 i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE,ContactsContract.CommonDataKinds.Phone.TYPE_WORK);

 --

 On Apr 3, 6:30 pm, AJ ajeet.invinci...@gmail.com wrote:

  Any clues from experts.

  - AJ

  On Apr 3, 3:51 pm, AJ ajeet.invinci...@gmail.com wrote:

   Hi Group,

   I am able to launch contact application from the following way. I am
   also able to show Name and only one Phone number. My problem is :-

   1- How can I show multiple phone number [like Home, Mobile, Work etc]
   when I am launching contact application. How can I do that?
   2- In Contact application there is one option *More*, which is an
   expandable list. When I click that it open with other many fields like
   Notes, Website, Nicknam etc. How can I fill those fields while
   launching the Contact application?

   My code is as follows :-

    Code
   
   Intent intent = new Intent(Intent.ACTION_INSERT, People.CONTENT_URI);

   intent.putExtra(Contacts.Intents.Insert.NAME, mFullName);

   intent.putExtra(Contacts.Intents.Insert.PHONE, mPhoneMob);
   intent.putExtra(Contacts.Intents.Insert.PHONE_TYPE,
   Contacts.PhonesColumns.TYPE_MOBILE);
   startActivity(intent);
    Code
   

   Any help is really appreciated.
   Thanks,
   AJ

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Reusable Android library packaging: interest?

2010-04-04 Thread Manfred Moser
I like the idea and as far as I know this is already possible to some
extend by using the Maven Android Plugin. However this is really a
suboptimal way in terms of component reuse on the device. Ideally it
would even go further and get to a stage where a app could declare a
dependency to a widget, library, intent or whatever and some central
repository would be providing it for download.

This would be similar to how e.g maven treats dependencies and
downloads them on the fly when needed or even closer to Android how
Linux package management systems like apt or rpm handle dependencies.
The only problem with this approach is that it requires a strong open
source  community supporting the distribtution mechanism and at thist
age I have my doubts this could be achieved on Android. Would be great
though!

manfred

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Device Seeding Program for Top Android Market Developers

2010-04-04 Thread Jeremy Logan
Nevermind... it turns Verizon has just never heard of the phone and,
thus, doesn't have the free 30-day info.


On Apr 3, 3:07 pm, Jeremy Logan jeremy.lo...@gmail.com wrote:
 Where are you guys entering *228? I'm stuck on the activate screen.

 On Apr 1, 8:17 am, Wicked96SS 45gl...@gmail.com wrote:

  On Mar 31, 8:28 am, Justin Giles jtgi...@gmail.com wrote:

   On Tue, Mar 30, 2010 at 11:48 PM, Jason arm...@gmail.com wrote:
I received a Droid and I did not see the Read Me First leaflet that
was referenced in the Getting Started on Droid - Activation section of
the letter. Anyone else who got a Droid know what it looks like, where
it was packed or what it said?

   I too received a Droid and I didn't get a Read Me First leaflet.  Not 
   sure
   what channel to go through to activate this thing so I can get the 2.1
   update coming any day now.

  I got mine yesterday, and did not get the leaflet either.  I just
  dialed *228 and did what it told me, and my droid is now activated.

  give that a try!



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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] drawText and drawBitmap start location is different?

2010-04-04 Thread SoftwareForMe.com SoftwareForMe.com
I don't recall the exact details in Android, but in almost all graphics APIs
the Y position for text is either the [baseline] (bottom of a letter 'o' or
'n') or [baseline + descent] (bottom of the letter 'g' or 'y').  In other
words, (x,y) for bitmaps is top-left, (x,y) for text is lower left.

A quick experiment would tell you whether it's the baseline or baseline +
descent.

On Sat, Apr 3, 2010 at 11:25 PM, Stanley Li junpin1...@gmail.com wrote:

 Hi all,

 I want to draw a text on top of a bitmap.

 So in my onDraw function, i do the following:

 canvas.drawBitmap(myBitmap, 30, 30, mPaint);
 textPaint.setTextSize(20);
 canvas.drawText(Life X 3, 30, 30, textPaint);

 However, it ended up that the text is above the bitmap. (the X position is
 correct, but the y position is not).

 Can anyone help me with this?

 Thanks in advance,
 Stanley

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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] SMS number

2010-04-04 Thread perumal316
Hi,

Is there any record in Android which keep track of all the numbers to
which SMSes are send? Because for the application I am writing I want
to display the record if possible.

Is there any way I can access and display the numbers SMSes has been
send to?

Thanks In Advance,
Perumal

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

To unsubscribe, reply using remove me as the subject.


[android-developers] help needed in integration of facebook api with android [plz answe my confusion in the sample code given]

2010-04-04 Thread wahib.t...@gmail.com
Hello experts !
I am trying hard for many days to implement authentication facility in
my app by facebuk login id. I tried with fbconnect api but it wasnt
working. I got this code and tried . It works fine on version 1.6 and
connects to my facebook application. But i just need to ensure if
login is successful then it should return to my local app activity.

if it feels odd understanding the code then here is the link ...

http://forum.developers.facebook.com/viewtopic.php?pid=146956

I am still a beginner and takes a little while to understand code :S
up to my understanding there is a class fConnect created by author
which make http posts requests to facebook api.

Confusions:
1) why is xd_receiver link is required ? its imp to understand because
its used in the onPagestarted() function in facebookwebview client
class in Connection.java. There is an if condition for
page.getPath().equals(/connect/xd_receiver.htm  when its true a
session is created and Intent is called for the intended activity in
the application. Thats what i want to do.

Problem:
there is no getsetting() function implemented in the FConnect class :S
if the author has done it i might have been able to run it correctly.
Kindly guide me about working of this function so that i can implement
it myself.

Creating a User Class
Code:

public class User {
publicString uid;
publicString name;
publicString picUrl;
}

Of course you can add some fields here, but I didn't have any use of
the others.

2°) Creating the WebView
facebook_connect.xml
Code:

?xml version=1.0 encoding=utf-8?
ScrollView xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=fill_parent
android:background=#ff
android:scrollbars=none
WebView
android:id=@+id/facebookview
android:layout_width=fill_parent
android:layout_height=fill_parent
/
/ScrollView

Connection.java
Code:

public class Connection extends Activity {
FConnectfConnect;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.facebook_connect);

Toast.makeText(getBaseContext(), R.string.allow_facebook,
Toast.LENGTH_LONG).show();
WebViewwebview;
webview = (WebView) findViewById(R.id.facebookview);
webview.getSettings().setJavaScriptEnabled(true);
webview.setWebViewClient(new FacebookWebViewClient());
fConnect = new FConnect(this);
webview.loadUrl(http://www.connect.facebook.com/login.php?
return_session=1nochrome=1fbconnect=1extern=2connect_display=popupapi_key=+FConnect.API_KEY
+v=1.0next=+FConnect.XD_RECEIVER+%3Ffb_login%26fname
%3D_openercancel_url=+FConnect.XD_RECEIVER+%23fname%3D_opener
%26%257B%2522t%2522%253A3%252C%2522h%2522%253A%2522fbCancelLogin
%2522%252C%2522sid%2522%253A
%25220.741%2522%257Dchannel_url=+FConnect.XD_RECEIVER);
}

private class FacebookWebViewClient extends WebViewClient {
@Override
public void onPageStarted(WebView view, String url, Bitmap
favicon) {
super.onPageStarted(view, url, favicon);

try {
StringsubUrl = URLDecoder.decode(url).trim();
URLpage = new URL(subUrl);
if (page.getPath().equals(/connect/xd_receiver.htm))
{
subUrl = subUrl.substring(subUrl.indexOf({) + 1,
subUrl.indexOf(}));
fConnect.createSession(subUrl);
ListUser user =
fConnect.getUserInfo(fConnect.getSetting(uid));
Toast.makeText(getBaseContext(), Welcome,
+user.get(0).name+, you're now connected !,
Toast.LENGTH_LONG).show();
Intentintent = new Intent(getBaseContext(),
Base.class); //The next Activity to call
startActivity(intent);
finish();
}
} catch (Exception e) {
Toast.makeText(getBaseContext(), R.string.url_parsing,
Toast.LENGTH_LONG).show();
}
}
}
}

3°) Creating a FConnect Class
Code:

public class FConnect {
static publicfinal StringSECRET = your secret key;
static publicfinal StringAPI_KEY = your api key;
static publicfinal StringXD_RECEIVER = http:// link to
your xd receiver.htm file;

privatefinal Stringv = 1.0;
privatefinal Stringformat = JSON;
privatefinal Stringserver = http://api.facebook.com/
restserver.php;

static publicfinal StringPREF_NAME = Your application
name;
static publicfinal String[]PREF_VALUES = {session_key,
uid, expires, secret, sig};

privateSharedPreferencessettings;
Context ctx;

public FConnect(Context context) {
ctx = context;
settings = context.getSharedPreferences(PREF_NAME, 0);
}

//Getting the GET information after 

Re: [android-developers] plotting Market sales - determining if your android work is profitable

2010-04-04 Thread Karl Ostmo
The script grabs the cookie from an authenticated session with Google
Checkout before downloading the purchase records, which requires that the
user enter their password.  It's probably better that the passwords are not
transmitted to my system.

To run the script yourself, you just need an Ubuntu installation running
somewhere.  It's easy enough to set one up - if you don't want to install it
on a new partition, you can use Wubi (
http://en.wikipedia.org/wiki/Wubi_%28Ubuntu_installer%29) to install it from
Windows, or host an Ubuntu virtual machine inside Windows with VMWare or
VirtualBox.

I may eventually write an Android app that does the same thing as the
script, but the available Python libraries make the task much easier.

Karl

On Sun, Apr 4, 2010 at 12:16 AM, Kevin Duffey andjar...@gmail.com wrote:

 Maybe you can host that somewhere and allow people to put in their info to
 check it?

 On Sat, Apr 3, 2010 at 10:54 PM, kostmo kos...@gmail.com wrote:

 I thought I'd share a script that I've been working on:
 http://www.anddev.org/viewtopic.php?p=30732

 It lets you generate parameterizable histograms of Android Market
 sales by automatically downloading data from Google Checkout.

 Hope someone finds it useful.

 Karl

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

 To unsubscribe, reply using remove me as the subject.


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

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

[android-developers] Re: 2-D Graphics Performance after Motorola Droid 2.1 Update

2010-04-04 Thread Michele Scorcia
Hi,
I modified the Phil's LagTest to run in parallel a busy thread that
just forces the cpu to run at full speed.
With this test on my Nexus One and my G1 the fps is constantly at
60fps. A waste of cpu but just for testing.
It's interesting to see, using the profiler, the scheduling of the
drawing and the busy thread.

In the test I also removed the String.format because it causes a lot
af GC and false the test a bit and I write only the current fps.

If someone want to try the modified test on its phone the links are:

LagTest.apk: 
http://docs.google.com/leaf?id=0B7nVA-pXaubcY2MwZWE2MWQtNTU4ZS00ZDI2LTgzMmUtNmRjM2EyZWRhY2Yyhl=enbrowserok=true
LagTest.tgz: 
http://docs.google.com/leaf?id=0B7nVA-pXaubcNWY3ZDE0ZDQtM2ZjZS00NzA0LWFmNzItYmI2YjRhMGUyMDk0hl=enbrowserok=true

Bye
Michele

On Apr 3, 3:40 pm, Michele Scorcia michele.scor...@gmail.com wrote:
 Hi,
 did you check the cpu frequency on both phones while the test was
 running?
 You can from the shell on the phone run the following command that
 check the frequency every second:
 while true; do cat /sys/devices/system/cpu/cpu0/cpufreq/
 scaling_cur_freq; sleep 1; done

 Maybe they have done some optimization on the 2d graphics part that
 makes everything use less cpu and as a side effect the cpu governor
 lower the cpu frequency in response of the lower cpu need. Maybe the
 cpu and the 2d hardware frequencies are related each others.

 I own a Nexus One and not a Droid but some 3D tests that make an
 intensive use of the gpu but not of the cpu run with higher frame
 rates if I do something that keep the cpu busy just to keep the cpu
 freq high (just as a test).

 On my Nexus One your test gives the following results and the fps is
 not steady but really variable:
 avg=53 min=35 max=70

 Bye
 Michele

 On Apr 2, 7:29 pm, Phil tesujiga...@gmail.com wrote:

  I have observed a marked difference in frame rate of 2-D (Canvas)
  graphics following a 2.1 update on the Motorola Droid. Details are
  here:

 http://tesujigames.blogspot.com/2010/04/2-d-graphics-slowdown-after-m...

  Can anyone else corroborate this?  I have posted the code and an apk
  in the above blog entry.

  Also, it would be interesting to know whether there is a difference
  between manual and OTA updates.

  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: Fastest and most reliable Location provider

2010-04-04 Thread patbenatar
Bob- You're absolutely right. The phone will continue to be a phone,
so the Network listener really isn't an energy consumer as its always
connected to towers. Great analysis, thanks! You say simplicity is
probably the best approach here--my main goal is to get a location as
fast as possible, whether it be network or GPS, then hope we can
eventually get a GPS update, but without one it will be OK.. Do you
think my approach will be just as fast as running two side-by-side
listeners?

Ning- This isn't really a concern for me as the lifetime of my app is
not very long.. I couldn't imagine a user running my app in the
foreground for a day or so as in your application.

Thanks for all the feedback, you guys are great help!
-Nick


On Apr 3, 5:21 pm, Ning zeeg...@gmail.com wrote:
 On Apr 3, 2:39 am, patbenatar patbena...@gmail.com wrote:





  Hey all who are interested in this topic-

  I have taken John's above advice and modified it into what I believe
  is a more efficient way to be doing this [although the efficiency of
  my method is only evident if you're going to to ensure updates from
  either provider throughout the life of your app]. Please let me know
  your thoughts on this method:

  Rather than running both listeners side-by-side as John suggested
  above, I am first running a GPS listener and then within that
  listener's onProviderDisabled and onStatusChanged [only if the status
  is OUT_OF_SERVICE or TEMPORARILY_UNAVAILABLE] I am requesting updates
  from a Network listener [and of course setting a networkOn=true flag
  so I don't turn it on twice or anything]. Then the Network takes over
  [while GPS listener remains running] until onStatusChanged() in the
  GPS listener gets an AVAILABLE status at which point I turn off the
  Network listener [and mark the flag accordingly] and allow the GPS to
  do its thing.

 Apparently, my reply didn't go to the public list because I habitually
 hit 'a' when I tried to reply all in Google Groups, which does not do
 the job.

 I have been using this approach for a while. There are two problems
 with it. The first one is that GPS takes a while to get the first fix.
 The second one is power consumption. My program is set to get update
 every 5 minutes or 200 meters. After a day or so when I checked the
 battery usage, it had raised to the top of the list, consuming some
 30% of all power consumed during that period. So I switched to using
 network location only, and my program disappeared from the list.

 So my opinion on this is that unless absolutely necessary, I won't use
 GPS as location provider frequently. It will drain the battery very
 fast.

 --
 Ning

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Announcing RoboGuice 1.0

2010-04-04 Thread Matthias
I was thinking about using Guice myself before, but hesitated fearing
to make the overall sluggishness of the platform even worse.

How much of an overhead are talking about in terms of memory footprint
and size of bundled libraries? Any noticeable impacts on speed or
battery life? How often does Guice kick in in the background?

I'm currently stepping back from overly abstract programming models on
Android because of exactly these issues.

On Mar 29, 8:53 pm, Michael Burton m...@niskala.org wrote:
 Hello Android developers,

 I'd like to announce the final release of RoboGuice 1.0!

 http://code.google.com/p/roboguice

 RoboGuice is a framework that brings the simplicity and ease of Dependency 
 Injection to Android, using Google's own Guice library.  If you've ever used 
 Spring (the #1 enterprise framework on Java, now more popular than J2EE 
 itself) or Guice, you already know how convenient this style of programming 
 can be.

 To give you an idea, take a look at this simple example of a typical Android 
 activity:

 class AndroidWay extends Activity {
     TextView name;
     ImageView thumbnail;
     LocationManager loc;
     Drawable icon;
     String myName;

     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         name      = (TextView) findViewById(R.id.name);
         thumbnail = (ImageView) findViewById(R.id.thumbnail);
         loc       = (LocationManager) 
 getSystemService(Activity.LOCATION_SERVICE);
         icon      = getResources().getDrawable(R.drawable.icon);
         myName    = getString(R.string.app_name);
         name.setText( Hello,  + myName );
     }

 }

 This example is 18 lines of code.  If you're trying to read through 
 onCreate(), you have to skip over 5 lines of boilerplate initialization to 
 find the only one that really matters: name.setText().  And complex 
 activities can end up with a lot more of this sort of initialization code.

 Compare this to the same app, written using RoboGuice:

 class RoboWay extends GuiceActivity {
     @InjectView(R.id.name)             TextView name;
     @InjectView(R.id.thumbnail)        ImageView thumbnail;
     @InjectResource(R.drawable.icon)   Drawable icon;
     @InjectResource(R.string.app_name) String myName;
     @Inject                            LocationManager loc;

     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         name.setText( Hello,  + myName );
     }

 }

 In this example, onCreate() is much easier to take in at a glance.  All the 
 platform boilerplate is stripped away and you're left with just your own 
 app's business logic.  Do you need a SystemService?  Inject one.  Do you need 
 a View or Resource?  Inject those, too, and RoboGuice will take care of the 
 details.  

 RoboGuice's goal is to make your code be about your app, rather than be about 
 all the initialization and lifecycle code you typically have to maintain in 
 Android.

 RoboGuice has been in development since August 2009, and 0.9 entered release 
 candidacy in December and has been stabilizing ever since. After three months 
 and a few finishing touches, we now believe it's ready to expose to a larger 
 audience.

 We know that RoboGuice won't be for everybody.  Although RoboGuice never 
 prevents you from doing things the Android way, some people will still prefer 
 seeing everything spelled out explicitly in their code.  And other people who 
 write extremely high performance applications such as games may not want to 
 incur the small overhead imposed by yet another framework.  But for people 
 who want to build simple and straightforward code that's easily testable and 
 easy to read, I encourage you to give RoboGuice a try.

 We hope you like it.  Stop by our discussion forums if you'd like to have any 
 help getting started.

 Cheers,
 Mike

 PS. We're beginning work on RoboGuice 1.1 now, which will include more 
 injectible objects, better unit testing support, and hopefully some general 
 usability improvements as well.  I'd love to hear your thoughts on other 
 things you'd like to see in the next release.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: 2-D Graphics Performance after Motorola Droid 2.1 Update

2010-04-04 Thread patbenatar
Whoa.. Had no idea about the official 2.1 update. I rooted and
installed CM after the little snafoo a few weeks back with Motorola
pushing off the update again.. Glad to hear 2.1 is now officially on
the Droid!! Is it the complete Nexus One version? What features does
it have/lack?

-Nick



On Apr 4, 1:45 am, Michele Scorcia michele.scor...@gmail.com wrote:
 Hi,
 I modified the Phil's LagTest to run in parallel a busy thread that
 just forces the cpu to run at full speed.
 With this test on my Nexus One and my G1 the fps is constantly at
 60fps. A waste of cpu but just for testing.
 It's interesting to see, using the profiler, the scheduling of the
 drawing and the busy thread.

 In the test I also removed the String.format because it causes a lot
 af GC and false the test a bit and I write only the current fps.

 If someone want to try the modified test on its phone the links are:

 LagTest.apk:http://docs.google.com/leaf?id=0B7nVA-pXaubcY2MwZWE2MWQtNTU4ZS00ZDI2L...
 LagTest.tgz:http://docs.google.com/leaf?id=0B7nVA-pXaubcNWY3ZDE0ZDQtM2ZjZS00NzA0L...

 Bye
 Michele

 On Apr 3, 3:40 pm, Michele Scorcia michele.scor...@gmail.com wrote:



  Hi,
  did you check the cpu frequency on both phones while the test was
  running?
  You can from the shell on the phone run the following command that
  check the frequency every second:
  while true; do cat /sys/devices/system/cpu/cpu0/cpufreq/
  scaling_cur_freq; sleep 1; done

  Maybe they have done some optimization on the 2d graphics part that
  makes everything use less cpu and as a side effect the cpu governor
  lower the cpu frequency in response of the lower cpu need. Maybe the
  cpu and the 2d hardware frequencies are related each others.

  I own a Nexus One and not a Droid but some 3D tests that make an
  intensive use of the gpu but not of the cpu run with higher frame
  rates if I do something that keep the cpu busy just to keep the cpu
  freq high (just as a test).

  On my Nexus One your test gives the following results and the fps is
  not steady but really variable:
  avg=53 min=35 max=70

  Bye
  Michele

  On Apr 2, 7:29 pm, Phil tesujiga...@gmail.com wrote:

   I have observed a marked difference in frame rate of 2-D (Canvas)
   graphics following a 2.1 update on the Motorola Droid. Details are
   here:

  http://tesujigames.blogspot.com/2010/04/2-d-graphics-slowdown-after-m...

   Can anyone else corroborate this?  I have posted the code and an apk
   in the above blog entry.

   Also, it would be interesting to know whether there is a difference
   between manual and OTA updates.

   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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Creating Multiple Instances of a Class

2010-04-04 Thread patbenatar
Excellent idea TreKing!


On Apr 3, 12:10 pm, ~ TreKing treking...@gmail.com wrote:
 On Fri, Apr 2, 2010 at 5:58 PM, Matthew Patience 

 matthewj.patie...@gmail.com wrote:
   What I want to do is while the user is
  holding down the fire button to have it keep creating instances of the
  Laser class like a rapid fire and then when they hit the edge of the
  screen have them be disappear/destroyed so they are no longer taking
  up memory.

 To add to what has been said, you probably don't want to be continuously
 creating / destroying these laser objects if they are going to be used in
 high-frequency - and it sound like they are (rapid fire). This would mean
 a lot of unnecessary memory allocation and de-allocation that is likely to
 hurt your performance on a mobile device.

 Instead you could have a small pool of Laser objects initialized up front
 that will be the max number of lasers the user can fire and see on screen at
 any given time. By default all objects are inactive, or unfired. When
 the user fires one, you find the first inactive laser and fire it, which
 means making it active and getting it ready to move along it's path. Once
 it's hit something or is off screen, it's marked inactive again
 (destroyed) to be put back in the pool for re-use.

 You could do this with two lists (active and inactive), moving items back
 and forth as necessary, or with one list and setting a flag on each laser
 object indicating it's current state.

 Just some stuff to think about as you make your game. Hope that helps! Good
 luck!

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

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: How to refer an attribute value to the other attribute in the same element of layout

2010-04-04 Thread Mark Murphy
adag wrote:
 Thanks Mark for your reply,
 
 But my requirement is little different. basically I am changing
 listview android:background Color dynamically. As you know that while
 list gets prepared every time, first it refers to the
 android:cacheColorHint from the cache to draw the list otherwise the
 scrolling of list gives a broken color of predefined cache color with
 black. Therefore I was looking if I can refer the attribute of
 background to the cacheColorHint then changing the background would
 not also conflict with the listview background color.
 Otherwise I can also use
 getListView().setBackgroundResource(R.Color.light_blue); But I am
 affraid how to handle the cacheColorHint.
 getListView().setCacheColorHint is not working in this case. Other
 than using transparent with android:cacheColorHint.
 
 any light Mark would be wonderful.

If setCacheColorHint() is not working the way it is documented, write up
a sample project demonstrating the problem and post it to
http://b.android.com with a description.

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

_Beginning Android 2_ from Apress Now 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Finish activity

2010-04-04 Thread ReyLith
Hi!

I have a problem with my application. During the execution of it, I
have some buttons which execute other activities when I click on them.
The way I am realising it is:

private OnClickListener scaleImage = new OnClickListener()
{
   public void onClick(View v)
   {
   Intent intent = new Intent();
   intent.setClass(main.this, Scale.class);
   startActivity(intent);

   update();
   }
};

The other activity finish it execution using the function finish(). I
have a problem. When the activity finish, the function update() should
be executed. However it doesn't run until I click on other button. I
don't know the reason, the function update() is just bellow of
startActivity.

Thank you very much. Regards.

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Finish activity

2010-04-04 Thread Mark Murphy
ReyLith wrote:
 Hi!
 
 I have a problem with my application. During the execution of it, I
 have some buttons which execute other activities when I click on them.
 The way I am realising it is:
 
 private OnClickListener scaleImage = new OnClickListener()
 {
public void onClick(View v)
{
  Intent intent = new Intent();
  intent.setClass(main.this, Scale.class);
  startActivity(intent);
 
  update();
}
 };
 
 The other activity finish it execution using the function finish(). I
 have a problem. When the activity finish, the function update() should
 be executed. However it doesn't run until I click on other button. I
 don't know the reason, the function update() is just bellow of
 startActivity.

startActivity() is not a blocking call. As your code is written above,
your call to update() happens immediately after you call startActivity().

You may wish to use startActivityForResult(), so you can be notified via
onActivityResult() when then other activity has finish()-ed, and you can
call update() then. Or, depending on what update() does, you might
consider just putting that call in onStart() or onResume(), so you
update every time your activity comes back to the foreground.

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

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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Displays on emulator, not on phone

2010-04-04 Thread RMD
I had tried LocationManager.GPS_PROVIDER but for some reason I didn't
work.  I can't remember now if I tried it before or after I realized
the GPS was off :)

LocationManager.GPS_PROVIDER is supposed to use whatever location
source is available right?

Thanks,
RMD


On Apr 3, 8:05 am, Mark Murphy mmur...@commonsware.com wrote:

 RMDwrote:
  Thanks for all the responses.  I'm embarrassed to admit, but I had the
  GPS turned off in the phone.  Since,

  locm.requestLocationUpdates(gps, 0, 0,onLocationChange);

  was specifically set to gps it wouldn't work.

  To address that I have it check if the gps is on and use network if
  the gps is disabled.

     LocationManager locm = (LocationManager)
  getSystemService(Context.LOCATION_SERVICE);
     //Check if GPS is enabled and choose network if it isn't
      if ( !locm.isProviderEnabled( LocationManager.GPS_PROVIDER ) ) {
         locm.requestLocationUpdates(network, 0, 0,onLocationChange);
      } else {
         locm.requestLocationUpdates(gps, 0, 0,onLocationChange);
      }

 Another suggestion: don't use network and gps, but use
 LocationManager.NETWORK_PROVIDER and LocationManager.GPS_PROVIDER instead.

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

 Android Training in NYC: 30 April-2 May 2010:http://guruloft.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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Displays on emulator, not on phone

2010-04-04 Thread Mark Murphy
RMD wrote:
 I had tried LocationManager.GPS_PROVIDER but for some reason I didn't
 work.  I can't remember now if I tried it before or after I realized
 the GPS was off :)
 
 LocationManager.GPS_PROVIDER is supposed to use whatever location
 source is available right?

No, LocationManager.GPS_PROVIDER, presently, has a value of gps. It's
more that, in case for some crazy reason they change that convention,
your code will be less likely to break using
LocationManager.GPS_PROVIDER than gps, because they'll change
LocationManager.GPS_PROVIDER to match the new convention.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: How to Launch Contact application displaying multiple phone numbers?

2010-04-04 Thread AJ
Any clue please regarding my 2 problem


Thanks
AJ

On Apr 3, 7:00 pm, AJ ajeet.invinci...@gmail.com wrote:
 Hi group

 Now I am able to insert 3 phone numbers.

 But There does not looks a way that How can I enter other phone
 numbers like :- Work Fax, Home Fax, Pager etc.

 Any clue please.

 Here is the code what I have done:-

   1- How can I show multiple phone number [like Home, Mobile, Work etc]
   when I am launching contact application. How can I do that?

 
 i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE,
 22);
 i.putExtra(ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE,ContactsContract.CommonDataKinds.Phone.TYPE_HOME);

 i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE,  33);
 i.putExtra(ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE,ContactsContract.CommonDataKinds.Phone.TYPE_WORK);

 --

 On Apr 3, 6:30 pm, AJ ajeet.invinci...@gmail.com wrote:

  Any clues from experts.

  - AJ

  On Apr 3, 3:51 pm, AJ ajeet.invinci...@gmail.com wrote:

   Hi Group,

   I am able to launch contact application from the following way. I am
   also able to show Name and only one Phone number. My problem is :-

   1- How can I show multiple phone number [like Home, Mobile, Work etc]
   when I am launching contact application. How can I do that?
   2- In Contact application there is one option *More*, which is an
   expandable list. When I click that it open with other many fields like
   Notes, Website, Nicknam etc. How can I fill those fields while
   launching the Contact application?

   My code is as follows :-

    Code
   
   Intent intent = new Intent(Intent.ACTION_INSERT, People.CONTENT_URI);

   intent.putExtra(Contacts.Intents.Insert.NAME, mFullName);

   intent.putExtra(Contacts.Intents.Insert.PHONE, mPhoneMob);
   intent.putExtra(Contacts.Intents.Insert.PHONE_TYPE,
   Contacts.PhonesColumns.TYPE_MOBILE);
   startActivity(intent);
    Code
   

   Any help is really appreciated.
   Thanks,
   AJ

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Service Object Availability between Activities

2010-04-04 Thread Tunneling
I have a Connection object that is instantiated by the
ConnectionService. I bind to the service in order to access the
Connection object and get information from a controller over TCP/IP.

Again, I launch the service from a splash screen with success. I bind
to the service in my main activity and can access it's objects(i.e.
Connection) successfully.

Then once I start a new activity from the main activity, I am able to
successfully bind to the service. However, when I try to access the
Connection object I get the following errors/warns.

I would like to be able to connect to the object from multiple
activities throughout the application to obtain up to date information
from the controller.

Any assistance is greatly appreciated.

Here is the dump from LogCat.

04-04 08:25:18.068: INFO/ActivityManager(76): Process
com.google.android.apps.maps:LocationFriendService (pid 15448) has
died.
04-04 08:25:21.888: INFO/NotificationService(76): enqueueToast
pkg=com.scs.haus callback=android.app.ITransientNotification$Stub
$pr...@434d3868 duration=1
04-04 08:25:21.898: INFO/ActivityManager(76): Starting activity:
Intent { cmp=com.scs.haus/.LightController (has extras) }
04-04 08:25:22.088: WARN/Resources(15436): Converting to string:
TypedValue{t=0x12/d=0x0 a=2 r=0x7f070008}
04-04 08:25:22.098: WARN/Resources(15436): Converting to string:
TypedValue{t=0x12/d=0x0 a=2 r=0x7f070009}
04-04 08:25:22.108: INFO/LightController(15436): Could not check
serviceBinder.c.connected)
04-04 08:25:22.108: WARN/System.err(15436):
java.lang.NullPointerException
04-04 08:25:22.108: WARN/System.err(15436): at
com.scs.haus.LightController.onStart(LightController.java:111)
04-04 08:25:22.108: WARN/System.err(15436): at
android.app.Instrumentation.callActivityOnStart(Instrumentation.java:
1205)
04-04 08:25:22.108: WARN/System.err(15436): at
android.app.Activity.performStart(Activity.java:3519)
04-04 08:25:22.118: WARN/System.err(15436): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2373)
04-04 08:25:22.118: WARN/System.err(15436): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2417)
04-04 08:25:22.118: WARN/System.err(15436): at
android.app.ActivityThread.access$2100(ActivityThread.java:116)
04-04 08:25:22.118: WARN/System.err(15436): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
04-04 08:25:22.118: WARN/System.err(15436): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-04 08:25:22.118: WARN/System.err(15436): at
android.os.Looper.loop(Looper.java:123)
04-04 08:25:22.118: WARN/System.err(15436): at
android.app.ActivityThread.main(ActivityThread.java:4203)
04-04 08:25:22.118: WARN/System.err(15436): at
java.lang.reflect.Method.invokeNative(Native Method)
04-04 08:25:22.118: WARN/System.err(15436): at
java.lang.reflect.Method.invoke(Method.java:521)
04-04 08:25:22.118: WARN/System.err(15436): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:791)
04-04 08:25:22.118: WARN/System.err(15436): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
04-04 08:25:22.128: WARN/System.err(15436): at
dalvik.system.NativeStart.main(Native Method)
04-04 08:25:22.128: INFO/LightController(15436): Could not check
serviceBinder.c.connected)
04-04 08:25:22.128: WARN/System.err(15436):
java.lang.NullPointerException
04-04 08:25:22.128: WARN/System.err(15436): at
com.scs.haus.LightController.onResume(LightController.java:126)
04-04 08:25:22.128: WARN/System.err(15436): at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:
1225)
04-04 08:25:22.128: WARN/System.err(15436): at
android.app.Activity.performResume(Activity.java:3559)
04-04 08:25:22.128: WARN/System.err(15436): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:
2838)
04-04 08:25:22.128: WARN/System.err(15436): at
android.app.ActivityThread.handleResumeActivity(ActivityThread.java:
2866)
04-04 08:25:22.138: WARN/System.err(15436): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2420)
04-04 08:25:22.138: WARN/System.err(15436): at
android.app.ActivityThread.access$2100(ActivityThread.java:116)
04-04 08:25:22.138: WARN/System.err(15436): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
04-04 08:25:22.138: WARN/System.err(15436): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-04 08:25:22.138: WARN/System.err(15436): at
android.os.Looper.loop(Looper.java:123)
04-04 08:25:22.138: WARN/System.err(15436): at
android.app.ActivityThread.main(ActivityThread.java:4203)
04-04 08:25:22.138: WARN/System.err(15436): at
java.lang.reflect.Method.invokeNative(Native Method)
04-04 08:25:22.138: WARN/System.err(15436): at
java.lang.reflect.Method.invoke(Method.java:521)
04-04 08:25:22.138: WARN/System.err(15436): at
com.android.internal.os.ZygoteInit

[android-developers] Re: Changing AlertDialog font size

2010-04-04 Thread Yahel
Thank you Mark,

Worked not like a charm at all, but work non the less :D

I found it awfully complicated and not very well documented just to
set a font size, or a layout.

The setAdapter seems to be pretty powerful although I'm not sure I
understood everything.

For future reference, in the onCreateDialog of an Activity :
---
final CharSequence[] itemsMark =
{getResources().getString(R.string.Mark_As_Beautiful),
  getResources().getString(R.string.Mark_As_Fun),
  getResources().getString(R.string.Mark_As_Not_A_Portrait),
  getResources().getString(R.string.Mark_As_Offensive),
  getResources().getString(R.string.Mark_As_Spam),
  getResources().getString(R.string.Mark_As_Cancel)

};


ArrayAdapterCharSequence itemsAdapter = new
ArrayAdapterCharSequence (this,
R.layout.menu_items, itemsMark);

builder = new AlertDialog.Builder(this);
builder.setTitle(My Title);
builder.setIcon(R.drawable.icon);
builder.setAdapter(itemsAdapter, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int item) {

switch(item) {
case 0:
  //Mark as Beautiful
break;

case 1:
  //Mark as Beautiful
break;

case 2: //Mark as Not a Portrait
break;

case 3:
  //Mark as Offensive
break;

case 4:
  //Mark as Spam
break;

case 5:
  //cancel
break;
}

}
});


And in my layout/menu_items.xml :

 TextView xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@android:id/text1
android:layout_width=fill_parent
android:layout_height=wrap_content
android:padding=10dip
android:layout_margin=5dip
android:gravity=center_vertical
android:textSize=22dip
android:textColor=#ff00
android:typeface=normal
android:lineSpacingExtra=0dip/



Anyway, I stopped trying to do something fancy, regular black on white
labels with default pressed state and I'm good to go.

Thanks again.

Yahel

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Progress dialog question/problem (API Demos example)

2010-04-04 Thread Evgeny V
Thanks!

Please check the attached file from
android-2.1\samples\ApiDemos\src\com\example\android\apis\app folder
/* Display a custom progress bar */
Button progressButton = (Button) findViewById(R.id.progress_button);
progressButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
showDialog(DIALOG_PROGRESS);
mProgress = 0;
mProgressDialog.setProgress(0);
mProgressHandler.sendEmptyMessage(0);
}
});

The rest of related code in my original post.

On Sun, Apr 4, 2010 at 9:27 AM, ~ TreKing treking...@gmail.com wrote:

  On Sat, Apr 3, 2010 at 9:39 PM, Kumar Bibek coomar@gmail.com wrote:

 So, before orientation change and after orientation change, you need to
 save the state of your dialog and then recreate it.


 If you use showDialog(), which it looks like the OP is using, you don't
 have to save the dialog's state - this is handled by the Activity.

 OP - where are you setting up and calling your handler? My guess it's not
 being re-initialized or, if it is, whatever is posting messages to it isn't
 restarted.


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

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


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

To unsubscribe, reply using remove me as the subject.


AlertDialogSamples.java
Description: Binary data


[android-developers] Re: Complains of shrinking font sizes

2010-04-04 Thread polyclefsoftware
Yep, I'm experiencing the same thing, both personally after upgrading
my Droid to 2.1 and from users who have just upgraded.

I'm assuming there's an easy fix, but does anyone else know why the
update had this effect?

On Feb 10, 2:54 pm, Timothy DeWees whtdrgn...@gmail.com wrote:
 Hello,

 I have an application on the Android Market called My Collection Pro.
 I am getting complaints from my post Android 2.0 users (Droid, etc)
 that when the close and re-open the app, thefontkeeps getting
 smaller.

 I build my application in the 1.5 API to have the highest number of
 supported phones.  If the users rotate the phone to cause the app to
 restart it goes back to the originalfont.

 I am unable to reproduce this in the emulator and on my G1.

 Any ideas or suggestions?  My resource layouts are really straight-
 forward and I leavefontat system default (i.e., I don't specify
 anything)...

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: plotting Market sales - determining if your android work is profitable

2010-04-04 Thread JP

Hey thanks - I'll give it a test run one of these days. I like Kevin's
idea to run it as web app

On Apr 4, 12:57 am, Karl Ostmo kos...@gmail.com wrote:
 The script grabs the cookie from an authenticated session with Google
 Checkout before downloading the purchase records, which requires that the
 user enter their password.  It's probably better that the passwords are not
 transmitted to my system.

Consider using GAE. It uses Google Accounts authentication and you
never touch the account password




 To run the script yourself, you just need an Ubuntu installation running
 somewhere.  It's easy enough to set one up - if you don't want to install it
 on a new partition, you can use Wubi 
 (http://en.wikipedia.org/wiki/Wubi_%28Ubuntu_installer%29) to install it from
 Windows, or host an Ubuntu virtual machine inside Windows with VMWare or
 VirtualBox.

 I may eventually write an Android app that does the same thing as the
 script, but the available Python libraries make the task much easier.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] [Urgent] Need Help in File Functions

2010-04-04 Thread brijesh masrani
Hello Everyone

I want to modify a text file using Android program .
I searched about that and i found that I have to copy whole content of file
and than Modify it and save it to other file and than Delete Original file
and rename the Modified one.

I tried file.delete() method But i am getting error of permission denied to
delete that file.

So can anyone help me As Soon As possible

Regards,
Brijesh Masrani.

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Reusable Android library packaging: interest?

2010-04-04 Thread Ning Shi
On Mon, Mar 29, 2010 at 10:19 AM, Mark Murphy mmur...@commonsware.comwrote:

 Creating Android JARs is fairly easy...so long as all you want to do is
 ship Java code. If your Java code needs resources or assets, or offers
 up activities or services, then you have to ship a JAR plus a whole
 bunch of other stuff. And the person reusing your JAR would need to know
 about all that other stuff, find it, download it into the right spots,
 etc. The only way that is somewhat convenient for the developers is to
 package this stuff into separate APKs...which is inconvenient for the
 users.

 IMHO, that's one of the reasons why we don't have a robust collection of
 third-party widgets or other libraries. There are few recipes for
 creating such things, no standards or conventions for how to consume
 them, and no home for them to live. At least, I am not aware of much in
 this area -- please correct me if I've missed something.


Sounds like intents could solve some of the problems if apps and widgets are
developed with reusability in mind.

-- 
Ning

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Contacts from 1.5 and 1.6 ... filtering out trash

2010-04-04 Thread DulcetTone
Dmitri, thanks for this.  You might be right-- the user indicated an
HTC app (not Android, per se) did this sync for him.  I think I may
offer an option for including ALL contacts with a simple textual
filter on their display name in an effort to weed out the filth.  This
alternative mode would support people like this guy, I hope.

tone


On Apr 3, 5:21 pm, Dmitri Plotnikov dplotni...@google.com wrote:
 Hi Tone,

 This was before my time, but I think you are doing it right.  As far as I
 remember, Android 1.5/6 did not support any kind of integration with
 Outlook.  Whatever mechanism was used to import the Outlook contacts must
 have messed them up.  On Android 1.5/6, when you were adding a contact, you
 were supposed to add it to the MyContacts group explicitly.  So reading the
 MyContacts group should give you all _correctly_ imported contacts and
 filter out those automatically added by Gmail.

 Cheers,
 - Dmitri

 On Sat, Apr 3, 2010 at 1:03 PM, DulcetTone dulcett...@gmail.com wrote:
  I am using this in Android 1.x:

         final String[] proj = new String[] {
            Contacts.People._ID,
             Contacts.People.STARRED,
            Contacts.People.NAME
            };

         final String selection = null;
         Uri uri = Uri.parse(content://contacts/groups/system_id/
                      + Groups.GROUP_MY_CONTACTS + /members);

         Cursor people = context.getContentResolver().query(
                  uri,
                  proj,
                 selection,
                 null,
                 Contacts.People.DEFAULT_SORT_ORDER);

  and people who have contacts imported from Outlook are missing those
  contacts.

  Why is this so under-documented, with access provided through textual
  URIs and database calls?

  Can someone show me a definitive code blurb that gets all the contacts
  in the Android contact panel and NOT those crufty pretend contacts?

  Thanks in advance.

  tone

  On Feb 25, 1:49 am, Dmitri Plotnikov dplotni...@google.com wrote:
   I believe the system group my contacts was used for that purpose.

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

  To unsubscribe, reply using remove me as the subject.



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

2010-04-04 Thread DulcetTone
Ok... it's ugly.  Indeed, this was one of the things I found difficult
to do in the same manner in Android 1.x and Android 2.x

I actually found it difficult to have one app exercise both these
interfaces, one of the several reasons I wish I had a separate app for
1.x vs 2.x  -- if you've not yet made a final choice there, split them
up and you will be happier.



In Android 1.x, this will do it, cribbed and reduced from Android
source.
I had to bring over a considerable portion of android.bluetooth to get
this working.

You would call the static enable() function to do it:


import android.bluetooth.BluetoothDevice;
import android.content.Context;

public class LocalBluetoothManager {

private static LocalBluetoothManager sSingleton;
/** Used when obtaining a reference to the singleton instance. */
private static Object INSTANCE_LOCK = new Object();

private boolean mInitialized;
private BluetoothDevice mManager;



public static boolean enable(Context context, boolean b) {


synchronized (INSTANCE_LOCK) {
if (sSingleton == null) {
sSingleton = new LocalBluetoothManager();
}

if (!sSingleton.init(context)) {
return false;
}
return b ? sSingleton.mManager.enable() :
sSingleton.mManager.disable();
}

}


private boolean init(Context context) {
if (mInitialized) return true;
mInitialized = true;

mManager = (BluetoothDevice)
context.getSystemService(bluetooth); //
Context.BLUETOOTH_SERVICE);
if (mManager == null) {
return false;
}

return true;
}

}


In Android 2.x, it is simpler:

import android.bluetooth.BluetoothAdapter;
BluetoothAdapter adapt = BluetoothAdapter.getDefaultAdapter();
adapt.enable(); // or adapt.disable();

You MAY need to have these permissions in your manifest:


uses-permission android:name=android.permission.BLUETOOTH /
uses-permission
android:name=android.permission.BLUETOOTH_ADMIN /

Make sure you test on both Android 1.x and 2.x before going to Market.

tone

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


[android-developers] ListView question

2010-04-04 Thread DonFrench
Is there any way to programmatically select a ListView item such that
when using a simple_list_item_single_choice layout, it lights up the
radio button?  Because setSelection(position) does not seem to have
this effect.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] IllegalArgument Exception: Service is not registered: when unbindservice is called.

2010-04-04 Thread praj
Hi,

I am getting IllegalArgumentException: Service is not registered when
i try to stop my service by initially calling unbindservice and then
stopService.


Before calling unbindService i first check if my service is still
bound by checking (mBoundService - obtained from the
ServiceConnection) I also check if the service is not stopped and only
then i call the unbindService But I still get the error.
From the posts that I read only I found out that both these calls are
asynchronous and that the service will only stop when nothing is bound
to it.

Please can anyone let me know if I am missing on anything or if my
understanding is wrong.

Thanks,
Prajakta

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

2010-04-04 Thread Stanley Li
Thanks a lot. You are right. The x,y for text is lower left.

On Sun, Apr 4, 2010 at 12:14 AM, SoftwareForMe.com SoftwareForMe.com 
softwareforme@gmail.com wrote:

 I don't recall the exact details in Android, but in almost all graphics
 APIs the Y position for text is either the [baseline] (bottom of a letter
 'o' or 'n') or [baseline + descent] (bottom of the letter 'g' or 'y').  In
 other words, (x,y) for bitmaps is top-left, (x,y) for text is lower left.

 A quick experiment would tell you whether it's the baseline or baseline +
 descent.

 On Sat, Apr 3, 2010 at 11:25 PM, Stanley Li junpin1...@gmail.com wrote:

 Hi all,

 I want to draw a text on top of a bitmap.

 So in my onDraw function, i do the following:

 canvas.drawBitmap(myBitmap, 30, 30, mPaint);
 textPaint.setTextSize(20);
 canvas.drawText(Life X 3, 30, 30, textPaint);

 However, it ended up that the text is above the bitmap. (the X position is
 correct, but the y position is not).

 Can anyone help me with this?

 Thanks in advance,
 Stanley

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


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


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Fastest and most reliable Location provider

2010-04-04 Thread Maps.Huge.Info (Maps API Guru)
There are competing parameters in a location fix: Availability, Speed
and accuracy. You'll have to determine what level of accuracy is
acceptable before you can decide which fix you want to use.

I've seen network location fixes with 10,000 meter accuracy, is that
good enough for your application?

If the user is on WiFi and indoors, you won't get much of a fix at all
but you won't even know the availability of GPS until at 30 seconds or
more have passed.

-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

To unsubscribe, reply using remove me as the subject.


[android-developers] Moving a graphic on different screen sizes with the right ratio?

2010-04-04 Thread Bevor
Hello,
I tracked the behaviour of the different screen sizes when I increased
the position of a graphic by 10 pixel. Unfortunately happened what I
already thought. When the display is bigger, I'm able move a graphic a
lot of times more to get to the bottom of the screen. So the ratio
between the graphic and its environment is not correct anymore (so not
10 pixel as on normal screen) although the change of the graphic on
the different screens looks correct (On big screen it is bigger, on
small screens it is smaller). When I move the graphic from the top of
the screen to the bottom, I can move that on 480x800 about 65 times,
on 480x854 70 times, and on the 320x480 screen only about 25 times. So
the target must be to calculate the right ratio so that 10 pixels on
the small screen are 17 pixel (or sth. similar) on big screens. What
approaches do I have to do that? I already thought about getting the
value of res.getConfiguration().screenLayout to know if I have a
small, normal, or big size to be able to calculate anyhow the right
ratio, but this both seems to be pretty cumbersome and moreover I get
values from res.getConfiguration().screenLayout I can't explain. I
launched 6 emulator instances and got the following values from
res.getConfiguration().screenLayout:

240x320 QVGA low density: 17
320x480 HVGA medium density: 18
480x854 WVGA high density: 34
480x800 WVGA high density: 34
240x400 WQVGA low density: 34
240x432 WQVGA low density: 266435490 (yes, I really get this value!)

This approach seems to be useless because I cannot even distinguish
between 480x854 and 480x800, much less of the last value which seems
to be corrupt.

How can I solve it to move a graphic on the different screens with the
right ratio? How do game developers solve this when they support all
screens?


Regards.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: ListView row floats out of place, scrolls different speed?

2010-04-04 Thread Jeffrey Blattman
to answer my own question (sort of), there were two objects in the list that
were equal according to my equals / hashcode. as this is a list i am not
sure why this would be a problem, but removing the unnecessary equals /
hashcode made it go away.

On Sun, Apr 4, 2010 at 9:55 AM, Jeffrey Blattman jeffrey.blatt...@gmail.com
 wrote:

 i have a list view. as i scroll, one of the elements in the list scrolls at
 a different rate and ends up floating above the other elements. i don't
 know how exactly to describe it, so i attached a pic screen cap. any ideas
 what would cause 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: plotting Market sales - determining if your android work is profitable

2010-04-04 Thread Lance Nanek
Neat. I wonder if the market API could be used to do graphs for free
apps as well:
http://code.google.com/p/android-market-api/

On Apr 4, 1:54 am, kostmo kos...@gmail.com wrote:
 I thought I'd share a script that I've been working 
 on:http://www.anddev.org/viewtopic.php?p=30732

 It lets you generate parameterizable histograms of Android Market
 sales by automatically downloading data from Google Checkout.

 Hope someone finds it useful.

 Karl

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


[android-developers] Where do the resources from android.R come from?

2010-04-04 Thread rnstewart
I'm trying to understand the whole android.R structure, and it would
be nice if I knew where the source of those resources is.

I assume that, like the R object in my own project, it is built from a
resources directory somewhere on my system. That directory should
contain the drawables, layouts, values and whatever other files are
used to create this object. But I'm not sure where to find it.

I thought that I had found it when I went to /usr/lib/android-sdk-
linux_86 (where I have the SDK installed on my computer), and found
the platforms directory. In that path, there is a directory for each
platform installed in the SDK, and under each of those directories
there is a data/res directory that contains drawables, layouts, etc.
But the contents of those directories don't match what is available in
the android.R object while I am developing. For example, under
android-1.6/data/res/drawables, I see the following dialog icon
images:

ic_dialog_alert.png
ic_dialog_dialer.png
ic_dialog_email.png
ic_dialog_info.png
ic_dialog_map.png
ic_dialog_menu_generic.png
ic_dialog_time.png
ic_dialog_usb.png

But the only android.R drawables available to me in my applications
are:

ic_dialog_alert.png
ic_dialog_dialer.png
ic_dialog_email.png
ic_dialog_info.png
ic_dialog_map.png

Does anyone know what's going on? Is something wrong with my SDK
install, or is there another source of platform-level resources that I
am not aware of?

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

To unsubscribe, reply using remove me as the subject.


[android-developers] error while calling an activity from another activity

2010-04-04 Thread anushree
me and my partners are working on developing a pwa client for android
Am gettin an error while callin an activity from another activity.the
error is as follows:

WARN/InputManagerService(59): Window already focused, ignoring focus
gain of: com.android.internal.view.IInputMethodClient$Stub
$pr...@43d8fe28

Code is:-
public class Pwaclient extends Activity {
public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent i=new Intent(v.getContext(),Album.class);

startActivity(i);
}}
public class Album extends ListActivity{
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);


try
{

finish();
}catch(Exception e){e.printStackTrace();}
}}

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Where do the resources from android.R come from?

2010-04-04 Thread Dianne Hackborn
 Not all resources in the framework are available to applications.  There is
a public.xml file that lists the ones that are in the public SDK.

On Sun, Apr 4, 2010 at 10:46 AM, rnstewart rnstew...@gmail.com wrote:

 I'm trying to understand the whole android.R structure, and it would
 be nice if I knew where the source of those resources is.

 I assume that, like the R object in my own project, it is built from a
 resources directory somewhere on my system. That directory should
 contain the drawables, layouts, values and whatever other files are
 used to create this object. But I'm not sure where to find it.

 I thought that I had found it when I went to /usr/lib/android-sdk-
 linux_86 (where I have the SDK installed on my computer), and found
 the platforms directory. In that path, there is a directory for each
 platform installed in the SDK, and under each of those directories
 there is a data/res directory that contains drawables, layouts, etc.
 But the contents of those directories don't match what is available in
 the android.R object while I am developing. For example, under
 android-1.6/data/res/drawables, I see the following dialog icon
 images:

 ic_dialog_alert.png
 ic_dialog_dialer.png
 ic_dialog_email.png
 ic_dialog_info.png
 ic_dialog_map.png
 ic_dialog_menu_generic.png
 ic_dialog_time.png
 ic_dialog_usb.png

 But the only android.R drawables available to me in my applications
 are:

 ic_dialog_alert.png
 ic_dialog_dialer.png
 ic_dialog_email.png
 ic_dialog_info.png
 ic_dialog_map.png

 Does anyone know what's going on? Is something wrong with my SDK
 install, or is there another source of platform-level resources that I
 am not aware of?

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

 To unsubscribe, reply using remove me as the subject.




-- 
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] crash in Android SMS code

2010-04-04 Thread NTDYLF
Hi, I'm sending data SMS messages with no trouble until one (otherwise
unremarkable) message in particular makes it crash:

E/AndroidRuntime(29764): Caused by: java.lang.NullPointerException
E/AndroidRuntime(29764):at android.telephony.SmsMessage
$SubmitPdu.init(SmsMessage.java:100)
E/AndroidRuntime(29764):at
android.telephony.SmsMessage.getSubmitPdu(SmsMessage.java:425)
E/AndroidRuntime(29764):at
android.telephony.SmsManager.sendDataMessage(SmsManager.java:196)

This is on a T-Mobile MyTouch running 1.6. I made sure I'm not sending
any null parameters. Here's the code in SmsMessage.java that it
crashes at:

public static class SubmitPdu extends SubmitPduBase {
}

The crash is in the Android platform, but I'm guessing that I'm using
it wrong, so I'm asking here. Why would init croak? Thanks in
advance for your insight.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: error while calling an activity from another activity

2010-04-04 Thread Kumar Bibek
This log doesn't have enough info on the error. Please post the whole
log so that people can get the actual error here.

Thanks and Regards,
Kumar Bibek

On Apr 4, 11:56 pm, anushree godbole.anush...@gmail.com wrote:
 me and my partners are working on developing a pwa client for android
 Am gettin an error while callin an activity from another activity.the
 error is as follows:

 WARN/InputManagerService(59): Window already focused, ignoring focus
 gain of: com.android.internal.view.IInputMethodClient$Stub
 $pr...@43d8fe28

 Code is:-
 public class Pwaclient extends Activity {
 public void onCreate(final Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 Intent i=new Intent(v.getContext(),Album.class);

 startActivity(i);}}

 public class Album extends ListActivity{
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);

 try
 {

 finish();

 }catch(Exception e){e.printStackTrace();}
 }}

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: error while calling an activity from another activity

2010-04-04 Thread AJ
 Code is:-
 public class Pwaclient extends Activity {
 public void onCreate(final Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 Intent i=new Intent(v.getContext(),Album.class);



What is this v in [(v.getContext()] ?  Try this


Thanks,
AJ

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Need Help in File Functions

2010-04-04 Thread Kumar Bibek
Not all files will have the permission to edit/delete. You should
first check for the permission before doing an operation on a file.

Thanks and Regards,
Kumar Bibek

On Apr 4, 8:42 pm, brijesh masrani masrani.brij...@gmail.com wrote:
 Hello Everyone

 I want to modify a text file using Android program .
 I searched about that and i found that I have to copy whole content of file
 and than Modify it and save it to other file and than Delete Original file
 and rename the Modified one.

 I tried file.delete() method But i am getting error of permission denied to
 delete that file.

 So can anyone help me As Soon As possible

 Regards,
 Brijesh Masrani.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Need Help in File Functions

2010-04-04 Thread AJ
There is one file which is present in following mentioned path.

File: FileUtils.java (\frameworks\base\core\java\android\os)
Functon: public static native int setPermissions(String file, int
mode, int uid, int gid); // Native Function

But you can not use in eclipse as it is *not* part of android SDK.
You can only use this when you are compiling you application with full
source code of android in linux environment.


Thanks,
AJ

On Apr 4, 10:11 pm, Kumar Bibek coomar@gmail.com wrote:
 Not all files will have the permission to edit/delete. You should
 first check for the permission before doing an operation on a file.

 Thanks and Regards,
 Kumar Bibek

 On Apr 4, 8:42 pm, brijesh masrani masrani.brij...@gmail.com wrote:

  Hello Everyone

  I want to modify a text file using Android program .
  I searched about that and i found that I have to copy whole content of file
  and than Modify it and save it to other file and than Delete Original file
  and rename the Modified one.

  I tried file.delete() method But i am getting error of permission denied to
  delete that file.

  So can anyone help me As Soon As possible

  Regards,
  Brijesh Masrani.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: intensive writing to internal memory

2010-04-04 Thread Nadav
Thanks Bob and Dianne,

The issue is that I have no choice but do a lot of writing since this
is a research app that constantly logs phone and user activity over
many months...  We are dealing ok with battery and processing power
(we only write every several minutes), and the main concern remains
the Flash lifetime.

We are working with cyclic log files (that roll over every several
hours), and have already found a way to move our older files to the SD
card. However our current dilemma is whether to do all writing on the
SD-card, or keep the current open file on the main memory, and copy
it to SD when moving to the next log file.

The problem of doing everything on the SD card is that when a user
mounts the card to a PC, we can't access it for logging and other
tasks, and that leads to various crashes and issues, so I thought it
might be simpler if we work with the current file on the main
memory, but I fear the Flash degradation... I'm willing to buy new SD
cards every few months, but I really don't want to mess up the phone
itself!


On Apr 4, 2:27 am, Dianne Hackborn hack...@android.com wrote:
 If you are talking about internal storage (not RAM memory), then yes this is
 generally flash memory, and you want to be careful about how much you write
 to it for numerous reasons: also extremely important are the battery impact
 (writing to flash is expensive) and performance (causing other things that
 are accessing flash storage to be blocked by what you are doing).

 That said, properly designed flash storage won't let you write to the same
 block over and over.  Writes are spread across the flash storage just to
 avoid that kind of issue.



 On Sat, Apr 3, 2010 at 9:49 AM, Nadav nad...@gmail.com wrote:
  Hi All,

  I'm wondering how worried should I be about writing an app that does a
  lot of writing (logs + db files) to the phone's main memory.

  In the past I was involved in a project that had to do a lot of
  writing to SD card, and the SD cards started malfunctioning after 2-3
  months due to this, and had to be replaced every now and then. The
  developer realized  he was reaching the flash memory's read/write
  guarantees (don't remember the exact specs).

  If the phone's main memory is also flash based, should this be a
  concern? I wouldn't want to damage the phone's memory in a permanent
  way

  I'm also not sure if the issue is related to reading writing to the
  same physical block (the guy was using a single log file and kept
  appending it, so he was constantly accessing the file's header block),
  and whether writing cyclic log files might remedy a problem like
  this..

  Would appreciate any thoughts on this issue.

  Thanks!

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

  To unsubscribe, reply using remove me as the subject.

 --
 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] AudioTrack in streaming mode

2010-04-04 Thread Simone
Hi everyone, I need to modify the volume of an AudioTrack, while it is
playing a sound in streaming mode.
I have something like this:

minBufSize=AudioTrack.getMinBufferSize(11025,
AudioFormat.CHANNEL_OUT_STEREO, AudioFormat.ENCODING_PCM_16BIT);
fSound=new AudioTrack(
AudioManager.STREAM_MUSIC,
11025,
AudioFormat.CHANNEL_OUT_STEREO,
AudioFormat.ENCODING_PCM_16BIT,
minBufSize,
AudioTrack.MODE_STREAM
);


sample=this.getApplicationContext().getResources().openRawResource(R.raw.longfart);
b=new byte[minBufSize];
fSound.play();

fSound.setPlaybackRate(11025/2 + 11025*(yPos+187)/(2*187));
fSound.setStereoVolume( volume, volume);
try {
c=sample.read(b, 0, b.length);
} catch (IOException e1) {
}
while(c!=-1){
fSound.write(b, 0, c);
try {
c=sample.read(b, 0, 
b.length);
} catch (IOException e) {

}
}


This works ok and plays the whole song (it's just a few seconds).
What I want to do is allow the user to change the volume while the
stream is being played. Can it be done?
Thanks
Simone

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Forcing the Symbols Soft Keyboard

2010-04-04 Thread Nmix
I have an EditText that specifies android:digits where all the
specified characters are on the standard symbols soft keyboard.
Unfortunately it seems that just using android:digits is enough to
always cause the qwerty keyboard to pop up. Always having to press the
123? key for that one EditText is a bit inconvenient for my users and,
sad to say, it's a difficult concept for a few.

Apart from writing up a custom IME, is there a way to force the
symbols keyboard on an EditText? I did look around and even try a few
things, but I'm now thinking this isn't possible. Hopefully I'm wrong.
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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: 2-D Graphics Performance after Motorola Droid 2.1 Update

2010-04-04 Thread patbenatar
Phil-

Meant to send this directly to you not post on the public group [sorry
about going off-topic on your public discussion]!

Whoa.. Had no idea about the official 2.1 update. I rooted and
installed CM after the little snafoo a few weeks back with Motorola
pushing off the update again.. Glad to hear 2.1 is now officially on
the Droid!! Is it the complete Nexus One version? What features does
it have/lack?

-Nick



On Apr 2, 8:20 pm, Phil tesujiga...@gmail.com wrote:
 patbenatar,

 Verizon started the rollout of 2.1 to Droid devices earlier this week.
 If it has been halted, it's news to me.

 On Apr 2, 10:30 pm,patbenatarpatbena...@gmail.com wrote:



  If you updated to 2.1, you must have root and have installed some
  custom ROM, correct? Motorola has not yet rolled out 2.1 updates [and
  from what I've been hearing they've put it on some sort of indefinite
  hiatus] so any version of 2.1 you're running is not OFFICIALLY built
  for Droid... Maybe the ROM is the reason for this behavior? What ROM
  are you running?

  On Apr 2, 6:16 pm, Emmanuel emmanuel.ast...@gmail.com wrote:

   I think the Nexus One can't go above 30 FPS in OGL because of the
   screen resolution :
   It is fill limited

   Emmanuelhttp://androidblogger.blogspot.com/http://www.alocaly.com/

   On Apr 2, 9:55 pm, Ralf Schneider li...@gestaltgeber.com wrote:

UUUhh!

Does this mean the Nexus One would be faster if it would use 2.0.1?

Is OpenGL affected, too? This would explain why it is nearly impossible 
to
reach 60FPS, even if only doing a glClear...

... There is so much idle time! Does Android 2.1 try to keep an upper 
limit
of 30 FPS to save battery?

So, many questions!

2010/4/2 MrChaz mrchazmob...@googlemail.com

 Wow that is a big difference in performance!

 On Apr 2, 6:29 pm, Phil tesujiga...@gmail.com wrote:
  I have observed a marked difference in frame rate of 2-D (Canvas)
  graphics following a 2.1 update on the Motorola Droid. Details are
  here:

 http://tesujigames.blogspot.com/2010/04/2-d-graphics-slowdown-after-m...

  Can anyone else corroborate this?  I have posted the code and an apk
  in the above blog entry.

  Also, it would be interesting to know whether there is a difference
  between manual and OTA updates.

  Thanks!

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

 To unsubscribe, reply using remove me as the subject.

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

2010-04-04 Thread Jason LeBlanc
Why not push the data up to a server?
J

On Apr 4, 2010 2:53 PM, Nadav nad...@gmail.com wrote:

Thanks Bob and Dianne,

The issue is that I have no choice but do a lot of writing since this
is a research app that constantly logs phone and user activity over
many months...  We are dealing ok with battery and processing power
(we only write every several minutes), and the main concern remains
the Flash lifetime.

We are working with cyclic log files (that roll over every several
hours), and have already found a way to move our older files to the SD
card. However our current dilemma is whether to do all writing on the
SD-card, or keep the current open file on the main memory, and copy
it to SD when moving to the next log file.

The problem of doing everything on the SD card is that when a user
mounts the card to a PC, we can't access it for logging and other
tasks, and that leads to various crashes and issues, so I thought it
might be simpler if we work with the current file on the main
memory, but I fear the Flash degradation... I'm willing to buy new SD
cards every few months, but I really don't want to mess up the phone
itself!



On Apr 4, 2:27 am, Dianne Hackborn hack...@android.com wrote:
 If you are talking about interna...

 On Sat, Apr 3, 2010 at 9:49 AM, Nadav nad...@gmail.com wrote:
  Hi All,

  I'm wondering ho...
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com


  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en...
 hack...@android.com


 Note: please don't send private questions to me, as I don't have time to
 provide private suppo...

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Displays on emulator, not on phone

2010-04-04 Thread Bob Kerns
In addition to this fine reason, using the provided symbol will allow
the compiler to catch any typos, while simultaneously making it clear
that you are using a standard value, and allowing you to see the
documentation for that value with the mouse.

It's a big win all around.

On Apr 4, 5:09 am, Mark Murphy mmur...@commonsware.com wrote:
 RMD wrote:
  I had tried LocationManager.GPS_PROVIDER but for some reason I didn't
  work.  I can't remember now if I tried it before or after I realized
  the GPS was off :)

  LocationManager.GPS_PROVIDER is supposed to use whatever location
  source is available right?

 No, LocationManager.GPS_PROVIDER, presently, has a value of gps. It's
 more that, in case for some crazy reason they change that convention,
 your code will be less likely to break using
 LocationManager.GPS_PROVIDER than gps, because they'll change
 LocationManager.GPS_PROVIDER to match the new convention.

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Android GData (Calendar)

2010-04-04 Thread Johan
Thanks!
Have tried to use the GData Java std.
Now saw that they had an Alpha of GData v2 where they included a part
of Android.

Link: http://code.google.com/p/gdata-java-client/downloads/list

On 3 Apr, 16:11, Kumar Bibek coomar@gmail.com wrote:
 You can use the official gdata libraries from google. Whats stopping
 you?
 This works quite well. There are some minor problem, but it works on
 android.

 Thanks and Regards,
 Kumar Bibek

 On Apr 2, 12:25 am, Johan johan.k...@gmail.com wrote:



  Hi

  I'm working on a program whose job is to parse a schema from a course
  at university (html) and synchronize it with a calendar in Google
  Calendar.
  A must-have requirements from the author is that the user must enter
  their user information (x...@gmail.com) then connect via the Calendar
  API to calendar services.
  ** The smartphone calendar via Intent is not okay to use **

  The main problem is that there is no GData (Dalvik Java) for Android.
  But I checked on GitHub and found that there seems to be something
  going on 
  com.google.wireless.gdata:http://android.git.kernel.org/?p=platform/external/gdata.git,a=summary
  Searched around and found some packets like simply-android-GData and
  GData on code.google.com, but none of them help with the structure of
  calendrar, and they can login to retrieve data rss, json, atom.

  So my question is then whether someone has a solution that works quite
  well as a possible. next update of the SDK will provide, a full GData
  API?

  Is it possible to compile a custom SDK from git and get with the
  functionality of git://android.git.kernel.org/platform/external/gdata.git?

  Or do you have any other solution that might work?

  Minimum functionality:
  View Calendars
  View Events
  Add Events
  Delete Events

  Happy Easter
  Johan

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Fastest and most reliable Location provider

2010-04-04 Thread Bob Kerns
I should have said to opt for the simplest thing that actually works!
Or, to put it another way, as simple as possible, but no simpler.

(Neither phrase is mine, but I can't recall the correct attributions.)

For the fastest result, I'd start off with both listeners. The network
will nearly always win (unless you're off the grid), but the GPS won't
start until you ask it to.

However, even if you can't get a network fix, you MAY be able to get a
GPS fix, eventually. It will certainly take longer in this case. I
haven't tested it in a location far enough away from towers to not get
any network fix at all, and it would vary by phone anyway, but in
theory it should be possible.

Handling this case may not be important. A long-delayed GPS fix may be
useless, for example. So as Maps API Guru says, you'll have to decide.

On Apr 4, 3:00 am, patbenatar patbena...@gmail.com wrote:
 Bob- You're absolutely right. The phone will continue to be a phone,
 so the Network listener really isn't an energy consumer as its always
 connected to towers. Great analysis, thanks! You say simplicity is
 probably the best approach here--my main goal is to get a location as
 fast as possible, whether it be network or GPS, then hope we can
 eventually get a GPS update, but without one it will be OK.. Do you
 think my approach will be just as fast as running two side-by-side
 listeners?

 Ning- This isn't really a concern for me as the lifetime of my app is
 not very long.. I couldn't imagine a user running my app in the
 foreground for a day or so as in your application.

 Thanks for all the feedback, you guys are great help!
 -Nick

 On Apr 3, 5:21 pm, Ning zeeg...@gmail.com wrote:



  On Apr 3, 2:39 am, patbenatar patbena...@gmail.com wrote:

   Hey all who are interested in this topic-

   I have taken John's above advice and modified it into what I believe
   is a more efficient way to be doing this [although the efficiency of
   my method is only evident if you're going to to ensure updates from
   either provider throughout the life of your app]. Please let me know
   your thoughts on this method:

   Rather than running both listeners side-by-side as John suggested
   above, I am first running a GPS listener and then within that
   listener's onProviderDisabled and onStatusChanged [only if the status
   is OUT_OF_SERVICE or TEMPORARILY_UNAVAILABLE] I am requesting updates
   from a Network listener [and of course setting a networkOn=true flag
   so I don't turn it on twice or anything]. Then the Network takes over
   [while GPS listener remains running] until onStatusChanged() in the
   GPS listener gets an AVAILABLE status at which point I turn off the
   Network listener [and mark the flag accordingly] and allow the GPS to
   do its thing.

  Apparently, my reply didn't go to the public list because I habitually
  hit 'a' when I tried to reply all in Google Groups, which does not do
  the job.

  I have been using this approach for a while. There are two problems
  with it. The first one is that GPS takes a while to get the first fix.
  The second one is power consumption. My program is set to get update
  every 5 minutes or 200 meters. After a day or so when I checked the
  battery usage, it had raised to the top of the list, consuming some
  30% of all power consumed during that period. So I switched to using
  network location only, and my program disappeared from the list.

  So my opinion on this is that unless absolutely necessary, I won't use
  GPS as location provider frequently. It will drain the battery very
  fast.

  --
  Ning

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Auto-centering and auto-clipping TextView background?

2010-04-04 Thread HippoMan
Is there a way to tell Android to do the following when setting the
background image for a TextView?

1. Scale the image so that it's just large enough to fill the the
entire viewing area without any black borders, while still maintaining
its aspect ratio. This might require clipping once the image is
actually displayed, but that's OK (read on).

2. Then, center the image in the viewing area, both horizontally and
vertically.

3. Finally, clip the image to the size of the viewing area, without
any further rescaling.

I'm guessing that this kind of image processing is not automatically
done via any of Android's facilities, and that I'll have to do it
myself. If this is a correct assumption, could someone point me to
some documentation or some examples which could explain how I can
accomplish this? I'm guessing that I'll have to subclass my TextView
and implement my own onDraw() method, but could someone confirm or
deny that assumption?

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: how to DEBUG build an APK?

2010-04-04 Thread Xavier Ducrohet
If you are talking about
http://d.android.com/reference/android/util/Config.html#DEBUG
then it's based on whether the device build is a debug build. It has
nothing to do with your app.

BTW, if Config.DEBUG is true, (for example in the emulator), then
putting debuggable=true in your manifest is not needed (the app will
be debuggable by default).

Xav

On Sat, Apr 3, 2010 at 11:06 PM, HeHe cnm...@gmail.com wrote:
 thanks.

 i did, otherwise ADT build tool would complain it.

 do you get a true Config.DEBUG value with your apk?

 On Apr 3, 7:53 pm, JP joachim.pfeif...@gmail.com wrote:
 On Apr 3, 4:30 pm, HeHe cnm...@gmail.com wrote: yes, the flag is set to 
 true.

 In the right location? In the manifest, it must be placed like this:
 application
     android:debuggable=true





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

 To unsubscribe, reply using remove me as the subject.




-- 
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] Re: intensive writing to internal memory

2010-04-04 Thread Bob Kerns
If Jason's suggestion of pushing it to a server is inadequate, you can
buffer events, and only write them out once a minute or 10 minutes or
something. This will put an upper bound on the number of writes
performed.

You can combine the approaches, and push to the server, and only write
to the filesystem if you don't succeed in pushing to the server within
a decent interval. Then when communications is reestablished, push the
saved data up first.

You could also send it to the SD -- and when the SD is not available,
buffer it on the local filesystem until it becomes available again.

Essentially, we're looking at a 3-level buffering hierarchy -- RAM,
local flash, and either SD or server. The more the buffering in RAM,
the more data you risk losing in the event of a crash, but the fewer
writes and less battery required.

On Apr 4, 12:53 pm, Nadav nad...@gmail.com wrote:
 Thanks Bob and Dianne,

 The issue is that I have no choice but do a lot of writing since this
 is a research app that constantly logs phone and user activity over
 many months...  We are dealing ok with battery and processing power
 (we only write every several minutes), and the main concern remains
 the Flash lifetime.

 We are working with cyclic log files (that roll over every several
 hours), and have already found a way to move our older files to the SD
 card. However our current dilemma is whether to do all writing on the
 SD-card, or keep the current open file on the main memory, and copy
 it to SD when moving to the next log file.

 The problem of doing everything on the SD card is that when a user
 mounts the card to a PC, we can't access it for logging and other
 tasks, and that leads to various crashes and issues, so I thought it
 might be simpler if we work with the current file on the main
 memory, but I fear the Flash degradation... I'm willing to buy new SD
 cards every few months, but I really don't want to mess up the phone
 itself!

 On Apr 4, 2:27 am, Dianne Hackborn hack...@android.com wrote:



  If you are talking about internal storage (not RAM memory), then yes this is
  generally flash memory, and you want to be careful about how much you write
  to it for numerous reasons: also extremely important are the battery impact
  (writing to flash is expensive) and performance (causing other things that
  are accessing flash storage to be blocked by what you are doing).

  That said, properly designed flash storage won't let you write to the same
  block over and over.  Writes are spread across the flash storage just to
  avoid that kind of issue.

  On Sat, Apr 3, 2010 at 9:49 AM, Nadav nad...@gmail.com wrote:
   Hi All,

   I'm wondering how worried should I be about writing an app that does a
   lot of writing (logs + db files) to the phone's main memory.

   In the past I was involved in a project that had to do a lot of
   writing to SD card, and the SD cards started malfunctioning after 2-3
   months due to this, and had to be replaced every now and then. The
   developer realized  he was reaching the flash memory's read/write
   guarantees (don't remember the exact specs).

   If the phone's main memory is also flash based, should this be a
   concern? I wouldn't want to damage the phone's memory in a permanent
   way

   I'm also not sure if the issue is related to reading writing to the
   same physical block (the guy was using a single log file and kept
   appending it, so he was constantly accessing the file's header block),
   and whether writing cyclic log files might remedy a problem like
   this..

   Would appreciate any thoughts on this issue.

   Thanks!

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

   To unsubscribe, reply using remove me as the subject.

  --
  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: Auto-centering and auto-clipping TextView background?

2010-04-04 Thread Kumar Bibek
If your image is a texture, use 9-patch images. This is the
recommended way to manage your images on Android. There's a slight
learning curve, but once you get a hold of it, it will be a breeze.

Thanks and Regards,
Kumar Bibek

On Apr 5, 1:30 am, HippoMan hippo.mail...@gmail.com wrote:
 Is there a way to tell Android to do the following when setting the
 background image for a TextView?

 1. Scale the image so that it's just large enough to fill the the
 entire viewing area without any black borders, while still maintaining
 its aspect ratio. This might require clipping once the image is
 actually displayed, but that's OK (read on).

 2. Then, center the image in the viewing area, both horizontally and
 vertically.

 3. Finally, clip the image to the size of the viewing area, without
 any further rescaling.

 I'm guessing that this kind of image processing is not automatically
 done via any of Android's facilities, and that I'll have to do it
 myself. If this is a correct assumption, could someone point me to
 some documentation or some examples which could explain how I can
 accomplish this? I'm guessing that I'll have to subclass my TextView
 and implement my own onDraw() method, but could someone confirm or
 deny that assumption?

 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Moving a graphic on different screen sizes with the right ratio?

2010-04-04 Thread Lance Nanek
That field is documented as being a bit mask:
http://developer.android.com/intl/fr/reference/android/content/res/Configuration.html#screenLayout

That means that it is one number, but different bits within the number
are being used to indicate different things. To check any particular
thing about it you can perform an and operation on it using the mask
of the part you want, then compare to the constants.

It sounds like you'd be better off in general using the equivalent of
density independent pixels anyway. Multiply your pixel measurements by
the density field in DisplayMetrics:
http://developer.android.com/intl/fr/reference/android/util/DisplayMetrics.html#density

And you'll get the same number as if you used dip:
http://developer.android.com/intl/fr/guide/practices/screens_support.html

It is also easy to check the width and height of the display in
pixels:
http://developer.android.com/intl/fr/reference/android/util/DisplayMetrics.html#heightPixels

If you wanted to cross the screen vertically in the same number of
steps no matter what the height, the number of pixels needed per step
for any particular height is easy to calculate.

If you are writing a game using GLSurfaceView you don't even have to
get the display size yourself, it is passed to you:
http://developer.android.com/intl/fr/reference/android/opengl/GLSurfaceView.Renderer.html#onSurfaceChanged%28javax.microedition.khronos.opengles.GL10,%20int,%20int%29

On Apr 4, 1:13 pm, Bevor andr...@pithax.net wrote:
 Hello,
 I tracked the behaviour of the different screen sizes when I increased
 the position of a graphic by 10 pixel. Unfortunately happened what I
 already thought. When the display is bigger, I'm able move a graphic a
 lot of times more to get to the bottom of the screen. So the ratio
 between the graphic and its environment is not correct anymore (so not
 10 pixel as on normal screen) although the change of the graphic on
 the different screens looks correct (On big screen it is bigger, on
 small screens it is smaller). When I move the graphic from the top of
 the screen to the bottom, I can move that on 480x800 about 65 times,
 on 480x854 70 times, and on the 320x480 screen only about 25 times. So
 the target must be to calculate the right ratio so that 10 pixels on
 the small screen are 17 pixel (or sth. similar) on big screens. What
 approaches do I have to do that? I already thought about getting the
 value of res.getConfiguration().screenLayout to know if I have a
 small, normal, or big size to be able to calculate anyhow the right
 ratio, but this both seems to be pretty cumbersome and moreover I get
 values from res.getConfiguration().screenLayout I can't explain. I
 launched 6 emulator instances and got the following values from
 res.getConfiguration().screenLayout:

 240x320 QVGA low density: 17
 320x480 HVGA medium density: 18
 480x854 WVGA high density: 34
 480x800 WVGA high density: 34
 240x400 WQVGA low density: 34
 240x432 WQVGA low density: 266435490 (yes, I really get this value!)

 This approach seems to be useless because I cannot even distinguish
 between 480x854 and 480x800, much less of the last value which seems
 to be corrupt.

 How can I solve it to move a graphic on the different screens with the
 right ratio? How do game developers solve this when they support all
 screens?

 Regards.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] How integrate mobclix on Android

2010-04-04 Thread Gabriel Simões
Hello,

After some weeks learning about Android I´m about to publish my first
app.
Since it´s going to be ad-supported and I decided to go with mobclix
(based on reviews) I´ve finaly signed up for it and then tried to
download it´s android SDK.
Well, the sdk comes with only one extensionless file and there´s no
documentation at all on their site about how to integrate their sdk
with your application. At least I couldn´t find after spending quite
some time surfing on it.
Has anyone here been able to integrate it? If so, could you point me
to a how to, tutorial, documentation or a where to start?

Thanks,
Gabriel

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: how to DEBUG build an APK?

2010-04-04 Thread HeHe
yes, i was talking about Config.DEBUG constant.

how can i make a debug build in Eclipse IDE?

right now, no matter if i use RunRun As or RunDebug As menu
commands, i always see Config.DEBUG == false.

i am using Eclipse v3.4.1 and Android SDK 1.6.

thanks in advance for further answer!!

On Apr 4, 1:35 pm, Xavier Ducrohet x...@android.com wrote:
 If you are talking 
 abouthttp://d.android.com/reference/android/util/Config.html#DEBUG
 then it's based on whether the device build is a debug build. It has
 nothing to do with your app.

 BTW, if Config.DEBUG is true, (for example in the emulator), then
 putting debuggable=true in your manifest is not needed (the app will
 be debuggable by default).

 Xav





 On Sat, Apr 3, 2010 at 11:06 PM, HeHe cnm...@gmail.com wrote:
  thanks.

  i did, otherwise ADT build tool would complain it.

  do you get a true Config.DEBUG value with your apk?

  On Apr 3, 7:53 pm, JP joachim.pfeif...@gmail.com wrote:
  On Apr 3, 4:30 pm, HeHe cnm...@gmail.com wrote: yes, the flag is set to 
  true.

  In the right location? In the manifest, it must be placed like this:
  application
      android:debuggable=true

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

  To unsubscribe, reply using remove me as the subject.

 --
 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] Re: Android Dev for Military Applications

2010-04-04 Thread schwiz
Droid does kill people.

On Mar 31, 2:59 pm, Nate chene...@gmail.com wrote:
 There are a few opportunities out there for Android development in the
 military. We'd really like to pull in a developer to help our efforts
 out on some of these projects - the bulk of the work would go to you.
 If you're interested, please let me know. nchenenko at winvale dot com
 or 202 296 5505.

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


[android-developers] MediaStore.ACTION_VIDEO_CAPTURE

2010-04-04 Thread bmalicoat
I'm trying to use the built in camera to capture a video but when I
specify the URI I want the file saved to (using
videoCaptureIntent.putExtra (MediaStore.EXTRA_OUTPUT, Uri.fromFile
(fileLocation)); ) the 'Retake' and 'Play' buttons crash my app. I am
trying to switch and let the Intent store the file where it wants but
I can't figure out how to recover the URI where it is saved to. The
docs say this:

The caller may pass in an extra EXTRA_OUTPUT to control where the
video is written. If EXTRA_OUTPUT is not present the video will be
written to the standard location for videos, and the Uri of that
location will be returned in the data field of the Uri.


But what is the data field of the Uri?

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] MediaStore.ACTION_VIDEO_CAPTURE

2010-04-04 Thread Carmen Delessio
Set up the Intent to do video capture and then call StartActivityForResult.
The example has a hard-coded 2 as the identifier.

Intent i = new Intent(android.media.action.VIDEO_CAPTURE);
startActivityForResult(i, 2);


Add an onActivityResult Method

protected void  onActivityResult  (int requestCode, int resultCode, Intent
data){
...
 if (requestCode==2){ // Our request for video capture
 if (resultCode == RESULT_OK) { // a good results
 try {
 AssetFileDescriptor videoAsset =
getContentResolver().openAssetFileDescriptor(data.getData(), r);
   //... do something with the AssetFileDescriptor
  // to read the file, create an inputStream

  FileInputStream fileInputStream
=videoAsset.createInputStream();


 } catch (FileNotFoundException e) {

 Toast.makeText(getBaseContext(),  Could not find
Video file,
Toast.LENGTH_LONG).show();

 }
 }
 }


-- 
Carmen
http://www.twitter.com/CarmenDelessio
http://www.talkingandroid.com
http://www.facebook.com/BFFPhoto
http://www.twitter.com/DroidDrop

On Sun, Apr 4, 2010 at 8:29 PM, bmalicoat bmalic...@gmail.com wrote:

 I'm trying to use the built in camera to capture a video but when I
 specify the URI I want the file saved to (using
 videoCaptureIntent.putExtra (MediaStore.EXTRA_OUTPUT, Uri.fromFile
 (fileLocation)); ) the 'Retake' and 'Play' buttons crash my app. I am
 trying to switch and let the Intent store the file where it wants but
 I can't figure out how to recover the URI where it is saved to. The
 docs say this:

 The caller may pass in an extra EXTRA_OUTPUT to control where the
 video is written. If EXTRA_OUTPUT is not present the video will be
 written to the standard location for videos, and the Uri of that
 location will be returned in the data field of the Uri.


 But what is the data field of the Uri?

 Thanks!

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

 To unsubscribe, reply using remove me as the subject.


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

[android-developers] I want to get Listview click event

2010-04-04 Thread syuta
hello.
I use ListView.(Adapter is a Custom Adapter) *extends BaseAdapter

I wanto to get selected item, when I click the item in the list.
now, I use OnItemClickListener, OnItemSelectedListener.
but, This program doesn't do the operation for which I hope.

not click. I want to get a selected Item in the list, when like mouse_down.
(Moment when color of item in list changed?)

Can this be done?

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Reusable Android library packaging: interest?

2010-04-04 Thread Mark Murphy
 Sounds like intents could solve some of the problems if apps and widgets
 are
 developed with reusability in mind.

Widgets, as subclasses of View, do not usually interoperate with Intents.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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

To unsubscribe, reply using remove me as the subject.


[android-developers] Behavior of Just In in Market

2010-04-04 Thread Siva G
Hi,

When I publish update to my app, sometimes, the app does not feature
in the Just In. But sometimes it does too. Have anyone faced this
issue?

What might be going wrong?

Thanks in advance for your answer.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Splash Screen Appears only once

2010-04-04 Thread Dror520
thanks for your answer! i figured it out it was actually my fault ...
lol
now i'm having a hard time figuring out how to start the mydeals
activity but keep the splashscreen activity showing on the screen and
when the mydeals activity is done move to that activity ...
thanks!

On Apr 3, 7:34 am, Kumar Bibek coomar@gmail.com wrote:
 Make sure that your onCreate method is called, and it is not resumed.
 You can put some Log statements to check this in your onCreate method.

 Thanks and Regards,
 Kumar Bibek

 On Mar 30, 3:45 am, Dror520 dror...@gmail.com wrote:



  Hey, i made a splash screen:
  public class SplashScreen extends Activity  {

          protected int splashTime = 2000;

          @Override
          public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.splash);
            new Handler().postDelayed(new Runnable(){
                @Override
                public void run() {
                    Intent intent = new Intent(SplashScreen.this, 
  MyDeals.class);
                    SplashScreen.this.startActivity(intent);
                SplashScreen.this.finish();
                  }

            }, splashTime);

          }

  }

  AndroidMenifiest:

  activity android:name=.SplashScreen
                    android:theme=@android:style/Theme.NoTitleBar
                    android:screenOrientation=portrait
                  intent-filter
                  action android:name=android.intent.action.MAIN /
                   category
  android:name=android.intent.category.LAUNCHER /
              /intent-filter
              /activity
          activity android:name=.MyDeals
                    android:theme=@android:style/Theme.NoTitleBar
                    android:screenOrientation=portrait
                  intent-filter
                  action android:name=android.intent.action.DEFAULT/
                  category android:name=android.intent.catagory.VIEW /

              /intent-filter
          /activity

  it works the first time i put it on the device. but then when i kill
  the application so the application can start over i don't see it. it
  goes straight to the next activity MyDeals.

  can you please help me 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Motorola Droid - white balance issues

2010-04-04 Thread Sheado
Howdy all,

I've developed a camera-based app, but am experiencing apparent white
balance (over balance?) issues on Motorola Droid. I'm using previews
and auto-focus before taking the picture - with takePicture() being
called from a thread within onAutoFocus().

If I pass the camera in front of a brightly lit scene it begins to
alternate between taking an extremely bright (if not solid white
image) and a quite dark image.

What's going on? Anybody have any ideas?

Thanks!
-Chad
P.S. Thanks Google for the device seeding program =]

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Can´t set the emulator´s dns servers on windows

2010-04-04 Thread Gabriel Simões
Hello,

Right now my app needs to use the device´s (emulator´s) internet
connection. I´ve read before that since my computer has internet the
emulator should be able to access it.
On linux everything works but on windows the emulator can´t find the
DNS I´m using, event if I add -dns-server 8.8.8.8,8.8.8.7 on Eclipse´s
launch options.

I´ve tried on Android 1.6 and 2.1.
Is there anything else I should try?

Thanks
Gabriel

ps: I know it´s a DNS problem because if I open the browser and set
any website´s ip as the address everything just works.

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


Re: [android-developers] Re: how to DEBUG build an APK?

2010-04-04 Thread ~ TreKing
On Sun, Apr 4, 2010 at 6:20 PM, HeHe cnm...@gmail.com wrote:

 how can i make a debug build in Eclipse IDE?


Use the debuggable flag in your manifest.


  right now, no matter if i use RunRun As or RunDebug As menu
 commands, i always see Config.DEBUG == false.


Didn't Xavier just answer this for you?

On Sun, Apr 4, 2010 at 3:35 PM, Xavier Ducrohet x...@android.com wrote:

 If you are talking about
 http://d.android.com/reference/android/util/Config.html#DEBUG then it's
 based on whether the device build is a debug build. It has nothing to do
 with your app.


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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Can´t set the emulator´s dns servers on windows

2010-04-04 Thread Brion Emde
That's a funny looking DNS that you're entering. How are you finding
your DNS?

I'm not saying those are not right, but I suspect that if they were
right, I your emulator would work.


On Apr 4, 7:37 pm, Gabriel Simões gsim...@gmail.com wrote:
 Hello,

 Right now my app needs to use the device´s (emulator´s) internet
 connection. I´ve read before that since my computer has internet the
 emulator should be able to access it.
 On linux everything works but on windows the emulator can´t find the
 DNS I´m using, event if I add -dns-server 8.8.8.8,8.8.8.7 on Eclipse´s
 launch options.

 I´ve tried on Android 1.6 and 2.1.
 Is there anything else I should try?

 Thanks
 Gabriel

 ps: I know it´s a DNS problem because if I open the browser and set
 any website´s ip as the address everything just works.

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


[android-developers] Re: Reusable Android library packaging: interest?

2010-04-04 Thread lordjoe

I am interested - I have the same issues even sharing with my own
libraries - In some ways the an approach might be to simply import
both the code and the resources into the project if that were possible
- The biggest issue I run across is resources which don't seem to get
imported properly when I build my projects as two separate eclipse
projects or  two  IntelliJ modules , the common widgets and the
project specific code.

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Can´t set the emulator´s dns servers on windows

2010-04-04 Thread Gabriel Simões
Actualy 8.8.8.8 is google´s open DNS
The second should be 8.8.4.4

On 4 abr, 22:54, Brion Emde brione2...@gmail.com wrote:
 That's a funny looking DNS that you're entering. How are you finding
 your DNS?

 I'm not saying those are not right, but I suspect that if they were
 right, I your emulator would work.

 On Apr 4, 7:37 pm, Gabriel Simões gsim...@gmail.com wrote:



  Hello,

  Right now my app needs to use the device´s (emulator´s) internet
  connection. I´ve read before that since my computer has internet the
  emulator should be able to access it.
  On linux everything works but on windows the emulator can´t find the
  DNS I´m using, event if I add -dns-server 8.8.8.8,8.8.8.7 on Eclipse´s
  launch options.

  I´ve tried on Android 1.6 and 2.1.
  Is there anything else I should try?

  Thanks
  Gabriel

  ps: I know it´s a DNS problem because if I open the browser and set
  any website´s ip as the address everything just works.- Ocultar texto das 
  mensagens anteriores -

 - Mostrar texto das mensagens anteriores -

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: how to DEBUG build an APK?

2010-04-04 Thread HeHe
it does not work. here is the setting in my manifest.xml:

application
android:name=com.xxx.yyy
android:label=@string/app_name
android:icon=@drawable/icon_zzz
android:debuggable=true


my apk stills gets a *false* Config.DEBUG value.


On Apr 4, 6:40 pm, ~ TreKing treking...@gmail.com wrote:
 On Sun, Apr 4, 2010 at 6:20 PM, HeHe cnm...@gmail.com wrote:
  how can i make a debug build in Eclipse IDE?

 Use the debuggable flag in your manifest.

   right now, no matter if i use RunRun As or RunDebug As menu
  commands, i always see Config.DEBUG == false.

 Didn't Xavier just answer this for you?

 On Sun, Apr 4, 2010 at 3:35 PM, Xavier Ducrohet x...@android.com wrote:
  If you are talking about
 http://d.android.com/reference/android/util/Config.html#DEBUGthen it's
  based on whether the device build is a debug build. It has nothing to do
  with your app.

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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Web Browser die when request cached geolocation position.

2010-04-04 Thread oslim
   Does anyone know about this problem?

   When I run Browser and create new windows by press button menu key
to
   menu-windows-press + New window from time to time Browser die.

   I have try to solve this problem but it doesn't works. If anyone
know the solution
   please tell me.


Android code version you are running: 2.1-update1

Your development environment: Ubuntu

Describe the problem:

Steps to reproduce:
1. Launch the Browser APK- It shows google.com page and
geolocation position with blue light icon
2. Press Menu button - select Windows- select + New window -
creat new google.com page
3. Do step 2 again, if i do this 3times or 4times then get Browser
die at
geolocation::requestReturnedCachedPosition(GeoNotifier*
notifier);
4. It only happen m_cachedPosition is true at
Geolocation::GeoNotifier::timerFired(...);

Expected results:
   It supposed to create new http://www.google.com window page and
show geolocation position
   with blue icon under search text field in the page.

Observed results:

Additional information:
I/DEBUG   ( 2763): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG   ( 2763): Build fingerprint: '-/-/-/8x50:2.1-update1/-/-
5.014234:eng/release-keys'
I/DEBUG   ( 2763): pid: 2896, tid: 2915   com.android.browser 
I/DEBUG   ( 2763): signal 11 (SIGSEGV), fault addr 006e007b
I/DEBUG   ( 2763):  r0 00690075  r1 00690074  r2 6fe3db84  r3 6a0fc72c
I/DEBUG   ( 2763):  r4 0062b8d8  r5 6a421750  r6 6a421750  r7 006e006f
I/DEBUG   ( 2763):  r8 31d8dd90  r9 2db40f1c  10 2db40f04  fp 0032e000
I/DEBUG   ( 2763):  ip 4258  sp 31d8dcc0  lr 6a0fc823  pc
6a0fc73a  cpsr 0030
I/DEBUG   ( 2763):  #00  pc 000fc73a  /system/lib/
libwebcore.so
I/DEBUG   ( 2763):  #01  pc 000fc81e  /system/lib/
libwebcore.so
I/DEBUG   ( 2763):  #02  pc 000faebe  /system/lib/
libwebcore.so
I/DEBUG   ( 2763):  #03  pc 0010ef7a  /system/lib/
libwebcore.so
I/DEBUG   ( 2763):
I/DEBUG   ( 2763): code around pc:
I/DEBUG   ( 2763): 6a0fc728 18eda300 460c4607 b1119103 1c486809
I/DEBUG   ( 2763): 6a0fc738 68fe6020 f107b13e a903000c fe98f7fe
I/DEBUG   ( 2763): 6a0fc748 bf181e06 a8032601 fe00f7fe f107b19e
I/DEBUG   ( 2763):
I/DEBUG   ( 2763): code around lr:
I/DEBUG   ( 2763): 6a0fc810 e000f8d0 3008f8de 68604798 f7ff4621
I/DEBUG   ( 2763): 6a0fc820 e023ff7f ad014813 46281831 f946f031
I/DEBUG   ( 2763): 6a0fc830 462a2103 f7fe4668 4628fb9b f7129e00
I/DEBUG   ( 2763):
I/DEBUG   ( 2763): stack:
I/DEBUG   ( 2763): 31d8dc80  31d8dca8
I/DEBUG   ( 2763): 31d8dc84  31d8dca0
I/DEBUG   ( 2763): 31d8dc88  31d8dcd4
I/DEBUG   ( 2763): 31d8dc8c  6a10f799  /system/lib/libwebcore.so
I/DEBUG   ( 2763): 31d8dc90  31d8dcb0
I/DEBUG   ( 2763): 31d8dc94  00330ed8  [heap]
I/DEBUG   ( 2763): 31d8dc98  6a421750  /system/lib/libwebcore.so
I/DEBUG   ( 2763): 31d8dc9c  6a10ee25  /system/lib/libwebcore.so
I/DEBUG   ( 2763): 31d8dca0  00330ed8  [heap]
I/DEBUG   ( 2763): 31d8dca4  6a421750  /system/lib/libwebcore.so
I/DEBUG   ( 2763): 31d8dca8  6a421750  /system/lib/libwebcore.so
I/DEBUG   ( 2763): 31d8dcac  6a10f557  /system/lib/libwebcore.so
I/DEBUG   ( 2763): 31d8dcb0  
I/DEBUG   ( 2763): 31d8dcb4  006269d0  [heap]
I/DEBUG   ( 2763): 31d8dcb8  df002777
I/DEBUG   ( 2763): 31d8dcbc  e3a070ad
I/DEBUG   ( 2763): #00 31d8dcc0  0001
I/DEBUG   ( 2763): 31d8dcc4  006246e0  [heap]
I/DEBUG   ( 2763): 31d8dcc8  0062b198  [heap]
I/DEBUG   ( 2763): 31d8dccc  0062b8d8  [heap]
I/DEBUG   ( 2763): 31d8dcd0  41d2ee51
I/DEBUG   ( 2763): 31d8dcd4  0062b8d8  [heap]
I/DEBUG   ( 2763): 31d8dcd8  00330ec8  [heap]
I/DEBUG   ( 2763): 31d8dcdc  6a421750  /system/lib/libwebcore.so
I/DEBUG   ( 2763): 31d8dce0  31d8dd54
I/DEBUG   ( 2763): 31d8dce4  6a0fc823  /system/lib/libwebcore.so
I/DEBUG   ( 2763): #01 31d8dce8  0062b8d8  [heap]
I/DEBUG   ( 2763): 31d8dcec  0062b8f0  [heap]
I/DEBUG   ( 2763): 31d8dcf0  0062b8f0  [heap]
I/DEBUG   ( 2763): 31d8dcf4  00330ec8  [heap]
I/DEBUG   ( 2763): 31d8dcf8  
I/DEBUG   ( 2763): 31d8dcfc  6a0faec1  /system/lib/libwebcore.so
E/copybit ( 1154): copyBits failed (Invalid argument)
I/DEBUG   ( 2763): debuggerd committing suicide to free the zombie!
I/ActivityManager( 1154): Process com.android.browser (pid 2896) has
died.


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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] I want to get Listview click event

2010-04-04 Thread dillirao malipeddi
implement onScrollListeners

public abstract void onScroll
(AbsListViewfile:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/reference/android/widget/AbsListView.html
view,
int firstVisibleItem, int visibleItemCount, int totalItemCount)
Since: API Level
1file:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/guide/appendix/api-levels.html#level1

Callback method to be invoked when the list or grid has been scrolled. This
will be called after the scroll has completed
ParametersviewThe view whose scroll state is being reportedfirstVisibleItemthe
index of the first visible cell (ignore if visibleItemCount == 0)
visibleItemCountthe number of visible cellstotalItemCountthe number of items
in the list adaptor
public abstract void onScrollStateChanged
(AbsListViewfile:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/reference/android/widget/AbsListView.html
view,
int scrollState)
Since: API Level
1file:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/guide/appendix/api-levels.html#level1

Callback method to be invoked while the list view or grid view is being
scrolled. If the view is being scrolled, this method will be called before
the next frame of the scroll is rendered. In particular, it will be called
before any calls to getView(int, View,
ViewGroup)file:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/reference/android/widget/Adapter.html#getView(int,
android.view.View, android.view.ViewGroup).
ParametersviewThe view whose scroll state is being reportedscrollStateThe
current scroll state. One of
SCROLL_STATE_IDLEfile:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/reference/android/widget/AbsListView.OnScrollListener.html#SCROLL_STATE_IDLE
, 
SCROLL_STATE_TOUCH_SCROLLfile:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/reference/android/widget/AbsListView.OnScrollListener.html#SCROLL_STATE_TOUCH_SCROLL
 or 
SCROLL_STATE_IDLEfile:///E:/Development/ANDROID_2_0/android-sdk-windows/docs/reference/android/widget/AbsListView.OnScrollListener.html#SCROLL_STATE_IDLE
.

On Mon, Apr 5, 2010 at 6:26 AM, syuta nakamura.sh...@gmail.com wrote:

 hello.
 I use ListView.(Adapter is a Custom Adapter) *extends BaseAdapter

 I wanto to get selected item, when I click the item in the list.
 now, I use OnItemClickListener, OnItemSelectedListener.
 but, This program doesn't do the operation for which I hope.

 not click. I want to get a selected Item in the list, when like mouse_down.
 (Moment when color of item in list changed?)

 Can this be done?

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

 To unsubscribe, reply using remove me as the subject.




-- 
Thank you,
Dilli Rao. M
www.arijasoft.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: need someone to try my app on htc hero

2010-04-04 Thread kanatacrude
Thank you so much folks.  I appreciate the help.

Garnet

On Mar 31, 3:05 am, Dan Sherman impact...@gmail.com wrote:
 Downloads, installs, and runs on USA's Sprint HTC Hero as well.

 - Dan

 On Wed, Mar 31, 2010 at 12:58 AM, ko5tik kpriblo...@yahoo.com wrote:
  German HTC Hero also works
  (downloads and installs,  I do not have time to check
  emulation quality though )

  regards,

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

  To unsubscribe, reply using remove me as the subject.

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

2010-04-04 Thread ~ TreKing
On Sun, Apr 4, 2010 at 8:04 PM, Siva G sivarama...@gmail.com wrote:

 When I publish update to my app, sometimes, the app does not feature in the
 Just In. But sometimes it does too. Have anyone faced this issue?


Your app will only show up in the Just In list if there's been some time
since the last update (like or week or so I think). Otherwise people could
bump their apps on a daily basis (if not sooner).

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

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: how to DEBUG build an APK?

2010-04-04 Thread ~ TreKing
On Sun, Apr 4, 2010 at 9:38 PM, HeHe cnm...@gmail.com wrote:

 my apk stills gets a *false* Config.DEBUG value.


Are you being serious? Which part of Xavier's post did you not understand?

So once again:

On Sun, Apr 4, 2010 at 3:35 PM, Xavier Ducrohet x...@android.com wrote:

 If you are talking about
 http://d.android.com/reference/android/util/Config.html#DEBUG then it's
 based on whether the device build is a debug build. It has nothing to do
 with your app.


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

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

To unsubscribe, reply using remove me as the subject.


[android-developers] App released but only tested using the emulator. Could you please test it to me?

2010-04-04 Thread Gabriel Simões
Hi all,

After spending some time learning about Android´s SDK I´ve finally
finished a first version of my first app: a metronome.
It´s a simple app but I´ve faced some problems with AudioTrack, most
trying to syncronize the audio with changes on the UI. In the end I
did all my tests using the Android Emulator (1.6 and 2.1) since I don
´t have an Android device right now.
I´ve posted this first version on some sites to get an initial
feedback about it: how it works, how is the syncronization between
audio and UI, how easy it is to understand the UI, if it´s stable,
etc.
I would appreciate if you could give me some feedback:

https://slideme.org/application/mobile-metronome
http://andappstore.com/AndroidApplications/apps/Mobile_Metronome

I will post it on Android market as soon as I confirm it´s stable and
working properly.

Thanks,
Gabriel Simões

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Multiple Listviews in single Activity?

2010-04-04 Thread javame_android
Hi,

I want to have multiple listviews in single activity. But only one
listview should be displayed at one time. The listviews will be loaded
dynamically. So, how can I fill all the four listviews at the same
time and display only one.

If anyone knows the solution then please share it over here.

I hope to get a quick response.



Thanks  Regards
Sunil

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] Re: Splash Screen Appears only once

2010-04-04 Thread kavitha
Hi

even i have same problem,,splash screen appears only once,,,and doesnt show
up when application is restarted on device.

How to solve it?Please tell me.

I hope Dror520 has solved the problem.

Thanks
Kavitha

On Mon, Apr 5, 2010 at 6:43 AM, Dror520 dror...@gmail.com wrote:

 thanks for your answer! i figured it out it was actually my fault ...
 lol
 now i'm having a hard time figuring out how to start the mydeals
 activity but keep the splashscreen activity showing on the screen and
 when the mydeals activity is done move to that activity ...
 thanks!

 On Apr 3, 7:34 am, Kumar Bibek coomar@gmail.com wrote:
  Make sure that your onCreate method is called, and it is not resumed.
  You can put some Log statements to check this in your onCreate method.
 
  Thanks and Regards,
  Kumar Bibek
 
  On Mar 30, 3:45 am, Dror520 dror...@gmail.com wrote:
 
 
 
   Hey, i made a splash screen:
   public class SplashScreen extends Activity  {
 
   protected int splashTime = 2000;
 
   @Override
   public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.splash);
 new Handler().postDelayed(new Runnable(){
 @Override
 public void run() {
 Intent intent = new Intent(SplashScreen.this,
 MyDeals.class);
 SplashScreen.this.startActivity(intent);
 SplashScreen.this.finish();
   }
 
 }, splashTime);
 
   }
 
   }
 
   AndroidMenifiest:
 
   activity android:name=.SplashScreen
 android:theme=@android:style/Theme.NoTitleBar
 android:screenOrientation=portrait
   intent-filter
   action android:name=android.intent.action.MAIN /
category
   android:name=android.intent.category.LAUNCHER /
   /intent-filter
   /activity
   activity android:name=.MyDeals
 android:theme=@android:style/Theme.NoTitleBar
 android:screenOrientation=portrait
   intent-filter
   action android:name=android.intent.action.DEFAULT/
   category android:name=android.intent.catagory.VIEW /
 
   /intent-filter
   /activity
 
   it works the first time i put it on the device. but then when i kill
   the application so the application can start over i don't see it. it
   goes straight to the next activity MyDeals.
 
   can you please help me thanks!

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

 To unsubscribe, reply using remove me as the subject.


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

2010-04-04 Thread Maxood
I have updated software and ADT in my Eclipse a number of times. I am
unable to run projects above than 1.5.I have the following errors
showing up in my console window after i create a HelloWorld project
with API Level 4 (1.6):

[2010-04-04 22:21:53 - Framework Resource Parser] Collect resource IDs
failed, class android.R not found in E:\Android\android-sdk_r04-windows
\android-sdk-windows\platforms\android-1.6\android.jar
[2010-04-04 22:21:53 - Framework Resource Parser] Collect permissions
failed, class android.Manifest$permission not found in E:\Android
\android-sdk_r04-windows\android-sdk-windows\platforms
\android-1.6\android.jar
[2010-04-04 22:21:54 - Android Framework Parser] failed to collect
preference classes


How to resolve this 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

To unsubscribe, reply using remove me as the subject.


[android-developers] how to add a local language to my android application

2010-04-04 Thread santha
Hi Guys,

I am new bee to android.Im trying to add local language to my android
application..
But i don't know how to do that.. I tried with the default languages
in android, those are working fine..

Could any one please help me..

Thanks in advance

Cheers
Uday Kiran Pichika

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: Reusable Android library packaging: interest?

2010-04-04 Thread Pieter
Hello Mark,

You are absolutely right: support for reusable components other than
pure Java code (and Java resources) is sorely missed. I personally
think Google should step up and add this kind of support to the
Android eclipse plugin.

In my opinion, the problem of lack of tool support is minor when
batch packaging. Using ant it is easy to copy the content of third
party libraries. Of course a lack of standards does mean that no
viable marketplace for this kind of reusable Android components can
emerge. I believe the real problem lies when developing in-house
libraries for multiple applications.

As maybe 98% or more of the developers use eclipse (just
guestimating), eclipse support for reusable (in-house) components is a
must for getting this concept off the ground (imho). When developing
your own components is easy (just being able add the library Android
project as a dependency to your application project, and not having to
worry about resources etc.), a need to package and distribute library
projects for external use will surely emerge. Ant can actually fill in
most of this need already, although a standardised format and
automatic dependency resolving (maven?) will surely help.

Anyway, if you choose to go the parcel shell route, don't forget a
parcel upgrade command. Personally, If I cannot upgrade easily to a
new version of a library I wouldn't use 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

To unsubscribe, reply using remove me as the subject.


[android-developers] Re: how to DEBUG build an APK?

2010-04-04 Thread HeHe
thanks.

i did, otherwise ADT build tool would complain it.

do you get a true Config.DEBUG value with your apk?

On Apr 3, 7:53 pm, JP joachim.pfeif...@gmail.com wrote:
 On Apr 3, 4:30 pm, HeHe cnm...@gmail.com wrote: yes, the flag is set to 
 true.

 In the right location? In the manifest, it must be placed like this:
 application
     android:debuggable=true





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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] plotting Market sales - determining if your android work is profitable

2010-04-04 Thread Kevin Duffey
Maybe you can host that somewhere and allow people to put in their info to
check it?

On Sat, Apr 3, 2010 at 10:54 PM, kostmo kos...@gmail.com wrote:

 I thought I'd share a script that I've been working on:
 http://www.anddev.org/viewtopic.php?p=30732

 It lets you generate parameterizable histograms of Android Market
 sales by automatically downloading data from Google Checkout.

 Hope someone finds it useful.

 Karl

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

 To unsubscribe, reply using remove me as the subject.


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

2010-04-04 Thread Dianne Hackborn
Fyi this approach is illustrated in the LocalService sample code.

On Sat, Apr 3, 2010 at 7:39 PM, JP joachim.pfeif...@gmail.com wrote:

 Kumar's method might work, but you should look up
 Context.bindService() and ServiceConnection.onServiceConnected()
 to find out how to do this within Android's framework.

 What I do: In MyApplication's
@Override public void onStart()
 I call:
 bindService(new Intent(MyApplication.this, MyService.class),
new (MyServiceConnection(this)),
BIND_AUTO_CREATE);

 MyServiceConnection implements ServiceConnection, and as soon as the
 service is created or bound, you get a call to
 MyServiceConnection.onServiceConnected(), which you implement like
 this:
 public void onServiceConnected(ComponentName name, IBinder service) {
serv = ((MyService.LocalBinder)service).getService();
 }
 With serv being an instance variable of MyApplication of type
 MyService which you can use to call methods of your Service. Hope this
 helps.



 On Mar 30, 1:26 am, T-Droid dev.r...@googlemail.com wrote:
  Hi @all,
 
  I have a design problem with my Android components.
 
  My activity is starting a service which is doing the work in the
  background. What I want is that the service informs the activity about
  state changes. How can I do this?
 
  Normally I would add an observer but the activity has no reference to
  the service. Then I was thinking to take AIDL but this is more for
  inter-process communication.
 
  How is it possible that the service informs the activity about state
  changes? Both are running in the same process. What can you recommend?
 
  Thank you in advance.
 
  T-Droid

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

 To unsubscribe, reply using remove me as the subject.




-- 
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] drawText and drawBitmap start location is different?

2010-04-04 Thread Stanley Li
Hi all,

I want to draw a text on top of a bitmap.

So in my onDraw function, i do the following:

canvas.drawBitmap(myBitmap, 30, 30, mPaint);
textPaint.setTextSize(20);
canvas.drawText(Life X 3, 30, 30, textPaint);

However, it ended up that the text is above the bitmap. (the X position is
correct, but the y position is not).

Can anyone help me with this?

Thanks in advance,
Stanley

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

To unsubscribe, reply using remove me as the subject.


Re: [android-developers] intensive writing to internal memory

2010-04-04 Thread Dianne Hackborn
If you are talking about internal storage (not RAM memory), then yes this is
generally flash memory, and you want to be careful about how much you write
to it for numerous reasons: also extremely important are the battery impact
(writing to flash is expensive) and performance (causing other things that
are accessing flash storage to be blocked by what you are doing).

That said, properly designed flash storage won't let you write to the same
block over and over.  Writes are spread across the flash storage just to
avoid that kind of issue.

On Sat, Apr 3, 2010 at 9:49 AM, Nadav nad...@gmail.com wrote:

 Hi All,

 I'm wondering how worried should I be about writing an app that does a
 lot of writing (logs + db files) to the phone's main memory.

 In the past I was involved in a project that had to do a lot of
 writing to SD card, and the SD cards started malfunctioning after 2-3
 months due to this, and had to be replaced every now and then. The
 developer realized  he was reaching the flash memory's read/write
 guarantees (don't remember the exact specs).

 If the phone's main memory is also flash based, should this be a
 concern? I wouldn't want to damage the phone's memory in a permanent
 way

 I'm also not sure if the issue is related to reading writing to the
 same physical block (the guy was using a single log file and kept
 appending it, so he was constantly accessing the file's header block),
 and whether writing cyclic log files might remedy a problem like
 this..

 Would appreciate any thoughts on this issue.

 Thanks!

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

 To unsubscribe, reply using remove me as the subject.




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