[android-developers] Re: Class ServiceManager missing in Android 2.1

2010-06-07 Thread FrankG
I.E. for android.os.SystemProperties;

This class is their, also in 2.1, but not part of the SDK.

If you make some kind of platform extension and use the android build
system
you access this classes.

Good luck  !

  Frank


On 4 Jun., 14:43, Shobha  wrote:
> Hi,
>
> I am trying to change the DNS settings of Android phone,
> programatiacally.
>
> I need to use the following class:
> android.os.ServiceManager;
> android.os.SystemProperties;
> com.android.internal.telephony;
>
> These classes are available in Android 1.5 but they dont exist in
> Android 2.1.
> Are they replaced by any other class in 2.1?
>
> Any pointers on the substitute classes available in Android2.1?
>
> Regards,
> Shobha

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


[android-developers]

2010-06-07 Thread saurabh sinha
I need a project  a small projects like photo sharing application in android

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

2010-06-07 Thread blindfold
You may wish to follow the issue 2794 discussion at
http://code.google.com/p/android/issues/detail?id=2794 and consider
the use of addCallbackBuffer() and setPreviewCallbackWithBuffer().

Regards

On Jun 6, 8:53 pm, Jay Ha  wrote:
> Hi.
>
> I'm writing an Augmented Reallity codes that should works in realtime,
>
> But the VM's garbage collection hinders my program's performance.
>
> I checked my program's execution time for each in OnPrevFrame(byte[],
> Camera)
>
> and it execution time increases from around 50ms  to 120ms at just
> after each garbage collection.
>
> I copied parts of logs below.
> (local time is just before and after of signal processing, and global
> time is time stamps for every onPreviewFrame() calling )
> -
> 06-06 18:42:26.340: WARN/matchTarget(725):     global 151844ms, local
> 167ms
> 06-06 18:42:26.390: WARN/matchTarget(725):     global 55ms, local 54ms
> 06-06 18:42:26.510: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 20
> objects / 346432 bytes in 88ms
> 06-06 18:42:26.510: WARN/matchTarget(725):     global 119ms, local
> 115ms
> 06-06 18:42:26.600: WARN/matchTarget(725):     global 83ms, local 75ms
> 06-06 18:42:26.670: WARN/matchTarget(725):     global 76ms, local 70ms
> 06-06 18:42:26.740: WARN/matchTarget(725):     global 66ms, local 63ms
> 06-06 18:42:26.820: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 73
> objects / 464096 bytes in 55ms
> 06-06 18:42:26.830: WARN/matchTarget(725):     global 95ms, local 94ms
> 06-06 18:42:26.890: WARN/matchTarget(725):     global 57ms, local 56ms
> 06-06 18:42:26.940: WARN/matchTarget(725):     global 46ms, local 45ms
> 06-06 18:42:27.000: WARN/matchTarget(725):     global 59ms, local 59ms
> 06-06 18:42:27.070: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 144
> objects / 466776 bytes in 56ms
> 06-06 18:42:27.080: WARN/matchTarget(725):     global 80ms, local 79ms
> 06-06 18:42:27.150: WARN/matchTarget(725):     global 71ms, local 65ms
> 06-06 18:42:27.210: WARN/matchTarget(725):     global 61ms, local 60ms
> 06-06 18:42:27.250: WARN/matchTarget(725):     global 41ms, local 39ms
> 06-06 18:42:27.310: WARN/matchTarget(725):     global 57ms, local 41ms
> 06-06 18:42:27.350: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 207
> objects / 584128 bytes in 39ms
> 06-06 18:42:27.420: WARN/matchTarget(725):     global 116ms, local
> 59ms
> 06-06 18:42:27.470: WARN/matchTarget(725):     global 50ms, local 49ms
> 06-06 18:42:27.530: WARN/matchTarget(725):     global 58ms, local 55ms
> 06-06 18:42:27.620: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 210
> objects / 353680 bytes in 58ms
> 06-06 18:42:27.630: WARN/matchTarget(725):     global 96ms, local 95ms
> 06-06 18:42:27.690: WARN/matchTarget(725):     global 61ms, local 57ms
> 06-06 18:42:27.740: WARN/matchTarget(725):     global 57ms, local 55ms
> 06-06 18:42:27.820: WARN/matchTarget(725):     global 76ms, local 68ms
> 06-06 18:42:27.870: WARN/matchTarget(725):     global 49ms, local 46ms
> 06-06 18:42:27.900: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 226
> objects / 469944 bytes in 34ms
> 06-06 18:42:27.970: WARN/matchTarget(725):     global 97ms, local 55ms
> 06-06 18:42:28.000: WARN/matchTarget(725):     global 39ms, local 38ms
> 06-06 18:42:28.080: WARN/matchTarget(725):     global 80ms, local 61ms
> 06-06 18:42:28.170: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 220
> objects / 469184 bytes in 50ms
> 06-06 18:42:28.170: WARN/matchTarget(725):     global 86ms, local 84ms
> 06-06 18:42:28.230: WARN/matchTarget(725):     global 60ms, local 52ms
> 06-06 18:42:28.280: WARN/matchTarget(725):     global 52ms, local 51ms
> 06-06 18:42:28.340: WARN/matchTarget(725):     global 61ms, local 59ms
> 06-06 18:42:28.420: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 193
> objects / 468200 bytes in 53ms
> 06-06 18:42:28.430: WARN/matchTarget(725):     global 82ms, local 81ms
> 06-06 18:42:28.490: WARN/matchTarget(725):     global 64ms, local 57ms
> 06-06 18:42:28.550: WARN/matchTarget(725):     global 61ms, local 60ms
> 06-06 18:42:28.610: WARN/matchTarget(725):     global 57ms, local 56ms
> 06-06 18:42:28.690: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 205
> objects / 468832 bytes in 58ms
> 06-06 18:42:28.700: WARN/matchTarget(725):     global 88ms, local 86ms
> 06-06 18:42:28.750: WARN/matchTarget(725):     global 58ms, local 55ms
> 06-06 18:42:28.810: WARN/matchTarget(725):     global 54ms, local 53ms
> 06-06 18:42:28.860: WARN/matchTarget(725):     global 52ms, local 51ms
> 06-06 18:42:28.990: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 226
> objects / 469544 bytes in 42ms
> 06-06 18:42:28.990: WARN/matchTarget(725):     global 134ms, local
> 100ms
> 06-06 18:42:29.060: WARN/matchTarget(725):     global 62ms, local 52ms
> 06-06 18:42:29.100: WARN/matchTarget(725):     global 49ms, local 47ms
> 06-06 18:42:29.160: WARN/matchTarget(725):     global 51ms, local 50ms
> 06-06 18:42:29.240: DEBUG/dalvikvm(725):

[android-developers]

2010-06-07 Thread saurabh sinha
somebody send me code for wallpaper background to me

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Force Close on calling add/insert to ArrayAdapter

2010-06-07 Thread Eric F
Looks like according to the documentation
http://developer.android.com/reference/android/widget/ArrayAdapter.html
ArrayAdapter needs to reference a TextView where it looks like you are
giving it the ID of a spinner.

-E

On Jun 7, 9:44 pm, scadaguru  wrote:
> I am trying to add a string dynamically on button click but it force
> closes every time.
> Any help is appreciated please.
>
>         String[] mStrings = {
>                 "Abbaye de Belloc", "Abbaye du Mont des Cats",
> "Abertam", "Abondance", "Ackawi",
>                 "Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l
> Pitu", "Airag", "Airedale",
>                 "Aisy Cendre", "Allgauer Emmentaler", "Alverca",
> "Ambert", "American Cheese",
>                 "Ami du Chambertin", "Anejo Enchilado", "Anneau du Vic-
> Bilh", "Anthoriro", "Appenzell"
>         };
>
>         ArrayAdapter myArr;
>
>         myArr = new ArrayAdapter(this,
> android.R.layout.simple_spinner_dropdown_item, mStrings);
>
>         Spinner s1 = (Spinner) findViewById(R.id.Spinner01);
>         s1.setAdapter(myArr);
>
>         myAddBtn.setOnClickListener(new View.OnClickListener() {
>             public void onClick(View v) {
>                 //showToast("Just before add");
>                 myArr.insert("Added string");
>             }});

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


[android-developers] Re: Parsing heavy data

2010-06-07 Thread nexbug
save it to a file, and use the pull parser with the file as the input
stream ???
-g

On Jun 7, 7:52 pm, Frank Weiss  wrote:
> AFAIK SOAP is a bit heavyweight for a mobile device, but in many cases
> people have to use that existing legacy technology. Many people are using
> lighter weight technologies such as SAX, XPP, JSON to download and REST for
> bidirectional data. Also, do you really have to download all 10,000 items to
> make your mobile application work effectively?

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


[android-developers]

2010-06-07 Thread saurabh sinha
hi does any body send me example of Local and guesture builder in android

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

2010-06-07 Thread Zsolt Vasvari
The only way to avoid garbagge collection is to pre-allocate all the
objects used by your app.  You may have to use pools of objects or
tricks like that to make sure you don't create objects while the
augmented reality portion is running.  This is no different from an
action game.  There are some open source games out there that do a
good job at this, for example, Replica Island.

On Jun 7, 2:53 am, Jay Ha  wrote:
> Hi.
>
> I'm writing an Augmented Reallity codes that should works in realtime,
>
> But the VM's garbage collection hinders my program's performance.
>
> I checked my program's execution time for each in OnPrevFrame(byte[],
> Camera)
>
> and it execution time increases from around 50ms  to 120ms at just
> after each garbage collection.
>
> I copied parts of logs below.
> (local time is just before and after of signal processing, and global
> time is time stamps for every onPreviewFrame() calling )
> ---­--
> 06-06 18:42:26.340: WARN/matchTarget(725):     global 151844ms, local
> 167ms
> 06-06 18:42:26.390: WARN/matchTarget(725):     global 55ms, local 54ms
> 06-06 18:42:26.510: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 20
> objects / 346432 bytes in 88ms
> 06-06 18:42:26.510: WARN/matchTarget(725):     global 119ms, local
> 115ms
> 06-06 18:42:26.600: WARN/matchTarget(725):     global 83ms, local 75ms
> 06-06 18:42:26.670: WARN/matchTarget(725):     global 76ms, local 70ms
> 06-06 18:42:26.740: WARN/matchTarget(725):     global 66ms, local 63ms
> 06-06 18:42:26.820: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 73
> objects / 464096 bytes in 55ms
> 06-06 18:42:26.830: WARN/matchTarget(725):     global 95ms, local 94ms
> 06-06 18:42:26.890: WARN/matchTarget(725):     global 57ms, local 56ms
> 06-06 18:42:26.940: WARN/matchTarget(725):     global 46ms, local 45ms
> 06-06 18:42:27.000: WARN/matchTarget(725):     global 59ms, local 59ms
> 06-06 18:42:27.070: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 144
> objects / 466776 bytes in 56ms
> 06-06 18:42:27.080: WARN/matchTarget(725):     global 80ms, local 79ms
> 06-06 18:42:27.150: WARN/matchTarget(725):     global 71ms, local 65ms
> 06-06 18:42:27.210: WARN/matchTarget(725):     global 61ms, local 60ms
> 06-06 18:42:27.250: WARN/matchTarget(725):     global 41ms, local 39ms
> 06-06 18:42:27.310: WARN/matchTarget(725):     global 57ms, local 41ms
> 06-06 18:42:27.350: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 207
> objects / 584128 bytes in 39ms
> 06-06 18:42:27.420: WARN/matchTarget(725):     global 116ms, local
> 59ms
> 06-06 18:42:27.470: WARN/matchTarget(725):     global 50ms, local 49ms
> 06-06 18:42:27.530: WARN/matchTarget(725):     global 58ms, local 55ms
> 06-06 18:42:27.620: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 210
> objects / 353680 bytes in 58ms
> 06-06 18:42:27.630: WARN/matchTarget(725):     global 96ms, local 95ms
> 06-06 18:42:27.690: WARN/matchTarget(725):     global 61ms, local 57ms
> 06-06 18:42:27.740: WARN/matchTarget(725):     global 57ms, local 55ms
> 06-06 18:42:27.820: WARN/matchTarget(725):     global 76ms, local 68ms
> 06-06 18:42:27.870: WARN/matchTarget(725):     global 49ms, local 46ms
> 06-06 18:42:27.900: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 226
> objects / 469944 bytes in 34ms
> 06-06 18:42:27.970: WARN/matchTarget(725):     global 97ms, local 55ms
> 06-06 18:42:28.000: WARN/matchTarget(725):     global 39ms, local 38ms
> 06-06 18:42:28.080: WARN/matchTarget(725):     global 80ms, local 61ms
> 06-06 18:42:28.170: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 220
> objects / 469184 bytes in 50ms
> 06-06 18:42:28.170: WARN/matchTarget(725):     global 86ms, local 84ms
> 06-06 18:42:28.230: WARN/matchTarget(725):     global 60ms, local 52ms
> 06-06 18:42:28.280: WARN/matchTarget(725):     global 52ms, local 51ms
> 06-06 18:42:28.340: WARN/matchTarget(725):     global 61ms, local 59ms
> 06-06 18:42:28.420: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 193
> objects / 468200 bytes in 53ms
> 06-06 18:42:28.430: WARN/matchTarget(725):     global 82ms, local 81ms
> 06-06 18:42:28.490: WARN/matchTarget(725):     global 64ms, local 57ms
> 06-06 18:42:28.550: WARN/matchTarget(725):     global 61ms, local 60ms
> 06-06 18:42:28.610: WARN/matchTarget(725):     global 57ms, local 56ms
> 06-06 18:42:28.690: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 205
> objects / 468832 bytes in 58ms
> 06-06 18:42:28.700: WARN/matchTarget(725):     global 88ms, local 86ms
> 06-06 18:42:28.750: WARN/matchTarget(725):     global 58ms, local 55ms
> 06-06 18:42:28.810: WARN/matchTarget(725):     global 54ms, local 53ms
> 06-06 18:42:28.860: WARN/matchTarget(725):     global 52ms, local 51ms
> 06-06 18:42:28.990: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 226
> objects / 469544 bytes in 42ms
> 06-06 18:42:28.990: WARN/matchTarget(725):     global 134ms, local
> 100ms
> 06-06 18:42:29.060: WARN/matchTarget(725):     global 62ms, local 52ms

