[android-developers] Re: Slow Bitmap operations

2008-04-11 Thread qvark

Thanks guys for your answers.

I think I will post a question in the ADC group to see if somebody is
taking the risk of submitting an application that uses JNI. In the
mean time I will keep profiling and profiling to see if I can reduce
it a few seconds...


On 11 abr, 01:23, David Given <[EMAIL PROTECTED]> wrote:
> qvark wrote:
>
> [...]
>
> > The set of algorithms executed with a Sun JVM (1.6.0_03) take less
> > than 20 secs but when I execute them within the emulator (in the same
> > machine), they are taking over 7 minutes! That's more than 20x slower!
>
> AFAIK, the Dalvik VM is currently an *interpreter*... running on an
> emulated ARM. Apparently the speed of the ARM is roughly equivalent to
> the 300MHz target device when the emulator is run on a modern, fast
> machine, so what you're seeing is probably something like the eventual
> speed of the device. It's going to be slow.
>
> When the JIT arrives it'll be much faster, but I think your only real
> hope for now is to use JNI. Unfortunately, JNI is totally unsupported
> right now so if you want to do it you're completely on your own. There's
> also at least one loader bug which means your code may not end up in
> memory intact. While you can hack it into submission if you're willing
> to risk it, it's most certainly not product ready... but it is possible.
>
> --
> ┌─── dg@cowlark.com ─http://www.cowlark.com─
> │ "I have always wished for my computer to be as easy to use as my
> │ telephone; my wish has come true because I can no longer figure out
> │ how to use my telephone." --- Bjarne Stroustrup
>
>  signature.asc
> 1 KDescargar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Removing a database or its table

2008-04-11 Thread Ram

You can use the following steps to remove the database

adb shell
cd data
cd data
cd 
cd databases
rm 

if you'd just like to remove one table
replace the last step with
sqlite3 
drop table ;

For a clean start, it may be better to wipe out the whole db instead
of just removing one table

On Apr 10, 11:27 pm, Mi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have created a database for my application using sqlite. When
> continuing developing my application I want to change the tables in my
> database. I want to remove a table. But how to do that?
> If some one knows how to remove a database that would also be helpful.
>
> Tanks for helping.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Is it possible to create file in /system/media directory..

2008-04-11 Thread vetch

by my application ? I know policy about security, but I did not found
any information, how to access system media directory for writing and
creation of new, shareable files.

greets, Peter.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sample.XML Layout examples equivalents of Style Constants

2008-04-11 Thread hackbod

Don't copy the theme, just make your own theme that is a child of the
system theme you want to base yours on, and just put the modified
values in your own theme.

There are a number of examples in ApiDemos:

http://code.google.com/android/samples/ApiDemos/res/values/styles.html

On Apr 10, 9:59 pm, Rui Martins <[EMAIL PROTECTED]> wrote:
> *** BUMP ***
>
> Can anyone give some light on this subject ?
>
> Thanks
>
> On 10 abr, 17:48, Rui Martins <[EMAIL PROTECTED]> wrote:
>
> > Just an extra note:
>
> > The Styles & Themes  XMLlayoutfile format info, is not very useful,
> > since it does not look anywhere near 
> > complete.http://code.google.com/android/reference/available-resources.html#sty...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Extract focus color from theme

2008-04-11 Thread vetch


I know, you need something like in WindowsAPI: GetSysColor().

Unfortunately, I did not found any simply way to get color of system
control/item, too.

Documentation is in development, so at this time, you can create your
own global color table with public static function getColor(item).
Later you can change underlying code for one using system attributes.

greets, peter.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Progress bar problem

2008-04-11 Thread AkaZn

That lock is used for my working thread to calculating the data. In
the working thread I use

synchronized(lock){
// do work here
}

To guarantee that the progress dialog cannot be dismissed before the
calculating process is done. If at the time I call the progress
dialog, the work is not done then it will wait till it's done and the
dialog is dismissed nicely. But if it doesn't have to wait then the
dialog will be there forever. If there is no lock then why would I
bother calling a progress dialog and dismiss it right after that.

On Apr 11, 1:14 am, Rui Martins <[EMAIL PROTECTED]> wrote:
> Do you really need to use that syncrhonized(lock) ?
> Doest it work fine without it ?
>
> If no one else is messing with the progressDialog, why would you need
> to lock it ?
> There shouldn't be any concurrency issues.
>
> On 10 abr, 22:59, AkaZn <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I want to show a progress bar and then check if the work that need to
> > be done is completed yet so I used something like this:
>
> >         myProgressDialog = ProgressDialog.show(Test.this,
> >                           "Please wait...", "Calculating...", true);
> >                 }
> >           new Thread() {
> >               public void run() {
> >                    try{
> >                          synchronized(lock){
> >                                 //sleep(50);
> >                                 myProgressDialog.dismiss();
> >                                 // Some work here
> >                          }
>
> >                    } catch (Exception e) {  }
>
> >               }
> >          }.start();
>
> > The working thread use the lock to make sure the dialog cannot be
> > dismissed before the work is done. But if the work is done before the
> > ProgressDialog.show() is executed then it will be there forever. I
> > guess it's because the dismiss() function is called before the actual
> > show is called. If I put a sleep before the dismiss then everything is
> > fine but it's not a good practice and problem may still appear in
> > slower machine.
>
> > So the question is that how can I safely show a progress dialog and
> > then dismiss it right after it's show (if there is no work)? Is there
> > anyway I can use a lock to find out when the dialog is shown in the
> > screen for the dismiss to be executed only after that?
>
> > Thank you
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Porting android to PXA270 board

2008-04-11 Thread renegade

I try to run Android on my PXA270 board...
Kernel version is 2.6.19.
After hard fight I succesfully applied patch.
I have new shiny kernel.
My board starts from SD card.
Bootloader (u-boot) starts from flash and it searches for kernel on SD
card.
First partition of SD card contains kernel (FAT16):
linux.igz
Second partition of SD card contains filesystem (ext3)...
/cache
/data
/dev
/etc
/proc
/sbin (contains init)
/sys
/system
/tmp
/var

It starts...boot kernel, but there is problem with init process...
Take a look :

U-Boot 1.1.6 (Apr  2 2008 - 14:35:33)

DRAM:  64 MB
Flash:  2 MB
NAND:  64 MiB
*** Warning - bad CRC, using default environment

In:serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
Detected: 2027008 blocks of 512 bytes (989MB) SD card.
Vendor: Man 11 OEM JC "064MB" Date 11/2003
Product: 320
Revision: 0.10
reading linux.igz

1169832 bytes read
## Booting image at a100 ...
   Image Name:   Linux Kernel Image
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:1169768 Bytes =  1.1 MB
   Load Address: a080
   Entry Point:  a080
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing
Linux
done, booting the kern.
Linux version 2.6.19_RC15 ([EMAIL PROTECTED]) (gcc version 4.2.1
(CodeSourcery Sourcery G++ Lite 2007q3-53)) #210 Thu Apr 10 09:8
CPU: XScale-PXA270 [69054117] revision 7 (ARMv5TE), cr=397f
Machine: HITEC
Memory policy: ECC disabled, Data cache writeback
Run Mode clock: 208.00MHz (*16)
Turbo Mode clock: 416.00MHz (*2.0, active)
Memory clock: 104.00MHz (/2)
System bus clock: 208.00MHz
Standard (MSC0= 0x13387aa8)  NAND mode
The additional board GPIO's are configured
CPU0: D VIVT undefined 5 cache
CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
Built 1 zonelists.  Total pages: 16256
Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 ro
PID hash table entries: 256 (order: 8, 1024 bytes)
start_kernel(): bug: interrupts were enabled early
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 62336KB available (2124K code, 242K data, 204K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -1, 2048 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
yaffs Apr 10 2008 09:36:39 Installing.
io scheduler noop registered
io scheduler anticipatory registered (default)
Hitec Backlight Driver Initialized.
External logo in flash not found @ 0x1c
pxa2xx-uart.0: ttyS0 at MMIO 0x4010 (irq = 22) is a FFUART
pxa2xx-uart.1: ttyS1 at MMIO 0x4020 (irq = 21) is a BTUART
pxa2xx-uart.2: ttyS2 at MMIO 0x4070 (irq = 20) is a STUART
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
Found: AMD AM29LV160DB
THB PXA module: Found 1 x16 devices at 0x0 in 16-bit bank
number of JEDEC chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code
brokenness.
Using static partition definition
Creating 2 MTD partitions on "THB PXA module":
0x-0x0004 : "boot"
0x0004-0x001f : "kernel"
NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB
3,3V 8-bit)
Using static partition definition
Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
0x-0x03a0 : "rootfs (ro)"
Add SSFTL support
0x03a0-0x0400 : "config (rw)"
0x0400-0x0400 : "additional"
mtd: partition "additional" is out of reach -- disabled
mmcblk0: mmc0:0001 064MB 1013504KiB
 mmcblk0:<5>0x-0x0400 : "whole NAND"
 p1 p2
pxa27x_udc: version 01-01-2006
ether gadget: using random self ethernet address
ether gadget: using random host ethernet address
usb0: Ethernet Gadget, version: May Day 2005
usb0: using pxa27x_udc, OUT ep2out-bulk IN ep1in-bulk STATUS ep3in-
intr
usb0: MAC 72:52:c5:60:bd:ba
usb0: HOST MAC 56:28:f6:9d:7e:54
usb0: RNDIS ready
wm97xx: Version 0.64 [EMAIL PROTECTED]
Advanced Linux Sound Architecture Driver Version 1.0.13 (Tue Nov 28
14:07:24 2006 UTC).
AC97 for PXA255 registered
pxa2xx-ac97: reset
wm97xx: Detected a WM9712 codec
input: wm97xx touchscreen as /class/input/input0
wm97xx: setting pen detect pull-up to 16000 Ohms
wm97xx: setting adc sample delay to 42 u Secs.
WM97XX: Vbat = 4.1V
WM97XX: Vref = 2.0V
ALSA device list:
  #0: pxa2xx-ac97

[android-developers] Re: Discussion on media-sample-apps

2008-04-11 Thread barbapapaz

Hello Megha

I have post two video on your topics "About Rtsp" (see link below)

http://groups.google.com/group/android-challenge/msg/114f11e31351840d

Can you test it?

Thanks

On Apr 11, 5:55 am, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> Hi Anil,
>
> This might be because the sample does not include any test media files or
> URLs, you must modify the code to include those before using it.
>
> Thanks,
> Megha
>
> On Thu, Apr 10, 2008 at 7:13 PM, Anil <[EMAIL PROTECTED]> wrote:
>
> > Were you able to get this to run?
> > In MediaPlayerTest, local file audio, file video and streaming video
> > don't play.
> > MediaRecorder has a null pointer exception upon clicking record.
> > ViewVideoDemo doesn't play any video.
> > -
> > Anil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Using notifications to switch between different already opened activities

2008-04-11 Thread Semeria Stefano
Hi all,

 

I am working on an IM application for android. Currently I have one main
activity showing a list of contacts and another activity (let's call it
ChatActivity) for handling conversation.

When the user starts a chat with a contact I open the chat activity with
the startActivity firing an Intent using ACTION_VIEW as action and
CATEGORY_DEFAULT as category with a sessionId as intent data expressed
as a content URI (in my own format content://userId#).

When a second user receives a chat message, a notification is shown in
the status bar. When it clicks on the notification the same intent
described before is fired to start the ChatActivity.

 

ChatActivity is registered in manifest using the following intent
filter:

 









 

 

When the user clicks on the notification the right activity is started.
But when a new user launches a new message and a second notification is
added to statusbar and the user is not able to open his new chat
activity if the first one is already opened.

Basically, I'm not able to use the notifications on the statusbar to be
able to switch between different already opened conversation activities
(as using alt+tab on windows). It would be great if it was possible to
do so in some way.

 

What's wrong with my approach?

Have you got any suggestion?

 

Please help!

 

Thanks a lot and best regards,

 

Stefano 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SSL KeyStore

2008-04-11 Thread patrick

I have the same problem with android m5-rc15.
Which TLS key formats are supported by the android api?

thanks for answers!
Patrick

On Mar 23, 6:09 am, "Jonathan Thompson" <[EMAIL PROTECTED]>
wrote:
> Hi All,
>
> I am getting an IOException "wrong version of key store" when I run the
> following code (the load method is the culprit):
>
> char password[] = "password".toCharArray();
>
> KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
>
> keyStore.load(graphicalUI.getResources().openRawResource(R.raw.serverkeys),
> password);
>
> R.raw.serverkeys refers to the certificate I created using the Java keytool
> as follows:
>
> keytool -genkey -keystore serverkeys -keyalg rsa -alias sk
>
> Enter keystore password:  password
>
> What is your first and last name?
>
>   [Unknown]:  first.last.name
>
> What is the name of your organizational unit?
>
>   [Unknown]:  Home
>
> What is the name of your organization?
>
>   [Unknown]:  Home
>
> What is the name of your City or Locality?
>
>   [Unknown]:  Toronto
>
> What is the name of your State or Province?
>
>   [Unknown]:  Ontario
>
> What is the two-letter country code for this unit?
>
>   [Unknown]:  CA
>
> Is CN=ultra, OU=Training and Consulting,
>
> O=javacourses.com, L=Toronto, ST=Ontario, C=CA correct?
>
>   [no]:  yes
>
> Enter key password for 
>
> (RETURN if same as keystore password):  RETURN
>
> What is causing this exception to be thrown, is it that I have the wrong
> KeyStore type?  How do I know what the valid KeyStore types?
>
> Regards,
>
> Spoon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SSL KeyStore

2008-04-11 Thread patrick


I now tested following key formats:

* JKS:
  not supported, exception.msg = "KeyStore JKS Implementaion not
found", after calling: KeyStore.getInstance("JKS");
* PKCS12:
  doesn't complain when created (keyStore =
KeyStore.getInstance("PKCS12") works).
  but fails on load-time: "exception decrypting data -