Re: [android-developers] Fastest Android Phone -- HTC EVO 4G?

2010-06-07 Thread Chi Kit Leung
For speed of CPU, that is still 1Ghz, same as HTC Desire and N1

On Tue, Jun 8, 2010 at 4:34 AM, Eric  wrote:

> Hello,
>
> Is it correct to assume that the best/fastest Android phone (hardware-
> wise) currently available now, and for the near-term future, is the
> HTC EVO 4G?  If not, can anyone recommend the competing phone?
>
> Second, can I buy this phone (or any other phone recommended here)
> without a cellular plan?  I am a new Android developer and I just want
> access to the fastest hardware out there to test my application.
>
> Thank You,
> Eric
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

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

[android-developers] How to apply background color to all the activities

2010-06-07 Thread subrat kumar panda
i have applied the background color to all the activities by using
 to the AndroidManifest file.

but the color affected to the background partly, in some pages it only coloured
textbox  names, nowhere to the background.



#99FF99



if anybody knows please help me,how to apply a successful theme.

Thanks in advance,

Best Regards
Subrat kumar Panda
India.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Clearing all the Task within an application while activity launch

2010-06-07 Thread Asif k
Hi TreKing,

Thanks for your reply.

I tried to set same taskaffinity for both the activity but application
failed to launch at that time.

So it didn't work. Any other idea?

Thanks,
Asif

On Jun 8, 5:26 am, TreKing  wrote:
> On Mon, Jun 7, 2010 at 9:19 AM, Asif k  wrote:
> > Is there any way to clear all the tasks within the application?
>
> Try 
> this:http://developer.android.com/intl/de/guide/topics/manifest/activity-e...
>
> -
> 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


[android-developers] prob in attaching txt file while email from internal package file storage

2010-06-07 Thread adag
Hello,

I am successful in creating file using openFileOutput(). and can read
the file using openFileInput().
I am able attach file from external storage sdcard while emailing the
same using getExternalStorageDirectory as
sendIntent.putExtra(Intent.EXTRA_STREAM,
Uri.parse("file://"+Environment.getExternalStorageDirectory()+"/
zibra.txt"));

But while trying to attach file from the openOutputFile stored area
using sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+
getFilesDir() + "/zibra.txt"));, resulting emptied file emailing.
My file is stored in "/data/data/com.example/files/zibra.txt".

Could you please point out what is going wrong in it?
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_EMAIL, recipients);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "attachment test");
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse
("file://"+ getFilesDir() + "/zibra.txt"));

//("file://"+Environment.getExternalStorageDirectory()+"/
zibra.txt"));
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "Send mail..."));

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


[android-developers] Re: How to add shadow for text drawn on google map

2010-06-07 Thread SREEHARI


Hi Nithin & Mark,

   Thank you very much.I used paint.setShadowLayer() and it works
fine.

Regards,
SREEHARI

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

2010-06-07 Thread hansamann
Another question I have with regards to this: how can I load a HMTL
file including resources from the package/classpath?

On Jun 7, 8:03 pm, hansamann  wrote:
> Hi all,
>
> I'd like to create dynamic HTML in my app that will also include
> referecences to a few images. The images should not be resolved /
> requested by the internet, but instead I would like to somehow
> intercept these calls and then respond will classpath resources to
> those requests. I think this is similar how phonegap or titanium do
> this, but this is just an assumption.
>
> Does anyone know how webkit's resource loading can be intercepted and
> resources can be served from a local cache/ classpath intead of
> contacting the internet?
>
> Cheers
> Sven

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

2010-06-07 Thread Matthew Patience
No unfortunately it doesn't work. Thanks for the tip though.

Matt

On Jun 4, 2:48 am, Daniel  wrote:
> Did you try Project -> Clean?
> Not even sure if its relevant, but something similar happened to me a
> few weeks ago and that helped.
>
> On Jun 3, 1:00 pm,MatthewPatience
> wrote:
>
> > I am trying to add some updates to an already released application but
> > something has happened with my workspace that prevents me from Running
> > or Exporting the application. I keep getting the following:
>
> > Error generating final archive: duplicate entry: res/drawable-hdpi/
> > icon.png    TwitocTwo        Unknown    Android Packaging Problem
>
> > You think it would be an easy fix but I looked into the HDPI drawables
> > folder and there were no doubles. I even went as far as to delete the
> > entire folder and the error still appears.
>
> > Anyone got any clever ideas?

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


[android-developers] Force Close on calling add/insert to ArrayAdapter

2010-06-07 Thread scadaguru
I am trying to add a string dynamically on button click but it force
closes every time.
Any help is appreciated please.

String[] mStrings = {
"Abbaye de Belloc", "Abbaye du Mont des Cats",
"Abertam", "Abondance", "Ackawi",
"Acorn", "Adelost", "Affidelice au Chablis", "Afuega'l
Pitu", "Airag", "Airedale",
"Aisy Cendre", "Allgauer Emmentaler", "Alverca",
"Ambert", "American Cheese",
"Ami du Chambertin", "Anejo Enchilado", "Anneau du Vic-
Bilh", "Anthoriro", "Appenzell"
};

ArrayAdapter myArr;

myArr = new ArrayAdapter(this,
android.R.layout.simple_spinner_dropdown_item, mStrings);

Spinner s1 = (Spinner) findViewById(R.id.Spinner01);
s1.setAdapter(myArr);


myAddBtn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
//showToast("Just before add");
myArr.insert("Added string");
}});


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


[android-developers] Re: Lost with custom drawable animation

2010-06-07 Thread skink


Tomtom G wrote:
> Hi everyone,
>
> I'm currently developing an application with custom drawables and i'm
> kind of lost.
> I do not use XML since all kind of the parameters have to be computed
> on the fly.
> I have a main custom view holding all the gui.
> I made a class mcDrawable extending drawable implementing
> Drawable.Callback.
> In its draw method, i draw a couple of primitive (circles, and so on)
> An instance of mcDrawable is displayed via the onDraw method of the
> view.
>
> When I trigger a motionEvent in the view, it calls a certain method in
> an instance of mcDrawable which modifies the shapes. Since I call an
> invalidate() after each event in the view, the drawable is updated
> nicely during the motion. So far, all is good.
>
> When I stop the motion (ACTION_UP), it triggers another method in the
> instance of mcDrawable which send a message to an Handler in
> mcDrawable which animate it by the mean of delayed messages. However,
> the View is not aware of these changes and therefore, does not redraw
> the drawable.
> To achieve the proper behavior, i made the view static, with a
> Handler, and send a message from mcDrawable Handler to the one of the
> view. When the view receive it, it invalidates. However, I don't think
> that its the proper way to achieve this !
>
> So my question is the following: is there a proper way for mcDrawable
> to ask the View to redraw it, by the mean of Drawable.Callbacks for
> example ? I understand that it may use a selfInvalidate() in
> mcDrawable, but I don't understand how to link it to the view. Could
> someone help me ?
>
> Thanks !

i think you probably need to override verifyDrawable

http://developer.android.com/intl/fr/reference/android/view/View.html#verifyDrawable(android.graphics.drawable.Drawable)

pskink

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


[android-developers] Accessing external USB storage

2010-06-07 Thread Brian
Are there  Android API's  to access data from an external USB device,
such as a hard drive?  I need to write an app to interface with an
external usb device, is this possible?

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


RE: [android-developers] Why my application doesn't in application history?

2010-06-07 Thread 楊健
I think the new activity is the same application which you are running. Try
to launch some other application  gallery e.g.

 

  _  

From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Jiang
Sent: Tuesday, June 08, 2010 12:38 PM
To: android-developers@googlegroups.com
Subject: [android-developers] Why my application doesn't in application
history?

 


I start a new activity with the following statements:

   Intnet intent = new Intent(this, NewActivity.class);
   intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_MULTIPLE_TASK |
Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
   startActivity(intent);

After the new activity is launched, I press HOME key for about 3 seconds,
and I see the a dialog with messages "No recent applications".

why my application is disappeared?

thanks.
-Jiang


  

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

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

Re: [android-developers] Can't grok Activity life cycle.

2010-06-07 Thread Leigh McRae
The common case is where an activity is put into the background and 
isn't killed for memory.  Forcing an Activity to save it's state when 
it's not required is a waste of resources on a resource scarce platform.



On 6/7/2010 10:38 PM, Frank Weiss wrote:


Hmm. I'm trying to grok how a world simulation that needs lots of 
memory is a common case instead of an extreme case for a handheld 
mobile device.


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


--
Leigh McRae
www.lonedwarfgames.com

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


[android-developers] Why my application doesn't in application history?

2010-06-07 Thread Jiang
I start a new activity with the following statements:

   Intnet intent = new Intent(this, NewActivity.class);
   intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | 
Intent.FLAG_ACTIVITY_MULTIPLE_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
   startActivity(intent);

After the new activity is launched, I press HOME key for about 3 seconds, and I 
see the a dialog with messages "No recent applications".

why my application is disappeared?

thanks.
-Jiang



  

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

Re: [android-developers] Android Geolocation app, Find if a user is facing a certain Location using Digital Compass.

2010-06-07 Thread Frank Weiss
Keep Googling, you should find something related to spherical geometry.

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

[android-developers] Intercepting WebKitView resource requests, serving from classpath

2010-06-07 Thread hansamann
Hi all,

I'd like to create dynamic HTML in my app that will also include
referecences to a few images. The images should not be resolved /
requested by the internet, but instead I would like to somehow
intercept these calls and then respond will classpath resources to
those requests. I think this is similar how phonegap or titanium do
this, but this is just an assumption.

Does anyone know how webkit's resource loading can be intercepted and
resources can be served from a local cache/ classpath intead of
contacting the internet?

Cheers
Sven

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


[android-developers] Picking up contacts: difference in behaviour between HTC and NexusOne - SDK 2.1-update1

2010-06-07 Thread frantz lohier
Hi,

I wrote an app that invokes the contact manager in the following way:

Intent pickcontact = new Intent(Intent.ACTION_PICK, People.CONTENT_URI);
startActivityForResult(pickcontact, CONTACTPICKED);

I am experiencing 2 different behavior between HTC phones and the NexusOne,
all with firmware 2.1-update1.

Thanks work properly on the NexusOne (i.e., my application is getting access
to all my contact along the primary phone number of that contact list). On
HTC phones however (incredible and the hero), the list of contact I get
represents some sort of index as opposed to the actual contact name/phone
number.

Am I missing anything ?

Thanks,

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

Re: [android-developers] WSDL Webservice

2010-06-07 Thread Frank Weiss
It's much better in most cases to just write an API you can use on the
client end. I remember when I was writing a SOAP client for Hitbox, I had
the darndest time trying to set up Axis and find the correct WSDL. After a
day or two, I stumbled upon the API of theirs which was 100 times easier to
use.

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

2010-06-07 Thread Stacy
Ah found it, override getAccountRemovalAllowed()

Cheers
-S

On Jun 7, 10:38 pm, Connick  wrote:
> Hi folks,
>
> Been doing some digging but so far it's not apparent on how I can have my
> app be notified (via intent possibly?) on when an account type associated
> with my app is removed from the manager. When this happens I need to perform
> data cleanup for that account in a local database etc.
>
> Any insight appreciated.
>
> Cheers,
> Stacy

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


[android-developers] Re: how to change TextSwitcher's textcolor or textsize??

2010-06-07 Thread didihome
Neilz thank , it's working.XD

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

2010-06-07 Thread Frank Weiss
AFAIK SOAP is a bit heavyweight for a mobile device, but in many cases
people have to use that existing legacy technology. Many people are using
lighter weight technologies such as SAX, XPP, JSON to download and REST for
bidirectional data. Also, do you really have to download all 10,000 items to
make your mobile application work effectively?

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

Re: [android-developers] Can't grok Activity life cycle.

2010-06-07 Thread Frank Weiss
Hmm. I'm trying to grok how a world simulation that needs lots of memory is
a common case instead of an extreme case for a handheld mobile device.

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

[android-developers] Possible to receive notification of account removal?

2010-06-07 Thread Connick
Hi folks,

Been doing some digging but so far it's not apparent on how I can have my
app be notified (via intent possibly?) on when an account type associated
with my app is removed from the manager. When this happens I need to perform
data cleanup for that account in a local database etc.

Any insight appreciated.

Cheers,
Stacy

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

2010-06-07 Thread gosh
>Like Olivier says, most of us don't have the time to
>spend in fixing open source bugs.

What do you think the free phones are for.
Did you really think they were free.

Steve

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


[android-developers] Re: App Pulled from Market

2010-06-07 Thread Scott Kennedy
But that doesn't help me.  As it stands right now, I can't upload a
new version.

I cannot find any written policy that I've violated, but I have a
suspicion as to the part of my app that Google didn't like.  I can
remove it without much trouble, but it doesn't help me get back in the
Market.

On Jun 7, 8:47 pm, TreKing  wrote:
> On Mon, Jun 7, 2010 at 3:35 PM, Scott Kennedy  wrote:
> > Does anyone know how I can get in touch with someone on the Market team so
> > that I can make the necessary changes to get my app back in the Market?
>
> You can't - they don't respond to inquiries of any sort. You're probably
> SOL.
> Your best bet is to review the policy and determine for yourself what you
> supposedly did wrong.
> 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


Re: [android-developers] Can't grok Activity life cycle.

2010-06-07 Thread Leigh McRae
If you have a world simulation with lots of entities an what not it adds 
up.  I just did some tests and onSaveInstanceState() always gets called 
when my activity is put into the background.  This is an unnecessary 
burden to put on the app developer and will lead to many game developers 
to just killing their activity and forcing the user to pay for the 
reload.  The framework should have been written for the common case and 
not the extreme.  Who's idea was it anyway to encourage the user to 
leave a trail of open apps behind them!


Leigh

On 6/7/2010 9:36 PM, Frank Weiss wrote:


I wonder what you mean by a fair amount of serialization. It would 
seem to me a kilobyte or so would suffice for most mobile 
applications. If it's much, much more than that, I think someone 
suggested using a caching strategy instead. I would suppose that means 
setting aside a few megs on the SD Card and storing your state there, 
pulling it into main memory only when it's needed.


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


--
Leigh McRae
www.lonedwarfgames.com

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


[android-developers] Re: StackOverflowError in UI redraw

2010-06-07 Thread Zsolt Vasvari
Also, I just fixed my Android 1.5 issue.  I simply made sure that I
did a .toString() on all my CharSequence objects before calling
setText().  That removes a bunch of calls from the stack as well as
plaing String objects are simpler to draw than a generic CharSequence
Of course, that assumes that all your items are simple non-styled
strings, which were in my case.


On Jun 8, 8:44 am, Zsolt Vasvari  wrote:
> Are you using the tab widget by any chance?  Because adding activities
> inside tabs will take up at least 5 layers in your UI hierarchy.  I am
> struggling with the same issue which only crashes on 1.5, 1.6+ is
> fine.
>
> On Jun 7, 9:16 pm, Thierry Legras  wrote:
>
>
>
> > Hi,
>
> > I am facing rare StackOverflowError in my application during UI redraw. Does
> > it mean memory is exhausted? How can i fix this? And finally how can i be
> > sure the issue will be definitevly fixed??
>
> > Any advice would be welcome :)
> > Thierry.
>
> > Here is the backtrace:
>
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): java.lang.StackOverflowError
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at android.text.method.
>
> > ReplacementTransformationMethod$ReplacementCharSequence.getChars(Replacemen­­tTransformationMethod.java:151)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.TextUtils.getChars(TextUtils.java:69)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Layout$Ellipsizer.getChars(Layout.java:1778)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.TextUtils.getChars(TextUtils.java:69)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.graphics.Paint.measureText(Paint.java:1016)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Styled.each(Styled.java:124)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Styled.foreach(Styled.java:249)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Styled.measureText(Styled.java:371)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Layout.measureText(Layout.java:1600)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Layout.getLineMax(Layout.java:654)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Layout.getLineMax(Layout.java:628)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Layout.getHorizontal(Layout.java:552)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Layout.getHorizontal(Layout.java:513)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.text.Layout.getPrimaryHorizontal(Layout.java:498)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.widget.TextView.getFocusedRect(TextView.java:3962)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.FocusFinder.findNextFocus(FocusFinder.java:72)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.focusSearch(ViewGroup.java:473)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.View.focusSearch(View.java:3032)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.widget.TextView.onCreateInputConnection(TextView.java:4342)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.inputmethod.InputMethodManager.startInputInner(InputMethodMana­­ger.java:933)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.j­­ava:1105)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.inputmethod.InputMethodManager.isActive(InputMethodManager.jav­­a:530)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.widget.TextView.onDraw(TextView.java:3893)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.View.draw(View.java:5838)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.drawChild(ViewGroup.java:1540)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.drawChild(ViewGroup.java:1538)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.View.draw(View.java:5841)
> > 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> > android.view.ViewGroup.drawChild(ViewGroup.java:1540)

[android-developers] Lost with custom drawable animation

2010-06-07 Thread Tomtom G
Hi everyone,

I'm currently developing an application with custom drawables and i'm
kind of lost.
I do not use XML since all kind of the parameters have to be computed
on the fly.
I have a main custom view holding all the gui.
I made a class mcDrawable extending drawable implementing
Drawable.Callback.
In its draw method, i draw a couple of primitive (circles, and so on)
An instance of mcDrawable is displayed via the onDraw method of the
view.

When I trigger a motionEvent in the view, it calls a certain method in
an instance of mcDrawable which modifies the shapes. Since I call an
invalidate() after each event in the view, the drawable is updated
nicely during the motion. So far, all is good.

When I stop the motion (ACTION_UP), it triggers another method in the
instance of mcDrawable which send a message to an Handler in
mcDrawable which animate it by the mean of delayed messages. However,
the View is not aware of these changes and therefore, does not redraw
the drawable.
To achieve the proper behavior, i made the view static, with a
Handler, and send a message from mcDrawable Handler to the one of the
view. When the view receive it, it invalidates. However, I don't think
that its the proper way to achieve this !

So my question is the following: is there a proper way for mcDrawable
to ask the View to redraw it, by the mean of Drawable.Callbacks for
example ? I understand that it may use a selfInvalidate() in
mcDrawable, but I don't understand how to link it to the view. Could
someone 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


Re: [android-developers] Can't grok Activity life cycle.

2010-06-07 Thread Frank Weiss
I wonder what you mean by a fair amount of serialization. It would seem to
me a kilobyte or so would suffice for most mobile applications. If it's
much, much more than that, I think someone suggested using a caching
strategy instead. I would suppose that means setting aside a few megs on the
SD Card and storing your state there, pulling it into main memory only when
it's needed.

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

2010-06-07 Thread TreKing
On Sat, Jun 5, 2010 at 11:56 PM, saurabh sinha  wrote:

> what are the new things in android 2.1


You can answer this for yourself in about 1 minute by looking at the
documentation.

-
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

Re: [android-developers] Can't grok Activity life cycle.

2010-06-07 Thread Leigh McRae
Got your reply late for some reason. I would agree with 
onSaveInstanceState being called whenever you are put into a killable 
state as it's the only thing that makes sense.  As it turns out I am 
just about to do some tests with the logging you suggested.  If this is 
the case it's a poor design IMHO.  If you have a simulation that 
requires a fair amount of serialization to save it's state it's not 
going to work all that well.


The Android way seems to suggest that you make an Activity per full 
screen and use the stack.  So when I push an Activity for something like 
my game options, I am forced to serialize my state if 
onSaveInstanceState comes calling when the common case will be that the 
user comes right back.  If I wrote code at work with comments like it 
may or may not be called, they would likely tell me to enjoy my new job.


Leigh

On 6/6/2010 9:30 PM, Daniel M. Drummond wrote:

On Sun, 2010-06-06 at 18:18 -0700, Leigh McRae wrote:
   

I am having a really hard time grokking the Activity life cycle
concept.  The main issue is with onStop() and onDestory() not being
guaranteed to be called before the process is killed.  I though I had
it figured out when I saw that the system calls onSaveInstanceState()
when it's shutting down the activity to claim some memory.  Thing is
that the docs says onSaveInstanceState() will be called before
onPause() but how does the system know at this point whether the
activity will be killed by the system or the user?

Here is a use case:

1) My activity starts up and is running.
2) At some point I want to show a web page so I use an Intent to start
an activity.
3) The web browser covers my app/activity so I would expect onPause()
to be called followed by onStop().

At this point it's my understanding that all bets are off and I can be
killed at any point without be called.

4) Since the system has enough memory onSaveInstance() doesn't get
called.
5) The user presses home and decides to open some app which requires a
lot of memory.
6) System wants more memory and decides to kill my app but I am
already stopped (onPause() has been called).  What happens here?

I am finding this a really serious problem since onPause() pretty much
needs to be treated as onDestory() as far as I can tell. If my app has
to be able to survive being killed without onStop() and onDestory()
being called, why bother having them?
 

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

under the heading "Saving Activity State", we find

"Unlike onPause() and the other methods discussed earlier,
onSaveInstanceState() and onRestoreInstanceState() are not lifecycle
methods. They are not always called. For example, Android calls
onSaveInstanceState() before the activity becomes vulnerable to being
destroyed by the system, but does not bother calling it when the
instance is actually being destroyed by a user action (such as pressing
the BACK key). In that case, the user won't expect to return to the
activity, so there's no reason to save its state.

"Because onSaveInstanceState() is not always called, you should use it
only to record the transient state of the activity, not to store
persistent data. Use onPause() for that purpose instead."

So the way I understand it is that onSaveInstanceState() is called
whenever the *system* is putting the activity into a "killable" state,
thus allowing you to save the current state for it to be reloaded when
your activity is loaded again, but if the activity is being destroyed by
a user action, (where there is no expectation of an unchanged state) if
you want to save any state, you need to do it yourself in onPause().

So in your use case onSaveInstanceState() *will* be called, and the
state can be saved, so 4) is completely incorrect.

Feel free to correct me if I am wrong
Hope that helps

Dan


   


--
Leigh McRae
www.lonedwarfgames.com

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


Re: [android-developers] Encrypt and decrypt .apk files