java.security.NuSuchAlgorighmException: SecretKeyFactory
1.2.840.113549.1.12.1.6 implementation not found", after calling
keyStore.load(keyInputStream, pKeyPassword.toCharArray());

So which encription algorithms will I be able to use for ssl/tls keys?
Some thoughts on this?

thanks,
patrick

On Apr 11, 11:32 am, patrick <[EMAIL PROTECTED]> wrote:
> I have the same problem with android m5-rc15.
> Which TLS key formats are supported by the android api?
>
> thanks for answers!
> Patrick
>
> On Mar 23, 6:09 am, "Jonathan Thompson" <[EMAIL PROTECTED]>
> wrote:
>
> > Hi All,
>
> > I am getting an IOException "wrong version of key store" when I run the
> > following code (the load method is the culprit):
>
> > char password[] = "password".toCharArray();
>
> > KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
>
> > keyStore.load(graphicalUI.getResources().openRawResource(R.raw.serverkeys),
> > password);
>
> > R.raw.serverkeys refers to the certificate I created using the Java keytool
> > as follows:
>
> > keytool -genkey -keystore serverkeys -keyalg rsa -alias sk
>
> > Enter keystore password:  password
>
> > What is your first and last name?
>
> >   [Unknown]:  first.last.name
>
> > What is the name of your organizational unit?
>
> >   [Unknown]:  Home
>
> > What is the name of your organization?
>
> >   [Unknown]:  Home
>
> > What is the name of your City or Locality?
>
> >   [Unknown]:  Toronto
>
> > What is the name of your State or Province?
>
> >   [Unknown]:  Ontario
>
> > What is the two-letter country code for this unit?
>
> >   [Unknown]:  CA
>
> > Is CN=ultra, OU=Training and Consulting,
>
> > O=javacourses.com, L=Toronto, ST=Ontario, C=CA correct?
>
> >   [no]:  yes
>
> > Enter key password for 
>
> > (RETURN if same as keystore password):  RETURN
>
> > What is causing this exception to be thrown, is it that I have the wrong
> > KeyStore type?  How do I know what the valid KeyStore types?
>
> > Regards,
>
> > Spoon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Taking care of proxy Internet access for Dev Challenge?

2008-04-11 Thread joos


Is there an offical answer from google regarding this?

I would rather not have to care about this, since it is difficult to
test this anyway. I would have to set up a proxy and so on.

I think I will not handle proxy access in my app and rather add a note
to my readme file, that my prototype requires direct internet access.

(Android is beta anyway, so they can't require complete nifty
outprogrammed solutions anyway - with the next sdk api release we
would have to make migrations/changes anyway)

Greetings,
Joos
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Your content must have a listview whose id attribute is 'android.R.id.list'

2008-04-11 Thread aibtus

This too does not work.  I still get a "Your Content must have a
ListView whose id attribute is 'android.R.id.list' " How do we go
around this problem?





On Feb 21, 1:27 am, trickybit <[EMAIL PROTECTED]> wrote:
>  etc.
>
> On Feb 20, 1:03 am, shubha <[EMAIL PROTECTED]> wrote:
>
> > szeldon, even am facing the same problem even after changing to
> > android:id.. can u pls suggest me..
> > On Feb 14, 4:42 am, szeldon <[EMAIL PROTECTED]> wrote:
>
> > > Oh, my mistake. Changing "id" to "android:id" is a solution.
>
> > > On 14 Lut, 00:22, szeldon <[EMAIL PROTECTED]> wrote:
>
> > > > I have the same problem but this answer does not solve all the
> > > > problems.Errormentioned by CJ still exists after "android:id"
> > > > change. Any ideas?
>
> > > > On 13 Lut, 22:51, Steve918 <[EMAIL PROTECTED]> wrote:
>
> > > > > you now need to put android:id instead of just id=, it's a namespace
> > > > > issue that didn't exist before.
>
> > > > > On Feb 13, 3:42 pm, CJ <[EMAIL PROTECTED]> wrote:
>
> > > > > > Hi, guys
> > > > > > What does it mean? My code was totally fine before this upgrade. 
> > > > > > Right
> > > > > > now, I cannot even start it.
> > > > > > My activity has an ListView.
> > > > > >  > > > > >   android:layout_width="fill_parent"
> > > > > >   android:layout_height="fill_parent"
> > > > > >   android:layout_weight="5"
> > > > > >   android:drawSelectorOnTop="false"/>
>
> > > > > > I don't understand what has gone wrong.
> > > > > > Help please!!!
> > > > > > Thanks- Hide quoted text -
>
> > > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Taking care of proxy Internet access for Dev Challenge?

2008-04-11 Thread Harsh Jain
BUMP. Cant we expect judges to just use -http-proxy flag  ? I have not taken
care of proxy issues in my app. Please let us know.

Regards,
harsh

On Fri, Apr 11, 2008 at 4:58 PM, joos <[EMAIL PROTECTED]> wrote:

>
>
> Is there an offical answer from google regarding this?
>
> I would rather not have to care about this, since it is difficult to
> test this anyway. I would have to set up a proxy and so on.
>
> I think I will not handle proxy access in my app and rather add a note
> to my readme file, that my prototype requires direct internet access.
>
> (Android is beta anyway, so they can't require complete nifty
> outprogrammed solutions anyway - with the next sdk api release we
> would have to make migrations/changes anyway)
>
> Greetings,
> Joos
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Taking care of proxy Internet access for Dev Challenge?

2008-04-11 Thread joos

I think yes, you can expect judges to you proxy flags.

But if you are opening an http Connection from inside your app it does
not use the proxy settings (I think).

You would have to check the proxy settings in your application and
then add these parameters to your http open connection call.

Greetings,
Joos



On Apr 11, 1:34 pm, "Harsh Jain" <[EMAIL PROTECTED]> wrote:
> BUMP. Cant we expect judges to just use -http-proxy flag  ? I have not taken
> care of proxy issues in my app. Please let us know.
>
> Regards,
> harsh
>
> On Fri, Apr 11, 2008 at 4:58 PM, joos <[EMAIL PROTECTED]> wrote:
>
> > Is there an offical answer from google regarding this?
>
> > I would rather not have to care about this, since it is difficult to
> > test this anyway. I would have to set up a proxy and so on.
>
> > I think I will not handle proxy access in my app and rather add a note
> > to my readme file, that my prototype requires direct internet access.
>
> > (Android is beta anyway, so they can't require complete nifty
> > outprogrammed solutions anyway - with the next sdk api release we
> > would have to make migrations/changes anyway)
>
> > Greetings,
> > Joos
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Service starts on Alarm

2008-04-11 Thread Saj

I want the program to allow a user to define a specific time and
date.. and a message should appear when the schedule is triggered.
Like if I set the time and date to 12 am, April 14, 2008, a message
should appear on that time. How do you suggest me to do that? 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Extending android.app.Application

2008-04-11 Thread WildLuka

Not exactly what I was looking for ...

On Apr 11, 5:23 am, SnowDrifter <[EMAIL PROTECTED]> wrote:
> I started here:http://code.google.com/android/intro/index.html
>
> download Eclipse and install the android package as instructed in the
> documentation above. using Eclipse will help you with setting up
> applications and your manifest.
>
> Enjoy!
>
> On Apr 10, 6:33 pm, WildLuka <[EMAIL PROTECTED]> wrote:
>
> > Dear All,
>
> > can you tell me how to go about extending android.app.Application, as
> > I need some global data access, and what to write in the
> > AndroidManifest.xml ?
>
> > your help will be appreciated
>
> > many thanks in advance.
>
> > Luka
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Your content must have a listview whose id attribute is 'android.R.id.list'

2008-04-11 Thread Steve918

I think your code should read @android:id/android:list, you left out
the android: in front of list

On Apr 11, 6:55 am, aibtus <[EMAIL PROTECTED]> wrote:
> This too does not work.  I still get a "Your Content must have a
> ListView whose id attribute is 'android.R.id.list' " How do we go
> around this problem?
>
> 
>                  android.id="@android:id/list"
>                 android:layout_width="fill_parent"
>                 android:layout_height="fill_parent"
>                 android:layout_weight="1" yout_width="fill_parent"
>                 android:drawSelectorOnTop="false"/>
> 
>
> On Feb 21, 1:27 am, trickybit <[EMAIL PROTECTED]> wrote:
>
> >  > etc.
>
> > On Feb 20, 1:03 am, shubha <[EMAIL PROTECTED]> wrote:
>
> > > szeldon, even am facing the same problem even after changing to
> > > android:id.. can u pls suggest me..
> > > On Feb 14, 4:42 am, szeldon <[EMAIL PROTECTED]> wrote:
>
> > > > Oh, my mistake. Changing "id" to "android:id" is a solution.
>
> > > > On 14 Lut, 00:22, szeldon <[EMAIL PROTECTED]> wrote:
>
> > > > > I have the same problem but this answer does not solve all the
> > > > > problems.Errormentioned by CJ still exists after "android:id"
> > > > > change. Any ideas?
>
> > > > > On 13 Lut, 22:51, Steve918 <[EMAIL PROTECTED]> wrote:
>
> > > > > > you now need to put android:id instead of just id=, it's a namespace
> > > > > > issue that didn't exist before.
>
> > > > > > On Feb 13, 3:42 pm, CJ <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi, guys
> > > > > > > What does it mean? My code was totally fine before this upgrade. 
> > > > > > > Right
> > > > > > > now, I cannot even start it.
> > > > > > > My activity has an ListView.
> > > > > > >      > > > > > >               android:layout_width="fill_parent"
> > > > > > >               android:layout_height="fill_parent"
> > > > > > >               android:layout_weight="5"
> > > > > > >               android:drawSelectorOnTop="false"/>
>
> > > > > > > I don't understand what has gone wrong.
> > > > > > > Help please!!!
> > > > > > > Thanks- Hide quoted text -
>
> > > > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Extending android.app.Application

2008-04-11 Thread Agus

WildLuka,

In the android manifest file, you can see  tag
now add the attribute
android:name="your_full_classname_which_extends_application"
thats all to it.

Agus.


On 4/11/08, WildLuka <[EMAIL PROTECTED]> wrote:
>
>  Not exactly what I was looking for ...
>
>
>  On Apr 11, 5:23 am, SnowDrifter <[EMAIL PROTECTED]> wrote:
>  > I started here:http://code.google.com/android/intro/index.html
>  >
>  > download Eclipse and install the android package as instructed in the
>  > documentation above. using Eclipse will help you with setting up
>  > applications and your manifest.
>  >
>  > Enjoy!
>  >
>  > On Apr 10, 6:33 pm, WildLuka <[EMAIL PROTECTED]> wrote:
>  >
>  > > Dear All,
>  >
>  > > can you tell me how to go about extending android.app.Application, as
>  > > I need some global data access, and what to write in the
>  > > AndroidManifest.xml ?
>  >
>  > > your help will be appreciated
>  >
>  > > many thanks in advance.
>  >
>  > > Luka
>  >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Why not display Vertical Scroll bar and can not scroll down.

2008-04-11 Thread Android-Berry

Hi Megha,

Thanks for your replay, it was really helpful.

I have done this according to your msg. it does work.

However, this things is that if content of LinearLayout is not enought
to fill the screen,
while the LinearLayout's background is set to YELLOW or WHITE,or what
ever not BLACK(since the default background color is BLACK)

The background color of filled area will be displayed correctly, the
rest area is still BLACK.
So it is so odd.

Here is my Code :

public View getView(.){
ScrollView sv = new ScrollView(mCtx);
sv.setLayoutParams(new LinearLayout.LayoutParams(
   LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
sv.addView(mLL,new LinearLayout.LayoutParams(
   LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
return sv;
}


mLL definition is :

mLL  = new LinearLayout(mCtx);
mLL.setOrientation(LinearLayout.VERTICAL);
mLL.setLayoutParams(new LinearLayout.LayoutParams(
  LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
mLL.setVerticalScrollBarEnabled(true);
mLL.setBackgroundColor(0xcc99);
...

Thanks








On Apr 9, 5:10 pm, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I think you have not placed your LinearLayout inside a ScrollView, this is
> needed if you want the scrollbars.
>
> http://schemas.android.com/apk/res/android";
>        android:layout_width="fill_parent"
>        android:layout_height="fill_parent">
>
>                        android:orientation="vertical"
>                android:layout_width="fill_parent"
>                android:layout_height="fill_parent"
>                android:id="@+id/linearLayout">
>
>        
> 
>
> Thanks,
> Megha
>
> On Wed, Apr 9, 2008 at 1:25 PM, Android-Berry <[EMAIL PROTECTED]>
> wrote:
>
>
>
>
>
> > Hi There,
>
> > I have created Linearlayout dynamatically. and added some Checkbox,
> > and RadioButton to.
> > which can not display within one screen.
>
> > however, it does not show Vertical Scroll bar, and down - arrow does
> > not work neither.
>
> > here is the source code that I am using,
>
> >        mLL  = new LinearLayout(mCtx);
> >        mLL.setOrientation(LinearLayout.VERTICAL);
> >        mLL.setLayoutParams(new LinearLayout.LayoutParams(
> >                                LayoutParams.FILL_PARENT,
> > LayoutParams.WRAP_CONTENT));
> >        mLL.setVerticalScrollBarEnabled(true);
> >        mLL.setBackgroundColor(0xcc99);
>
> > and it is displayed within TabPanel.
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] XferMode

2008-04-11 Thread tatagogo

Does anyone know exactly how you set up an Xfermode for use with
Paint..? I'm trying to set up an XferMode with PorterDuff.Mode.DARKEN
so that, when assigned, all pixels painted with the Paint call will
darken the underlying pixels (I don't wish to use an alpha channel
btw)... however I've had very little success actually doing this!

According to the Xfermode documentation: "The static function
Create(Modes) can be called to return an instance of any of the
predefined subclasses as specified in the Modes enum" - unfortunately
I cannot find such a function!

Any help would be much appreciated, cheers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] RelativeLayout does not work Correctly(Bug?)

2008-04-11 Thread Android-Berry

Hi There,

I have created RelativeLayout and added only one TextView to make
display at the center-horizantal.

However, it does not work. it always show up left-align.

Here is my code:

 RelativeLayout rl = new RelativeLayout(this);
 rl.setLayoutParams(new RelativeLayout.LayoutParams(
 LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
 TextView view = new TextView(this);
view.setHeight(40);
  view.setText("Test");
  RelativeLayout.LayoutParams rlp =  new
RelativeLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
 rlp.addRule(RelativeLayout.CENTER_HORIZONTAL);
 rl.addView(view,rlp);
 setContentView(rl);

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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Custom mockup location providers - what's wrong with this?

2008-04-11 Thread NTR

I'm trying to make my own mockup location providers, but I just can't
get them to work. I have the following file structure in the emulator:

/data/misc/location/house/kml
/data/misc/location/house/properties

The kml file is obtained by saving a path in Google Earth.

Code:

LocationManager locationManager = (LocationManager) getSystemService(
Context.LOCATION_SERVICE);

Location location = locationManager.getCurrentLocation("house");

Permissions:





Either the location is null, when executing the code in an intent, or
if I run the code in a service, the following exception is shown in
the log:

ERROR/JavaBinder(520): java.lang.NullPointerException
ERROR/JavaBinder(520): at
android.server.LocationManagerService.getCurrentLocation(LocationManagerService.java:
690)
ERROR/JavaBinder(520): at android.location.ILocationManager
$Stub.onTransact(ILocationManager.java:149)
ERROR/JavaBinder(520): at
android.os.Binder.execTransact(Binder.java:274)
ERROR/JavaBinder(520): at android.dalvik.NativeStart.run(Native
Method)

Once again, any advice? :/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] GTalk incoming chat message causes an exception in the emulator

2008-04-11 Thread NTR

When I try to send a GTalk message from the GTalk client in my
computer to the emulator client, the following exception is thrown:

ERROR/Checkin(520): Error reporting crash:
java.lang.NullPointerException
ERROR/Notification(6349): This constructor doesn't work correctly
anymore
ERROR/Notification(6349): java.lang.RuntimeException
ERROR/Notification(6349): at
android.app.Notification.(Notification.java:172)
ERROR/Notification(6349): at
com.google.android.gtalkservice.service.StatusBarNotifier.notify(StatusBarNotifier.java:
138)
ERROR/Notification(6349): at
com.google.android.gtalkservice.service.StatusBarNotifier.notifyNewMessage(StatusBarNotifier.java:
101)
ERROR/Notification(6349): at
com.google.android.gtalkservice.ChatMgr.notifyNewMessage(ChatMgr.java:
611)
ERROR/Notification(6349): at
com.google.android.gtalkservice.ChatSession.notifyNewMessage(ChatSession.java:
688)
ERROR/Notification(6349): at
com.google.android.gtalkservice.ChatSession.onReceiveMessage(ChatSession.java:
295)
ERROR/Notification(6349): at
com.google.android.gtalkservice.ChatMgr.processIncomingMessage(ChatMgr.java:
532)
ERROR/Notification(6349): at
com.google.android.gtalkservice.ChatMgr.doProcessPacket(ChatMgr.java:
318)
ERROR/Notification(6349): at
com.google.android.gtalkservice.ChatMgr.access$000(ChatMgr.java:54)
ERROR/Notification(6349): at
com.google.android.gtalkservice.ChatMgr
$ProcessPacketCallback.run(ChatMgr.java:486)
ERROR/Notification(6349): at
android.os.Handler.handleCallback(Handler.java:455)
ERROR/Notification(6349): at
android.os.Handler.dispatchMessage(Handler.java:78)
ERROR/Notification(6349): at android.os.Looper.loop(Looper.java:
91)
ERROR/Notification(6349): at
android.app.ActivityThread.main(ActivityThread.java:3052)
ERROR/Notification(6349): at
java.lang.reflect.Method.invokeNative(Native Method)
ERROR/Notification(6349): at
java.lang.reflect.Method.invoke(Method.java:356)
ERROR/Notification(6349): at android.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:1547)
ERROR/Notification(6349): at
android.os.ZygoteInit.main(ZygoteInit.java:1445)
ERROR/Notification(6349): at
android.dalvik.NativeStart.main(Native Method)

I have no chat message listeners registered.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Taking care of proxy Internet access for Dev Challenge?

2008-04-11 Thread Michael Johnston

Bump.  I'd also like to read an official clarification about proxies.

On Apr 11, 4:34 am, "Harsh Jain" <[EMAIL PROTECTED]> wrote:
> BUMP. Cant we expect judges to just use -http-proxy flag  ? I have not taken
> care of proxy issues in my app. Please let us know.
>
> Regards,
> harsh
>
> On Fri, Apr 11, 2008 at 4:58 PM, joos <[EMAIL PROTECTED]> wrote:
>
> > Is there an offical answer from google regarding this?
>
> > I would rather not have to care about this, since it is difficult to
> > test this anyway. I would have to set up a proxy and so on.
>
> > I think I will not handle proxy access in my app and rather add a note
> > to my readme file, that my prototype requires direct internet access.
>
> > (Android is beta anyway, so they can't require complete nifty
> > outprogrammed solutions anyway - with the next sdk api release we
> > would have to make migrations/changes anyway)
>
> > Greetings,
> > Joos
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Taking care of proxy Internet access for Dev Challenge?

2008-04-11 Thread Stefan Handschuh


You should relax!

IF the proxy-setting would be THIS important, there would be a hint and
a proper support by Adnroid itself.

But testing is not that complicated:

just serach for "public proxy" and select a anonymous (don't take a
transparent one).


> Bump.  I'd also like to read an official clarification about proxies.
> 
> On Apr 11, 4:34 am, "Harsh Jain" <[EMAIL PROTECTED]> wrote:
> > BUMP. Cant we expect judges to just use -http-proxy flag  ? I have not taken
> > care of proxy issues in my app. Please let us know.
> >
> > Regards,
> > harsh
> >
> > On Fri, Apr 11, 2008 at 4:58 PM, joos <[EMAIL PROTECTED]> wrote:
> >
> > > Is there an offical answer from google regarding this?
> >
> > > I would rather not have to care about this, since it is difficult to
> > > test this anyway. I would have to set up a proxy and so on.
> >
> > > I think I will not handle proxy access in my app and rather add a note
> > > to my readme file, that my prototype requires direct internet access.
> >
> > > (Android is beta anyway, so they can't require complete nifty
> > > outprogrammed solutions anyway - with the next sdk api release we
> > > would have to make migrations/changes anyway)
> >
> > > Greetings,
> > > Joos
> > 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Cursor c = this.getContentResolver().query( gets nullpointer exception when code is moved

2008-04-11 Thread franw

hi - this code worked perfectly when it was in my main launcher, but
when i moved it to another class in my project, i get a null pointer
exception.  

public String getContactStr()
{
String pList = "";
String st = "";

Cursor c = this.getContentResolver().query(
android.provider.Contacts.Phones.CONTENT_URI,
null, null, null,
android.provider.Contacts.Phones.PERSON_ID+ " ASC");

 .
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] emulator of m5-rc15 problem

2008-04-11 Thread minti

it keep typing the "=" without quote in the text field in front of
contacts as emulator start
i have check the keyboad also but it still typing the sign 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: query phone state

2008-04-11 Thread Megha Joshi
Hi David,

At present, there is no value in Phone state enum like 'ENGAGED' to show
that the phone is engaged in a call.
But the Phone state of RINGING is broadcast when a call is received and a
state of IDLE is broadcast when the call ends.
You could devise your logic to know when a phone is engaged based on that.

If you really feel there should a value to directly query the engaged state,
you may want to put a feature request in the android issue tracker with a
couple of use cases.

Thanks,
Megha

On Tue, Apr 8, 2008 at 7:42 AM, David Welton <[EMAIL PROTECTED]> wrote:

>
> Hi, I know it's possible to receive information about the phone state
> via an intent receiver:
>
>
>  
>
>
> But is there a way to simply query whether the phone is engaged in a
> voice call? Information about the call would be good too, but I don't
> think that's possible, given that it's not even possible using the
> intent receiver above.
>
> Thanks,
> --
> David N. Welton
>
> http://www.welton.it/davidw/
>
> http://www.dedasys.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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Bug in the PhoneStateIntentReceiver

2008-04-11 Thread Megha Joshi
Hi Abhinav,

There is a bug int he current SDK due to which you do not receive a
broadcast when "send to voicemail" is hit.
This has been fixed and the fix will be available with a future release of
the SDK.

Thanks,
Megha

On Thu, Apr 10, 2008 at 12:48 PM, Abhinav Parashar <[EMAIL PROTECTED]>
wrote:

>
>
> Yes Greg I also noticed the same thing. Could you suggest me what
> should i do because i need to
> track if the person hits ..."send to voicemail" ?
>
> Abhinav Parashar
>
>
>
>
>
> On Apr 9, 12:11 am, Greg_G <[EMAIL PROTECTED]> wrote:
> > I can confirm this also, using the AndroidManifest.xml "Receiver->Intent
> Filter->android.intent.action.PHONE_STATE" method of receiving
> >
> > the intent.
> >
> > When a call comes in, a PHONE_STATE intent with a STATE of RINGING is
> > broadcast.  If the caller stops calling before the user presses a
> > button a STATE of IDLE is broadcast (after pressing OK to the missed
> > call).  However, if the user hits "Send tovoicemail" before the
> > caller stops calling, it instead sends another RINGING broadcast.
> >
> > I believe the intended behavior is likely to be to send a PHONE_STATE
> > intent with a STATE of IDLE when the user presses "Send tovoicemail".
>  Isn't that correct?
> >
> > Greg
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: RelativeLayout does not work Correctly(Bug?)

2008-04-11 Thread Dan U.

Change rlp to

RelativeLayout.LayoutParams rlp = new 
RelativeLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, 
LayoutParams.WRAP_CONTENT);

Because what your original code did was to make the TextView fill up
the width of the screen.

On Apr 11, 8:23 am, Android-Berry <[EMAIL PROTECTED]> wrote:
> Hi There,
>
> I have created RelativeLayout and added only one TextView to make
> display at the center-horizantal.
>
> However, it does not work. it always show up left-align.
>
> Here is my code:
>
>  RelativeLayout rl = new RelativeLayout(this);
>  rl.setLayoutParams(new RelativeLayout.LayoutParams(
>  LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
>  TextView view = new TextView(this);
> view.setHeight(40);
>   view.setText("Test");
>   RelativeLayout.LayoutParams rlp =  new
> RelativeLayout.LayoutParams(
> LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);
>  rlp.addRule(RelativeLayout.CENTER_HORIZONTAL);
>  rl.addView(view,rlp);
>  setContentView(rl);
>
> 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: XferMode

2008-04-11 Thread NTR

Simply:

setXfermode(new PorterDuff(PorterDuff.Mode.DARKEN));

tatagogo wrote:
> Does anyone know exactly how you set up an Xfermode for use with
> Paint..? I'm trying to set up an XferMode with PorterDuff.Mode.DARKEN
> so that, when assigned, all pixels painted with the Paint call will
> darken the underlying pixels (I don't wish to use an alpha channel
> btw)... however I've had very little success actually doing this!
>
> According to the Xfermode documentation: "The static function
> Create(Modes) can be called to return an instance of any of the
> predefined subclasses as specified in the Modes enum" - unfortunately
> I cannot find such a function!
>
> Any help would be much appreciated, cheers.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: intent actions vs. filter actions

2008-04-11 Thread Megha Joshi
Hi David,

This seems like a bug in the Menu.addIntentOptions() method, because the
Intent should have had an Action even though it was fired because it was in
SELECTED_ALTERNATIVE category.
Please log this in the android issue tracker.

Thanks,
Megha

On Thu, Apr 10, 2008 at 10:44 AM, David Given <[EMAIL PROTECTED]> wrote:

>
> I have an Activity that can be invoked in two ways.
>
> 
>  
>   
>   
>   
>   
>  
>  
>   android:name="android.intent.category.SELECTED_ALTERNATIVE"/>
>   
>/>
>  
> 
>
> This can be invoked either from the web browser or from a menu item.
>
> The problem is that when I select the menu item and the Activity gets
> invoked, I can't tell what action caused the invocation.
> getIntent().getAction() returns null.
>
> I think what's going on is that the Intent I'm getting when the Activity
> is launched from the menu item is the template Intent I pass in to
> addIntentOptions():
>
> intent = new Intent();
> intent.setType("vnd.android.cursor.item/vnd.cowlark.item");
> intent.setData(ContentUris.withAppendedId(getIntent().getData(),
>   getSelectedItemId()));
> intent.addCategory(Intent.SELECTED_ALTERNATIVE_CATEGORY);
> menu.addIntentOptions(Menu.SELECTED_ALTERNATIVE, 0, new
>   ComponentName(this, MyListActivity.class), null, intent, 0, null);
>
> Because it's a template, of course it doesn't have an action specified
> (because otherwise it wouldn't match all my menu items!). When the
> Activity receives the Intent, it hasn't had its Action set to the value
> in the filter.
>
> Any suggestions as to how I can resolve this? Other than subclassing
> InstallerActivity, of course.
>
> --
> David Given
> [EMAIL PROTECTED]
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Question of geocoding API - to be used in Android App.

2008-04-11 Thread marvin

I think I worked out why the real geocoder doesnt do reverse geocoding
nicel. I posted it up here:
http://blog.marvinware.com/2008/04/gee-oh-code.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Sample code: MyMediaRecorder.java NullPointerException

2008-04-11 Thread Niranjan

I am getting following exception while trying sample media recording
example. Any idea?

ERROR/AndroidRuntime(654): java.lang.NullPointerException
ERROR/AndroidRuntime(654): at
android.content.ContentResolver.getProvider(ContentResolver.java:380)
ERROR/AndroidRuntime(654): at
android.content.ContentResolver.insert(ContentResolver.java:281)
ERROR/AndroidRuntime(654): at
mysamples.android.MyMediaRecorder.initiateMediaRecorder(MyMediaRecorder.java:
98)
ERROR/AndroidRuntime(654): at mysamples.android.MyMediaRecorder
$1.onClick(MyMediaRecorder.java:63)

Thanks,
Niranjan
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Communication between two emulators. UDP Chat app

2008-04-11 Thread kobica



On Apr 10, 3:28 am, Digit <[EMAIL PROTECTED]> wrote:
> you need to type "redir add udp:5000:5000" on the server emulator's console
> you typed it in a Windows command-line :-)
>


What's the difference between redirecting and forwarding.
Right now I'm using forwarding on the server emulator to forward
incoming connection.
Is "redir" doing the same thing?
Forwarding works just fine. I do have, however, an issue when I'm
trying to bind a INET socket to a _non_ localhost address (a real IPv4
address).
It says errno 99 and I'm getting a bind exception.

Thanks in advance,
Kobi.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-11 Thread Robert


Hi Megha,

I am successfully using your classes to capture and view video files.
But, can't seem to reliable reuse the same surface when returning from
a subactivity. I tried playing a video file in onActivityResult(), and
although managed to play it on rare occasions, most of the time the
video is not shown. Since I've been running the same code over and
over again (and only sometimes successfully), I am assuming that the
surface is not ready to receive the video sequence. How can I make
sure surfaceCreated() has already done its job? Should I add something
to onResume() or onRestart() in my main activity?

The relevant code:

public class mediaclass extends Activity implements
SurfaceHolder.Callback {
  private SurfaceView mSF;
  private SurfaceHolder mHolder = null;
  private boolean mHasSurface;
  private MediaPlayer myPlayer;

  @Override public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
mSF = (SurfaceView) findViewById(R.id.preview);
mSF.getHolder().addCallback(this);
mHasSurface = false;
  }

  public void surfaceCreated(SurfaceHolder holder) {
mHolder = holder;
mHasSurface = true;
  }

  public void surfaceDestroyed(SurfaceHolder holder) {
mHolder = null;
mHasSurface = false;
  }

  @Override protected void onActivityResult(int requestCode, int
resultCode, String data, Bundle extras) {
super.onActivityResult(requestCode, resultCode, data, extras);

myPlayer = new MediaPlayer();
if (mHasSurface == true){
myPlayer.setDisplay(mHolder.getSurface());
}
try {
myPlayer.setDataSource(data); // data contains the full path/
filename (from SD card)
myPlayer.prepare();
} catch (IOException e) {
Log.e(TAG, e.getMessage(), e);
}
myPlayer.start();
  }

As you can see, I am checking mHasSurface, before attaching to the
surface. I even tried waiting for mHasSurface to become true in an
"infinite" loop, but no luck with that either :( What else can I try?

This is how the surface is defined in main.xml:


Also can you suggest a way to display a PNG image from SD card on a
SurfaceView? Seems that MediaPlayer was not designed for this.

Thanks and regards
Robert

On Apr 8, 1:19 am, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> This is because the surface is not yet ready for the mediaplayer, please
> call the mediaPlayer initialization code in or after OnSurfaceCreate()
> callback..
>
> Thanks,
> Megha
>
> On Mon, Apr 7, 2008 at 9:45 AM, fubin <[EMAIL PROTECTED]> wrote:
>
> > In Sample given by google There is a button to invoke a file.
> >private void playVideo(Integer Media) {
> >try {
> >// If the path has not changed, just start the media
> > player
> >path = "/data/room.mp4";
>
> >// Create a new media player and set the listeners
> >mp = new MediaPlayer();
> >mp.setDataSource(path);
> >mp.setDisplay(holder.getSurface());
> >mp.prepare();
> >mp.setOnBufferingUpdateListener(this);
> >mp.setOnCompletionListener(this);
> >mp.setOnPreparedListener(this);
> >mp.setAudioStreamType(AudioSystem.STREAM_MUSIC);
> >Log.d("\n\nCREATE", "mediaplayer");
> >mp.start();
> >} catch (Exception e) {
> >Log.e(TAG, "error: " + e.getMessage(), e);
> >}
> >}
>
> >private OnClickListener mPlayListener = new OnClickListener() {
> >public void onClick(View v) {
> >playVideo(extras.getInt(MEDIA));
>
> >}
> >};
>
> > When I copy the code directly to onCreate like the following program
> > creshed...:
>
> >public void onCreate(Bundle icicle) {
> >super.onCreate(icicle);
> >setContentView(R.layout.mediaplayer);
> >mPreview = (SurfaceView) findViewById(R.id.surface);
>
> >// Set the transparency
> >getWindow().setFormat(PixelFormat.TRANSPARENT);
> >// Set a size for the video screen
> >holder = mPreview.getHolder();
> >holder.addCallback(this);
> >try {
> >// If the path has not changed, just start the media
> > player
> >path = "/data/room.mp4";
>
> >// Create a new media player and set the listeners
> >mp = new MediaPlayer();
> >mp.setDataSource(path);
> >mp.setDisplay(holder.getSurface());
> >mp.prepare();
> >mp.setOnBufferingUpdateListener(this);
>
> >mp.setOnCompletionListener(this);
> >mp.setOnPreparedListener(this);
> >mp.setAudioStreamType(AudioSystem.STREAM_MUSIC);
> >Log.d("\n\nCREATE", "mediaplayer");
> >mp.start();
> >} catch (Exception e) {
> >Log.e(TAG, "error: " + e.getMessage(), e);
> >}
> > }
>

[android-developers] Here's some help for the "Emulator disconnected" launch issue!

2008-04-11 Thread NTR

At least this works for me.

1. Disable automatic launch targeting from the Run...-dialog
2. Run your project as usual
3. The launch target selector opens. Now it's tempting to click
"Launch emulator", but the trick is
4. Don't do that! Click "Cancel" instead.
5. Quickly launch the project again and this time, click "Launch
emulator"

Hope it works for you fellow Androids, too!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Media Sample Apps

2008-04-11 Thread Niranjan

Hi Megha,

I am trying sample application MediaRecorder and I get following
exception when I click start recording button.

ERROR/AndroidRuntime(654): java.lang.NullPointerException
ERROR/AndroidRuntime(654): at
android.content.ContentResolver.getProvider(ContentResolver.java:380)
ERROR/AndroidRuntime(654): at
android.content.ContentResolver.insert(ContentResolver.java:281)
ERROR/AndroidRuntime(654): at
mysamples.android.MyMediaRecorder.initiateMediaRecorder(MyMediaRecorder.java:
98)
ERROR/AndroidRuntime(654): at mysamples.android.MyMediaRecorder
$1.onClick(MyMediaRecorder.java:63)

Am I missing something? Could you point me to relevant information.

Thanks,
Niranjan

On Mar 19, 5:12 pm, Megha <[EMAIL PROTECTED]> wrote:
> The sample applications for using Media APIs:
>
> 1) MediaPlayerTest
> 2) MediaRecorder
> 3) VideoViewDemo
>
> are uploaded in the Group's Files 
> section:http://groups.google.com/group/android-developers/files
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Cannot connect to server running in Android

2008-04-11 Thread kobica

Hi Folks,

I have a strange issue and would appreciate if someone can take a
quick look. I'm probably missing here something fundamental.

I'm trying to run 2 emulators. 1 with TCP Server application,
listening on localhost:, and the other emulator, running a client,
trying to connect to the first emulator running the server.

For the Server-emulator, I've created a port forwarding from  --->

Telnet to localhost  works just fine, and the server accept
connections.

However, trying to connect to the same server with the other emulator
(on the same machine), fails with:

IOException java.net.ConnectException: 127.0.0.1/127.0.0.1: -
Connection refused

Trying to connect to a different real IP outside the local machine,
works just fine.

Any idea why I'm having such an issue? Is there anything I need to
setup on the client side emulator to make is work?
Maybe it has something to do with loading 2 emulators on the same
machine?
Do I need to load the second emulator with some special params?

Working with recent M5 SDK, on Linux, Fedora 6.

Thanks in advance,
Kobi.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Service starts on Alarm

2008-04-11 Thread zero

if you can wait for another week or so, i suggest using the
openintents alert framework. :)
(we'll have support for this pretty soon, but right now i'm' busy with
polishing other things)
but as this is propably not the case, i just point you here:
http://code.google.com/android/reference/android/app/AlarmManager.html
this does basically what you need.


On Apr 11, 2:25 pm, Saj <[EMAIL PROTECTED]> wrote:
> I want the program to allow a user to define a specific time and
> date.. and a message should appear when the schedule is triggered.
> Like if I set the time and date to 12 am, April 14, 2008, a message
> should appear on that time. How do you suggest me to do that? 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Extending android.app.Application

2008-04-11 Thread trickybit

I didn't use fully-qualified  classname, I used classname starting
with a 'dot' relative to the manifest package.

That is, in the top level  tag, the package attribute might
have value "com.jjj.myapp" and in the   tag, the
android:name attribute might have value ".MyApplication" where the
full classname of your Application extension class would be
com.jj.myapp.MyApplication.

Fully-qualified probably works just fine, but for some things I was
under the impression that this approach was needed.

 Jim


On Apr 11, 7:00 am, Agus <[EMAIL PROTECTED]> wrote:
> WildLuka,
>
> In the android manifest file, you can see  tag
> now add the attribute
> android:name="your_full_classname_which_extends_application"
> thats all to it.
>
> Agus.
>
> On 4/11/08, WildLuka <[EMAIL PROTECTED]> wrote:
>
>
>
> >  Not exactly what I was looking for ...
>
> >  On Apr 11, 5:23 am, SnowDrifter <[EMAIL PROTECTED]> wrote:
> >  > I started here:http://code.google.com/android/intro/index.html
>
> >  > download Eclipse and install the android package as instructed in the
> >  > documentation above. using Eclipse will help you with setting up
> >  > applications and your manifest.
>
> >  > Enjoy!
>
> >  > On Apr 10, 6:33 pm, WildLuka <[EMAIL PROTECTED]> wrote:
>
> >  > > Dear All,
>
> >  > > can you tell me how to go about extending android.app.Application, as
> >  > > I need some global data access, and what to write in the
> >  > > AndroidManifest.xml ?
>
> >  > > your help will be appreciated
>
> >  > > many thanks in advance.
>
> >  > > Luka
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Browser(webkit) Icon?

2008-04-11 Thread zero

Hi folks
a simple, maybe even stupid question:
i'd like to display the browser icon in an activiy menu (as it is
supposed to launch the browser with an uri), but i can't find it
anywhere. (maybe i'm just looking in the wrong direction). is this
possible? am i allowed to do so?  any hints are appreciated :)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Imagine the possibilities of Android + Carnegie Mellon's Alice

2008-04-11 Thread trickybit

Something where professional software creators can make good money
doing top-quality work?

On Apr 10, 10:37 pm, RichardBronosky <[EMAIL PROTECTED]>
wrote:
> http://www.alice.org/index.php?page=what_is_alice/what_is_alice
>
> If Google gets the Android platform so that anyone on any network has
> the freedom to run it, and uses something like Alice to teach normal
> people to program for it...  What could ever compete against that?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Confusing Problem about VideoView

2008-04-11 Thread Mayank

Hey, I'm too facing a similar problem. I'm using a frame layout
containing 2 surface view of different sizes one over the other.


  
  
 
 


I'm playing only one 3gp file with media player but trying to switch
the surface view while the application runs. I'm unable to switch the
video on 2nd surface.



On Apr 8, 6:15 am, fubin <[EMAIL PROTECTED]> wrote:
> Thanks in advance : )
>
> On 4月8日, 下午6时13分, fubin <[EMAIL PROTECTED]> wrote:
>
> > Why does the following code failed? I just want switch between
> > different files. But the application crashed again and again
>
> > package com.google.android.samples.media.test;
>
> > import android.app.Activity;
> > import android.graphics.PixelFormat;
> > import android.net.Uri;
> > import android.os.Bundle;
> > import android.util.Log;
> > import android.view.View;
> > import android.view.View.OnClickListener;
> > import android.widget.Button;
> > import android.widget.MediaController;
> > import android.widget.VideoView;
>
> > public class VideoViewDemo extends Activity {
> > /** Called when the activity is first created. */
> > private String path = "/data/room.mp4";
> > private VideoView mVideoView;
>
> > @Override
> > public void onCreate(Bundle icicle) {
> > super.onCreate(icicle);
> > getWindow().setFormat(PixelFormat.TRANSLUCENT);
> > setContentView(R.layout.videoview);
> > mVideoView = (VideoView) findViewById(R.id.surface_view);
> > MediaController nc = new MediaController(this);
> > mVideoView.setMediaController(nc);
> > mVideoView.requestFocus();
>
> > Button b1 = (Button)findViewById(R.id.button1);
> > Button b2 = (Button)findViewById(R.id.button2);
>
> > b1.setOnClickListener(new OnClickListener(){
> > @Override
> > public void onClick(View view) {
> > // TODO Auto-generated method stub
> > mVideoView.pause();
> > mVideoView.stopPlayback();
> > mVideoView.setVideoPath("PATH1.MP4");
> > }
> > });
> > b2.setOnClickListener(new OnClickListener(){
> > @Override
> > public void onClick(View view) {
> > // TODO Auto-generated method stub
> > mVideoView.pause();
> > mVideoView.stopPlayback();
> > mVideoView.setVideoPath("PATH2.MP4");
> > }
> > });
> > }
>
> > }
>
> > On 4月8日, 上午12时39分, fubin <[EMAIL PROTECTED]> wrote:
>
> > > The VideoView example works fine when play just a sigle mp4 file, But
> > > I wander if I can pause the current playing file and setpath to
> > > another file ? I tried but it failed.
>
> > > how should I do if I want to switch between different mp4 files while
> > > the previous one is not finished?
>
> > > I use the following code to set a new file  to a videoview:
> > > if (mVideoView.isPlaying()) {
> > > mVideoView.pause();
> > > mVideoView.stopPlayback();
> > > }
> > > mVideoView.setVideoPath("X.mp4");
> > > mVideoView.setMediaController(mMediaController);
>
> > > Is there anything wrong?
> > > The result is the first runing file paused, and the second file can
> > > not run. when switch back to the previous one, it crashed
>
> > > (BTW, the videoview widget seems resource consuming, It can't work on
> > > my old T42 notebook with 1G memory, 1.7G cpu 1core, the application
> > > die often,  but on T61 with 2 core CPU, it works just as expected...)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Changing view widget properties in a ListAdapter

2008-04-11 Thread SnowDrifter

After looking at the Activity lifecycle I am not sure if there are any
other places I can put this update. Anyone have any ideas?

On Apr 10, 9:50 pm, SnowDrifter <[EMAIL PROTECTED]> wrote:
> I also tried using the getListView, which seems like the right thing
> to use but at onStart it reports that it has views (when getCount is
> called) but all of the children are null. I also tried it at
> onContentChanged with no luck.
>
> On Apr 10, 9:20 pm, SnowDrifter <[EMAIL PROTECTED]> wrote:
>
> > I have a list adapter with the following view:
>
> > 
> >  > android:layout_width="fill_parent"
> > android:layout_height="?android:attr/listPreferredItemHeight"
> > android:focusable="false" android:clickable="false"/>
>
> > and I want to set the checkbox to clicked or not based off the state
> > of a list of objects like so:
>
> > ListAdapter tempListAdapter = this.getListAdapter();
> > //setup the checkboxes to reflect the data
> > for(int idx = 0; idx < tempListAdapter.getCount(); idx++)
> > {
> > CheckBox cb = (CheckBox) tempListAdapter.getView(idx, null,
> > null);
> > cb.setChecked(m_objectList.get(idx).isChecked);
> > }
>
> > Setting the "setChecked()" works later on in the code, for instance in
> > onListItemClick I can call:
>
> > CheckBox cb = (CheckBox) l.getChildAt(position);
> > cb.setChecked(true);
>
> > And it works there, but It does not work onCreate or onStart. Where
> > can I set this data so that it shows up?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: XferMode

2008-04-11 Thread tatagogo

Lol, that was easy I feel like a world class idiot now :)