2010-06-07 Thread Dianne Hackborn
It depends on what you are modifying.  If you are just changing a bitmap,
you can just modify that file.  However, whatever change you make, you will
always need to re-sign the .apk (with jarsigner) with your own cert.  You
probably will need to strip out the jar manifest files before doing so, so
that the existing signing is not bad (mismatching the contents).

On Mon, Jun 7, 2010 at 10:03 AM, AndyP  wrote:

> Hi All,
>
> I was wondering how to break apart .apk files in Windows to see all of
> it's components, edit some of the components, and put the file back
> together.
>
> I have been able to open up the file to see the components using
> WinZip but I am unsure of how to re-"make" the .apk file again using
> WinZip. Is there a special option within winzip or can you just change
> the extension from .zip to .apk? Not sure if this matters, but
> the .apk files are being used within Eclipse in an emulator as of now.
>
> Thank you!
>
> Andy
>
> P.s. First time poster here so please go easy on me
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



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

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

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

Re: [android-developers] Use DownloadProvider or not?

2010-06-07 Thread Dianne Hackborn
DownloadProvider is not an SDK API, so should not be used by anything that
goes on Market.  You could copy its code into your app if you wanted to.

On Mon, Jun 7, 2010 at 5:21 PM, ivan  wrote:

> Hello,
>
> I'm building an extensive Android app that will be pre-packaged on
> many soon to be released devices.
>
> I have seen from the post that in general one should not use the
> DownloadProvider, except for the cases where the app is prepackaged on
> the phone.  This is correct, right?
>
> I need robust downloading functionality that will allow
>
> - Specification of the download location
> - Specification of the connection type for download (i.e. WiFi only).
> - Restoration of downloading after connection interruption
> - Status of current download progress
> - pause/stop/resume for downloads
> - progressive downloading of media files to specific locations
>
> Should I avoid using the DownloadProvider for downloading media files?
>
> Are there any other downloaders available for android that already
> handle such downloading feats?
>
> 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
>



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

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

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

Re: [android-developers] App Pulled from Market

2010-06-07 Thread TreKing
On Mon, Jun 7, 2010 at 3:35 PM, Scott Kennedy  wrote:

> Does anyone know how I can get in touch with someone on the Market team so
> that I can make the necessary changes to get my app back in the Market?
>

You can't - they don't respond to inquiries of any sort. You're probably
SOL.
Your best bet is to review the policy and determine for yourself what you
supposedly did wrong.
Good luck.

-
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

[android-developers] Re: StackOverflowError in UI redraw

2010-06-07 Thread Zsolt Vasvari
Are you using the tab widget by any chance?  Because adding activities
inside tabs will take up at least 5 layers in your UI hierarchy.  I am
struggling with the same issue which only crashes on 1.5, 1.6+ is
fine.

On Jun 7, 9:16 pm, Thierry Legras  wrote:
> Hi,
>
> I am facing rare StackOverflowError in my application during UI redraw. Does
> it mean memory is exhausted? How can i fix this? And finally how can i be
> sure the issue will be definitevly fixed??
>
> Any advice would be welcome :)
> Thierry.
>
> Here is the backtrace:
>
> 06-07 15:11:20.318 E/AndroidRuntime(22775): java.lang.StackOverflowError
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at android.text.method.
>
> ReplacementTransformationMethod$ReplacementCharSequence.getChars(Replacemen­tTransformationMethod.java:151)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.TextUtils.getChars(TextUtils.java:69)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Layout$Ellipsizer.getChars(Layout.java:1778)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.TextUtils.getChars(TextUtils.java:69)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.graphics.Paint.measureText(Paint.java:1016)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Styled.each(Styled.java:124)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Styled.foreach(Styled.java:249)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Styled.measureText(Styled.java:371)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Layout.measureText(Layout.java:1600)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Layout.getLineMax(Layout.java:654)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Layout.getLineMax(Layout.java:628)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Layout.getHorizontal(Layout.java:552)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Layout.getHorizontal(Layout.java:513)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.text.Layout.getPrimaryHorizontal(Layout.java:498)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.widget.TextView.getFocusedRect(TextView.java:3962)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.FocusFinder.findNextFocus(FocusFinder.java:72)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.focusSearch(ViewGroup.java:473)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.focusSearch(ViewGroup.java:475)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.View.focusSearch(View.java:3032)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.widget.TextView.onCreateInputConnection(TextView.java:4342)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.inputmethod.InputMethodManager.startInputInner(InputMethodMana­ger.java:933)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.inputmethod.InputMethodManager.checkFocus(InputMethodManager.j­ava:1105)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.inputmethod.InputMethodManager.isActive(InputMethodManager.jav­a:530)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.widget.TextView.onDraw(TextView.java:3893)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.View.draw(View.java:5838)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.drawChild(ViewGroup.java:1540)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.drawChild(ViewGroup.java:1538)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.View.draw(View.java:5841)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.drawChild(ViewGroup.java:1540)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.drawChild(ViewGroup.java:1538)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGroup.dispatchDraw(ViewGroup.java:1282)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.View.draw(View.java:5944)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.widget.FrameLayout.draw(FrameLayout.java:352)
> 06-07 15:11:20.318 E/AndroidRuntime(22775): at
> android.view.ViewGro

Re: [android-developers] Intro plus question :)

2010-06-07 Thread Mark Murphy
Jason Hensler wrote:
> Before I get started here, I do want to make sure I have the correct
> software to program an android widget. I have eclipse with the android
> sdk.. from reading other websites this is what i have installed.. Is
> there any 'Howto's' out anywhere to help me out?

Developing an app widget, while not terribly hard, is not what I would
recommend as a starting project. Make an ordinary Android application
first, then convert it to an app widget later.

So, you can start with Hello, World:

http://developer.android.com/resources/tutorials/hello-world.html

and work your way up from there. Besides the developer.android.com site
and this list, you might consider searching or posting on StackOverflow,
with the 'android' tag:

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

Here are a couple of posts of mine regarding getting support for Android
development:

http://www.androidguys.com/2009/06/22/youve-got-questions-thats-understandable/
http://www.androidguys.com/2009/12/21/devs-get-thee-to-stackoverflow/

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

Android App Developer Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Clearing all the Task within an application while activity launch

2010-06-07 Thread TreKing
On Mon, Jun 7, 2010 at 9:19 AM, Asif k  wrote:

> Is there any way to clear all the tasks within the application?


Try this:
http://developer.android.com/intl/de/guide/topics/manifest/activity-element.html#aff

-
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

[android-developers] Use DownloadProvider or not?

2010-06-07 Thread ivan
Hello,

I'm building an extensive Android app that will be pre-packaged on
many soon to be released devices.

I have seen from the post that in general one should not use the
DownloadProvider, except for the cases where the app is prepackaged on
the phone.  This is correct, right?

I need robust downloading functionality that will allow

- Specification of the download location
- Specification of the connection type for download (i.e. WiFi only).
- Restoration of downloading after connection interruption
- Status of current download progress
- pause/stop/resume for downloads
- progressive downloading of media files to specific locations

Should I avoid using the DownloadProvider for downloading media files?

Are there any other downloaders available for android that already
handle such downloading feats?

Thanks.

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


Re: [android-developers] Does specifying 2.2 exclude any devices?

2010-06-07 Thread TreKing
On Mon, Jun 7, 2010 at 6:45 AM, Neilz  wrote:

> I wonder if specifying this could have caused restrictions for
> some devices? As there has been a marked drop in usage stats since I
> made this release.
>

Don't think it should, but you never know. How long ago was this? Apparently
the Android Market is crapping on itself the last few days which could be
the cause of the decrease in usage you noticed.

-
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

Re: [android-developers] Re: Why is Android so buggy?

2010-06-07 Thread Olivier Guilyardi
On 06/08/2010 01:48 AM, Xavier Ducrohet wrote:
> On Mon, Jun 7, 2010 at 4:33 PM, Olivier Guilyardi  wrote:
>> I think that your problem is that the whole of Android is too monolithic. You
>> are mentioning branches where you could think in terms of standalone modules.
> 
> monolithic? Have you looked at git.source.android.com ? There are over
> 150 projects which are exactly modules.

Yes, I looked there many times, and often got lost browsing the projects list at
the git root ;)

> When Dianne refer to branches she talks about release branches. Work
> for froyo, gingerbread and what comes after must be in different
> branches.

Okay, official releases imply branches of course.

> Although, some other projects can have their own branch strategy:
> branching for sdk.git is now split from the rest of the platform, and
> we follow our own release schedule, this is likely to happen for other
> projects that move to the open.
> 
>> For example, let's take Dalvik, it's a great VM. So why isn't that included 
>> in
>> Debian/Ubuntu for example, why can't I: aptitude install dalvik?
> 
> Dalvik is its own module already. As to why it's not in Debian/Ubuntu,
> you can talk to these guys. It's up to them to include it, not us.

For what it's worth, one my apps got included in several Linux distribs a couple
of month right after the first release, without me asking for anything. It was a
much simpler project of course, but it looked like a flexible standalone app.
And even if getting open, Dalvik doesn't yet /look/ like that, although it 
could.

>> Whereas WebKit *is*. There even are python bindings. Do you get my point?
>>
>> With modularity, you could maybe safely turn non-sensitive modules into
>> standalone projects, which could be used outside of Android. And that could
>> result in wider interest.
> 
> We *have* modularity, we *are* moving non-sensitive projects to the
> open (as Dan said Dalvik is working toward moving to the open).

Then maybe that it's just a matter presenting things as standalone projects, not
just git projects. A matter of communication. Right now, it all looks, or better
said, feels, like a whole big project.

> It's not like we don't want to do all this stuff. It's just that it's
> a huge projects (or a huge number of projects if you prefer), and
> there's some inertia in the way we've been doing things and it's going
> to take us a while to improve, but it *is* happening.

Okay, I'll look forward into it.

Anyway, that was just my $0.99 ideas ;)

Thanks and keep up the good work!

--
  Olivier

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


[android-developers] Re: Can't grok Activity life cycle.

2010-06-07 Thread Indicator Veritatis
You say, " The main issue is with onStop() and onDestory() not being
> guaranteed to be called before the process is killed.  ", but I wonder how 
> you reached this conclusion. Did you actually see this in the emulator?

I consider the question important, because according to the
description of onDestroy() given at the link, it is always called. For
it says, "Called before the activity is destroyed. This is the final
call that the activity will receive."

This wording seems pretty general and unconditional to me. If you
override onDestroy() in the emulator and put a log message there, you
should see it get called.

On Jun 6, 6:30 pm, "Daniel M. Drummond"  wrote:
> On Sun, 2010-06-06 at 18:18 -0700, Leigh McRae wrote:
> > I am having a really hard time grokking the Activity life cycle
> > concept.  The main issue is with onStop() and onDestory() not being
> > guaranteed to be called before the process is killed.  I though I had
> > it figured out when I saw that the system calls onSaveInstanceState()
> > when it's shutting down the activity to claim some memory.  Thing is
> > that the docs says onSaveInstanceState() will be called before
> > onPause() but how does the system know at this point whether the
> > activity will be killed by the system or the user?
>
> > Here is a use case:
>
> > 1) My activity starts up and is running.
> > 2) At some point I want to show a web page so I use an Intent to start
> > an activity.
> > 3) The web browser covers my app/activity so I would expect onPause()
> > to be called followed by onStop().
>
> > At this point it's my understanding that all bets are off and I can be
> > killed at any point without be called.
>
> > 4) Since the system has enough memory onSaveInstance() doesn't get
> > called.
> > 5) The user presses home and decides to open some app which requires a
> > lot of memory.
> > 6) System wants more memory and decides to kill my app but I am
> > already stopped (onPause() has been called).  What happens here?
>
> > I am finding this a really serious problem since onPause() pretty much
> > needs to be treated as onDestory() as far as I can tell. If my app has
> > to be able to survive being killed without onStop() and onDestory()
> > being called, why bother having them?
>
> Fromhttp://developer.android.com/guide/topics/fundamentals.html#actlife
>
> under the heading "Saving Activity State", we find
>
> "Unlike onPause() and the other methods discussed earlier,
> onSaveInstanceState() and onRestoreInstanceState() are not lifecycle
> methods. They are not always called. For example, Android calls
> onSaveInstanceState() before the activity becomes vulnerable to being
> destroyed by the system, but does not bother calling it when the
> instance is actually being destroyed by a user action (such as pressing
> the BACK key). In that case, the user won't expect to return to the
> activity, so there's no reason to save its state.
>
> "Because onSaveInstanceState() is not always called, you should use it
> only to record the transient state of the activity, not to store
> persistent data. Use onPause() for that purpose instead."
>
> So the way I understand it is that onSaveInstanceState() is called
> whenever the *system* is putting the activity into a "killable" state,
> thus allowing you to save the current state for it to be reloaded when
> your activity is loaded again, but if the activity is being destroyed by
> a user action, (where there is no expectation of an unchanged state) if
> you want to save any state, you need to do it yourself in onPause().
>
> So in your use case onSaveInstanceState() *will* be called, and the
> state can be saved, so 4) is completely incorrect.
>
> Feel free to correct me if I am wrong
> Hope that helps
>
> Dan

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