Cheers!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Failed to open database file

2008-04-11 Thread Megha Joshi
Hi,

I was able to re-install the latest version of SDK and plugin, download the
samples and use them on my windows machine.
Did you modify the code to include your local files, URLs before running it?
The Media Samples use files from sdcard, so you do need to upload files to
the sdcard and provide its path in the sample code, before running it.

Thanks,
Megha

On Wed, Apr 9, 2008 at 6:22 PM, Hongliang Tong <[EMAIL PROTECTED]>
wrote:

> thanks. the error is as below when run the application.
> ERROR/jdwp(517): Failed writing handshake bytes: Broken pipe (-1 of 14)
> ERROR/SurfaceFlinger(517): GL error 0x0500
> ERROR/PackageManager(517): Package com.google.android.development has
> mismatched uid: 1000 on disk, 10008 in settings; read messages:
> ERROR/PackageManager(517): Read completed successfully: 6 packages, 3
> shared uids
> ERROR/Database(517): Failed to open database file "/data/checkin.db" -
> unable to open database file
> ERROR/EventHub(517): could not get driver version for /dev/input/mice, Not
> a typewriter
> ERROR/EventHub(517): could not get driver version for /dev/input/mouse0,
> Not a typewriter
> ERROR/Database(579): Failed to open database file
> "/data/data/com.google.android.providers.telephony/databases/mmssms.db" -
> unable to open database file
> ERROR/org.bluez.*(579): D-Bus error: The name org.bluez was not provided
> by any .service files
> ERROR/AndroidRuntime(623): Uncaught handler: thread Main exiting due to
> uncaught exception
> ERROR/AndroidRuntime(623): java.lang.NullPointerException
> ERROR/AndroidRuntime(623): at
> android.content.ContentResolver.getProvider(ContentResolver.java:380)
> ERROR/AndroidRuntime(623): at
> android.content.ContentResolver.insert(ContentResolver.java:281)
> ERROR/AndroidRuntime(623): at
> mysamples.android.MyMediaRecorder.initiateMediaRecorder(MyMediaRecorder.java:100)
> ERROR/AndroidRuntime(623): at
> mysamples.android.MyMediaRecorder$1.onClick(MyMediaRecorder.java:64)
> ERROR/AndroidRuntime(623): at
> android.view.View.performClick(View.java:1857)
> ERROR/AndroidRuntime(623): at
> android.view.View.onTouchEvent(View.java:2966)
> ERROR/AndroidRuntime(623): at
> android.widget.TextView.onTouchEvent(TextView.java:2850)
> ERROR/AndroidRuntime(623): at
> android.view.View.dispatchTouchEvent(View.java:2706)
> ERROR/AndroidRuntime(623): at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:641)
> ERROR/AndroidRuntime(623): at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:641)
> ERROR/AndroidRuntime(623): at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:641)
> ERROR/AndroidRuntime(623): at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:641)
> ERROR/AndroidRuntime(623): at
> android.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1193)
> ERROR/AndroidRuntime(623): at
> android.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:876)
> ERROR/AndroidRuntime(623): at
> android.app.Activity.dispatchTouchEvent(Activity.java:1520)
> ERROR/AndroidRuntime(623): at
> android.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1177)
> ERROR/AndroidRuntime(623): at
> android.view.ViewRoot.handleMessage(ViewRoot.java:617)
> ERROR/AndroidRuntime(623): at
> android.os.Handler.dispatchMessage(Handler.java:80)
> ERROR/AndroidRuntime(623): at android.os.Looper.loop(Looper.java:91)
> ERROR/AndroidRuntime(623): at
> android.app.ActivityThread.main(ActivityThread.java:3052)
> ERROR/AndroidRuntime(623): at
> java.lang.reflect.Method.invokeNative(Native Method)
> ERROR/AndroidRuntime(623): at
> java.lang.reflect.Method.invoke(Method.java:356)
> ERROR/AndroidRuntime(623): at
> android.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1547)
> ERROR/AndroidRuntime(623): at
> android.os.ZygoteInit.main(ZygoteInit.java:1445)
> ERROR/AndroidRuntime(623): at android.dalvik.NativeStart.main(Native
> Method)
>
>
>
> 2008/4/10, Megha Joshi <[EMAIL PROTECTED]>:
> >
> > I will try a fresh install on my windows machine and check on it.
> >
> > Thanks,
> > Megha
> >
> > On Wed, Apr 9, 2008 at 6:05 PM, Hongliang Tong <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Yeah. ApiDemos is ok on my computer.
> > >
> > > 2008/4/10, Megha Joshi <[EMAIL PROTECTED]>:
> > >
> > > > The mediaplayer sample does work on m5.  I am not sure what the
> > > > issue is in your case. Do other samples like ApiDemos work on your 
> > > > machine?
> > > >
> > > > Thanks,
> > > > Megha
> > > >
> > > > On Tue, Apr 8, 2008 at 5:38 PM, Hongliang Tong <
> > > > [EMAIL PROTECTED]> wrote:
> > > >
> > > > > Hi Megha
> > > > > Thanks for your response. I had searched internet for the
> > > > > issue before i post it in developer groups and find the solution as '
> > > > > http://groups.google.com/group/android-developers/msg/2db1c1a3305f23b7'
> > > > > said . I reinstalled my windows and eclipse. The eclipse plugin is the
> > > > > lat

[android-developers] Re: emulator of m5-rc15 problem

2008-04-11 Thread SnowDrifter

If you changed over from a previous version make sure you delete your
image file in (probably):

C:\Documents and Settings\YourName\Local Settings\Application Data
\Android

Delete the.img file and try again. I had issues with the old img file
messing stuff up. If your background is the mountainscape then you
have the wrong img from the previous version.

On Apr 11, 12:47 pm, minti <[EMAIL PROTECTED]> wrote:
> it keep typing the "=" without quote in the text field in front of
> contacts as emulator start
> i have check the keyboad also but it still typing the sign 
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Service starts on Alarm

2008-04-11 Thread hackbod

The Alarm examples in ApiDemos is a good place to start:

http://code.google.com/android/samples/ApiDemos/src/com/google/android/samples/app/

On Apr 11, 5:25 am, Saj <[EMAIL PROTECTED]> wrote:
> I want the program to allow a user to define a specific time and
> date.. and a message should appear when the schedule is triggered.
> Like if I set the time and date to 12 am, April 14, 2008, a message
> should appear on that time. How do you suggest me to do that? 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] gallery displaying RelativeLayout?

2008-04-11 Thread hal

I'm trying to have my gallery display RelativeLayouts instead of
ImageViews, using the code from:
http://code.google.com/android/samples/ApiDemos/src/com/google/android/samples/view/Gallery1.html


My getView code looks like this, but I get null pointers and nothing
works:
 public View getView(int position, View convertView, ViewGroup parent)
{
RelativeLayout i = (RelativeLayout) findViewById(R.id.ae);

switch(position) {
case 1: i = (RelativeLayout) findViewById(R.id.am);
case 2: i = (RelativeLayout)
findViewById(R.id.ap);
}
// i.setImageResource(mImageIds[position]);
// i.setScaleType(ImageView.ScaleType.FIT_XY);
//i.setLayoutParams(new Gallery.LayoutParams(100, 65));
return i;
}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Emulator Startup Options

2008-04-11 Thread kobica

Hi Folks,

The docs says :

-data
If you use -data  but  does not exist, the emulator
creates a file at that location.

It doesn't work.

Cannot find file: /home/.../.android/userdata-qemu2.img
Please specify a valid -data file

Any idea?

Thanks,
Kobi

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Different scroll with buttons vs touch

2008-04-11 Thread revcom

Hi Ola,

I've been having this problem for ages with scrolling  long series of
vertical nested layouts including a TextView title and embedded
buttons in each row.

When scrolled and operated entirely by touch, you can click any
visible button and it fires correctly.

When scrolling vertically using the arrow keys (and focusing the
relevant title TextView as appropriate in OnKeyDown) you can navigate
vertically across the row to the button and it fires when you press
ENTER or the centre D-PAD key.

However, as you report, when you mix the two there's trouble. If you
scroll using the D-PAD and then try to click a button with the mouse,
the entire containing layout scrolls right back to the beginning and
focuses an EditText contained in the topmost row.

Here's some good news. After trying various things today to fix it,
(including requestRectangleOnScreen()) nothing worked UNTIL I added
setFocusableInTouchMode(true) to my title TextViews.

Now everything seems to work as it should as far as I can tell.

I hope this helps someone else.

Robert

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Sample code: MyMediaRecorder.java NullPointerException

2008-04-11 Thread Megha Joshi
Hi,

You should install sdcard on the emulator before running the MediaRecorder
sample as it stores the recorded media file in the path
Video.Media.EXTERNAL_CONTENT_URI which is on the sdcard.

Thanks,
Megha

On Fri, Apr 11, 2008 at 1:32 PM, Niranjan <[EMAIL PROTECTED]> wrote:

>
> I am getting following exception while trying sample media recording
> example. Any idea?
>
> ERROR/AndroidRuntime(654): java.lang.NullPointerException
> ERROR/AndroidRuntime(654): at
> android.content.ContentResolver.getProvider(ContentResolver.java:380)
> ERROR/AndroidRuntime(654): at
> android.content.ContentResolver.insert(ContentResolver.java:281)
> ERROR/AndroidRuntime(654): at
>
> mysamples.android.MyMediaRecorder.initiateMediaRecorder(MyMediaRecorder.java:
> 98)
> ERROR/AndroidRuntime(654): at mysamples.android.MyMediaRecorder
> $1.onClick(MyMediaRecorder.java:63)
>
> Thanks,
> Niranjan
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android real hardware performance in comparison with emulator