Re: [android-developers] Re: Why is Android so buggy?

2010-06-07 Thread Xavier Ducrohet
On Mon, Jun 7, 2010 at 4:33 PM, Olivier Guilyardi  wrote:
> I think that your problem is that the whole of Android is too monolithic. You
> are mentioning branches where you could think in terms of standalone modules.

monolithic? Have you looked at git.source.android.com ? There are over
150 projects which are exactly modules.
When Dianne refer to branches she talks about release branches. Work
for froyo, gingerbread and what comes after must be in different
branches.

Although, some other projects can have their own branch strategy:
branching for sdk.git is now split from the rest of the platform, and
we follow our own release schedule, this is likely to happen for other
projects that move to the open.

> For example, let's take Dalvik, it's a great VM. So why isn't that included in
> Debian/Ubuntu for example, why can't I: aptitude install dalvik?

Dalvik is its own module already. As to why it's not in Debian/Ubuntu,
you can talk to these guys. It's up to them to include it, not us.

> Whereas WebKit *is*. There even are python bindings. Do you get my point?
>
> With modularity, you could maybe safely turn non-sensitive modules into
> standalone projects, which could be used outside of Android. And that could
> result in wider interest.

We *have* modularity, we *are* moving non-sensitive projects to the
open (as Dan said Dalvik is working toward moving to the open).

It's not like we don't want to do all this stuff. It's just that it's
a huge projects (or a huge number of projects if you prefer), and
there's some inertia in the way we've been doing things and it's going
to take us a while to improve, but it *is* happening.

Xav
-- 
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] Soft keyboard “del” key fai ls in EditText on Gallery widget

2010-06-07 Thread droidful
Hi,

I am developing an application in Eclipse build ID 20090920-1017 using
android SDK 2.2 and testing on a Google Nexus One. For the purposes of
the tests below I am using the IME "Android keyboard" on a non-rooted
phone.

I have an EditText widget which exhibits some very strange behavior. I
can type text, and then press the "del" key to delete that text; but
after I enter a 'space' character, the "del" key will no longer remove
characters before that space character.

An example speaks a thousand words, so consider the following two
incredibly simple applications...

Example 1: An EditText in a LinearLayout widget:

--
package com.example.linear.edit;

import android.app.Activity;
import android.os.Bundle;

import android.view.ViewGroup.LayoutParams;
import android.widget.EditText;
import android.widget.Gallery;
import android.widget.LinearLayout;

public class LinearEdit extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

LinearLayout layout = new
LinearLayout(getApplicationContext());
layout.setLayoutParams(new
Gallery.LayoutParams(Gallery.LayoutParams.MATCH_PARENT,
Gallery.LayoutParams.MATCH_PARENT));

EditText edit = new EditText(getApplicationContext());
layout.addView(edit, new
LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT));

setContentView(layout);
}
}
--

Run the above application, enter text "edit example", then press the
"del" key several times until the entire sentence is deleted.
Everything Works fine.

Now consider example 2: An EditText in a Gallery widget:

--
package com.example.gallery.edit;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.Gallery;
import android.widget.LinearLayout;

public class GalleryEdit extends Activity
{
private final String[] galleryData = {"string1", "string2",
"string3"};

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

Gallery gallery = new Gallery(getApplicationContext());

gallery.setAdapter(new ArrayAdapter(getApplicationContext(),
android.R.layout.simple_list_item_1, galleryData)
{
@Override
public View getView(int position, View convertView,
ViewGroup parent)
{
LinearLayout layout = new
LinearLayout(getApplicationContext());
layout.setLayoutParams(new
Gallery.LayoutParams(Gallery.LayoutParams.MATCH_PARENT,
Gallery.LayoutParams.MATCH_PARENT));

EditText edit = new
EditText(getApplicationContext());
layout.addView(edit, new
LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT,
LayoutParams.WRAP_CONTENT));

return layout;
}
});

setContentView(gallery);
}
}
--

Run the above application, enter text "edit example", then press the
"del" key several times. If you are getting the same problem as me
then you will find that you can't deleted past the 'space' character.
All is not well.

If anyone could shed some light on this issue I would be most
appreciative.

Regards

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


Re: [android-developers] Problem when turning the phone

2010-06-07 Thread TreKing
On Thu, Jun 3, 2010 at 7:32 AM, Patrick  wrote:

> Is there a way or concept that I missed to tell activities (or the UI
> elements) to keep their status?
>

Yes - read the very detailed documentation on the Activity Lifecycle. You
need to handle saving and restoring your instance state. Look at
onSaveInstanceState and onRestoreInstanceState in particular.

On Thu, Jun 3, 2010 at 7:56 AM, Rajiv  wrote:

> You can reseted the value of the Text by using onConfigurationChanged
> method of the Activity.


On Mon, Jun 7, 2010 at 2:39 AM, Jeremy  wrote:

> If you don't want the os to handle a configuration change (like a screen
> rotation), you can use the android:configChanges="" tag in the manifest file
> to specify what config changes should be handled manually:
>

Patrick's problem is not the configuration changing - it's his app being
destroyed and recreated DUE TO the configuration change. Dealing with this
by handling the configuration changes is not the correct solution, though it
may work for this case.

If you do it this way your app will only survive an orientation change - it
will not survive being killed for other reasons. For example, if the user
leaves your app to go to another and comes back to you some time later,
without changing orientation, your app will have been destroyed and
recreated and none of your data will be restored.

I would suggest you use onSave- and onRestore- InstanceState - that's what
they're there for. Don't waste time handling orientation change if your app
doesn't call for it to then only solve a part of your problem.

-
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

Re: [android-developers] Re: Why is Android so buggy?

2010-06-07 Thread Olivier Guilyardi
On 06/08/2010 01:04 AM, Dianne Hackborn wrote:
> On Mon, Jun 7, 2010 at 3:21 PM, Olivier Guilyardi  > wrote:
> 
> This openness is your strength, and I think that it will lead to
> success if you
> manage to build an active community of contributors. I'm not
> monitoring this
> closely, but it looks like it is not the case (yet).
> 
> 
> Development has increasingly moved to the open.  Unlike many open-source
> projects, we have a lot of complications that make it very difficult to
> just throw everything into the open: from the fact that in many
> countries you can't file patents after any information about them is
> publicly available, to needing to work with hardware manufacturers on
> major new features that are important for them to control the PR around
> for their devices.

Okay, I'm not a free software fanatic, but I'm going to tell you right away
(something that you may already know): a big part of the free software community
is likely to consider these reasons as unacceptable.

I do understand these reasons though, but I also know the community, and it's
not without reason that one of the most widely used tool is named 
"Subversion"...

> Development tools, Dalvik, and other things are now done in the open.
>  There is increasing desire to have the framework done in the open, but
> this is challenging because it will by necessity mean we need to be
> working in two branches, to continue to keep sensitive work private
> until it can be released.  Given that we also are often working on two
> more more active internal branches (for the current release under test,
> the next release in development, and often the next release after that),
> the development process for having yet another active branch (with all
> the corresponding merge issues and correctly deciding which branch X
> work should go in) is...  not pleasant to contemplate.

I think that your problem is that the whole of Android is too monolithic. You
are mentioning branches where you could think in terms of standalone modules.

If you were to make it more modular then you could get a boost in contributions.

For example, let's take Dalvik, it's a great VM. So why isn't that included in
Debian/Ubuntu for example, why can't I: aptitude install dalvik?

Whereas WebKit *is*. There even are python bindings. Do you get my point?

With modularity, you could maybe safely turn non-sensitive modules into
standalone projects, which could be used outside of Android. And that could
result in wider interest.

> Also, we have been accepting an increasing number of patches from the
> community.  I have regularly been reviewing and accepting multiple
> patches every week, as have other framework engineers.  This is slacking
> off a bit as we wait for the froyo drop, but I am sure it will pick up
> again.  Most patches don't need to be done on the very most recent head.

That sounds good indeed.

--
  Olivier

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


[android-developers] Re: Import a *.jar (htmlparser jericho)

2010-06-07 Thread Brion Emde
I created a lib directory under the project and put the jar file
there. Then, in Eclipse, I go to the project build path and Add
External Jar and put the path to the jar file. That works.


On Jun 2, 6:53 am, "herr...@googlemail.com" 
wrote:
> Hello guys,
>
> I have a big problem to import an external jar file. I want to import
> the jericho htmlparser. But when I am adding it through the build path
> and add jar, it doesnt work.
> Can someone explain me how to implement external jar files?
>
> It is very important for me.
>
> Thanks
> herrmie

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

2010-06-07 Thread Xavier Ducrohet
I'm guessing you're using Eclipse and adding to your Android library
project a dependency on a Java project?

This is not supported as an Eclipse project. You'll have to create a
jar file, and add it to both your Android projects.

Xav

On Sun, Jun 6, 2010 at 3:19 PM, darun  wrote:
> Hi,
> I have 2 android projects out of which I modified one to work as a
> library. I want the main project to refer to this library to perform
> few functions. While this scenario works just as expected, I want to
> introduce one more functionality. I want to link this library project
> with another just a java project which has code common to both Android
> and Blackberry applications. This second part however doesn't seem to
> work and throws "The application  () has
> stopped unexpectedly. Please try again" with a ForceClose button.
> I would greatly appreciate if someone can give a brief information on
> how to make this work.
> 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
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

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


Re: [android-developers] Re: Why is Android so buggy?

2010-06-07 Thread Dan Bornstein
On Mon, Jun 7, 2010 at 4:04 PM, Dianne Hackborn  wrote:
> Dalvik [is] now done in the open.

Actually, we're not developing in the open yet, but we are working
toward it. It is nontrivial to get there for all the reasons you cite.

-dan

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


Re: [android-developers] WiFi Signal Strength

2010-06-07 Thread Kostya Vasilyev
No WiFi in the emulator.

For signal strength, look at WifiManager and its accompanying objects.

08.06.2010 2:47 пользователь "varsha"  написал:

I am very new to android. Need help from Android Developers.

Can anyone PLEASE help me how to find current WiFi signal strength
in android. I'm trying very hard to get android to display the signal
strength.

 Also, i would like to know if this works on emulator. If possible
please provide
sample code.

I found out the following link but I am unable to write a simple
program
to display signal strength on emulator/phone.
http://developer.android.com/reference/android/net/wifi/WifiInfo.html

Please Reply
Thanks a lot,
-Varsha

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

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

[android-developers] Re: Experience with GoAPK.com

2010-06-07 Thread Brion Emde
I did it with my free app. Seems they did a nice job and I added
Taiwanese Chinese to the Android Marketplace as well as having the app
in the mainland Chinese market with Simplified Chinese. They gave me
instructions to look at the downloads and I did that once a while back
and not recently.


On May 20, 7:20 am, Jason Van Anden  wrote:
> I received an email from goapk.com - offering to translate my apps for
> Chinese market.  Has anyone here have an experience with this?  I am curious
> about your experience.
>
> Thanks,
> Jason Van Andenhttp://www.BubbleBeats.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 
> athttp://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: APIs to access email accounts or SMS/MMS messages

2010-06-07 Thread Mark Murphy
curtis wrote:
> This tutorial is dead. The  android.provider.Telephony.SMS_RECEIVED
> intent appears to have been removed sometime ago and it doesn't look
> like its been replaced by anything comparable