2008-04-11 Thread Gable

I see the previous poster mentioned around 3000 faces running with OK
speed.. i really don't understand that. although i'm using textures
and normals for my loaded quake 2 models, i get like < 1 FPS. Even if
I only load the vertex, texture, and normal buffers once, at model
loading time and i never refresh it during the main loop. I only
access the drawelements once each frame, still get a pathetic result.
When the judges test the applications, will they use the same emulator
used by us? OpenGL applications won't be test-able at all in my
opinion then. Or i am doing some serious mishandling of something, as
for me, 1 loaded quake 2 model ~ 500 triangles makes that <1 FPS
alone... Any feedback would be highly appreciated!

Thanks,

Gabor

On Feb 24, 3:19 pm, Digit <[EMAIL PROTECTED]> wrote:
> It is nearly impossible to give really meaningful equivalence numbers
> between a real device and the emulator runnign CPU.even something like the
> "BogoMips" reported by the Linux kernel is misleading (try "adb cat
> /proc/cpuinfo" to get it).
>
> to understand this, consider the following:
>
> while purely ARM arithmetic operations can be translated into x86 machine
> instructions with a rather fixed performance "ratio", things get murky
> quickly because:
>
>    - conditional ARM instructions need to be translated into branching
>    x86 instruction sequence, whose performance varies greatly depending on x86
>    branch prediction.
>
>    - any memory load/store in user programs need to be emulated through a
>    software MMU, so a simple operation like "ldr r0, [r1]" (load in r0 the 
> word
>    at address r1), which normally takes a single ARM cycle is going to require
>    at the minimum a hash table lookup and several indirect memory access in 
> the
>    generated x86 machine code (things get even worse in the case of a cache
>    miss)
>
>    - most branching ARM instructions require a hash table lookup to find
>    the address of the generated code fragment of the target address. in case 
> of
>    a miss, you also need to generate the target address code before being able
>    to run it.
>
>    - when the generated code fragment becomes full, it is totally wiped
>    and you start again from zero. very fortunately, the fact that most of the
>    execution time is spent in the small Dalvik interpreter loop considerably
>    reduces this occurence :-) We might not be so lucky when we implement
>    precompilation or a JIT in the system.
>
> all of this means that the performance characteristics of the emulator are
> very different from a real device. And I have only been talking about the
> CPU.
> memory, flash and other devices have also widely different latencies and
> bandwidths anyway.
>
> now, regarding OpenGL: you should never use glReadPixels(), this function is
> bound to be considerably slow on any hardware-accelerated OpenGL
> implementation. GL is designed as a mostly write-only API, so use it like
> that...
>
>
>
> On Sun, Feb 24, 2008 at 1:03 AM, eugenk <[EMAIL PROTECTED]> wrote:
>
> > Thank you ! I think earlier that emulator uses my videocard hardware
> > directly. But now find sources and make sure that it is usual ARM. But
> > can you say, what will be approximately emulated ARM clock frequency
> > with my Athlon 3000 under Windows XP ? I think that real Android
> > hardware will use ARM with frequency not lower that 300Mhz. And I hear
> > about video-accelerator. Now, my application maximum  complexity is
> > about 3000 non-textured triangles. I not know about QUAKE complexity.
> > But think, it is much great.
> > About code piece, that slows down. To speed up my application, I save
> > not changed OpenGL objects as a Bitmap. And then output saved picture
> > as a background. Unfortunately, Android native Bitmap is incompatible
> > with OpenGL format. So, to save picture I use the next method:
>
> >    public static Bitmap SavePixels(int x, int y, int w, int h, GL10
> > gl)
> >    {
> >         int b[]=new int[w*(y+h)];
> >         int bt[]=new int[w*h];
> >         IntBuffer ib=IntBuffer.wrap(b);
> >         ib.position(0);
> >         gl.glReadPixels(x, 0, w, y+h, GL10.GL_RGBA,
> > GL10.GL_UNSIGNED_BYTE, ib);
>
> >         int i,j,pix;
> >         for(i=0; i >         {
> >              for(j=0; j >              {
> >                   pix=b[i*w+j];
> >                   bt[(h-i-1)*w+j]=(pix&0xff00ff00) |
> > ((pix<<16)&0x00ff) | ((pix>>16)&0xff);
> >              }
> >         }
> >         Bitmap sb=Bitmap.createBitmap(bt, w, h, true);
> >         return sb;
> >    }
>
> > It slows down in double cycle "for". So I interest, how it will works
> > on real Android hardware in comparison with emulator, running on
> > Athlon 3000 ?- Hide quoted text -
>
> - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@goo

[android-developers] Re: how to play a JSpeex encoded audio file?

2008-04-11 Thread Megha Joshi

Hi Anil,

These codecs are not yet supported. Please see the list below for
currently supported codecs:
http://code.google.com/android/migrating/m3-to-m5/m5-api-changes.html#media

Thanks,
Megha

On Apr 10, 9:48 am, Anil <[EMAIL PROTECTED]> wrote:
> no reply?
>
> On Apr 10, 10:14 am, Anil <[EMAIL PROTECTED]> wrote:
>
> > *bump*
>
> > On Apr 9, 8:40 pm, Anil <[EMAIL PROTECTED]> wrote:
>
> > > can any of the google engineers assigned to the codecs help?
>
> > > On Apr 9, 1:34 pm, Anil <[EMAIL PROTECTED]> wrote:
>
> > > > *bump*
>
> > > > On Apr 9, 9:43 am, Anil <[EMAIL PROTECTED]> wrote:
>
> > > > > I am trying to figure out how to play a JSpeex encoded audio file on
> > > > > android but am stuck.
>
> > > > > Speex or JSpeex (the Java implementation) is royalty free and is well
> > > > > suited to voice applications. It provides as much compression as mp3.
> > > > > Apparently it will be implemented in 
> > > > > android:http://code.google.com/p/android/issues/detail?id=354&can=4&colspec=I...
>
> > > > > the project page is 
> > > > > herehttp://sourceforge.net/project/showfiles.php?group_id=84548
>
> > > > > I am trying to figure out how to fit it into the android calls
>
> > > > > MediaPlayer mp = new android.media.MediaPlayer();
> > > > > mp.setDataSource("/data/data/com.jo.blockpad/files/jo-russkelly_files/
> > > > > 2-0.spx");
> > > > > mp.prepare();
> > > > > mp.start();
>
> > > > > Any help appreciated.
> > > > > thanks,
> > > > > Anil
>
> > > > > -
> > > > > calling it from Java Sound example
> > > > > --
>
> > > > > import java.io.IOException;
> > > > > import java.net.URL;
> > > > > import java.util.Observable;
> > > > > import java.util.Observer;
>
> > > > > import javax.sound.sampled.AudioFormat;
> > > > > import javax.sound.sampled.AudioInputStream;
> > > > > import javax.sound.sampled.AudioSystem;
> > > > > import javax.sound.sampled.DataLine;
> > > > > import javax.sound.sampled.LineEvent;
> > > > > import javax.sound.sampled.LineListener;
> > > > > import javax.sound.sampled.LineUnavailableException;
> > > > > import javax.sound.sampled.Mixer;
> > > > > import javax.sound.sampled.SourceDataLine;
> > > > > import javax.swing.JOptionPane;
>
> > > > > /**
> > > > >  * Audio playing code has been adapted from Matthias Pfisterer's
> > > > >  * AudioPlayer.java
> > > > >  *
> > > > >  *  Anil
> > > > >  */
>
> > > > > private MyObservable observable = new MyObservable();
>
> > > > > private static int DEFAULT_EXTERNAL_BUFFER_SIZE = 128000;
>
> > > > > int nExternalBufferSize = DEFAULT_EXTERNAL_BUFFER_SIZE;
>
> > > > > int nInternalBufferSize = AudioSystem.NOT_SPECIFIED;
>
> > > > > boolean bForceConversion = false;
>
> > > > > private static boolean DEBUG = false;
>
> > > > > SourceDataLine line = null;
>
> > > > > private Object snippet = null;
>
> > > > > public void playClip(String urlStr) throws Exception {
> > > > > // important - otherwise skim() will fail to move to 
> > > > > the next node
> > > > > this.snippet = snippetRef;
>
> > > > > /**
> > > > >  * Flag for forcing a conversion. If set to true, a 
> > > > > conversion of
> > > > > the
> > > > >  * AudioInputStream 
> > > > > (AudioSystem.getAudioInputStream(...,
> > > > >  * AudioInputStream)) is done even if the format of 
> > > > > the original
> > > > >  * AudioInputStream would be supported for 
> > > > > SourceDataLines directly.
> > > > >  * This flag is set by the command line options "-E" 
> > > > > and "-S".
> > > > >  */
> > > > > boolean bForceConversion = false;
>
> > > > > /**
> > > > >  * Endianess value to use in conversion. If a 
> > > > > conversion of the
> > > > >  * AudioInputStream is done, this values is used as 
> > > > > endianess in the
> > > > >  * target AudioFormat. The default value can be 
> > > > > altered by the
> > > > > command
> > > > >  * line option "-B".
> > > > >  */
> > > > > boolean bBigEndian = false;
>
> > > > > /**
> > > > >  * Sample size value to use in conversion. If a 
> > > > > conversion of the
> > > > >  * AudioInputStream is done, this values is used as 
> > > > > sample size in
> > > > > the
> > > > >  * target AudioFormat. The default value can be 
> > > > > altered by the
> > > > > command
> > > > >  * line option "-S".
> > > > >  */
> > > > > int nSampleSizeInBits = 16;
>
> > > > > String strMixerName = null;
>
> > > > > int nExternalBufferSize = 
> > > > > DEFAULT_EXTERNAL_BUFFER_SIZE;
>
> > > > >   

[android-developers] Is a Service already running?

2008-04-11 Thread Soonil Nagarkar

As the subject states, I want to check if a Service is already
running. If it is not, I do not want to start it, and if it is I want
to stop and then start it again. How can I find this out? Thanks -
Soonil N.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Confusing Problem about MediaPlayer

2008-04-11 Thread Megha Joshi
 Hi Robert,

 What if you set mSF to null in surfaceDestroyed() call... Does that help?

 Thanks,
 Megha

On Fri, Apr 11, 2008 at 2:27 PM, Robert <[EMAIL PROTECTED]> wrote:

>
>
> Hi Megha,
>
> I am successfully using your classes to capture and view video files.
> But, can't seem to reliable reuse the same surface when returning from
> a subactivity. I tried playing a video file in onActivityResult(), and
> although managed to play it on rare occasions, most of the time the
> video is not shown. Since I've been running the same code over and
> over again (and only sometimes successfully), I am assuming that the
> surface is not ready to receive the video sequence. How can I make
> sure surfaceCreated() has already done its job? Should I add something
> to onResume() or onRestart() in my main activity?
>
> The relevant code:
>
> public class mediaclass extends Activity implements
> SurfaceHolder.Callback {
>  private SurfaceView mSF;
>  private SurfaceHolder mHolder = null;
>  private boolean mHasSurface;
>  private MediaPlayer myPlayer;
>
>  @Override public void onCreate(Bundle icicle) {
>super.onCreate(icicle);
>setContentView(R.layout.main);
>mSF = (SurfaceView) findViewById(R.id.preview);
>mSF.getHolder().addCallback(this);
>mHasSurface = false;
>  }
>
>  public void surfaceCreated(SurfaceHolder holder) {
>mHolder = holder;
>mHasSurface = true;
>  }
>
>  public void surfaceDestroyed(SurfaceHolder holder) {
>mHolder = null;
>mHasSurface = false;
>  }
>
>  @Override protected void onActivityResult(int requestCode, int
> resultCode, String data, Bundle extras) {
>super.onActivityResult(requestCode, resultCode, data, extras);
>
>myPlayer = new MediaPlayer();
>if (mHasSurface == true){
>myPlayer.setDisplay(mHolder.getSurface());
>}
>try {
>myPlayer.setDataSource(data); // data contains the full
> path/
> filename (from SD card)
>myPlayer.prepare();
>} catch (IOException e) {
>Log.e(TAG, e.getMessage(), e);
>}
>myPlayer.start();
>  }
>
> As you can see, I am checking mHasSurface, before attaching to the
> surface. I even tried waiting for mHasSurface to become true in an
> "infinite" loop, but no luck with that either :( What else can I try?
>
> This is how the surface is defined in main.xml:
>  android:id="@+id/preview"
> android:layout_width="176dip"
> android:layout_height="144dip"
> android:layout_alignParentTop="true"
> android:layout_marginLeft="4px"
> />
>
> Also can you suggest a way to display a PNG image from SD card on a
> SurfaceView? Seems that MediaPlayer was not designed for this.
>
> Thanks and regards
> Robert
>
> On Apr 8, 1:19 am, "Megha Joshi" <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > This is because the surface is not yet ready for the mediaplayer, please
> > call the mediaPlayer initialization code in or after OnSurfaceCreate()
> > callback..
> >
> > Thanks,
> > Megha
> >
> > On Mon, Apr 7, 2008 at 9:45 AM, fubin <[EMAIL PROTECTED]> wrote:
> >
> > > In Sample given by google There is a button to invoke a file.
> > >private void playVideo(Integer Media) {
> > >try {
> > >// If the path has not changed, just start the media
> > > player
> > >path = "/data/room.mp4";
> >
> > >// Create a new media player and set the listeners
> > >mp = new MediaPlayer();
> > >mp.setDataSource(path);
> > >mp.setDisplay(holder.getSurface());
> > >mp.prepare();
> > >mp.setOnBufferingUpdateListener(this);
> > >mp.setOnCompletionListener(this);
> > >mp.setOnPreparedListener(this);
> > >mp.setAudioStreamType(AudioSystem.STREAM_MUSIC);
> > >Log.d("\n\nCREATE", "mediaplayer");
> > >mp.start();
> > >} catch (Exception e) {
> > >Log.e(TAG, "error: " + e.getMessage(), e);
> > >}
> > >}
> >
> > >private OnClickListener mPlayListener = new OnClickListener() {
> > >public void onClick(View v) {
> > >playVideo(extras.getInt(MEDIA));
> >
> > >}
> > >};
> >
> > > When I copy the code directly to onCreate like the following program
> > > creshed...:
> >
> > >public void onCreate(Bundle icicle) {
> > >super.onCreate(icicle);
> > >setContentView(R.layout.mediaplayer);
> > >mPreview = (SurfaceView) findViewById(R.id.surface);
> >
> > >// Set the transparency
> > >getWindow().setFormat(PixelFormat.TRANSPARENT);
> > >// Set a size for the video screen
> > >holder = mPreview.getHolder();
> > >holder.addCallback(this);
> > >try {
> > >// If the path has not changed, just start the media
> > > player
> > >path = "/data/room.mp4";
> >
> > >// Create a new media player and set the listeners
> >

[android-developers] enquiry about the resubmission

2008-04-11 Thread vinay

hello,

I have two questions -

After I submit my app then suppose I re-submit my app.

1-  So, can I safely assume that my second submission is the one that
will be tested and not the first one?
2-  Do we get a acknowledge mail for resubmission as well? I only got a
ack mail for my new submission but not fo the resubmission.


anyone have any clue about these points?

regards
vinay
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Installing apk on the emulator

2008-04-11 Thread Shooter

Hi there,

To test out my project, I installed my project using (on the
commandline):
- emulator -wipe-data
- adb install xyz.apk   (xyz is my application name).

What I see is that I get in the list of apps on the phone, I get "xyz"
icon for each class in my project rather than just one "xyz" icon. Can
someone please help me figure out what is wrong here?

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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] ListView throws Exception

2008-04-11 Thread pyf

Hi,

I'm trying to customize layout by having ListView in it.
This is my code:
=
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.wardrobe_layout);
setListAdapter(ArrayAdapter.createFromResource(Project.this,
R.array.collections, android.R.id.list));
}
=
and my layout XML:
=

http://schemas.android.com/apk/res/
android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>


=
but I've got "File  from xml type layout resource ID #0x1050005" in
screen, and exception in debug monitor:

=
E/AndroidRuntime(815): android.content.Resources$NotFoundException:
File  from xml type layout resource ID #0x1050005
E/AndroidRuntime(815): at
android.content.Resources.loadXmlPullParser(Resources.java:1783)
E/AndroidRuntime(815): at
android.content.Resources.loadXmlPullParser(Resources.java:1726)
E/AndroidRuntime(815): at
android.content.Resources.getLayout(Resources.java:446)
E/AndroidRuntime(815): at
android.view.ViewInflate.inflate(ViewInflate.java:211)
E/AndroidRuntime(815): at
android.view.ViewInflate.inflate(ViewInflate.java:161)
E/AndroidRuntime(815): at
android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
179)
E/AndroidRuntime(815): at
android.widget.ArrayAdapter.getView(ArrayAdapter.java:171)
E/AndroidRuntime(815): at
android.widget.ListView.onMeasure(ListView.java:697)
E/AndroidRuntime(815): at android.view.View.measure(View.java:
4857)
E/AndroidRuntime(815): at
android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:1234)
E/AndroidRuntime(815): at
android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
732)
E/AndroidRuntime(815): at
android.widget.LinearLayout.measureVertical(LinearLayout.java:289)
E/AndroidRuntime(815): at
android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
E/AndroidRuntime(815): at android.view.View.measure(View.java:
4857)
E/AndroidRuntime(815): at
android.view.ViewGroup.measureChild(ViewGroup.java:1202)
E/AndroidRuntime(815): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:148)
E/AndroidRuntime(815): at android.view.View.measure(View.java:
4857)
E/AndroidRuntime(815): at
android.view.ViewGroup.measureChild(ViewGroup.java:1202)
E/AndroidRuntime(815): at
android.widget.FrameLayout.onMeasure(FrameLayout.java:148)
E/AndroidRuntime(815): at android.policy.PhoneWindow
$DecorView.onMeasure(PhoneWindow.java:1076)
E/AndroidRuntime(815): at android.view.View.measure(View.java:
4857)
E/AndroidRuntime(815): at
android.view.ViewRoot.performTraversals(ViewRoot.java:290)
E/AndroidRuntime(815): at
android.view.ViewRoot.handleMessage(ViewRoot.java:547)
E/AndroidRuntime(815): at
android.os.Handler.dispatchMessage(Handler.java:80)
E/AndroidRuntime(815): at android.os.Looper.loop(Looper.java:71)
E/AndroidRuntime(815): at
android.app.ActivityThread.main(ActivityThread.java:2506)
E/AndroidRuntime(815): at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(815): at
java.lang.reflect.Method.invoke(Method.java:380)
E/AndroidRuntime(815): at android.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:1170)
E/AndroidRuntime(815): at
android.os.ZygoteInit.main(ZygoteInit.java:1121)
E/AndroidRuntime(815): at android.dalvik.NativeStart.main(Native
Method)
E/AndroidRuntime(815): Caused by: java.io.FileNotFoundException:
E/AndroidRuntime(815): at
android.content.AssetManager.openNonAssetNative(Native Method)
E/AndroidRuntime(815): at
android.content.AssetManager.openNonAsset(AssetManager.java:372)
E/AndroidRuntime(815): at
android.content.Resources.loadXmlPullParser(Resources.java:1774)
E/AndroidRuntime(815): ... 30 more
=