Correct, there is no way to receive SMS messages and stick to the SDK,
unfortunately.

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

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

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


[android-developers] Re: Why is Android so buggy?

2010-06-07 Thread blahblah...@gmail.com
I think we all appreciate the work that Google has done in open-
sourcing Android. Like Olivier says, most of us don't have the time to
spend in fixing open source bugs.

Most of the bugs mentioned admittedly are easily worked around. The
only serious ones are the socket ioexception bugs, but these may just
be in the emulator.

It would just be nice if Google could employ a few more people to go
through the bug list and really look at the serious bugs to try and
get them under control. That sdk setup.exe bug is a good example:
apparently Xavier thought it was fixed, and yet it is been listed as
an open bug since January 2010 (issue 5944).

Oh, and while we're on the subject of wish-lists, the documentation
needs work in many places. Apple has a useful feature - on the bottom
of all of their documentation web pages there is a 'feedback' link
allowing you to report bugs and missing information in the
documentation. It would be useful if the Android docs had something
similar.

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

2010-06-07 Thread Mark Murphy
Jason wrote:
> I just joined this group to help myself learn more about developing on
> my andriod evo phone. My first project is to develope a widget to
> silence the alarm volume. I was just wondering if this would be
> possible before I actaully jump in and start learning to program
> android apps.

Yes, that should be doable. You can control volume streams from SDK
applications like an app widget.

Here is some code that demonstrates working with AudioManager to
manipulate volume levels:

http://github.com/commonsguy/cw-advandroid/tree/master/SystemServices/Volume/

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

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

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


Re: [android-developers] Re: Why is Android so buggy?

2010-06-07 Thread Dianne Hackborn
On Mon, Jun 7, 2010 at 3:21 PM, Olivier Guilyardi  wrote:

> This openness is your strength, and I think that it will lead to success if
> you
> manage to build an active community of contributors. I'm not monitoring
> this
> closely, but it looks like it is not the case (yet).
>

Development has increasingly moved to the open.  Unlike many open-source
projects, we have a lot of complications that make it very difficult to just
throw everything into the open: from the fact that in many countries you
can't file patents after any information about them is publicly available,
to needing to work with hardware manufacturers on major new features that
are important for them to control the PR around for their devices.

Development tools, Dalvik, and other things are now done in the open.  There
is increasing desire to have the framework done in the open, but this is
challenging because it will by necessity mean we need to be working in two
branches, to continue to keep sensitive work private until it can be
released.  Given that we also are often working on two more more active
internal branches (for the current release under test, the next release in
development, and often the next release after that), the development process
for having yet another active branch (with all the corresponding merge
issues and correctly deciding which branch X work should go in) is...  not
pleasant to contemplate.

Also, we have been accepting an increasing number of patches from the
community.  I have regularly been reviewing and accepting multiple patches
every week, as have other framework engineers.  This is slacking off a bit
as we wait for the froyo drop, but I am sure it will pick up again.  Most
patches don't need to be done on the very most recent head.

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

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

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

Re: [android-developers] Troubles with hierarchyviewer

2010-06-07 Thread Romain Guy
HierarchyViewer cannot be used with user builds, for security reasons.
You can use it with debug builds or the emulator.

On Mon, Jun 7, 2010 at 3:31 AM, Thom  wrote:
> Hi,
>
> I can't figure out how to acces to the view hierarchy through
> hierarchyviewer :
>
> - my device (tests with NexusOne/Froyo and Galaxy/Cupcake) is
> connected,
> - I start hierarchyviewer, I select my device in the "device panel",
> - And when I press start the terminal dispalys :
>
> protocol = 2
> version = 2
>
> but nothing else appends.
>
> "Stop Servers", "Refresh Windows", "Devices" and "Load View Hierarchy"
> buttons remains unavailable.
> Did i do smthg wrong ?
>
> Thanx.
>
> Tom.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

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

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


[android-developers] Is there some way to monitor the browser events without modifying webkit code?

2010-06-07 Thread shuai yuan
hi, all,

I am trying to recorder some events when browsing the web, like
keyDown, keyUp, Touch, ScrollDown, ScrollUp, Scale change, rotation
etc.
I wonder is this possible without changing webkit code?

Thank you all.

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


[android-developers] Cursor.moveToNext() and head controlled loops

2010-06-07 Thread drsoran
Hi!

I've wondering about the behavior of the Cursor.moveToNext() method.
According to the docs:

"This method will return false if the cursor is already past the last
entry in the result set."

this method should give good support for head controlled loops like:

   final Cursor c = 

   for ( boolean ok = c.moveToFirst(); ok && !c.isAfterLast(); )
   {
  // Do something ...
  ok = c.moveToNext();
   }

But during the move from the last entry to the position after the last
entry it returns false. I think this conflicts with the docs and
prohibits loops like above.

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


[android-developers] Adb single adb interface.

2010-06-07 Thread Jimmy
Hello all,

I am trying to set up a android-power device on windows. I check the
$SDK/usb_driver folder, in the android_winusb.inf file, there are
different driver type like SingleAdbInterface, CompositeAdbInterface
and SingleBootLoaderInterface, does anyone know the difference and
what are these meaning?

Thanks
Jimmy

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


[android-developers] Fastest Android Phone -- HTC EVO 4G?

2010-06-07 Thread Eric
Hello,

Is it correct to assume that the best/fastest Android phone (hardware-
wise) currently available now, and for the near-term future, is the
HTC EVO 4G?  If not, can anyone recommend the competing phone?

Second, can I buy this phone (or any other phone recommended here)
without a cellular plan?  I am a new Android developer and I just want
access to the fastest hardware out there to test my application.

Thank You,
Eric

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


[android-developers] Re: APIs to access email accounts or SMS/MMS messages

2010-06-07 Thread curtis
This tutorial is dead. The  android.provider.Telephony.SMS_RECEIVED
intent appears to have been removed sometime ago and it doesn't look
like its been replaced by anything comparable

curtis.

On Jun 3, 1:00 pm, Yuvi  wrote:
> Hi,
>
> to get the received sms take a look 
> here:http://www.anddev.org/novice-tutorials-f8/recognize-react-on-incoming...
> Unfortunately there is no analogous way to listen for sent messages...AFAIK.
>
> Yuvi
>
> On Thu, Jun 3, 2010 at 6:02 PM, Nando Android wrote:
>
>
>
>
>
> > I am interested on that too.
>
> > But what I want to do is to know how many SMS messages were sent and
> > received.
>
> > That is, I need to know stats. Is it possible?
>
> > Thanks.
>
> > On Mon, May 24, 2010 at 6:54 PM, sojan P.R.  wrote:
>
> >> What you want to do..reading emails and doing something automatically? I
> >> think it is not possible from application level.
> >> You can listen to an sms port for that..just look some push registery
> >> samples.
>
> >> If you only want to show the SMS in your application ...i think it is
> >> better to open the installed client using intents.
>
> >> On Mon, May 24, 2010 at 5:47 PM, Mark Murphy 
> >> wrote:
>
> >>> San wrote:
> >>> > Does anyone know if there is an API available to access all SMS
> >>> > messages as well as emails in the inbox?
>
> >>> There is nothing in the Android SDK for either of these.
>
> >>> While there are applications frequently available on Android devices for
> >>> these functions (SMS, Email, Gmail), device manufacturers can and do
> >>> replace them with other applications. Also, users can elect to download
> >>> and install their own email clients (e.g., K9).
>
> >>> --
> >>> Mark Murphy (a Commons Guy)
> >>>http://commonsware.com|http://github.com/commonsguy
> >>>http://commonsware.com/blog|http://twitter.com/commonsguy
>
> >>> Android Training in NYC: 4-6 June 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 >>>  cr...@googlegroups.com>
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/android-developers?hl=en
>
> >>  --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com >>  cr...@googlegroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> YuviDroidhttp://android.yuvalsharon.net

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


[android-developers] Troubles with hierarchyviewer

2010-06-07 Thread Thom
Hi,

I can't figure out how to acces to the view hierarchy through
hierarchyviewer :

- my device (tests with NexusOne/Froyo and Galaxy/Cupcake) is
connected,
- I start hierarchyviewer, I select my device in the "device panel",
- And when I press start the terminal dispalys :

protocol = 2
version = 2

but nothing else appends.

"Stop Servers", "Refresh Windows", "Devices" and "Load View Hierarchy"
buttons remains unavailable.
Did i do smthg wrong ?

Thanx.

Tom.

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


[android-developers] Encrypt and decrypt .apk files

2010-06-07 Thread AndyP
Hi All,

I was wondering how to break apart .apk files in Windows to see all of
it's components, edit some of the components, and put the file back
together.

I have been able to open up the file to see the components using
WinZip but I am unsure of how to re-"make" the .apk file again using
WinZip. Is there a special option within winzip or can you just change
the extension from .zip to .apk? Not sure if this matters, but
the .apk files are being used within Eclipse in an emulator as of now.

Thank you!

Andy

P.s. First time poster here so please go easy on me

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


[android-developers] Intro plus question :)

2010-06-07 Thread Jason
Hello Group,

I just joined this group to help myself learn more about developing on
my andriod evo phone. My first project is to develope a widget to
silence the alarm volume. I was just wondering if this would be
possible before I actaully jump in and start learning to program
android apps.

Thank you much for your support!
Jason

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


[android-developers] Bug/Issue tracker a joke!

2010-06-07 Thread Colin
I find astounding, rude and arrogant the complete disregard with which
Google treats people attempting to access help on the tracker.

Thread after thread - even ones that are 18+ months old, with 400+
posts and nearly 1000 stars, have gone completely unanswered - look at
the Wifi/Proxy issue for instance, or the Gapless audio, or even the
3g-to-WiFi switching issues that has many hundreds of posts and only
towards the end is there even a luke-warm response from Google! But no
ownership or actual interest.

Most of the tickets are still, perversely, marked as New even after a
year of people begging, pleading, demanding solutions!! No owner
allocated.

I could understand if somehow the development resources available to
the world's fastest growing and probably most successful mobile OS
were limited - but given the fanfare, hype, etc from Google, that
seems unlikely. But the VERY LEAST someone could do is respond to
these poor bastards, and acknowledge their pain, even if it is just to
say "we are too busy" to address this right now.

But no, the response is, no response. Deafening silence. The rudeness
and arrogance is mindboggling!! Where the hell are your customer
service skills?

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


Re: [android-developers] How to detect CPU Speed?

2010-06-07 Thread Peter Lord
On Sat, 2010-06-05 at 07:05 -0700, Martiño wrote:
> Is there a way of getting the speed at which the device is running?

Take a look at /proc/cpuinfo ?



-- 
Peter Lord 

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


[android-developers] Gesture detection on Dialog / AlertDialog

2010-06-07 Thread Josh
Hello,

Does anybody know if it is possible to track gestures when an
alertDialog box is up?

Thanks,
Josh

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


[android-developers] Couple questions regarding gestures and system uis

2010-06-07 Thread Josh
Hello,

I'm a super noob to Android and have a couple questions... If there
are any links to examples that people know of I would love it if they
were posted.  I've been doing some searching and not seeing a lot on
what I'm looking for.

1.  Can have a program running in the background that will listen for
gestures across any view that is currently showing whether or not the
app "has focus"?

2.  Can you replace a core ui view with your own.  i.e.  Create a
keypad application that replaces the default android keypad with one
you have created.

Thanks in advance.
Josh

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

2010-06-07 Thread ravi tandon
Suppose I want to use my own set of words in the dictionary of the
Nuance API used by Android. Is ther a way to do this ??
How can I get the raw spoken words that are interpreted by the Speech-
Recognizer ??
I want to apply my own Phonetic based algo on those words >..

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


[android-developers] Re: App disappears from the Market after upgrade

2010-06-07 Thread Kupsi
There are more apps missing in the market for Android 2.1:

http://www.google.com/support/forum/p/Android+Market/thread?tid=2156a1d8ddb8ba47&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] MediaPlayer and ShouCAST / How to retrieve Meta Data

2010-06-07 Thread sebsto
Dear All,

Like many others, I am trying to read a Shoutcast stream on Android
2.2 (Froyo).
I found out that MediaPlayer handles the stream out of the box,
without specific coding.