May I know what's the problem? it does not seem to be the identifier
problem, I tried with @android:id/list, @id/android:list and
@android:id/android:list ...but still having the same result.

Something missing?

Appreciate your help!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~-

[android-developers] Re: Porting android to PXA270 board

2008-04-11 Thread Qin Shiming

Init process tries to get partition information by read /proc/mtd,
and try to mount system and userdata partitions.
but your MTD partition has no those partitions.

On 4月11日, 下午4时37分, renegade <[EMAIL PROTECTED]> wrote:
> I try to run Android on my PXA270 board...
> Kernel version is 2.6.19.
> After hard fight I succesfully applied patch.
> I have new shiny kernel.
> My board starts from SD card.
> Bootloader (u-boot) starts from flash and it searches for kernel on SD
> card.
> First partition of SD card contains kernel (FAT16):
> linux.igz
> Second partition of SD card contains filesystem (ext3)...
> /cache
> /data
> /dev
> /etc
> /proc
> /sbin (contains init)
> /sys
> /system
> /tmp
> /var
>
> It starts...boot kernel, but there is problem with init process...
> Take a look :
>
> U-Boot 1.1.6 (Apr  2 2008 - 14:35:33)
>
> DRAM:  64 MB
> Flash:  2 MB
> NAND:  64 MiB
> *** Warning - bad CRC, using default environment
>
> In:serial
> Out:   serial
> Err:   serial
> Hit any key to stop autoboot:  0
> Detected: 2027008 blocks of 512 bytes (989MB) SD card.
> Vendor: Man 11 OEM JC "064MB" Date 11/2003
> Product: 320
> Revision: 0.10
> reading linux.igz
>
> 1169832 bytes read
> ## Booting image at a100 ...
>Image Name:   Linux Kernel Image
>Image Type:   ARM Linux Kernel Image (uncompressed)
>Data Size:1169768 Bytes =  1.1 MB
>Load Address: a080
>Entry Point:  a080
>Verifying Checksum ... OK
> OK
>
> Starting kernel ...
>
> Uncompressing
> Linux
> done, booting the kern.
> Linux version 2.6.19_RC15 ([EMAIL PROTECTED]) (gcc version 4.2.1
> (CodeSourcery Sourcery G++ Lite 2007q3-53)) #210 Thu Apr 10 09:8
> CPU: XScale-PXA270 [69054117] revision 7 (ARMv5TE), cr=397f
> Machine: HITEC
> Memory policy: ECC disabled, Data cache writeback
> Run Mode clock: 208.00MHz (*16)
> Turbo Mode clock: 416.00MHz (*2.0, active)
> Memory clock: 104.00MHz (/2)
> System bus clock: 208.00MHz
> Standard (MSC0= 0x13387aa8)  NAND mode
> The additional board GPIO's are configured
> CPU0: D VIVT undefined 5 cache
> CPU0: I cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
> CPU0: D cache: 32768 bytes, associativity 32, 32 byte lines, 32 sets
> Built 1 zonelists.  Total pages: 16256
> Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 ro
> PID hash table entries: 256 (order: 8, 1024 bytes)
> start_kernel(): bug: interrupts were enabled early
> Console: colour dummy device 80x30
> Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
> Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
> Memory: 64MB = 64MB total
> Memory: 62336KB available (2124K code, 242K data, 204K init)
> Mount-cache hash table entries: 512
> CPU: Testing write buffer coherency: ok
> NET: Registered protocol family 16
> NET: Registered protocol family 2
> IP route cache hash table entries: 512 (order: -1, 2048 bytes)
> TCP established hash table entries: 2048 (order: 1, 8192 bytes)
> TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
> TCP: Hash tables configured (established 2048 bind 1024)
> TCP reno registered
> squashfs: version 3.2-r2 (2007/01/15) Phillip Lougher
> squashfs: LZMA suppport for slax.org by jro
> JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
> yaffs Apr 10 2008 09:36:39 Installing.
> io scheduler noop registered
> io scheduler anticipatory registered (default)
> Hitec Backlight Driver Initialized.
> External logo in flash not found @ 0x1c
> pxa2xx-uart.0: ttyS0 at MMIO 0x4010 (irq = 22) is a FFUART
> pxa2xx-uart.1: ttyS1 at MMIO 0x4020 (irq = 21) is a BTUART
> pxa2xx-uart.2: ttyS2 at MMIO 0x4070 (irq = 20) is a STUART
> PPP generic driver version 2.4.2
> PPP Deflate Compression module registered
> PPP BSD Compression module registered
> PPP MPPE Compression module registered
> Found: AMD AM29LV160DB
> THB PXA module: Found 1 x16 devices at 0x0 in 16-bit bank
> number of JEDEC chips: 1
> cfi_cmdset_0002: Disabling erase-suspend-program due to code
> brokenness.
> Using static partition definition
> Creating 2 MTD partitions on "THB PXA module":
> 0x-0x0004 : "boot"
> 0x0004-0x001f : "kernel"
> NAND device: Manufacturer ID: 0xec, Chip ID: 0x76 (Samsung NAND 64MiB
> 3,3V 8-bit)
> Using static partition definition
> Creating 4 MTD partitions on "NAND 64MiB 3,3V 8-bit":
> 0x-0x03a0 : "rootfs (ro)"
> Add SSFTL support
> 0x03a0-0x0400 : "config (rw)"
> 0x0400-0x0400 : "additional"
> mtd: partition "additional" is out of reach -- disabled
> mmcblk0: mmc0:0001 064MB 1013504KiB
>  mmcblk0:<5>0x-0x0400 : "whole NAND"
>  p1 p2
> pxa27x_udc: version 01-01-2006
> ether gadget: using random self ethernet address
> ether gadget: using random host ethernet address
> usb0: Ethernet Gadget, version: May Day 2005
> usb0: using pxa27x_udc, OUT ep2out-bulk IN ep1in-bulk STATUS ep3in-
> intr
> usb0: MAC 72:52:c5:60:bd:ba
>

[android-developers] Re: Installing apk on the emulator

2008-04-11 Thread Dan U.

You have a  in androidmanifest.xml for each activity you have.

On Apr 11, 7:53 pm, Shooter <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> To test out my project, I installed my project using (on the
> commandline):
> - emulator -wipe-data
> - adb install xyz.apk   (xyz is my application name).
>
> What I see is that I get in the list of apps on the phone, I get "xyz"
> icon for each class in my project rather than just one "xyz" icon. Can
> someone please help me figure out what is wrong here?
>
> 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Installing apk on the emulator

2008-04-11 Thread Dan U.

If it's not obvious what the solution is, you need to only have one of
those LAUNCHER entries in your app (assuming 1 entry point).

On Apr 11, 8:57 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
> You have a 
> > in androidmanifest.xml for each activity you have.
>
> On Apr 11, 7:53 pm, Shooter <[EMAIL PROTECTED]> wrote:
>
> > Hi there,
>
> > To test out my project, I installed my project using (on the
> > commandline):
> > - emulator -wipe-data
> > - adb install xyz.apk   (xyz is my application name).
>
> > What I see is that I get in the list of apps on the phone, I get "xyz"
> > icon for each class in my project rather than just one "xyz" icon. Can
> > someone please help me figure out what is wrong here?
>
> > 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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Managed Cursors

2008-04-11 Thread Flik

How many cursors can an activity manage?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Problem woth OnLongClickListener

2008-04-11 Thread [EMAIL PROTECTED]

I'm also having problems with the OnLongClickListener. I have it
attached to an ImageButton, but the event never fires.