However, I wonder how to retrieve the meta data (ie song title) from
the stream.

The OnInfoListener.onInfo is never called for me (http://
developer.android.com/reference/android/media/
MediaPlayer.OnInfoListener.html).  Even if it was, doc is silent about
retrieving these metadata - is this something planned for a later
revision ?

I know of course I can read the bits and bytes myself, parse the title
out of the music stream and give the music bytes to MediaPlayer.
(already did that for another platform)

But because I am lazy (a good quality for developers ?) and because
MediaPlayer seems so close to perform 100% of the job, I would like to
double check with this group if / what I am missing.

Thanks for your help

Seb

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


[android-developers] TabHost Loads Listview that loads a ListView?

2010-06-07 Thread Bill
I have a project where I am using a TabHost (4 tabs). On the 1st three
tabs I use a ViewFlipper to go between a ListView and a View with
content. On the last tab however, I need to load a ListView that will
have multiple different kids of views. For instance, the 1st row will
load another ListView when clicked. The second row will load a View
with content when clicked, etc.

So far, I have everything working except when I click the row in the
4th tab, I am not sure how to load the other ListView. Use a
ViewFlipper?

Any help would be great

Bill

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


[android-developers] AudioRecord class - Disable AGC and noise suppression

2010-06-07 Thread Brian
Hi,

Is there a way to disable AGC and noise suppression in the AudioRecord
class? I see in the cpp source that these are enabled with no method
to disable on the java side.

Thanks,
Brian

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


Re: [android-developers] Can't grok Activity life cycle.

2010-06-07 Thread Daniel M. Drummond
Perhaps testing your application, and outputting some info to the logs
will help you resolve your misunderstanding, ie. put a line in
onSaveInstanceState() to write a line to the logs such as
"onSaveInstanceState() Called", and put a similar line in onPause(),
onStop(), onDestroy(), etc. and then force the emulator/phone to run out
of memory by running many apps together, and also exit on a user
interaction, and see what happens by looking at the order of the lines
in the log.

I always learn things a lot better by experimenting, than by reading
docs.

Dan

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


[android-developers] Android: ListAdapter populating image (icon) source

2010-06-07 Thread electronbender
I'm populating a list from the DB, and i have a image field in the DB
which contains a URL to a image file.

ListAdapter adapter=new SimpleCursorAdapter(this,
R.layout.row, constantsCursor,
new String[] {"title", "subtitle", "image"},
new int[] {R.id.value, R.id.title, R.id.icon});

However, the other fields are populated, but the image remains empty.
Why?

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


[android-developers] Measuring memory usage of the WebView component

2010-06-07 Thread Raju Bitter
Is there a best practice for measuring memory usage of a WebView
component before and after loading page content?

Thanks,
Raju

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

2010-06-07 Thread pacoder
At the risk of thread hijacking I'd like to personally thank Diane and
Romain for their posts, blogs, and articles without which my
development efforts would have been that much harder. I'd have to add
Mark Murphy into that too. So from one random developer, for what its
worth, thanks for your community support.


Sean Overby

On Jun 7, 5:51 pm, Dianne Hackborn  wrote:
> On Mon, Jun 7, 2010 at 2:24 PM, Yahel  wrote:
> > When we think google we think HUGE company. So we think of the Android
> > Team as A TEAM, like 50 or 150 persons maybe...
>
> I am proud to be on the C team.
>
> > I would guess that at most there is 10 to 15 maybe less Google
> > employees in this Android team. When you out the two spoke-persons
> > you're only left with Romain and Dianne :D
>
> Sorry, but you have no clue about this.  We had that number of engineers
> early on in the development of Android.  Today that is more along the lines
> of just the framework team.
>
> I don't think you really have an idea of what all is involved in making such
> a product, between engineering on the kernel/system-level software and
> hardware support/bringup, framework development and maintenance, all of the
> applications, development tools, server-side development, everything
> involved with Market (app, server, web interface, billing, etc), QA,
> interacting with hardware manufacturers, developer support, etc.
>
> Also, Romain and I are not spoke-persons.  We take our spare time to spend
> on this group.  You will see many more people posting to the blog or visible
> elsewhere; I can't hold it against an engineer for not posting here.
>
> I would have loved to see the despair in the eyes of Romain Guy or
>
> > Dianne when the boss came and said : You know that part time
> > Androithingy you are working on ? Well I said to my boss we were
> > realeasing it next friday. You Ok with that ?? :D
>
> No, that is not how it works.  We actually have schedules, plans, feature
> lists, milestones, etc.  Of course they can often change, but that's just
> reality.
>
> Responding to the original poster: almost all of the issues listed were
> development tools issues, not Android system issues.  (I'm not sure about
> the socket thing, if that is just an emulator issue or an issue on devices.
>  I know that networking is very complicated on these devices because of
> telephony and such; but this isn't my area so I don't know much more.)
>
> The layout editor is a work in progress, and is available in its current
> form to help if it is useful, but is not intended to be taken as a complete
> product.
>
> For the screen not unlocking...  I think if you set the option to not turn
> off the screen, and don't exit the emulator, you won't have that problem.  I
> would consider this more a feature request (that is additional behavior as a
> convenience beyond the regular shipping device behavior) than a bug.
>
> Our developer tools team is admittedly fairly small, and has done an amazing
> job with the people they have.  Also most of the stuff related to these
> issues are in the open-source tree, so if they are trivial issues someone
> could probably contribute a patch.  I don't want to say the trite "it is
> open source so if there is a bug you can fix it"...  but, we don't charge
> any money for any of the tools or most other stuff, so it is also a little
> unreasonable to complain like this about something you are not paying
> anything for.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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


Re: [android-developers] The package name of your apk may not begin with any of the following values

2010-06-07 Thread Xavier Ducrohet
Market doesn't care about the filename of your application. It cares
about the package name defined in the manifest.

Xav

On Fri, Jun 4, 2010 at 6:37 PM, b c  wrote:
> I just tried to submit my app and I got this: The package name of your
> apk may not begin with any of the following values: [com.android.,
> com.google., android., com.example.]
>
> my app file name is myapp.apk (not that but it doesnt contain the com,
> android or google stuff). Im trying to get in touch with my developer
> but I was hoping I could fix this myself so I could get it submitted.
> Does anyone know what I need to change so it can go through? 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
>



-- 
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] Latency due to Garbage collection on onPrevFrame

2010-06-07 Thread Jay Ha
Hi.

I'm writing an Augmented Reallity codes that should works in realtime,

But the VM's garbage collection hinders my program's performance.


I checked my program's execution time for each in OnPrevFrame(byte[],
Camera)

and it execution time increases from around 50ms  to 120ms at just
after each garbage collection.


I copied parts of logs below.
(local time is just before and after of signal processing, and global
time is time stamps for every onPreviewFrame() calling )
-
06-06 18:42:26.340: WARN/matchTarget(725): global 151844ms, local
167ms
06-06 18:42:26.390: WARN/matchTarget(725): global 55ms, local 54ms
06-06 18:42:26.510: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 20
objects / 346432 bytes in 88ms
06-06 18:42:26.510: WARN/matchTarget(725): global 119ms, local
115ms
06-06 18:42:26.600: WARN/matchTarget(725): global 83ms, local 75ms
06-06 18:42:26.670: WARN/matchTarget(725): global 76ms, local 70ms
06-06 18:42:26.740: WARN/matchTarget(725): global 66ms, local 63ms
06-06 18:42:26.820: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 73
objects / 464096 bytes in 55ms
06-06 18:42:26.830: WARN/matchTarget(725): global 95ms, local 94ms
06-06 18:42:26.890: WARN/matchTarget(725): global 57ms, local 56ms
06-06 18:42:26.940: WARN/matchTarget(725): global 46ms, local 45ms
06-06 18:42:27.000: WARN/matchTarget(725): global 59ms, local 59ms
06-06 18:42:27.070: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 144
objects / 466776 bytes in 56ms
06-06 18:42:27.080: WARN/matchTarget(725): global 80ms, local 79ms
06-06 18:42:27.150: WARN/matchTarget(725): global 71ms, local 65ms
06-06 18:42:27.210: WARN/matchTarget(725): global 61ms, local 60ms
06-06 18:42:27.250: WARN/matchTarget(725): global 41ms, local 39ms
06-06 18:42:27.310: WARN/matchTarget(725): global 57ms, local 41ms
06-06 18:42:27.350: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 207
objects / 584128 bytes in 39ms
06-06 18:42:27.420: WARN/matchTarget(725): global 116ms, local
59ms
06-06 18:42:27.470: WARN/matchTarget(725): global 50ms, local 49ms
06-06 18:42:27.530: WARN/matchTarget(725): global 58ms, local 55ms
06-06 18:42:27.620: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 210
objects / 353680 bytes in 58ms
06-06 18:42:27.630: WARN/matchTarget(725): global 96ms, local 95ms
06-06 18:42:27.690: WARN/matchTarget(725): global 61ms, local 57ms
06-06 18:42:27.740: WARN/matchTarget(725): global 57ms, local 55ms
06-06 18:42:27.820: WARN/matchTarget(725): global 76ms, local 68ms
06-06 18:42:27.870: WARN/matchTarget(725): global 49ms, local 46ms
06-06 18:42:27.900: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 226
objects / 469944 bytes in 34ms
06-06 18:42:27.970: WARN/matchTarget(725): global 97ms, local 55ms
06-06 18:42:28.000: WARN/matchTarget(725): global 39ms, local 38ms
06-06 18:42:28.080: WARN/matchTarget(725): global 80ms, local 61ms
06-06 18:42:28.170: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 220
objects / 469184 bytes in 50ms
06-06 18:42:28.170: WARN/matchTarget(725): global 86ms, local 84ms
06-06 18:42:28.230: WARN/matchTarget(725): global 60ms, local 52ms
06-06 18:42:28.280: WARN/matchTarget(725): global 52ms, local 51ms
06-06 18:42:28.340: WARN/matchTarget(725): global 61ms, local 59ms
06-06 18:42:28.420: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 193
objects / 468200 bytes in 53ms
06-06 18:42:28.430: WARN/matchTarget(725): global 82ms, local 81ms
06-06 18:42:28.490: WARN/matchTarget(725): global 64ms, local 57ms
06-06 18:42:28.550: WARN/matchTarget(725): global 61ms, local 60ms
06-06 18:42:28.610: WARN/matchTarget(725): global 57ms, local 56ms
06-06 18:42:28.690: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 205
objects / 468832 bytes in 58ms
06-06 18:42:28.700: WARN/matchTarget(725): global 88ms, local 86ms
06-06 18:42:28.750: WARN/matchTarget(725): global 58ms, local 55ms
06-06 18:42:28.810: WARN/matchTarget(725): global 54ms, local 53ms
06-06 18:42:28.860: WARN/matchTarget(725): global 52ms, local 51ms
06-06 18:42:28.990: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 226
objects / 469544 bytes in 42ms
06-06 18:42:28.990: WARN/matchTarget(725): global 134ms, local
100ms
06-06 18:42:29.060: WARN/matchTarget(725): global 62ms, local 52ms
06-06 18:42:29.100: WARN/matchTarget(725): global 49ms, local 47ms
06-06 18:42:29.160: WARN/matchTarget(725): global 51ms, local 50ms
06-06 18:42:29.240: DEBUG/dalvikvm(725): GC_FOR_MALLOC freed 197
objects / 468320 bytes in 52ms
06-06 18:42:29.240: WARN/matchTarget(725): global 84ms, local 83ms
06-06 18:42:29.290: WARN/matchTarget(725): global 51ms, local 43ms
06-06 18:42:29.350: WARN/matchTarget(725): global 53ms, local 39ms
06-06 18:42:29.410: WARN/matchTarget(725): global 69ms, local 44ms
06-06 18:42:29.470: WARN/matchTarget(725): glo

[android-developers] Expandable List View OnClickListener....

2010-06-07 Thread dKnow
Hi
I have a problems with a projekt I am working on. I am working on a
calender in Android and its the first time I do anything with it. so
here are my problems

1) I used the Expandable List View Example from the Api Demo and I
wanted to ad a onChildClick event to get to anotherscreen

2) I wanted to switch between screens if the phone is turned from
vertical to horizontal and back. I got that done by adding the layout-
land folder , but when I am using the Expandable listview example this
wont work anymoor becouse the codeline "
setContentView(R.layout.main); "  will not be exepted in my class . So
what i wanted to do is to read out the sensor directly and ad a
listener for it that will switch between the screens.

I hope that was understandeble:) and that anybody can help me.

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


Re: [android-developers] Can't grok Activity life cycle.

2010-06-07 Thread Daniel M. Drummond
On Sun, 2010-06-06 at 18:18 -0700, Leigh McRae wrote:
> I am having a really hard time grokking the Activity life cycle
> concept.  The main issue is with onStop() and onDestory() not being
> guaranteed to be called before the process is killed.  I though I had
> it figured out when I saw that the system calls onSaveInstanceState()
> when it's shutting down the activity to claim some memory.  Thing is
> that the docs says onSaveInstanceState() will be called before
> onPause() but how does the system know at this point whether the
> activity will be killed by the system or the user?
> 
> Here is a use case:
> 
> 1) My activity starts up and is running.
> 2) At some point I want to show a web page so I use an Intent to start
> an activity.
> 3) The web browser covers my app/activity so I would expect onPause()
> to be called followed by onStop().
> 
> At this point it's my understanding that all bets are off and I can be
> killed at any point without be called.
> 
> 4) Since the system has enough memory onSaveInstance() doesn't get
> called.
> 5) The user presses home and decides to open some app which requires a
> lot of memory.
> 6) System wants more memory and decides to kill my app but I am
> already stopped (onPause() has been called).  What happens here?
> 
> I am finding this a really serious problem since onPause() pretty much
> needs to be treated as onDestory() as far as I can tell. If my app has
> to be able to survive being killed without onStop() and onDestory()
> being called, why bother having them?

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

under the heading "Saving Activity State", we find

"Unlike onPause() and the other methods discussed earlier,
onSaveInstanceState() and onRestoreInstanceState() are not lifecycle
methods. They are not always called. For example, Android calls
onSaveInstanceState() before the activity becomes vulnerable to being
destroyed by the system, but does not bother calling it when the
instance is actually being destroyed by a user action (such as pressing
the BACK key). In that case, the user won't expect to return to the
activity, so there's no reason to save its state.

"Because onSaveInstanceState() is not always called, you should use it
only to record the transient state of the activity, not to store
persistent data. Use onPause() for that purpose instead."

So the way I understand it is that onSaveInstanceState() is called
whenever the *system* is putting the activity into a "killable" state,
thus allowing you to save the current state for it to be reloaded when
your activity is loaded again, but if the activity is being destroyed by
a user action, (where there is no expectation of an unchanged state) if
you want to save any state, you need to do it yourself in onPause().

So in your use case onSaveInstanceState() *will* be called, and the
state can be saved, so 4) is completely incorrect.

Feel free to correct me if I am wrong
Hope that helps

Dan


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


[android-developers] setSansSerifFontFamily: what arguments does it take?

2010-06-07 Thread Peter
WebSettings class has a method:
public synchronized void setSansSerifFontFamily (String font)

What does String font mean? Path to the TTF font file name? Can new
custom fonts be accessed via String font?

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


[android-developers] Adroind OS

2010-06-07 Thread Manuel
I can installed on my HTC HD2 Android OS ... I do not want windows
mobile ... But HD2 have good hardware is perfect for android ...
because I have t mobile service and do not want to switch to another
company. is that android is a free program, free nurse so I do not
think any problem. Iphone now runs up hehehe great job. Please help me
make this completely android Intalacion of HD2 .. but explain to me
how a 2-year child that there is a lot of this but if that android is
super ... on another topic when released an update for t mobile HSPA +
is already in that line ... the only model that this list is HTC HD2,
My HTC Touch Pro 2 and both run Windows Mobile, not a question of
equipment is the operating system.

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


[android-developers] Reference an android project library from another android project

2010-06-07 Thread darun
Hi,
I have 2 android projects out of which I modified one to work as a
library. I want the main project to refer to this library to perform
few functions. While this scenario works just as expected, I want to
introduce one more functionality. I want to link this library project
with another just a java project which has code common to both Android
and Blackberry applications. This second part however doesn't seem to
work and throws "The application  () has
stopped unexpectedly. Please try again" with a ForceClose button.
I would greatly appreciate if someone can give a brief information on
how to make this work.
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]

2010-06-07 Thread saurabh sinha
what are the new things in android 2.1

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


[android-developers] New Guy on the Block.

2010-06-07 Thread Buff Billington
Hello everyone. Just wanted you to know that I was joining the Android
Developers group today. I look forward to learning a lot from what I
see here. Take care, and talk to you soon.

Thanks

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


[android-developers] How can I use the VideoView in the class that extends view?

2010-06-07 Thread Emca
Hello.

Actually I want to use the VideoView in the class that is extends
view.
But whenever I tried, the space is allocated but anything is appeared.
SO I've changed the background color, then I can see the how much the
view's area is allocated.
but inside is nothing in there.
and next trying is I overrided the onDraw().
and inside the onDraw() I insert the 'videoView.draw(canvas)' like
this.
but it also not work.
is there any way that I can use the videoview inside the class
extended view?

Thanks for reading.

emca.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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 Geolocation app, Find if a user is facing a certain Location using Digital Compass.

2010-06-07 Thread Aidan C
Hi Guys,

I'm constructing a geolocation based application and I'm trying to
figure out a way to make my application realise when a user is facing
the direction of the given location (a particular long / lat co-ord).
I've done some Googling and checked the SDK but can't really find
anything for such a thing. Does anyone know of a way?

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


[android-developers] AudioRecord.read keep blocking, How to get buffer data and no wait with AudioRecord.read?

2010-06-07 Thread Hill.Fu
I just want get the audio input data, and draw a wave, but now I don't
know how to get audio data.

This is my code:

package com.fugui.fetal;

import java.nio.ByteBuffer;
import java.nio.ShortBuffer;

import android.app.Activity;
import android.content.Context;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.media.AudioRecord.OnRecordPositionUpdateListener;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Main extends Activity {
private final static int SAMPLE_RATE_IN_HZ = 8000;
private final static int BUFFER_SIZE = 20 * SAMPLE_RATE_IN_HZ;
AudioRecord audioRecord;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Button button = (Button) findViewById(R.id.Button01);

button.setOnClickListener(new OnClickListener() {

public void onClick(View v) {
if (audioRecord.getRecordingState() ==
AudioRecord.RECORDSTATE_RECORDING) {
audioRecord.stop();
((Button) v).setText("Start");
} else {

audioRecord.setRecordPositionUpdateListener(new
OnRecordPositionUpdateListener() {

public void 
onMarkerReached(AudioRecord recorder) {
Log.i( "Hill" , 
"onMarkerReached") ;
recordParse();
}

public void 
onPeriodicNotification(AudioRecord recorder) {
Log.i( "Hill", 
"onPeriodicNotification" );
recordParse();
}
});
Log.i("Hill",  
"setPositionNotificationPeriod Result: " +
audioRecord.setPositionNotificationPeriod(1000) );
//Log.i("Hill",  
"setNotificationMarkerPosition Result: " +
audioRecord.setNotificationMarkerPosition(8000) );


audioRecord.startRecording();
((Button) v).setText("Stop");

recordParse();
}
}
});

init();

if( audioRecord.getState() != AudioRecord.STATE_INITIALIZED )
{
button.setEnabled( false );
((TextView) findViewById(R.id.TextOut)).setText( "Audio 
Init
Failed.");
}
}

public void init() {
audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC,
SAMPLE_RATE_IN_HZ,
AudioFormat.CHANNEL_IN_MONO, 
AudioFormat.ENCODING_PCM_16BIT,
BUFFER_SIZE);

}

public void recordParse() {

short buffer[] = new short[8000 ];

((TextView) findViewById(R.id.TextOut)).setText( "Size: " +
audioRecord.read( buffer, 0, buffer.length ) + " Time:" +
System.currentTimeMillis() );
}
}

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


Re: [android-developers] How to detect CPU Speed?

2010-06-07 Thread eudokija
You can get BogoMIPS  by executing
Runtime.getRuntime().exec("cat /proc/cpuinfo") as soon as android is based
on linux kernel

2010/6/5 Martiño 

> Is there a way of getting the speed at which the device is running?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2010-06-07 Thread kozyr
I wrote a blog post about changing RatingBar images --
http://kozyr.zydako.net/2010/05/23/pretty-ratingbar/

Hope that helps!

On May 3, 7:30 am, Ajay  wrote:
> Hi,
>     I wanted to use a different image for the rating bar. I tried to
> do this by extending the RatingBar widget style.
>
> 
> 
>           name="myRatingBar" parent="@android:style/Widget.RatingBar">
>         @drawable/star_full item>
>         @drawable/
> star_full
>  
> 
>
> But, the resultant rating bar had some additional "bleeding effect".
> The stars looked like they were bleeding and it was not the same as
> the custom images I had added.
> Also, how can we add the custom empty and half stars?
>
> Thank you,
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

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


[android-developers] Lets Change FaceBook and Tagged

2010-06-07 Thread bora
Lets Change FaceBook and Tagged and try Klikot :)

Join With Us on Klikot Networking through this link and Enjoy

http://www.klikot.com/ar/SignUp.aspx?advertiser_id=519461

Identefication of Klikot Networking

Klikot is a Social Networking same as FaceBook & Tagged

you can meet girls , Women & men

share your pictures and exchange your Ideas and Bulletins

and by the way its cool networking website

and also it provide its clients and members with a cool prizes

and Dollars

So i advice you and all your friends to join it and invite all your
friends
Click here to Join


http://www.klikot.com/ar/SignUp.aspx?advertiser_id=519461

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


[android-developers] Is Android's onTouchEvent() dispatching accurate??

2010-06-07 Thread Peterdk
I have a weird bug in my piano app. Sometimes keys (and thus notes)
hang. I did a lot of debugging and narrowed it down to what looks like
androids inaccuracy of motion event handling:

 DEBUG/(2091): ACTION_DOWN A4
 DEBUG/(2091): KeyDown: A4
 DEBUG/(2091): ACTION_MOVE A4 => A4
 DEBUG/(2091): ACTION_MOVE ignoring since equal note
 DEBUG/(2091): ACTION_MOVE A4 => A4
 DEBUG/(2091): ACTION_MOVE ignoring since equal note
 DEBUG/(2091): ACTION_MOVE A4 => A4
 DEBUG/(2091): ACTION_MOVE ignoring since equal note
 DEBUG/(2091): ACTION_UP B4 //HOW CAN THIS BE
 DEBUG/(2091): KeyUp: B4
 DEBUG/(2091): Stream is null, can't stop
 DEBUG/(2091): Hanging Note: A4 X=240-287 EventX=292 Y=117-200
EventY=164
 DEBUG/(2091): KeyUp Note:   B4 X=288-335 EventX=292 Y=117-200
EventY=164

Clearly it can be seen here that out of nowhere I suddenly have an
ACTION_UP for another note. Shouldn't I definitely get a ACTION_MOVE
first?

As shown in the end of the log, it's definitely not an error in region
detection, since the ACTION_UP event is clearly in the B4 region.


Every onTouchEvent() call is logged, so the log is accurate.

The relevant pseudo-code for the ACTION_MOVE logging is:

 Key oldKey = Key.get(event.getHistoricalX(), event.getHistoricalY());
 Key newKey = Key.get(event.getX(), event.getY());


Is this normal behaviour for Android (the jumping in coordinates)??
Can ACTION_UP events just arise without any previous ACTION_MOVE
towards it coordinates??


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


[android-developers] MP3 streaming seeking problem...

2010-06-07 Thread Ravindra Kamble
Hi,
I am developing one online streaming player where it should support
for the seeking also. Same time I am updating the values like Time
Played and Remaining Time.

If I am not moving the seek bar, I am getting the correct values by
MediaPlayer.getDuration(); and MediaPlayer.getCurrentPosition().

But when I am changing the seek bar position, the values returned by
the MediaPlayer.getCurrentPosition(). is greater than the
MediaPlayer.getDuration()..

After changing the seek bar position, I am calling the
MediaPlayer.seekTo() method.


Does anyone have any idea on this, what's going wrong

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


  1   2   3   >