On Mar 8, 7:54 am, babyblue <[EMAIL PROTECTED]> wrote:
> I can't make onLongClickListener work either. I just register it with
> a Button. No matter how long I hold it, no long click event happens.
>
> On 3月8日, 上午6时13分, condor <[EMAIL PROTECTED]> wrote:
>
> > I have a class of type LinearLayout that is an element of a list
> > view.
>
> > I am able to attach a click leastener but it is impossible to make a
> > longClick leastenre wroking.
>
> > It there any operation that must be done?
>
> > Here is extraction of the code of the cass
> > private class PeopleList extends LinearLayout {
>
> > private CheckBox mCbContact;
> > private ViewmTheView;
> > private Context mContext;
> > private int mPositon=0;
>
> >  public PeopleList(Context context){
> > super(context);
> > Log.v(TAG,"PeopleList Constructor");
> > mContext = context;
> > ViewInflate inf
> > =(ViewInflate)getSystemService(INFLATE_SERVICE);
> > mTheView = inf.inflate(R.layout.contactlistrow, null, false,
> > null);
> > mTheView.setOnLongClickListener(mtheLongClickListener);
> > mCbContact = (CheckBox)
> > mTheView.findViewById(R.id.cbxSelectItem);
> > mCbContact.setOnClickListener(mCboxListener);
> > addView(mTheView, new LinearLayout.LayoutParams(
> > LayoutParams.FILL_PARENT,
> > LayoutParams.WRAP_CONTENT));
> > setOnLongClickListener(mtheLongClickListener);
> > setOnClickListener(mClickListener);
> > }
>
> > private OnClickListener mCboxListener = new OnClickListener()
> > {
> > public void onClick(View v)
> > {
> > Log.v(TAG,"check box onClick: ");
> > if(mCbContact.isChecked()){
> > 
> > ((Contact)theContactList.get(mPositon)).Selected=true;
> > }
> > else
> > {
> > 
> > ((Contact)theContactList.get(mPositon)).Selected=false;
> > }
> > }
> > };
>
> > // NOT WORKING leastener
> > private OnLongClickListener mtheLongClickListener = new
> > OnLongClickListener()
> > {
> > public boolean onLongClick(View v)
> > {
> > Log.v(TAG,"Long Click: ");
> > return true;
> > }
> > };
>
> > // WORKING leastener
> > private OnClickListener mClickListener = new OnClickListener()
> > {
> > public void onClick(View v)
> > {
> > Log.v(TAG,"Short Click: ");
> > if(mCbContact.isChecked()){
> > 
> > ((Contact)theContactList.get(mPositon)).Selected=true;
> > }
> > else
> > {
> > 
> > ((Contact)theContactList.get(mPositon)).Selected=false;
> > }
> > }
> > };
> > }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView throws Exception

2008-04-11 Thread Dan U.

You are extending ListActivity right? Maybe you could try using
android.R.layout.simple_list_item_1 in your createFromResource call
instead of android.R.id.list.

On Apr 11, 8:37 pm, pyf <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to customize layout by having ListView in it.
> This is my code:
> =
> public void onCreate(Bundle icicle) {
> super.onCreate(icicle);
> requestWindowFeature(Window.FEATURE_NO_TITLE);
> setContentView(R.layout.wardrobe_layout);
> setListAdapter(ArrayAdapter.createFromResource(Project.this,
> R.array.collections, android.R.id.list));
> }
> =
> and my layout XML:
> =
> 
> http://schemas.android.com/apk/res/
> android"
> android:layout_width="fill_parent"
> android:layout_height="fill_parent"
> android:orientation="vertical"
> >
>  android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:layout_weight="1"
> android:drawSelectorOnTop="false"
>/>
> 
> =
> but I've got "File  from xml type layout resource ID #0x1050005" in
> screen, and exception in debug monitor:
>
> =
> E/AndroidRuntime(815): android.content.Resources$NotFoundException:
> File  from xml type layout resource ID #0x1050005
> E/AndroidRuntime(815): at
> android.content.Resources.loadXmlPullParser(Resources.java:1783)
> E/AndroidRuntime(815): at
> android.content.Resources.loadXmlPullParser(Resources.java:1726)
> E/AndroidRuntime(815): at
> android.content.Resources.getLayout(Resources.java:446)
> E/AndroidRuntime(815): at
> android.view.ViewInflate.inflate(ViewInflate.java:211)
> E/AndroidRuntime(815): at
> android.view.ViewInflate.inflate(ViewInflate.java:161)
> E/AndroidRuntime(815): at
> android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
> 179)
> E/AndroidRuntime(815): at
> android.widget.ArrayAdapter.getView(ArrayAdapter.java:171)
> E/AndroidRuntime(815): at
> android.widget.ListView.onMeasure(ListView.java:697)
> E/AndroidRuntime(815): at android.view.View.measure(View.java:
> 4857)
> E/AndroidRuntime(815): at
> android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:1234)
> E/AndroidRuntime(815): at
> android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> 732)
> E/AndroidRuntime(815): at
> android.widget.LinearLayout.measureVertical(LinearLayout.java:289)
> E/AndroidRuntime(815): at
> android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
> E/AndroidRuntime(815): at android.view.View.measure(View.java:
> 4857)
> E/AndroidRuntime(815): at
> android.view.ViewGroup.measureChild(ViewGroup.java:1202)
> E/AndroidRuntime(815): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:148)
> E/AndroidRuntime(815): at android.view.View.measure(View.java:
> 4857)
> E/AndroidRuntime(815): at
> android.view.ViewGroup.measureChild(ViewGroup.java:1202)
> E/AndroidRuntime(815): at
> android.widget.FrameLayout.onMeasure(FrameLayout.java:148)
> E/AndroidRuntime(815): at android.policy.PhoneWindow
> $DecorView.onMeasure(PhoneWindow.java:1076)
> E/AndroidRuntime(815): at android.view.View.measure(View.java:
> 4857)
> E/AndroidRuntime(815): at
> android.view.ViewRoot.performTraversals(ViewRoot.java:290)
> E/AndroidRuntime(815): at
> android.view.ViewRoot.handleMessage(ViewRoot.java:547)
> E/AndroidRuntime(815): at
> android.os.Handler.dispatchMessage(Handler.java:80)
> E/AndroidRuntime(815): at android.os.Looper.loop(Looper.java:71)
> E/AndroidRuntime(815): at
> android.app.ActivityThread.main(ActivityThread.java:2506)
> E/AndroidRuntime(815): at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime(815): at
> java.lang.reflect.Method.invoke(Method.java:380)
> E/AndroidRuntime(815): at android.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:1170)
> E/AndroidRuntime(815): at
> android.os.ZygoteInit.main(ZygoteInit.java:1121)
> E/AndroidRuntime(815): at android.dalvik.NativeStart.main(Native
> Method)
> E/AndroidRuntime(815): Caused by: java.io.FileNotFoundException:
> E/AndroidRuntime(815): at
> android.content.AssetManager.openNonAssetNative(Native Method)
> E/AndroidRuntime(815): at
> android.content.AssetManager.openNonAsset(AssetManager.java:372)
> E/AndroidRuntime(815): at
> android.content.Resources.loadXmlPullParser(Resources.java:1774)
> E/AndroidRuntime(815): ... 30 more
> =
>
> May I know what's the problem? it does not seem to be the identifier
> problem, I tried with @android:id/list, @id/android:list and
> @andr

[android-developers] MapView invalidate (is invalidating?)

2008-04-11 Thread GUS


I have a MapView that I update from time to time from a timing
thread.

The problem is when the user interacts with the map two invalidate
occurs, does anyone know how can I know if the map is alredy drawing
for me not to send invalidate again?

is there anything like isdrawing or isinvalidating?


thx, Gustavo Avila
http://www.androidyou.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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Cursor c = this.getContentResolver().query( gets nullpointer exception when code is moved

2008-04-11 Thread Megha Joshi
Hi,

The code here is incomplete, and does not suggest any reason for an error, I
am not sure what the issue might be, could you post the code for your class
and its declaration in AndroidManifest.xml? Do you have the permission to
read contacts set in AndroidManifest.xml?

Thanks,
Megha

On Fri, Apr 11, 2008 at 11:19 AM, franw <[EMAIL PROTECTED]> wrote:

>
> hi - this code worked perfectly when it was in my main launcher, but
> when i moved it to another class in my project, i get a null pointer
> exception.  
>
>public String getContactStr()
>{
>String pList = "";
>String st = "";
>
>Cursor c = this.getContentResolver().query(
>android.provider.Contacts.Phones.CONTENT_URI,
>null, null, null,
>android.provider.Contacts.Phones.PERSON_ID+ " ASC");
>
> .
>}
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ListView throws Exception

2008-04-11 Thread pyf

Yes, it's working.
You mean the way I used is not correct?
but that's what mentioned in API.
From exception, it seems it could not find android.R.id.list.

On Apr 12, 1:17 pm, "Dan U." <[EMAIL PROTECTED]> wrote:
> You are extending ListActivity right? Maybe you could try using
> android.R.layout.simple_list_item_1 in your createFromResource call
> instead of android.R.id.list.
>
> On Apr 11, 8:37 pm, pyf <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > I'm trying to customize layout by having ListView in it.
> > This is my code:
> > =
> >     public void onCreate(Bundle icicle) {
> >         super.onCreate(icicle);
> >         requestWindowFeature(Window.FEATURE_NO_TITLE);
> >         setContentView(R.layout.wardrobe_layout);
> >         setListAdapter(ArrayAdapter.createFromResource(Project.this,
> >                                 R.array.collections, android.R.id.list));
> >     }
> > =
> > and my layout XML:
> > =
> > 
> > http://schemas.android.com/apk/res/
> > android"
> >     android:layout_width="fill_parent"
> >     android:layout_height="fill_parent"
> >     android:orientation="vertical"
>
> >      >         android:layout_width="fill_parent"
> >         android:layout_height="wrap_content"
> >         android:layout_weight="1"
> >                 android:drawSelectorOnTop="false"
> >    />
> > 
> > =
> > but I've got "File  from xml type layout resource ID #0x1050005" in
> > screen, and exception in debug monitor:
>
> > =
> > E/AndroidRuntime(815): android.content.Resources$NotFoundException:
> > File  from xml type layout resource ID #0x1050005
> > E/AndroidRuntime(815):     at
> > android.content.Resources.loadXmlPullParser(Resources.java:1783)
> > E/AndroidRuntime(815):     at
> > android.content.Resources.loadXmlPullParser(Resources.java:1726)
> > E/AndroidRuntime(815):     at
> > android.content.Resources.getLayout(Resources.java:446)
> > E/AndroidRuntime(815):     at
> > android.view.ViewInflate.inflate(ViewInflate.java:211)
> > E/AndroidRuntime(815):     at
> > android.view.ViewInflate.inflate(ViewInflate.java:161)
> > E/AndroidRuntime(815):     at
> > android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:
> > 179)
> > E/AndroidRuntime(815):     at
> > android.widget.ArrayAdapter.getView(ArrayAdapter.java:171)
> > E/AndroidRuntime(815):     at
> > android.widget.ListView.onMeasure(ListView.java:697)
> > E/AndroidRuntime(815):     at android.view.View.measure(View.java:
> > 4857)
> > E/AndroidRuntime(815):     at
> > android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:1234)
> > E/AndroidRuntime(815):     at
> > android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:
> > 732)
> > E/AndroidRuntime(815):     at
> > android.widget.LinearLayout.measureVertical(LinearLayout.java:289)
> > E/AndroidRuntime(815):     at
> > android.widget.LinearLayout.onMeasure(LinearLayout.java:231)
> > E/AndroidRuntime(815):     at android.view.View.measure(View.java:
> > 4857)
> > E/AndroidRuntime(815):     at
> > android.view.ViewGroup.measureChild(ViewGroup.java:1202)
> > E/AndroidRuntime(815):     at
> > android.widget.FrameLayout.onMeasure(FrameLayout.java:148)
> > E/AndroidRuntime(815):     at android.view.View.measure(View.java:
> > 4857)
> > E/AndroidRuntime(815):     at
> > android.view.ViewGroup.measureChild(ViewGroup.java:1202)
> > E/AndroidRuntime(815):     at
> > android.widget.FrameLayout.onMeasure(FrameLayout.java:148)
> > E/AndroidRuntime(815):     at android.policy.PhoneWindow
> > $DecorView.onMeasure(PhoneWindow.java:1076)
> > E/AndroidRuntime(815):     at android.view.View.measure(View.java:
> > 4857)
> > E/AndroidRuntime(815):     at
> > android.view.ViewRoot.performTraversals(ViewRoot.java:290)
> > E/AndroidRuntime(815):     at
> > android.view.ViewRoot.handleMessage(ViewRoot.java:547)
> > E/AndroidRuntime(815):     at
> > android.os.Handler.dispatchMessage(Handler.java:80)
> > E/AndroidRuntime(815):     at android.os.Looper.loop(Looper.java:71)
> > E/AndroidRuntime(815):     at
> > android.app.ActivityThread.main(ActivityThread.java:2506)
> > E/AndroidRuntime(815):     at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > E/AndroidRuntime(815):     at
> > java.lang.reflect.Method.invoke(Method.java:380)
> > E/AndroidRuntime(815):     at android.os.ZygoteInit
> > $MethodAndArgsCaller.run(ZygoteInit.java:1170)
> > E/AndroidRuntime(815):     at
> > android.os.ZygoteInit.main(ZygoteInit.java:1121)
> > E/AndroidRuntime(815):     at android.dalvik.NativeStart.main(Native
> > Method)
> > E/AndroidRuntime(815): Caused by: java.io.FileNotFoundException:
> > E/AndroidRuntime(815):     at
> > android.content.AssetManager.openNonAssetNative(Native Method)
> > E/AndroidRuntime(81