[android-developers] Re: [IME]avoiding softinput in one activity

2009-09-28 Thread Anonymous Anonymous
Hi Dianne,
I understand, i have many activities and just for one i need remove it. i
was able to remove as well by returning true on KEYCODE_MENU.

But i do have an options menu (without long press).

:(

Thanks

On Tue, Sep 29, 2009 at 12:03 PM, Dianne Hackborn wrote:

> Long press is a back-door for the user to bring up the keyboard outside of
> the app's control.  It isn't really intended to be turned off.
>
>
> On Mon, Sep 28, 2009 at 9:22 PM, Anonymous Anonymous <
> firewallbr...@googlemail.com> wrote:
>
>> Hi All,
>>
>> I want to avoid softinput specifically in one activty in a very specific
>> case.
>>
>> When i *long press "menu" button *softkeypad is coming irrespective of
>> the activty.
>>
>> How can i avoid this? i have tried "stateAlwaysHidden" etc for that
>> activity. But didit work.
>>
>> Al other cases ok. Just this case* long press "menu" button*.
>>
>>
>> Thanks
>>
>>
>>
>>
>>
>>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
> >
>

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



[android-developers] Re: [IME]avoiding softinput in one activity

2009-09-28 Thread Dianne Hackborn
Long press is a back-door for the user to bring up the keyboard outside of
the app's control.  It isn't really intended to be turned off.

On Mon, Sep 28, 2009 at 9:22 PM, Anonymous Anonymous <
firewallbr...@googlemail.com> wrote:

> Hi All,
>
> I want to avoid softinput specifically in one activty in a very specific
> case.
>
> When i *long press "menu" button *softkeypad is coming irrespective of the
> activty.
>
> How can i avoid this? i have tried "stateAlwaysHidden" etc for that
> activity. But didit work.
>
> Al other cases ok. Just this case* long press "menu" button*.
>
>
> Thanks
>
>
>
>
> >
>


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

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

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



[android-developers] App for Storing Waypoints and Waytracks.......

2009-09-28 Thread ragavendran s
can anybody tel me .

App for Storing Waypoints and Waytracks...

This application involves the user can track thier waypoints in a compass or
an map

if anybody knows pls let  me know where i can get these details 

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



[android-developers] Re: How to sign up for ADC judge?

2009-09-28 Thread bellapariah

Search for "Android Developer Challenge" in the Market.

Shelby

On Sep 27, 11:22 pm, parchira tech  wrote:
> where can I download theADCjudge application?
>
> Thanks!
>
> April
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Take an action when soft keyboard is launched

2009-09-28 Thread Gulfam

 Hi All,

   I also want to take some actions on soft keyboard appear and
disappear.
any one can help us how we can get appear and disappear events.

Gulfam




On Sep 29, 12:32 am, Thomas  wrote:
> Hi All,
>
> Does Nobody know that?
>
> thanks again
>
> Tomás
>
> On Fri, Sep 25, 2009 at 11:07 AM, Thomas  wrote:
> > Hi All,
>
> > I'd like to take an action always when soft keyboard is shown or
> > hidden. In my activity there is a menu that I want to hide when soft
> > keyboard is launched and this menu needs to be shown when soft
> > keyboard is hidden.
>
> > Does anyone have an idea about how to do that?
>
> > Thanks all
>
> > Thomas
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Cannot write SharedPreferences after update!! Help!

2009-09-28 Thread Sheado

Hello again..

I have more details about this problem.. perhaps somebody can help
clarify things now =)

So if I test by installing and upgrading via the browser only instead
of the browser/market combination then things work out ok - I don't
get the mismatched uid error:
com.my.application.package.path has mismatched uid: 10031 on disk,
10046 in settings; read messages:

Another thing I forgot to mention is that I'm using copy-protection in
the market - could this affect how uid's are generated? Speaking of
which, how are uid's generated - are we (as developers) supposed to
know or care at this layer of abstraction?

And one last question! If all upgrades are performed exclusively
through the market (with copy protection) will I have to worry about
all this uid business?

help! thanks!
Chad



On Sep 28, 9:32 am, Sheado  wrote:
> Hello,
>
> I'm trying to prepare an update to one of my apps and I just realized
> that the updated version cannot read or write over the previous
> version's SharedPreferences.
>
> Some details:
> * I'm using the 1.6 SDK and compiling for 1.5.3.
> * My androidmanifest.xml does not have a sharedUserId (I didn't think
> I need one if I was not sharing data between different apps).
>
> How to reproduce:
> * Install my current app from the market
> * Run the app
> * Exit and save the setting - invoking SharedPreferences Editor commit
> (it's using MODE_PRIVATE)
> * Now install my new update (via a browser download)
> * Run the app
>     * Everything works fine
> * Exit & Save
> *** Now reboot the phone
> * Run the app again
> ==> Can no longer access old data or write over it!!
>
> Did I do something wrong? Is it because of the sharedUserId thing? Is
> it because of the way I'm testing - via market then browser? Why is
> LogCat reporting a UID change?
> ==> mismatched uid: 10031 on disk, 10046 in settings;
> Can I recover from this? I don't want to delete all of my users' data.
> help! =]
>
> Here's some edited output from LogCat:
> 09-28 09:10:54.083: ERROR/PackageManager(60): Package
> com.my.application.package.path has mismatched uid: 10031 on disk,
> 10046 in settings; read messages:
> 09-28 09:10:54.083: ERROR/PackageManager(60): Read completed
> successfully: 71 packages, 7 shared uids
> 
> 09-28 09:11:08.513: ERROR/ApplicationContext(60): Couldn't create
> directory for SharedPreferences file shared_prefs/wallpaper-hints.xml
> 
> 09-28 09:11:51.522: ERROR/ApplicationContext(278): Couldn't rename
> file /data/data/com.my.application.package.path/shared_prefs/
> MyFuzzleFile.xml to backup file /data/data/
> com.my.application.package.path/shared_prefs/MyFuzzleFile.xml.bak
> 09-28 09:11:51.552: ERROR/ApplicationContext(278): Couldn't create
> directory for SharedPreferences file /data/data/
> com.my.application.package.path/shared_prefs/MyFuzzleFile.xml
> 09-28 09:11:51.552: ERROR/ApplicationContext(278): Couldn't rename
> file /data/data/com.my.application.package.path/shared_prefs/
> MyFuzzleFile.xml to backup file /data/data/
> com.my.application.package.path/shared_prefs/MyFuzzleFile.xml.bak
> 09-28 09:11:51.552: ERROR/ApplicationContext(278): Couldn't create
> directory for SharedPreferences file /data/data/
> com.my.application.package.path/shared_prefs/MyFuzzleFile.xml
> 
>
> Thank You! Any help is appreciated!
> Chad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Build APK file from command line...

2009-09-28 Thread Xavier Ducrohet

zipalign is only in the tools folder of SDK 1.6

I don't know why your apk doesn't work. can you give us the content of your apk?

Xav

On Mon, Sep 28, 2009 at 8:01 PM, HandsomeboyIT  wrote:
>
> And ... I don't know why I didn't find the zipalign tool in Andriod
> SDK's tools follder or Java-bin folder...
> >
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

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



[android-developers] Re: zipalign and Eclipse: Does Eclipse do this automatically?

2009-09-28 Thread Xavier Ducrohet

Yes, in ADT 0.9.3.

it's all explained here:
http://android-developers.blogspot.com/2009/09/zipalign-easy-optimization.html

Xav

On Mon, Sep 28, 2009 at 9:42 PM, Streets Of Boston
 wrote:
>
> Question:
> Does Eclipse automatically zipalign?
>
> In other words: If you use the Android 1.6 SDK, having it installed in
> Eclipse, and use Eclipse to sign your apk (right-click: Android Tools
> --> Export Signed Application Package), will your apk be zipaligned?
> >
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

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



[android-developers] change key width runtime

2009-09-28 Thread Long

Hi,
  I want to change the key width in keyboard at runtime.
  The constructor of class Keyboard only accepts the layout resource
ID.
  I tried setHeight method, but it didn't work obviously when I
checked the code of Keyboard.

  Any solution? Do I have to implement my own Keyboard

Thanks a lot

Cheers
Long


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



[android-developers] zipalign and Eclipse: Does Eclipse do this automatically?

2009-09-28 Thread Streets Of Boston

Question:
Does Eclipse automatically zipalign?

In other words: If you use the Android 1.6 SDK, having it installed in
Eclipse, and use Eclipse to sign your apk (right-click: Android Tools
--> Export Signed Application Package), will your apk be zipaligned?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How do I resize my application to a smaller one placing it on top left?

2009-09-28 Thread Karthik P
Is there any way for me to resize an app to make it smaller and placing it
top left? I understand that there is a theme -> Dialog its possible to make
the window size smaller but is it possible for me to dictate the x, y, dx,
and dy where the dialog has to be placed?

Karthik

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



[android-developers] Re: Disabling spelling suggestions in EditText

2009-09-28 Thread Brady

Scratch that, use textEmailAddress instead.

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



[android-developers] [IME]avoiding softinput in one activity

2009-09-28 Thread Anonymous Anonymous
Hi All,

I want to avoid softinput specifically in one activty in a very specific
case.

When i *long press "menu" button *softkeypad is coming irrespective of the
activty.

How can i avoid this? i have tried "stateAlwaysHidden" etc for that
activity. But didit work.

Al other cases ok. Just this case* long press "menu" button*.


Thanks

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



[android-developers] Correct use of Task Affinities and LaunchModes

2009-09-28 Thread Gavin Bong

My android app contains a suite of mini apps. In short, every screen
contains a navbar with several clickable icons, one each for the mini
apps (and one for the Main screen). When an icon is clicked, the mini
app is launched. In total I have 4 mini apps. So you could imagine
that my main screen is like the Home Screen Launcher. Although these
mini apps could run standalone by their own, I want the user to be
authenticated. Thus there is a LoginActivity right before the
MainActivity.

LoginActivity ---> MainActivity ---> AppOneActivity or AppTwoActivity
or AppThreeActivity or AppFourActivity (aka PresenceListActivity)

I'm still not pretty sure of the benefit of Tasks (arranged set of
Activities), so I would like comments from Android experts on my
design decisions:-

(1) I plan to set the attribute finishOnTaskLaunch to true for
LoginActivity. As I understand it, once the login is authenticated, I
will navigate the user to MainActivity, and I want LoginActivity to
disappear. Is this better than calling #finish on the Activity ? Will
MainActivity automatically become the root of the Task without any
extra configuration/code ?

(2) One of the mini app is an IM client. The PresenceListActivity will
hosts many instances of ChatActivity (one-to-one chat session with an
active contact in the buddylist). I plan to use the default launchmode
for ChatActivity since each Chat should be handled by a new instance.
Sounds correct ?

(3) As for the sticky navbar, I plan to set the clearTaskOnLaunch
attribute to true for all of them. As I understand it, that should
clear the stack whenever I plan to launch into any of the mini apps.
Also their launchModes will be singleTask. Am I on the right path ?

(4) Finally I don't really understand how to read the output of adb
shell dumpsys activity. For example

Task{10 com.me.rnd.exit}
clearOnBackground=false numActivities=1
affinity=com.me.rnd.exit
lastActiveTime=5513102 (inactive for 5s)
  History #1: .

Task{2 com.android.launcher}
clearOnBackground=true numActivities=1 rootWasReset=true
affinity=com.android.launcher
lastActiveTime=5512949 (inactive for 6s)
  Running #0:
Sometimes underneath the Tasks, you will see History and in others
Running, what do these mean ? Even stranger, sometimes I have two
History under a task.

Thanks

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



[android-developers] Re: Disabling spelling suggestions in EditText

2009-09-28 Thread Brady

Hi Lee,

change the android:inputType to "text"

Brady

On Sep 8, 6:53 pm, Lee  wrote:
> I've got an EditText that I don't want spelling suggestions for since
> it's just a user name input field.
>
> I've tried settingautoTextto be "false" but when I start typing in
> the EditText with the soft keyboard I am still provided with spelling
> suggestions. I've also tried setting inputType to be "none" however
> that doesn't help either.
>
> What's the correct way todisablethis functionality (in XML or in
> code) so that no spelling suggestions are provided?
>
> Thanks
> Lee
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Running camera android Emulator

2009-09-28 Thread shobhit kasliwal
I tried these wrapper classes...but no luck...can you tell me how can I do
that..can you help me on this

Thanks
Shobhit

On Mon, Sep 28, 2009 at 10:22 PM, Chi Kit Leung wrote:

> http://www.tomgibara.com/android/camera-source
>
> Would this one be helpful?
>
> On Tue, Sep 29, 2009 at 12:53 AM, Shobhit Kasliwal <
> shobhit.kasli...@gmail.com> wrote:
>
>>
>> Hi
>>
>> Can anyone tell me how can I use  my computers webcam as camera in
>> android emulator.
>> Tutorial would be a great help for me.
>>
>> Thanks,
>> Shobhit Kasliwal
>>
>>
>> --
>> Regards,
>> Michael Leung
>> http://www.itblogs.info
>> http://www.michaelleung.info
>>
>> >>
>>


-- 
Shobhit Kasliwal
Application Developer Intern
Liventus Designs
3400 Dundee Rd Northbrook IL 60062
skasli...@liventus.com
office: 847-291-1395 ext. 192
Cell: (309) 826 4709

Samuel Goldwyn
- "I'm willing to admit that I may not always be right, but I am never
wrong."

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



[android-developers] Re: Question about INSTALL_LOCATION_PROVIDER

2009-09-28 Thread itog

Hi,

I found there was @hide keyword in the comment of
installLocationProvider
that meant it's not visible.


I couldn't find any information about INSTALL_LOCATION_PROVIDER expect
SDK 1.6 release note.

Could anyone help me finding any information to use
INSTALL_LOCATION_PROVIDER?


Br/
itog


On 9月23日, 午後11:05, itog  wrote:
> Hi guys,
>
> I have a question about SDK 1.6 new featureINSTALL_LOCATION_PROVIDER.
>
> I looked through source code and found
> LocationManager:installLocationProvider(), then I thought
> I could install new location provider with this.
>
> But installLocationProvider() is not visible in SDK 1.6.
>
> Could some one help me with this kind of information?
>
>  - Is this SDK's bug or something is wrong with my environment?
>  - How can I make "installLocationProvider()" visible?
>  - any sample code with installLocationProvide?
>
> Best regards,
> itog
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Running camera android Emulator

2009-09-28 Thread Chi Kit Leung
http://www.tomgibara.com/android/camera-source

Would this one be helpful?

On Tue, Sep 29, 2009 at 12:53 AM, Shobhit Kasliwal <
shobhit.kasli...@gmail.com> wrote:

>
> Hi
>
> Can anyone tell me how can I use  my computers webcam as camera in
> android emulator.
> Tutorial would be a great help for me.
>
> Thanks,
> Shobhit Kasliwal
>
> >
>


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

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



[android-developers] Re: Build APK file from command line...

2009-09-28 Thread HandsomeboyIT

And ... I don't know why I didn't find the zipalign tool in Andriod
SDK's tools follder or Java-bin folder...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Build APK file from command line...

2009-09-28 Thread HandsomeboyIT

Thanks Xavier,
I use these command

>> apkbuilder.bat %FILE_NAME% -u -rf  "./project_folder"

then

>> keytool -genkey -v -keystore "path_to_my_keystore.keystore" -alias my_alias 
>> -keyalg RSA -validity 1

then input some information... The result is like this : "Generating
1,024 bit RSA key pair and self-signed certificate (SHA1withRSA) with
a validity of 10,000 days".
Then,

>> jarsigner -verbose -keystore "path_to_my_keystore.keystore" %FILE_NAME% 
>> my_alias

then enter correct passphrase...
The result is an APK file with sign.

But when I install this APK to emulator/device, It fail with message
Failure [INSTALL_FAILED_INVALID_APK].

So now, I don't know how to continue...
Please help me ...
Thanks in advance. :).

On Sep 29, 9:32 am, Xavier Ducrohet  wrote:
> Use the -u option to create an unsigned package and then call
> jarsigner to sign the generated apk.
>
>
>
> On Mon, Sep 28, 2009 at 6:52 PM, HandsomeboyIT  
> wrote:
>
> > Hi everyone,
> > I want to build the .apk file from java binary file (.class) or .dex
> > file. I have copied the bin+res folder and Manifest.xml file to a
> > specified folder. and run the command :
>
> > [apkbuilder.bat %FILE_NAME%  -rf  "./src_folderr"]
>
> > this command build the new .APK file with default keystore...
>
> > But I want to build the APK with me generated keystore, with command
> > line as this :
>
> > [apkbuilder.bat %FILE_NAME%  -rf  "./src_folder" -storetype
> > path_to_my_release_keystore.keystore]
>
> > but it can not find my keystore with
> > "java.security.KeyStoreException : release.keystore not found"
>
> > How can I build APK file with my keystore file ???
>
> > Thanks.
>
> --
> Xavier Ducrohet
> Android SDK Tech Lead
> Google Inc.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Dose opencore support multi-streams selection

2009-09-28 Thread nearfuture

Hi,all

Do anyone knows Opencore player engine support multi-stream
selection. For example, for the avi file, it may contain several audio
streams, so can the player support to switch among them? Until now, I
didn't find any code to support it
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Build APK file from command line...

2009-09-28 Thread Xavier Ducrohet

Use the -u option to create an unsigned package and then call
jarsigner to sign the generated apk.

On Mon, Sep 28, 2009 at 6:52 PM, HandsomeboyIT  wrote:
>
> Hi everyone,
> I want to build the .apk file from java binary file (.class) or .dex
> file. I have copied the bin+res folder and Manifest.xml file to a
> specified folder. and run the command :
>
> [apkbuilder.bat %FILE_NAME%  -rf  "./src_folderr"]
>
> this command build the new .APK file with default keystore...
>
> But I want to build the APK with me generated keystore, with command
> line as this :
>
> [apkbuilder.bat %FILE_NAME%  -rf  "./src_folder" -storetype
> path_to_my_release_keystore.keystore]
>
> but it can not find my keystore with
> "java.security.KeyStoreException : release.keystore not found"
>
> How can I build APK file with my keystore file ???
>
> Thanks.
> >
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

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



[android-developers] Re: REGRESSION - trap in android 1.6 SDK inflating DialogPreference from XML

2009-09-28 Thread Lee

Ok thanks that's great information I'll look into it.

Lee

On Sep 29, 10:38 am, Romain Guy  wrote:
> DialogPreference is an abstract class and cannot be instantiated.
> There was a bug in the VM in 1.5 that would allow abstract classes to
> be instantiated through reflection. Sorry it broke your app but the
> 1.6 behavior is the correct one. Having an instance of an abstract
> class is very wrong and could lead to all sorts of problems.
>
>
>
>
>
> On Mon, Sep 28, 2009 at 5:14 PM, Lee  wrote:
>
> > Code that was working fine on 1.5 is now trapping on 1.6 while
> > inflating a DialogPreference.  I've got a tab host and one of the tabs
> > is hosting a PreferenceActivity.  In the onCreate of the preference
> > activity the preferences are loaded from XML using the following call:
>
> >    public void onCreate(Bundle savedInstanceState)
> >    {
> >        super.onCreate(savedInstanceState);
> >        addPreferencesFromResource(R.xml.preferences);
> >     }
>
> > The stack trace is shown below - this seems like a regression from
> > 1.5...
>
> > 09-29 10:05:44.104: ERROR/AndroidRuntime(784): Uncaught handler:
> > thread main exiting due to uncaught exception
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):
> > java.lang.RuntimeException: Unable to start activity ComponentInfo
> > {com.XX.client.gui/
> > com.XXX.client.preferences.PreferencesActivity}:
> > android.view.InflateException: Binary XML file line #172: Error
> > inflating class java.lang.reflect.Constructor
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> > 2401)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.app.ActivityThread.startActivityNow(ActivityThread.java:2242)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.app.LocalActivityManager.moveToState(LocalActivityManager.java:
> > 127)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.app.LocalActivityManager.startActivity
> > (LocalActivityManager.java:339)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.widget.TabHost$IntentContentStrategy.getContentView
> > (TabHost.java:631)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.widget.TabHost.setCurrentTab(TabHost.java:317)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:127)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:346)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.View.performClick(View.java:2344)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.View.onTouchEvent(View.java:4133)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.View.dispatchTouchEvent(View.java:3672)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:850)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > com.android.internal.policy.impl.PhoneWindow
> > $DecorView.superDispatchTouchEvent(PhoneWindow.java:1712)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
> > (PhoneWindow.java:1202)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.app.Activity.dispatchTouchEvent(Activity.java:1987)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > com.android.internal.policy.impl.PhoneWindow
> > $DecorView.dispatchTouchEvent(PhoneWindow.java:1696)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.os.Handler.dispatchMessage(Handler.java:99)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.os.Looper.loop(Looper.java:123)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > android.app.ActivityThread.main(ActivityThread.java:4203)
> > 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> > java.lang.reflect.Method.invokeNative(Native Method)
> > 09-29 10:05:44.153: ERROR/

[android-developers] Re: Can't i call a service function in activity's onStart/onCreate?

2009-09-28 Thread bear tung
Thanks.
I want to know when the the service connection is connected. It seems like
won't connected before the ui show up.

The thing i what to do is show the UI based on the servie's some function's
return value. There is something like callback function when the connection
done?


On Tue, Sep 29, 2009 at 12:14 AM, Marco Nelissen wrote:

>
> You need to wait until you actually receive the service connection
> callback before you do anything with the service. You can't simply
> assume that the callback has already happened when you reach your
> onStart.
>
>
> On Mon, Sep 28, 2009 at 7:36 AM, bear tung  wrote:
> > My activity bind a service.  I want to call the service's function in
> > actitity's onStart/onCreate function, but it doesn't work.
> > The service started suncess but the connection is null.
> >
> > When I just call the service's function in other function (onClick for
> > example),  it works well.
> >
> > thanks for help.
> >
> > here is my code:
> >
> > public class AidlTest extends Activity
> > {
> > private static final String TAG = "AidlTest";
> > IAidlService mService;
> >
> > private OnClickListener mCorkyListener = new OnClickListener() {
> > public void onClick(View v) {
> > test();
> > }
> > };
> >
> > private ServiceConnection mConnection = new ServiceConnection() {
> >
> > public void onServiceConnected(ComponentName className,  IBinder
> > service) {
> > mService = IAidlService.Stub.asInterface(service);
> > }
> > public void onServiceDisconnected(ComponentName className) {
> >
> > mService = null;
> > }
> > };
> >
> > @Override
> > public void onCreate(Bundle savedInstanceState)
> > {
> > super.onCreate(savedInstanceState);
> > TextView v = new TextView(this);
> > setContentView(v);
> > v.setOnClickListener(mCorkyListener);
> > Log.v(TAG, IAidlService.class.getName().toString());
> > Intent intent = new Intent(IAidlService.class.getName());
> > bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
> > }
> >
> > @Override
> > public void onStart(){
> > super.onStart();
> > Log.d(TAG, "onStart");
> > test();
> > }
> > }
> >
> > public void test(){
> > if (mService == null){
> > Log.d(TAG, "mService is NULL");
> > }
> > try {
> > mService.test();
> > }catch (RemoteException e){
> > Log.d(TAG, e.toString());
> > }
> > }
> > }
> >
> >
> >
> > Bear
> >
> > >
> >
>
> >
>


-- 
董利明(Bear)
软件工程师  Software Engineer
Douban Inc.
office: +86 8479 9008
Mobile: 1358 1725 230
No.14 Jiuxianqiao Road, Area 51 A1-1-2106, Beijing 100016 , China
北京市酒仙桥路14号51楼A1区1门2016,100016

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



[android-developers] Re: Android XML Schema Location

2009-09-28 Thread Mihai Fonoage

Thanks both for your explanations!

Mihai Fonoage

On Sep 28, 8:19 pm, Dianne Hackborn  wrote:
> It's the namespace that the android framework resources live in.  It's just
> a namespace, but if you change the namespace, you totally change the meaning
> of the XML file because by definition all attributes that were in the old
> namespace have changed their identity to something unrelated in a different
> namespace.
>
>
>
> On Mon, Sep 28, 2009 at 4:25 PM, Mihai Fonoage  wrote:
>
> > But if I change the identifier to something else, it does not work,
> > hence the "http://schemas.android.com/apk/res/android"; value of the
> > namespace has to have some kind of (internal) meaning. I get though
> > that the validity of the attributes is based on the parent element (as
> > per my understanding), but this does not explain why it will not work
> > with a value of "http://mihai/fonoage"; for example.
>
> > Thank you,
> > Mihai Fonoage
>
> > On Sep 28, 7:09 pm, Romain Guy  wrote:
> > > There is no schema, this is just an identifier for the namespace.
>
> > > On Mon, Sep 28, 2009 at 4:04 PM, Mihai Fonoage 
> > wrote:
>
> > > > Hi,
>
> > > > The Android XML Schema is declared in the xml files as being at
> > > > "http://schemas.android.com/apk/res/android";. Since this URL is not
> > > > found, how does Android validate the xml attributes that are in the
> > > > Android namespace? I am guessing the schema file comes bundled with
> > > > the SDK, in which case where is it located?
>
> > > > Thank you,
> > > > Mihai Fonoage
>
> > > --
> > > Romain Guy
> > > Android framework engineer
> > > romain...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time
> > > to provide private support.  All such questions should be posted on
> > > public forums, where I and others can see and answer them
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] is there a way to simulate a dropped connection in the emulator?

2009-09-28 Thread sdphil

maybe more importantly going out of range.

specifically going out of data range (not voice).  i.e. i'm browsing
for something and I go out of range.

or to control the speed of the connection?

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



[android-developers] Build APK file from command line...

2009-09-28 Thread HandsomeboyIT

Hi everyone,
I want to build the .apk file from java binary file (.class) or .dex
file. I have copied the bin+res folder and Manifest.xml file to a
specified folder. and run the command :

[apkbuilder.bat %FILE_NAME%  -rf  "./src_folderr"]

this command build the new .APK file with default keystore...

But I want to build the APK with me generated keystore, with command
line as this :

[apkbuilder.bat %FILE_NAME%  -rf  "./src_folder" -storetype
path_to_my_release_keystore.keystore]

but it can not find my keystore with
"java.security.KeyStoreException : release.keystore not found"

How can I build APK file with my keystore file ???

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



[android-developers] Re: How to rotate a drawable programmatically?

2009-09-28 Thread Romain Guy

The fact that you cannot set from and toDegrees from code.

On Mon, Sep 28, 2009 at 5:56 PM, Micah  wrote:
>
> A bug stating that you can't instantiate a RotateDrawable in Java and
> set it's fromDegrees and toDegrees?  Or are you referring to something
> else that is a bug?
>
> On Sep 28, 5:51 pm, Romain Guy  wrote:
>> Oh wait, sorry, you can't. File a bug, I'll try to fix that asap.
>>
>>
>>
>>
>>
>> On Mon, Sep 28, 2009 at 5:47 PM, Micah  wrote:
>>
>> > In my application I want to be able to rotate a view programmatically
>> > rather than via XML.  I can easily create a  drawable that
>> > references my Drawable, but I can not figure out how to do the same
>> > thing in Java.  The problem is that many drawables in my scene can be
>> > displayed either vertically or horizontally and I do not want to have
>> > to create a separate rotate drawable for every drawable in my scene.
>>
>> > One thought I had was to instantiate a RotateDrawable in Java and then
>> > use that as the background for my view, but it does not appear that
>> > you can set the rotation of a RotateDrawable instantiated this way
>> > (you have to feed it XML to get it to be at all useful from what I can
>> > tell).
>>
>> > Another thought I had was to rotate the canvas, but I would like to be
>> > able to use the drawables as view backgrounds and I do not see a way
>> > to rotate the canvas before the background of a view is drawn and then
>> > revert it afterwards.
>>
>> > I also looked into creating some generic rotate drawable and then
>> > perhaps changing the drawable that it applies to, but that lead no
>> > where.
>>
>> > So, does anyone have any ideas about how I can rotate a drawable in
>> > code and then use that rotated drawable as a background?
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
> >
>



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

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

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



[android-developers] Re: How to rotate a drawable programmatically?

2009-09-28 Thread Micah

A bug stating that you can't instantiate a RotateDrawable in Java and
set it's fromDegrees and toDegrees?  Or are you referring to something
else that is a bug?

On Sep 28, 5:51 pm, Romain Guy  wrote:
> Oh wait, sorry, you can't. File a bug, I'll try to fix that asap.
>
>
>
>
>
> On Mon, Sep 28, 2009 at 5:47 PM, Micah  wrote:
>
> > In my application I want to be able to rotate a view programmatically
> > rather than via XML.  I can easily create a  drawable that
> > references my Drawable, but I can not figure out how to do the same
> > thing in Java.  The problem is that many drawables in my scene can be
> > displayed either vertically or horizontally and I do not want to have
> > to create a separate rotate drawable for every drawable in my scene.
>
> > One thought I had was to instantiate a RotateDrawable in Java and then
> > use that as the background for my view, but it does not appear that
> > you can set the rotation of a RotateDrawable instantiated this way
> > (you have to feed it XML to get it to be at all useful from what I can
> > tell).
>
> > Another thought I had was to rotate the canvas, but I would like to be
> > able to use the drawables as view backgrounds and I do not see a way
> > to rotate the canvas before the background of a view is drawn and then
> > revert it afterwards.
>
> > I also looked into creating some generic rotate drawable and then
> > perhaps changing the drawable that it applies to, but that lead no
> > where.
>
> > So, does anyone have any ideas about how I can rotate a drawable in
> > code and then use that rotated drawable as a background?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to rotate a drawable programmatically?

2009-09-28 Thread Romain Guy

Oh wait, sorry, you can't. File a bug, I'll try to fix that asap.

On Mon, Sep 28, 2009 at 5:47 PM, Micah  wrote:
>
> In my application I want to be able to rotate a view programmatically
> rather than via XML.  I can easily create a  drawable that
> references my Drawable, but I can not figure out how to do the same
> thing in Java.  The problem is that many drawables in my scene can be
> displayed either vertically or horizontally and I do not want to have
> to create a separate rotate drawable for every drawable in my scene.
>
> One thought I had was to instantiate a RotateDrawable in Java and then
> use that as the background for my view, but it does not appear that
> you can set the rotation of a RotateDrawable instantiated this way
> (you have to feed it XML to get it to be at all useful from what I can
> tell).
>
> Another thought I had was to rotate the canvas, but I would like to be
> able to use the drawables as view backgrounds and I do not see a way
> to rotate the canvas before the background of a view is drawn and then
> revert it afterwards.
>
> I also looked into creating some generic rotate drawable and then
> perhaps changing the drawable that it applies to, but that lead no
> where.
>
> So, does anyone have any ideas about how I can rotate a drawable in
> code and then use that rotated drawable as a background?
> >
>



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

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

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



[android-developers] Re: How to rotate a drawable programmatically?

2009-09-28 Thread Romain Guy

Yes you can, you need to call setLevel().

On Mon, Sep 28, 2009 at 5:47 PM, Micah  wrote:
>
> In my application I want to be able to rotate a view programmatically
> rather than via XML.  I can easily create a  drawable that
> references my Drawable, but I can not figure out how to do the same
> thing in Java.  The problem is that many drawables in my scene can be
> displayed either vertically or horizontally and I do not want to have
> to create a separate rotate drawable for every drawable in my scene.
>
> One thought I had was to instantiate a RotateDrawable in Java and then
> use that as the background for my view, but it does not appear that
> you can set the rotation of a RotateDrawable instantiated this way
> (you have to feed it XML to get it to be at all useful from what I can
> tell).
>
> Another thought I had was to rotate the canvas, but I would like to be
> able to use the drawables as view backgrounds and I do not see a way
> to rotate the canvas before the background of a view is drawn and then
> revert it afterwards.
>
> I also looked into creating some generic rotate drawable and then
> perhaps changing the drawable that it applies to, but that lead no
> where.
>
> So, does anyone have any ideas about how I can rotate a drawable in
> code and then use that rotated drawable as a background?
> >
>



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

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

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



[android-developers] How to rotate a drawable programmatically?

2009-09-28 Thread Micah

In my application I want to be able to rotate a view programmatically
rather than via XML.  I can easily create a  drawable that
references my Drawable, but I can not figure out how to do the same
thing in Java.  The problem is that many drawables in my scene can be
displayed either vertically or horizontally and I do not want to have
to create a separate rotate drawable for every drawable in my scene.

One thought I had was to instantiate a RotateDrawable in Java and then
use that as the background for my view, but it does not appear that
you can set the rotation of a RotateDrawable instantiated this way
(you have to feed it XML to get it to be at all useful from what I can
tell).

Another thought I had was to rotate the canvas, but I would like to be
able to use the drawables as view backgrounds and I do not see a way
to rotate the canvas before the background of a view is drawn and then
revert it afterwards.

I also looked into creating some generic rotate drawable and then
perhaps changing the drawable that it applies to, but that lead no
where.

So, does anyone have any ideas about how I can rotate a drawable in
code and then use that rotated drawable as a background?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: REGRESSION - trap in android 1.6 SDK inflating DialogPreference from XML

2009-09-28 Thread Romain Guy

DialogPreference is an abstract class and cannot be instantiated.
There was a bug in the VM in 1.5 that would allow abstract classes to
be instantiated through reflection. Sorry it broke your app but the
1.6 behavior is the correct one. Having an instance of an abstract
class is very wrong and could lead to all sorts of problems.

On Mon, Sep 28, 2009 at 5:14 PM, Lee  wrote:
>
> Code that was working fine on 1.5 is now trapping on 1.6 while
> inflating a DialogPreference.  I've got a tab host and one of the tabs
> is hosting a PreferenceActivity.  In the onCreate of the preference
> activity the preferences are loaded from XML using the following call:
>
>    public void onCreate(Bundle savedInstanceState)
>    {
>        super.onCreate(savedInstanceState);
>        addPreferencesFromResource(R.xml.preferences);
>     }
>
> The stack trace is shown below - this seems like a regression from
> 1.5...
>
>
> 09-29 10:05:44.104: ERROR/AndroidRuntime(784): Uncaught handler:
> thread main exiting due to uncaught exception
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):
> java.lang.RuntimeException: Unable to start activity ComponentInfo
> {com.XX.client.gui/
> com.XXX.client.preferences.PreferencesActivity}:
> android.view.InflateException: Binary XML file line #172: Error
> inflating class java.lang.reflect.Constructor
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
> 2401)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.app.ActivityThread.startActivityNow(ActivityThread.java:2242)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.app.LocalActivityManager.moveToState(LocalActivityManager.java:
> 127)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.app.LocalActivityManager.startActivity
> (LocalActivityManager.java:339)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.widget.TabHost$IntentContentStrategy.getContentView
> (TabHost.java:631)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.widget.TabHost.setCurrentTab(TabHost.java:317)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:127)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:346)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.View.performClick(View.java:2344)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.View.onTouchEvent(View.java:4133)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.View.dispatchTouchEvent(View.java:3672)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:850)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> com.android.internal.policy.impl.PhoneWindow
> $DecorView.superDispatchTouchEvent(PhoneWindow.java:1712)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
> (PhoneWindow.java:1202)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.app.Activity.dispatchTouchEvent(Activity.java:1987)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> com.android.internal.policy.impl.PhoneWindow
> $DecorView.dispatchTouchEvent(PhoneWindow.java:1696)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.os.Looper.loop(Looper.java:123)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> android.app.ActivityThread.main(ActivityThread.java:4203)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> java.lang.reflect.Method.invoke(Method.java:521)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:791)
> 09-29 10:05:44.153: ERROR/AndroidRuntime(784):     at
> com

[android-developers] Re: Android XML Schema Location

2009-09-28 Thread Dianne Hackborn
It's the namespace that the android framework resources live in.  It's just
a namespace, but if you change the namespace, you totally change the meaning
of the XML file because by definition all attributes that were in the old
namespace have changed their identity to something unrelated in a different
namespace.

On Mon, Sep 28, 2009 at 4:25 PM, Mihai Fonoage  wrote:

>
> But if I change the identifier to something else, it does not work,
> hence the "http://schemas.android.com/apk/res/android"; value of the
> namespace has to have some kind of (internal) meaning. I get though
> that the validity of the attributes is based on the parent element (as
> per my understanding), but this does not explain why it will not work
> with a value of "http://mihai/fonoage"; for example.
>
> Thank you,
> Mihai Fonoage
>
> On Sep 28, 7:09 pm, Romain Guy  wrote:
> > There is no schema, this is just an identifier for the namespace.
> >
> > On Mon, Sep 28, 2009 at 4:04 PM, Mihai Fonoage 
> wrote:
> >
> > > Hi,
> >
> > > The Android XML Schema is declared in the xml files as being at
> > > "http://schemas.android.com/apk/res/android";. Since this URL is not
> > > found, how does Android validate the xml attributes that are in the
> > > Android namespace? I am guessing the schema file comes bundled with
> > > the SDK, in which case where is it located?
> >
> > > Thank you,
> > > Mihai Fonoage
> >
> > --
> > Romain Guy
> > Android framework engineer
> > romain...@android.com
> >
> > Note: please don't send private questions to me, as I don't have time
> > to provide private support.  All such questions should be posted on
> > public forums, where I and others can see and answer them
> >
>


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

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

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



[android-developers] surfaceflinger & compiz

2009-09-28 Thread Westermann Fu
Hi, All:

I don't know whether this is the right place to post my question, maybe my
question is more related with android framework design. I think android is
designed with "composited desktop" in heart, here I mean each window doesnot
render itself directly on screen, rather they are rendered to separate "back
buffers" without any clipping applied (such as obscured by other windows),
then the surfaceflinger compose these backstores into the framebuffer to be
displayed with z-order or clip rectangle applied. It is the lacking of this
feature for core X window in desktop world that leading to xComposite
extension which at last leading to compiz to be born. My question is, for
compiz, not only simply to composite each window backstores to framebuffer
but rather it provides a plugin mechanism that user application can
customize the behavior before/in/after the composing process, so such as
water effect, magnifier tools/effect can be implemented easily. But for
surfaceflinger, is the compose behavior fixed? Do surfaceflinger or
windowmanager service or anyone others provide the similar "plugin"
interface for application to use for customizing the compose behavior, or
the only way left is hacking surfaceflinger? Thanks.

Regards

Westermann Fu

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



[android-developers] REGRESSION - trap in android 1.6 SDK inflating DialogPreference from XML

2009-09-28 Thread Lee

Code that was working fine on 1.5 is now trapping on 1.6 while
inflating a DialogPreference.  I've got a tab host and one of the tabs
is hosting a PreferenceActivity.  In the onCreate of the preference
activity the preferences are loaded from XML using the following call:

public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.preferences);
 }

The stack trace is shown below - this seems like a regression from
1.5...


09-29 10:05:44.104: ERROR/AndroidRuntime(784): Uncaught handler:
thread main exiting due to uncaught exception
09-29 10:05:44.153: ERROR/AndroidRuntime(784):
java.lang.RuntimeException: Unable to start activity ComponentInfo
{com.XX.client.gui/
com.XXX.client.preferences.PreferencesActivity}:
android.view.InflateException: Binary XML file line #172: Error
inflating class java.lang.reflect.Constructor
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2401)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.app.ActivityThread.startActivityNow(ActivityThread.java:2242)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.app.LocalActivityManager.moveToState(LocalActivityManager.java:
127)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.app.LocalActivityManager.startActivity
(LocalActivityManager.java:339)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.widget.TabHost$IntentContentStrategy.getContentView
(TabHost.java:631)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.widget.TabHost.setCurrentTab(TabHost.java:317)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:127)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:346)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.View.performClick(View.java:2344)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.View.onTouchEvent(View.java:4133)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.View.dispatchTouchEvent(View.java:3672)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:850)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:882)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.superDispatchTouchEvent(PhoneWindow.java:1712)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent
(PhoneWindow.java:1202)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.app.Activity.dispatchTouchEvent(Activity.java:1987)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
com.android.internal.policy.impl.PhoneWindow
$DecorView.dispatchTouchEvent(PhoneWindow.java:1696)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1658)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.os.Handler.dispatchMessage(Handler.java:99)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.os.Looper.loop(Looper.java:123)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.app.ActivityThread.main(ActivityThread.java:4203)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
java.lang.reflect.Method.invokeNative(Native Method)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
java.lang.reflect.Method.invoke(Method.java:521)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:791)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
dalvik.system.NativeStart.main(Native Method)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): Caused by:
android.view.InflateException: Binary XML file line #172: Error
inflating class java.lang.reflect.Constructor
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.preference.GenericInflater.createItem(GenericInflater.java:
397)
09-29 10:05:44.153: ERROR/AndroidRuntime(784): at
android.preference.GenericInflater.onCreateIte

[android-developers] Re: Android XML Schema Location

2009-09-28 Thread Mihai Fonoage

But if I change the identifier to something else, it does not work,
hence the "http://schemas.android.com/apk/res/android"; value of the
namespace has to have some kind of (internal) meaning. I get though
that the validity of the attributes is based on the parent element (as
per my understanding), but this does not explain why it will not work
with a value of "http://mihai/fonoage"; for example.

Thank you,
Mihai Fonoage

On Sep 28, 7:09 pm, Romain Guy  wrote:
> There is no schema, this is just an identifier for the namespace.
>
> On Mon, Sep 28, 2009 at 4:04 PM, Mihai Fonoage  wrote:
>
> > Hi,
>
> > The Android XML Schema is declared in the xml files as being at
> > "http://schemas.android.com/apk/res/android";. Since this URL is not
> > found, how does Android validate the xml attributes that are in the
> > Android namespace? I am guessing the schema file comes bundled with
> > the SDK, in which case where is it located?
>
> > Thank you,
> > Mihai Fonoage
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Content Provider VS SQLiteDatabase

2009-09-28 Thread GeezIHateCreatingNewNames


On Sep 28, 2:09 pm, Mark Murphy  wrote:
> GeezIHateCreatingNewNames wrote:
> > The more complicated case
> > seems to be a single application that has two processes in it (e.g, an
> > application with a long running service).
>
> You do not need two processes for an application with a long running
> service. Not to mention that long-running services aren't a great idea
> in the first place.

While it's not a common case, there ARE cases in which it makes sense
to have a long running service with two processes.  The case I have in
mind involves a media player with all the associated content
management.  I agree that in most cases it's a bad idea to have long-
running services or two processes, because most services are of the
"wake up when there is something to do" model.

> > In this case it seems like
> > you could simply share at the sqlite database layers, but the locking
> > and sharing story on the sqlite database APIs is somewhat unclear.
>
> SQLite handles cross-process locking.

There are two layers involved.  I have a lot of confidence in the
underlying native layer, which has a pretty clear story on the various
levels of locking (database, table, or page-level).  Write locks are
accomplished by locking the entire database, which is perhaps ok if
most of your access is to read.  More sophisticated databases will
allow simultaneous writes from different processes by page-level or
table-level locking, but at least SQLite has a clear guarantee and a
reasonable expectation of performance.  See http://www.sqlite.org/lockingv3.html
for a more thorough discussion.

On the other hand, the android SQLite API on top of the native layer
is a different animal.  In particular if you look in
SQLiteOpenHelper.getReadableDatabase() there is a line that says
"return getWritableDatabase()".  That's one way of satisfying lock
constraints, but it also seems to imply that all locks (read or write)
are exclusive to a process and lock the entire database.  If an
application in one process has a CursorAdapter, then it will
periodically have to reacquire a lock in order to call
SQLiteQuery.fillWindow(), but if there is another process writing to
the database, then the application is going to block.  I haven't
unwound the spaghetti to resolve this issue, and the documentation is
unclear on the point.

I am not claiming that "there is a consistency problem"; only that
there is a lot of ambiguity about what kind of performance will be
delivered, and what the semantics are on locking at the android API
layer.  That's why I was advocating the use of the ContentProvider
APIs, because it says that it uses a single process to handle
locking.  Thus there is no doubt that you can have multiple readers
because the lock will be shared.

Kevin McCurley

> That's one of the reasons why it is the default database for Rails and other 
> Ruby server-side frameworks
> that rely on multiple processes.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android Development Wiki:http://wiki.andmob.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android XML Schema Location

2009-09-28 Thread Romain Guy

There is no schema, this is just an identifier for the namespace.

On Mon, Sep 28, 2009 at 4:04 PM, Mihai Fonoage  wrote:
>
> Hi,
>
> The Android XML Schema is declared in the xml files as being at
> "http://schemas.android.com/apk/res/android";. Since this URL is not
> found, how does Android validate the xml attributes that are in the
> Android namespace? I am guessing the schema file comes bundled with
> the SDK, in which case where is it located?
>
> Thank you,
> Mihai Fonoage
>
> >
>



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

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

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



[android-developers] Android XML Schema Location

2009-09-28 Thread Mihai Fonoage

Hi,

The Android XML Schema is declared in the xml files as being at
"http://schemas.android.com/apk/res/android";. Since this URL is not
found, how does Android validate the xml attributes that are in the
Android namespace? I am guessing the schema file comes bundled with
the SDK, in which case where is it located?

Thank you,
Mihai Fonoage

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



[android-developers] rules for inflating layouts

2009-09-28 Thread Jason Proctor

>Ah, yes -- sorry, but the custom View was causing a mental block.
>
>There is an onFinishInflate() method you can override that gets control,
>well, when the inflate is finished. There, your children are ready and
>you can have them do what you want.

onFinishInflate() is perfect, thanks.

all my layout is declarative now, yay.


-- 
jason.vp.engineering.particle

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



[android-developers] Re: bindService, unbindService, ServiceConnection

2009-09-28 Thread Took

I have exactly the same problem, is there any solution?

On Sep 17, 1:32 am, sdphil  wrote:
> i have a service and an activity that will connect to that service.
>
> from what i can tell --
>
> bindService() generates a call to ServiceConnection.onServiceConnected
> ()
>
> however, unbindService does NOT generate a call to
> ServiceConnection.onServiceDisconnected().
>
> Is there a way to know when a service connection is bound and unbound
> (reliably) ?
>
> tia.

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



[android-developers] Re: Start the CallLog Activity via Intent

2009-09-28 Thread Matt

So it obviously cannot find an activity that can handle the Intent.
Does somebody know why? Wrong URI? Wrong action?

On 28 Sep., 02:04, Matt  wrote:
> unfortunately that did not work either.
>
> On 28 Sep., 00:29, iPaul Pro  wrote:
>
> > Intent i = new Intent();
> > i.setAction(Intent.ACTION_CALL_BUTTON);
> > startActivity(i);
>
> > Paul
>
> > On Sep 25, 7:43 pm, Matt  wrote:
>
> > > Hi,
>
> > > I have the following code in my application:
>
> > >   Intent i = new Intent();
> > >   i.setAction(Intent.ACTION_VIEW);
> > >   i.setData(android.provider.CallLog.CONTENT_URI);
> > >   startActivity(i);
>
> > > I want to bring up the CallLog activity, but when I run my application
> > > I get an error, that the application has stopped unexpectedly. Why
> > > does this happen and how can I display the CallLog? Using
>
> > >   i.setData(android.provider.CallLog.Calls.CONTENT_URI);
>
> > > does not give me an error, but brings up the dialer - not exactly what
> > > I want. ;-) I tried displaying the Contacts with
>
> > >   i.setData(android.provider.Contacts.People.CONTENT_URI);
>
> > > and that works flawlessly. Any help is highly appreciated!
>
> > > Best wishes,
> > > Matt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: rules for inflating layouts

2009-09-28 Thread Mark Murphy

Jason Proctor wrote:
> sorted it out. can't call findViewById() in the ContactView 
> constructor, as its tree hasn't been inflated under it yet. at least 
> i think that's what's going on.

Ah, yes -- sorry, but the custom View was causing a mental block.

There is an onFinishInflate() method you can override that gets control,
well, when the inflate is finished. There, your children are ready and
you can have them do what you want.

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

Android Development Wiki: http://wiki.andmob.org

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



[android-developers] rules for inflating layouts

2009-09-28 Thread Jason Proctor

sorted it out. can't call findViewById() in the ContactView 
constructor, as its tree hasn't been inflated under it yet. at least 
i think that's what's going on.

the ListView can see ContactView children just fine.

thanks for the responses, chaps.




>What Mark said. Also, the correct usage of inflate() in adapters is:
>
>inflate(layoutId, parent, false);
>
>Passing the parent (given to you as a parameter in getView()) allows
>the UI toolkit to create the appropriate LayoutParams object. Passing
>false tells the toolkit to NOT call parent.addView(theInflateChild),
>since ListView will do its own magic later on.
>
>On Mon, Sep 28, 2009 at 2:11 PM, Mark Murphy  wrote:
>>
>>  Jason Proctor wrote:
>>>  i thought by now you could read my mind :-)
>>>
>>>  assuming that the XML enclosed in the post is in 
>>>res/layout/contact_view.xml
>>>
>>>  in the custom ListView...
>>>
>>>  LayoutInflaterinflater = LayoutInflater.from (this.context);
>>>
>>>  // passing null here, as i'm assuming that the ListView will hook the
>>>  view up with its hierarchy
>>>  ContactView   contactView = (ContactView) inflater.inflate
>>>  (R.layout.contact_view, null);
>>>
>>>  in the custom item View...
>>>
>>>  LinearLayout  top = (LinearLayout) findViewById (R.id.contact_top_layout);
>>
>>  Try contactView.findViewById().
>>
>>  --
>>  Mark Murphy (a Commons Guy)
>>  http://commonsware.com | http://twitter.com/commonsguy
>>
>>  Android Development Wiki: http://wiki.andmob.org
>>
>>  >
>>
>
>
>
>--
>Romain Guy
>Android framework engineer
>romain...@android.com
>
>Note: please don't send private questions to me, as I don't have time
>to provide private support.  All such questions should be posted on
>public forums, where I and others can see and answer them
>
>

-- 
jason.vp.engineering.particle

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



[android-developers] Re: android 1.5 and 1.6 versions of SDK sitting side by side...

2009-09-28 Thread Xavier Ducrohet

You have most of it.

the --target value that you project to 'android create project' or
'android update project' will define what APIs you compile against.
If you want to use APIs from 1.6 you need to update your project with
the 1.6 target.

(The new SDK, starting with 1.5, can contains multiple versions of the
APIs. So if you install 1.1, 1.5 and 1.6 in your SDK, you could work
on different applications using different APIs at the same time. You
PATH environment variable only need to point to the tools folder of
your single SDK. When a new SDK is realeased the new SDK updater will
allow you to add/update your current SDK instead of downloading a new
one in a different location.)

The content of the  is used at install time (and allows
Market to filter out which apps are seen by which device).

you could technically compile against Android 1.6 but declare
minSdkVersion=3 (== Android 1.5) but if a 1.5 device tries to execute
the new APIs it'll crash.

You might want to read
http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html
for information about how to support older devices while using new
APIs.

Xav

On Mon, Sep 28, 2009 at 2:28 PM, sdphil  wrote:
>
> okay, so I have 1.5 and 1.6 co-existing on my dev boxes / build
> machine.
>
> I change my manifest to still say:
>
>    
>
> I'm not sure what happens when I need to use a 1.6 feature.
>
> The build script still uses
>
>    android  --target 2 
>
> So that it can support 1.5.
>
> I guess what I'm doing then is compiling my code which was designed
> around 1.5 using the 1.6 SDK.  It should theoretically just install on
> a 1.5 phone, right?
>
> Then what happens if i start using 1.6 features?  I assume at that
> point i need to do something like
>
>    android  --target 4 
>
> But then what happens when I install on a phone with 1.5...
>
> tia.
>
> On Sep 28, 9:55 am, Mike Collins  wrote:
>> I have 1.1, 1.5 and 1.6 all peacefully coexisting on my dev boxes.
>> Follow the directions.
>>
>>   mike
> >
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

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



[android-developers] Re: MyLocationOverlay causing crash in 1.6 (Donut)

2009-09-28 Thread CaptainSpam

Well, I suppose you do have a point.  I just thought that 1.6's
"proper" release was a bit more imminent.

I'll check back once Donut's fully ready for prime time, then.
Thanks!

On Sep 26, 8:48 am, MrChaz  wrote:
> Well if they will install a non-released version of the OS then that's
> to be expected.
>
> On Sep 25, 10:04 pm, CaptainSpam  wrote:
>
> > Recently, two independent users with 1.6 (Donut) on their phones have
> > informed me that my app crashes after it enters a MapView, just as
> > soon as MyLocationOverlay obtains its first location fix.  I have seen
> > it do so with one of them, in fact.  However, when I asked for a
> > logcat, what they sent me seems to indicate the crash originated from
> > an uncaught ClassCastException thrown from within MyLocationOverlay
> > itself, not from my code.  Worse, I tried running this on the 1.6
> > emulator and couldn't make it crash (I don't have 1.6 on my actual
> > phone yet), so I am completely lost with this and unsure if it's
> > something odd they were doing on their phones or something I will have
> > to worry about when 1.6 gets rolled out to more people.
>
> > One user has tried uninstalling/reinstalling the app numerous times,
> > as well as disabling Dalvik-Cache, all to no avail.  This app works
> > perfectly on both 1.1 and 1.5 phones.  I also tried recompiling the
> > app explicitly using the 1.6 SDK, and it still crashed (as per the
> > user I talked to).  Is there anything I would need to consider with
> > regards to MyLocationOverlay when upgrading to 1.6?
>
> > Thanks in advance!
>
> > --
> > Nicholas Killewald
>
> > What follows is the logcat I received from one user (apologies for any
> > formatting problems).  I would provide a code snippet, but since the
> > exception didn't come from my code, I'm not sure what I would need to
> > paste.
>
> > 09-22 11:38:16.106 I/ActivityManager(  158): Displayed activity
> > net.exclaimindustries.geohashdroid/.MainMap: 2846 ms (total 2846 ms)
> > 09-22 11:38:16.767 D/libgps  (  158): PDSM_PD_EVENT_BEGIN
> > 09-22 11:38:16.767 D/GpsLocationProvider(  158): Acquiring wakelock
> > 09-22 11:38:16.866 D/libgps  (  158): PDSM_PD_EVENT_COMM_BEGIN
> > 09-22 11:38:16.876 D/libgps  (  158): calling sAGpsStatusCallback
> > GPS_REQUEST_AGPS_DATA_CONN
> > 09-22 11:38:16.916 D/libgps  (  158): qct_agps_data_conn_open:
> > epc.tmobile.com
> > 09-22 11:38:16.916 D/libgps  (  158): DeferredActionThread calling
> > send_pdsm_atl_post_event PDSM_ATL_EVENT_OPEN_SUCCESS epc.tmobile.com
> > 09-22 11:38:17.501 D/libgps  (  158): PDSM_PD_EVENT_COMM_CONNECTED
> > 09-22 11:38:17.926 D/libgps  (  158): PDSM_PD_EVENT_GPS_BEGIN
> > 09-22 11:38:18.336 D/libgps  (  158): PDSM_PD_EVENT_COMM_DONE
> > 09-22 11:38:19.088 D/libgps  (  158): calling sAGpsStatusCallback
> > GPS_RELEASE_AGPS_DATA_CONN
> > 09-22 11:38:19.088 D/libgps  (  158): qct_agps_data_conn_closed
> > 09-22 11:38:19.216 D/dalvikvm(  730): GC(0) freed 8209 objects /
> > 611880 bytes in 109ms
> > 09-22 11:38:19.966 D/NetworkLocationProvider(  158): getLocation():
> > falling back to cell
> > 09-22 11:38:20.126 I/ActivityManager(  158): Start proc
> > com.google.android.apps.maps:LocationFriendService for service
> > com.google.android.apps.maps/
> > com.google.googlenav.friend.android.LocationFriendService: pid=750
> > uid=10025 gids={3003}
> > 09-22 11:38:20.366 I/Maps.MyLocationOverlay(  730): Running deferred
> > on first fix: net.exclaimindustries.geohashdroid.MainMap
> > $initiallocationadjus...@439ec528
> > 09-22 11:38:20.566 I/ActivityManager(  158): Process com.android.mms
> > (pid 614) has died.
> > 09-22 11:38:20.576 D/AndroidRuntime(  730): Shutting down VM
> > 09-22 11:38:20.576 W/dalvikvm(  730): threadid=3: thread exiting with
> > uncaught exception (group=0x4001e210)
> > 09-22 11:38:20.576 E/AndroidRuntime(  730): Uncaught handler: thread
> > main exiting due to uncaught exception
> > 09-22 11:38:20.636 E/AndroidRuntime(  730):
> > java.lang.ClassCastException: android.graphics.drawable.BitmapDrawable
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at
> > com.google.android.maps.MyLocationOverlay.getLocationDot
> > (MyLocationOverlay.java:180)
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at
> > com.google.android.maps.MyLocationOverlay.drawMyLocation
> > (MyLocationOverlay.java:561)
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at
> > com.google.android.maps.MyLocationOverlay.draw(MyLocationOverlay.java:
> > 511)
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at
> > com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:45)
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at
> > com.google.android.maps.MapView.onDraw(MapView.java:476)
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at android.view.View.draw
> > (View.java:6274)
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at
> > android.view.ViewGroup.drawChild(ViewGroup.java:1526)
> > 09-22 11:38:20.636 E/AndroidRuntime(  730): at
> > android.view.ViewGroup.dispatchDraw(ViewGroup.java:1

[android-developers] Re: Application using service in different project

2009-09-28 Thread Mark Murphy

Evgeny V wrote:
> Hi!
>  
> I have some similar question.
> APK1 (not service) has public class A.
>  
> How should I write class A or APK container to make it visble and
> "importable" from some other APK? In other words I need to use my first
> APK as library.
>  
> Please advise.

The closest thing to what you are asking is to export an interface via AIDL:

http://developer.android.com/guide/developing/tools/aidl.html

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

Android Development Wiki: http://wiki.andmob.org

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



[android-developers] Re: android 1.5 and 1.6 versions of SDK sitting side by side...

2009-09-28 Thread sdphil

okay, so I have 1.5 and 1.6 co-existing on my dev boxes / build
machine.

I change my manifest to still say:



I'm not sure what happens when I need to use a 1.6 feature.

The build script still uses

android  --target 2 

So that it can support 1.5.

I guess what I'm doing then is compiling my code which was designed
around 1.5 using the 1.6 SDK.  It should theoretically just install on
a 1.5 phone, right?

Then what happens if i start using 1.6 features?  I assume at that
point i need to do something like

android  --target 4 

But then what happens when I install on a phone with 1.5...

tia.

On Sep 28, 9:55 am, Mike Collins  wrote:
> I have 1.1, 1.5 and 1.6 all peacefully coexisting on my dev boxes.
> Follow the directions.
>
>   mike
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] rules for inflating layouts

2009-09-28 Thread Jason Proctor

thanks for the response.

i'm effectively calling contactView.findViewById(), as the call is 
from ContactView itself.

i tried the suggested inflate() usage, no change on the behaviour 
though. ContactView still claims it has no children, and therefore 
findViewById (contact_top_layout) doesn't find anything.




>What Mark said. Also, the correct usage of inflate() in adapters is:
>
>inflate(layoutId, parent, false);
>
>Passing the parent (given to you as a parameter in getView()) allows
>the UI toolkit to create the appropriate LayoutParams object. Passing
>false tells the toolkit to NOT call parent.addView(theInflateChild),
>since ListView will do its own magic later on.
>
>On Mon, Sep 28, 2009 at 2:11 PM, Mark Murphy  wrote:
>>
>>  Jason Proctor wrote:
>>>  i thought by now you could read my mind :-)
>>>
>>>  assuming that the XML enclosed in the post is in 
>>>res/layout/contact_view.xml
>>>
>>>  in the custom ListView...
>>>
>>>  LayoutInflaterinflater = LayoutInflater.from (this.context);
>>>
>>>  // passing null here, as i'm assuming that the ListView will hook the
>>>  view up with its hierarchy
>>>  ContactView   contactView = (ContactView) inflater.inflate
>>>  (R.layout.contact_view, null);
>>>
>>>  in the custom item View...
>>>
>>>  LinearLayout  top = (LinearLayout) findViewById (R.id.contact_top_layout);
>>
>>  Try contactView.findViewById().
>>
>>  --
>>  Mark Murphy (a Commons Guy)
>>  http://commonsware.com | http://twitter.com/commonsguy
>>
>>  Android Development Wiki: http://wiki.andmob.org
>>
>>  >
>>
>
>
>
>--
>Romain Guy
>Android framework engineer
>romain...@android.com
>
>Note: please don't send private questions to me, as I don't have time
>to provide private support.  All such questions should be posted on
>public forums, where I and others can see and answer them
>
>

-- 
jason.vp.engineering.particle

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



[android-developers] rules for inflating layouts

2009-09-28 Thread Jason Proctor

>  > in the custom item View...
>>
>>  LinearLayouttop = (LinearLayout) findViewById 
>> (R.id.contact_top_layout);
>
>Try contactView.findViewById().

thanks for the response.

that's effectively what i'm doing, as the findViewById() call is done 
from inside the ContactView.

sorry if the code wasn't clear -- ContactView is the custom item View.

-- 
jason.vp.engineering.particle

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



[android-developers] Re: rules for inflating layouts

2009-09-28 Thread Romain Guy

What Mark said. Also, the correct usage of inflate() in adapters is:

inflate(layoutId, parent, false);

Passing the parent (given to you as a parameter in getView()) allows
the UI toolkit to create the appropriate LayoutParams object. Passing
false tells the toolkit to NOT call parent.addView(theInflateChild),
since ListView will do its own magic later on.

On Mon, Sep 28, 2009 at 2:11 PM, Mark Murphy  wrote:
>
> Jason Proctor wrote:
>> i thought by now you could read my mind :-)
>>
>> assuming that the XML enclosed in the post is in res/layout/contact_view.xml
>>
>> in the custom ListView...
>>
>> LayoutInflater        inflater = LayoutInflater.from (this.context);
>>
>> // passing null here, as i'm assuming that the ListView will hook the
>> view up with its hierarchy
>> ContactView   contactView = (ContactView) inflater.inflate
>> (R.layout.contact_view, null);
>>
>> in the custom item View...
>>
>> LinearLayout  top = (LinearLayout) findViewById (R.id.contact_top_layout);
>
> Try contactView.findViewById().
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> Android Development Wiki: http://wiki.andmob.org
>
> >
>



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

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

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



[android-developers] Re: Application using service in different project

2009-09-28 Thread Evgeny V
Hi!

I have some similar question.
APK1 (not service) has public class A.

How should I write class A or APK container to make it visble and
"importable" from some other APK? In other words I need to use my first APK
as library.

Please advise.

Thanks in advance,
Evgeny

On Tue, Sep 1, 2009 at 4:02 PM, themanol  wrote:

>
> Thank you very much.
>
> The last link give me the life.
>
> On Sep 1, 11:52 am, Mark Murphy  wrote:
> > themanol wrote:
> > > I want create a service and that other application use this service.
> > > I want that the other application is in a different project that the
> > > service.
> >
> > > It is possible?
> >
> > Yes, via AIDL:
> >
> >
> http://developer.android.com/guide/developing/tools/aidl.htmlhttp://developer.android.com/guide/topics/fundamentals.html
> >
> > > If is possible somebody can show me a sample code.
> >
> >
> http://developer.android.com/guide/samples/ApiDemos/src/com/example/a...http://developer.android.com/guide/samples/ApiDemos/src/com/example/a...http://github.com/commonsguy/cw-advandroid/tree/e50e087577f8b28e72735.
> ..
> >
> > --
>  > Mark Murphy (a Commons Guy)http://commonsware.com|
> http://twitter.com/commonsguy
> >
> > Need help for your Android OSS project?http://wiki.andmob.org/hado
> >
>

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



[android-developers] Re: rules for inflating layouts

2009-09-28 Thread Mark Murphy

Jason Proctor wrote:
> i thought by now you could read my mind :-)
> 
> assuming that the XML enclosed in the post is in res/layout/contact_view.xml
> 
> in the custom ListView...
> 
> LayoutInflaterinflater = LayoutInflater.from (this.context);
> 
> // passing null here, as i'm assuming that the ListView will hook the 
> view up with its hierarchy
> ContactView   contactView = (ContactView) inflater.inflate 
> (R.layout.contact_view, null);
> 
> in the custom item View...
> 
> LinearLayout  top = (LinearLayout) findViewById (R.id.contact_top_layout);

Try contactView.findViewById().

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

Android Development Wiki: http://wiki.andmob.org

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



[android-developers] Re: Content Provider VS SQLiteDatabase

2009-09-28 Thread Mark Murphy

GeezIHateCreatingNewNames wrote:
> The more complicated case
> seems to be a single application that has two processes in it (e.g, an
> application with a long running service). 

You do not need two processes for an application with a long running
service. Not to mention that long-running services aren't a great idea
in the first place.

> In this case it seems like
> you could simply share at the sqlite database layers, but the locking
> and sharing story on the sqlite database APIs is somewhat unclear.

SQLite handles cross-process locking. That's one of the reasons why it
is the default database for Rails and other Ruby server-side frameworks
that rely on multiple processes.

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

Android Development Wiki: http://wiki.andmob.org

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



[android-developers] rules for inflating layouts

2009-09-28 Thread Jason Proctor

i thought by now you could read my mind :-)

assuming that the XML enclosed in the post is in res/layout/contact_view.xml

in the custom ListView...

LayoutInflater  inflater = LayoutInflater.from (this.context);

// passing null here, as i'm assuming that the ListView will hook the 
view up with its hierarchy
ContactView contactView = (ContactView) inflater.inflate 
(R.layout.contact_view, null);

in the custom item View...

LinearLayouttop = (LinearLayout) findViewById (R.id.contact_top_layout);

"top" comes back null. if ContactView asks for its own children, the 
count comes back zero.

thanks in advance!



>The code would help :)
>
>On Mon, Sep 28, 2009 at 1:56 PM, Jason Proctor
> wrote:
>>
>>  i'm running into some issues inflating layouts and i wonder whether i
>>  have something basic wrong.
>>
>>  i have a ListView with a custom adapter etc, and of course the item
>>  View is custom too. i've been creating the item View in code, and
>>  everything works fine, including recycling them and all that. great.
>>  but i want to move the View into a resource, where all good Android
>>  views live, and weirdness is happening.
>>
>>  in the ListView's getView(), i get my inflater and inflate the view
>>  by ID. the view itself has its own XML file. i can inflate the top
>>  view, but i can't find anything by ID, and when asked for its
>>  children, nothing comes back.
>>
>>  are there funky rules for inflating views this way? is there a
>>  convention for how this should be done inside a ListView?
>>
>>  thanks -- (abbreviated) XML layout code enclosed...
>>
>>  > xmlns:android="http://schemas.android.com/apk/res/android";
>> android:layout_width="fill_parent"
>> android:layout_height="wrap_content"
>> android:orientation="vertical"
>> android:background="#"
>> >
>> 
>> > android:id="@+id/contact_top_layout"
>> android:layout_width="fill_parent"
>> android:layout_height="wrap_content"
>> android:orientation="horizontal"
>> >
>> > android:id="@+id/contact_user_name"
>> android:layout_width="fill_parent"
>> android:layout_height="wrap_content"
>> android:layout_weight="1"
>> android:background="#"
>> android:textColor="#ff00"
>> android:textSize="18px"
>> />
>>  ...
>> 
>>  
>>
>>
>>  --
>>  jason.vp.engineering.particle
>>
>>  >
>>
>
>
>
>--
>Romain Guy
>Android framework engineer
>romain...@android.com
>
>Note: please don't send private questions to me, as I don't have time
>to provide private support.  All such questions should be posted on
>public forums, where I and others can see and answer them
>
>

-- 
jason.vp.engineering.particle

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



[android-developers] Re: rules for inflating layouts

2009-09-28 Thread Mark Murphy

Jason Proctor wrote:
> in the ListView's getView(), i get my inflater and inflate the view 
> by ID. the view itself has its own XML file. i can inflate the top 
> view, but i can't find anything by ID, and when asked for its 
> children, nothing comes back.

"when asked for its children" -- when who is asked?

> are there funky rules for inflating views this way? is there a 
> convention for how this should be done inside a ListView?

Not sure what qualifies as "funky rules". Here's a sample chapter from
one of my books that explains the process:

http://commonsware.com/Android/excerpt.pdf

If this doesn't help, write back with some Java code of where you are
doing the inflation and what calls seem to be failing.

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

Android Development Wiki: http://wiki.andmob.org

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



[android-developers] Re: Content Provider VS SQLiteDatabase

2009-09-28 Thread GeezIHateCreatingNewNames

I've also struggled with the the distinction between a ContentProvider
and just using a sqlite database.  Clearly if the application is
exporting data to other (potentially unknown) applications then a
ContentProvider would make some sense.  The more complicated case
seems to be a single application that has two processes in it (e.g, an
application with a long running service).  In this case it seems like
you could simply share at the sqlite database layers, but the locking
and sharing story on the sqlite database APIs is somewhat unclear.  By
using the ContentProvider APIs, it looks like you sidestep these
issues because all access to the database will be through a single
process and ContentResolver provides a bridge between the processes.

Kevin McCurley

On Sep 10, 1:00 am, Dianne Hackborn  wrote:
> If you need the features content provider adds (primarily interaction across
> separate application and associated discovery and cross-process calls, as
> well as MIME typing to integrate with intent resolution) then consider using
> it.  Otherwise there probably isn't a reason to.
>
>
>
> On Thu, Sep 10, 2009 at 12:11 AM, jayant  wrote:
>
> > Hi Dianne,
>
> > i get ur point that Content provider is built on top of  SQlite but i
> > wanna know is what additional features does a provider support. Say if
> > a make my own Database Store class  and provide methods in it to
> > insert/update/delete into a database.
>
> > And if i create  a Provider for the same purpose, ...in what way will
> > a Provider prove to be more beneficial over the DatabaseStore class
> > other than the fact that provider will allow me to share data ovet
> > different applications
>
> > On Sep 10, 11:01 am, Dianne Hackborn  wrote:
> > > Content provider is (generally) built on top of SQLite.  You don't pick
> > one
> > > or the other.
>
> > > On Wed, Sep 9, 2009 at 9:24 PM, Chris 
> > wrote:
>
> > > > I would like to know the exact difference between Content provider and
> > > > SQLiteDatabase. If we have to share our data among applications then
> > > > we use Content provider, otherwise SQLiteDatabase. Is this is the ONLY
> > > > difference, OR using Content Provider has something to do with
> > > > performence???
> > > > Any input will be highly appreciated.
>
> > > > Thanks
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > hack...@android.com
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

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



[android-developers] Problem with network location provider

2009-09-28 Thread David

Hi, there:

I downloaded the cupcake branch and compiled to get a new system.img.
I flashed the img to my G1 phone; then I checked the available
location providers, but only gps is available. The networkprovider
just is not there!

Before the flashing, both gps and network providers are available.

Can anybody tell me why network-provider is not working? Note that it
is not a enabling/disabling problem, since I enabled them in the
Settings.

Thanks.
David

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



[android-developers] Re: rules for inflating layouts

2009-09-28 Thread Romain Guy

The code would help :)

On Mon, Sep 28, 2009 at 1:56 PM, Jason Proctor
 wrote:
>
> i'm running into some issues inflating layouts and i wonder whether i
> have something basic wrong.
>
> i have a ListView with a custom adapter etc, and of course the item
> View is custom too. i've been creating the item View in code, and
> everything works fine, including recycling them and all that. great.
> but i want to move the View into a resource, where all good Android
> views live, and weirdness is happening.
>
> in the ListView's getView(), i get my inflater and inflate the view
> by ID. the view itself has its own XML file. i can inflate the top
> view, but i can't find anything by ID, and when asked for its
> children, nothing comes back.
>
> are there funky rules for inflating views this way? is there a
> convention for how this should be done inside a ListView?
>
> thanks -- (abbreviated) XML layout code enclosed...
>
>         xmlns:android="http://schemas.android.com/apk/res/android";
>        android:layout_width="fill_parent"
>        android:layout_height="wrap_content"
>        android:orientation="vertical"
>        android:background="#"
>        >
>        
>                        android:id="@+id/contact_top_layout"
>                android:layout_width="fill_parent"
>                android:layout_height="wrap_content"
>                android:orientation="horizontal"
>                >
>                                        android:id="@+id/contact_user_name"
>                        android:layout_width="fill_parent"
>                        android:layout_height="wrap_content"
>                        android:layout_weight="1"
>                        android:background="#"
>                        android:textColor="#ff00"
>                        android:textSize="18px"
>                />
> ...
>        
> 
>
>
> --
> jason.vp.engineering.particle
>
> >
>



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

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

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



[android-developers] Re: MediaPlayer PVMVErrTimeout error

2009-09-28 Thread Mark Skiba
After looking at related MediaPlayer discussions, I can discount a couple of
possibilities:- my MediaPlayer is attached to the application object and is
not affected Activity lifetimes (handles rotations ok)
- the MediaPlayer creation and play are done in a separate thread than the
activity thread

On Mon, Sep 28, 2009 at 1:19 PM, Mark Skiba  wrote:

> I'm writing a streaming music player application and I frequently get
> a "PFMVErrTimeout" error generated by the PlayerDriver according to
> the ADB log.  This appears to happen even with good reception.  I
> can't seem to find any documentation on this error message.
>
> What does a PFMVErrTimeout" error indicate?
>
> Is there anything that can be done from an application that can
> eliminate or minimize this error?  Is there a way to recover other
> than freeing up the MediaPlayer and creating a new one?
>
> Also, what is the ERROR/PlayerDriver(26027): HandleInformationalEvent:
> type=28 UNHANDLED refer to?  Do I need to add an event handler for
> this?
>
> This error seems to be mostly associated with the "/dalvikvm(55): GC
> freed" event.
>
> 09-28 13:08:17.458: ERROR/LocationMasfClient(55): getNetworkLocation
> (): accuracy is too high 43000
> 09-28 13:08:56.799: ERROR/PlayerDriver(26027):
> HandleInformationalEvent: type=28 UNHANDLED
> 09-28 13:09:00.048: DEBUG/dalvikvm(55): GC freed 28400 objects /
> 1300576 bytes in 383ms
> 09-28 13:09:11.799: ERROR/PlayerDriver(26027): HandleErrorEvent:
> PVMFErrTimeout
> 09-28 13:09:11.799: ERROR/MediaPlayer(27020): error (1, -11)
> 09-28 13:09:11.808: ERROR/MediaPlayer(27020): Error (1,-11)
> 09-28 13:09:11.808: ERROR/MobzillaPlayer(27020): onError--->   what:
> 1extra:-11
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): error: Media Player
> Error
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): java.lang.Exception:
> Media Player Error
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> com.Mobzilla.Player.MobzillaApplication.onError
> (MobzillaApplication.java:319)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:
> 972)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> android.os.Looper.loop(Looper.java:123)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> android.app.ActivityThread.main(ActivityThread.java:3948)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> java.lang.reflect.Method.invokeNative(Native Method)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> java.lang.reflect.Method.invoke(Method.java:521)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
> (ZygoteInit.java:782)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
> 09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
> dalvik.system.NativeStart.main(Native Method)
> 09-28 13:09:11.978: ERROR/MediaPlayer(27020): stop called in state 0
> 09-28 13:09:11.978: ERROR/MediaPlayer(27020): error (-38, 0)
>

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



[android-developers] rules for inflating layouts

2009-09-28 Thread Jason Proctor

i'm running into some issues inflating layouts and i wonder whether i 
have something basic wrong.

i have a ListView with a custom adapter etc, and of course the item 
View is custom too. i've been creating the item View in code, and 
everything works fine, including recycling them and all that. great. 
but i want to move the View into a resource, where all good Android 
views live, and weirdness is happening.

in the ListView's getView(), i get my inflater and inflate the view 
by ID. the view itself has its own XML file. i can inflate the top 
view, but i can't find anything by ID, and when asked for its 
children, nothing comes back.

are there funky rules for inflating views this way? is there a 
convention for how this should be done inside a ListView?

thanks -- (abbreviated) XML layout code enclosed...

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



...




-- 
jason.vp.engineering.particle

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



[android-developers] Re: zipalign and Proguard

2009-09-28 Thread Xavier Ducrohet

It's completely different.

The only thing that zipalign does is align the location of the
uncompressed zip entries on 4 bytes by adding padding before them
(using the extra field of a zip entry).

The content of the files inside the zip archive is not changed in
anyway (otherwise the signature would fail)

Xav

On Mon, Sep 28, 2009 at 1:28 PM, Fred Grott(Android Expert)
 wrote:
>
> As you mightknow new to SDK 1.6 is the zipalign to align data
> resources for better and optimized performance and it gets used after
> apk is signed.
>
> My question is how does this affect those who may be obfuscating their
> classes by using Proguard?
>
> Will I stil be able to obfuscate the classes using Proguard?
>
> Thanks
>
>
> >
>



-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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



[android-developers] Re: Availability of Android Development phone

2009-09-28 Thread Mark Murphy

EcDiet wrote:
> I've been trying to order an Android development phone. It has not
> been available for ordering.
> Does anyone know if there are ways to expedite it?

It has been on backorder for some time. You may wish to keep an eye out
for one on eBay or something.

Also, since some people get confused by this, you only need the ADP1 if
you are going to modify and test firmware changes. For ordinary
applications, any Android device is fine for testing.

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

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.1 Available!

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



[android-developers] zipalign and Proguard

2009-09-28 Thread Fred Grott(Android Expert)

As you mightknow new to SDK 1.6 is the zipalign to align data
resources for better and optimized performance and it gets used after
apk is signed.

My question is how does this affect those who may be obfuscating their
classes by using Proguard?

Will I stil be able to obfuscate the classes using Proguard?

Thanks


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



[android-developers] MediaPlayer PVMVErrTimeout error

2009-09-28 Thread Mark Skiba

I'm writing a streaming music player application and I frequently get
a "PFMVErrTimeout" error generated by the PlayerDriver according to
the ADB log.  This appears to happen even with good reception.  I
can't seem to find any documentation on this error message.

What does a PFMVErrTimeout" error indicate?

Is there anything that can be done from an application that can
eliminate or minimize this error?  Is there a way to recover other
than freeing up the MediaPlayer and creating a new one?

Also, what is the ERROR/PlayerDriver(26027): HandleInformationalEvent:
type=28 UNHANDLED refer to?  Do I need to add an event handler for
this?

This error seems to be mostly associated with the "/dalvikvm(55): GC
freed" event.

09-28 13:08:17.458: ERROR/LocationMasfClient(55): getNetworkLocation
(): accuracy is too high 43000
09-28 13:08:56.799: ERROR/PlayerDriver(26027):
HandleInformationalEvent: type=28 UNHANDLED
09-28 13:09:00.048: DEBUG/dalvikvm(55): GC freed 28400 objects /
1300576 bytes in 383ms
09-28 13:09:11.799: ERROR/PlayerDriver(26027): HandleErrorEvent:
PVMFErrTimeout
09-28 13:09:11.799: ERROR/MediaPlayer(27020): error (1, -11)
09-28 13:09:11.808: ERROR/MediaPlayer(27020): Error (1,-11)
09-28 13:09:11.808: ERROR/MobzillaPlayer(27020): onError--->   what:
1extra:-11
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): error: Media Player
Error
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): java.lang.Exception:
Media Player Error
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
com.Mobzilla.Player.MobzillaApplication.onError
(MobzillaApplication.java:319)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:
972)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
android.os.Handler.dispatchMessage(Handler.java:99)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
android.os.Looper.loop(Looper.java:123)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
android.app.ActivityThread.main(ActivityThread.java:3948)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
java.lang.reflect.Method.invokeNative(Native Method)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
java.lang.reflect.Method.invoke(Method.java:521)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-28 13:09:11.928: ERROR/MobzillaPlayer(27020): at
dalvik.system.NativeStart.main(Native Method)
09-28 13:09:11.978: ERROR/MediaPlayer(27020): stop called in state 0
09-28 13:09:11.978: ERROR/MediaPlayer(27020): error (-38, 0)

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



[android-developers] Re: wrap around with textview in a tablelayout broken

2009-09-28 Thread Fabian Sturm

Hi!

Thanks for your testing, at least I now know I am not doing anything
stupid :-) And yes I guess I could use something different for the
layout, I just thought the tablelayout would be the most logical choice
to get all items in the second column aligned properly.

Anyways I opened this bug report
http://code.google.com/p/android/issues/detail?id=4000 
but no one looked at it yet.

Thanks a lot, Fabian


Am Donnerstag, den 24.09.2009, 09:38 +1000 schrieb Broc Seib:

> Actually, your TextView is just fine; all the text "exists" and is
> wrapping properly, it has just been rendered off the edge of the
> screen. It is the TableLayout that is doing something odd.




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



[android-developers] Availability of Android Development phone

2009-09-28 Thread EcDiet

I've been trying to order an Android development phone. It has not
been available for ordering.
Does anyone know if there are ways to expedite it?
TIA

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



[android-developers] Re: Convince Dalvik to add a class with the same canonical path as another

2009-09-28 Thread fadden

On Sep 28, 11:29 am, fadden  wrote:
> From where is that exception being thrown?  Can you include more of
> the stack trace?

Ah, found the message in dalvik/dx/src/com/android/dx/dex/file/
ClassDefsSection.java.  Comment there says:

/**
 * Adds an element to this instance. It is illegal to attempt to
add more
 * than one class with the same name.
 *
 * @param clazz {...@code non-null;} the class def to add
 */

The "dx" command wants to take your various classes and combine them
into a single, large .dex file.  It wouldn't make sense to have more
than one copy of the same class -- one would never be used and would
just take up space.

Assuming you need parts of all of the involved jar files, you can
probably work around this by unzipping the jars into a single
directory (which will allow "unzip" to overwrite or skip redundant
entries as you prefer) and then create a new jar from that directory
hierarchy.  I don't know if this is appropriate for your situation.

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



[android-developers] Re: Any suggestion between 1.5 or 1.6 sdk

2009-09-28 Thread Fred Grott(Android Expert)

1. Are you using newly created AVDs or ones from the SDK 1.5r3?

2. was ADT 0.93 installed in anew Eclipse install or the old one?

On Sep 28, 9:01 am, pro  wrote:
> Hi All,
>
> I've been trying to use 1.6 sdk, and see numerous problems
>
> 1) Same projects flags for error, but hacking thru the environment
> using only the eclipse, sometime deleting the gen folder or deleting
> R.java  to solve it. Nothing methodical.  I did not have this on 1.5r3
>
> 2) Sometime the eclipse editor is locked, killing the AVD releases the
> editor
>
> 3) Debug launch gets stuck at 27%, yes magic number...
>
> -pro
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: (unofficial) Bluetooth API v. 0.2

2009-09-28 Thread jdesbonnet

Thanks for the pointer. And apologies for the cc to your email.

Joe.


On Sep 28, 6:03 pm, Dianne Hackborn  wrote:
> Nick has posted about this fairly regularly either on android-platform or
> android-porting.
>
>
>
>
>
> On Mon, Sep 28, 2009 at 4:50 AM, jdesbonnet  wrote:
>
> > Dianne,
>
> > Is there any chance you or someone else on the Android project can
> > make a statement (if even a vague one) about the Bluetooth API plans
> > and timeline. You can see from the issue tracker (http://
> > code.google.com/p/android/issues/detail?id=1725) that there is much
> > wailing and gnashing of teeth over this issue
>
> > Keep up the great work on Android: I'm really looking forward to the
> > Bluetooth API (I have great plans for an app which requires bluetooth
> > which is why I'm anxious to know).
>
> > Best regards,
>
> > Joe.
>
> > On Sep 16, 9:06 pm, windstorm  wrote:
> > > Agree with Jonas. We are not trying to break Android's rule but,
> > > sometimes we have to play with things or tricks or whatsoever for
> > > keeping on using Google's phone which rocks but with suckingBluetooth.
> > Otherwise we have to change the platform, which is the last
> > > thing I wanna see.
>
> > > On Sep 16, 1:04 pm, "Jonas Petersson"  wrote:
>
> > > > Dianne Hackborn wrote:
> > > > > Again, this code is using PRIVATE APIs.  As we've said repeatedly,
> > doing
> > > > > so is not safe, and you can expect your code to break in various ways
> > as
> > > > > a result.[...]
>
> > > > Thank you, Dianne. I'm pretty sure that everyone involved in these two
> > > >Bluetoothprojects are very much aware of this and try to make it clear
> > > > to the potential users too.
>
> > > > As I see it, the choice is between having basically no usefulBluetooth
> > > > API and to "boldy go where no man has gone before"...
>
> > > > Presumably, the main reason for changing that private API would be to
> > > > make a fully working public API. If (when) that happens everyone will
> > be
> > > > happy. Until then, it should be reasonably safe to examine the build
> > > > number (and hw id etc) and see what can be done by hitting the metal,
> > right?
>
> > > >                         Best / Jonas
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Take an action when soft keyboard is launched

2009-09-28 Thread Thomas

Hi All,

Does Nobody know that?

thanks again

Tomás

On Fri, Sep 25, 2009 at 11:07 AM, Thomas  wrote:
> Hi All,
>
> I'd like to take an action always when soft keyboard is shown or
> hidden. In my activity there is a menu that I want to hide when soft
> keyboard is launched and this menu needs to be shown when soft
> keyboard is hidden.
>
> Does anyone have an idea about how to do that?
>
> Thanks all
>
> Thomas
>

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



[android-developers] Hey Google I need to know

2009-09-28 Thread Jason Proctor

seems like we need an android-adc list, too...

>If you post the name of the app, I'm sure the users on here can let
>you know if we have seen it.
>
>On Sep 28, 2:53 pm, omnitial  wrote:
>>  i dont have an android phone, so i cant use the judging application. I
>>  dont know whether my submitted app was qualified for this adc 2 first
>>  round judging. I looked in various forums where people are discussing
>>  and reviewing various apps in the judge application. But i didnt find
>>  my app name there.
>>  It is very much disappointing for me :(
>>
>>  Hey Google i need to know whether my app is in the race or it was
>>  disqualified/dead before first round. If you provide a list of the
>>  qualified entries for the first round that could be a solution.
>>
>>  -omnitial
>

-- 
jason.vp.engineering.particle

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



[android-developers] Re: Hey Google I need to know

2009-09-28 Thread ander...@phdgaming.com

If you post the name of the app, I'm sure the users on here can let
you know if we have seen it.

On Sep 28, 2:53 pm, omnitial  wrote:
> i dont have an android phone, so i cant use the judging application. I
> dont know whether my submitted app was qualified for this adc 2 first
> round judging. I looked in various forums where people are discussing
> and reviewing various apps in the judge application. But i didnt find
> my app name there.
> It is very much disappointing for me :(
>
> Hey Google i need to know whether my app is in the race or it was
> disqualified/dead before first round. If you provide a list of the
> qualified entries for the first round that could be a solution.
>
> -omnitial
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hey Google I need to know

2009-09-28 Thread karthikr


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



[android-developers] Re: G1 crashing BatteryStatsImpl.writeLocked() OOM

2009-09-28 Thread rflexor

Hi again,

to anyone interested, here is the solution:

I found out that BatteryStatsImpl persists its state to /data/system.
The batterystats.bin-file there also was 1.5M big. Gladly I got
information from one of the developers that this is far from normal.
The command

dumpsys batteryinfo

helped great deal to find the culprit. In this case an application on
my device that had reserved wake-locks with a random string as a name
for each one. After 75k wake locks things began to go wrong. Deleting
the application from my device resolved the issue. At the next
periodical persist of the batterystats.bin-file, it's size went back
to normal 28k.

rflexor


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



[android-developers] Hey Google I need to know

2009-09-28 Thread omnitial

i dont have an android phone, so i cant use the judging application. I
dont know whether my submitted app was qualified for this adc 2 first
round judging. I looked in various forums where people are discussing
and reviewing various apps in the judge application. But i didnt find
my app name there.
It is very much disappointing for me :(

Hey Google i need to know whether my app is in the race or it was
disqualified/dead before first round. If you provide a list of the
qualified entries for the first round that could be a solution.

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



[android-developers] Re: Convince Dalvik to add a class with the same canonical path as another

2009-09-28 Thread fadden

On Sep 28, 6:28 am, "tomlotterm...@googlemail.com"
 wrote:
> Now I want to use the library in android and now dalvik comes in and
> says:
> UNEXPECTED TOP-LEVEL EXCEPTION:
> java.lang.IllegalArgumentException: already added: Lnet/xeoh/plugins/
> remote/ExportResult;

>From where is that exception being thrown?  Can you include more of
the stack trace?

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



[android-developers] Re: Broadcast receiver

2009-09-28 Thread Mark Murphy

richarth wrote:
> Hi,
> 
> I'm trying to create a broadcast receiver which responds to system
> events and change system settings.  I don't need any interaction from
> the user so I don't need an activity and have been trying to do
> everything through the manifest file.  I've put a log event into my
> onReceive method but it never logs anything so I'm presuming my method
> is never called.  I've tried this with both the 1.5 and 1.6 SDKs.  I
> was hoping somebody could have a look at my code please and let me
> know if there are any problems.
> 
> Manifest file
> 
> 
> http://schemas.android.com/apk/res/android";
>   package="uk.co.richarth"
>   android:versionCode="1"
>   android:versionName="1.0">
> 
> 
> 
>  android:permission="android.permission.ACCESS_NETWORK_STATE"
> android:enabled="true" android:name=".BroadcastReceiverExample">
> 
>  android:name="android.intent.action.AIRPLANE_MODE_CHANGED">
> 
> 
> 
> 
> 
>  android:name="android.permission.ACCESS_NETWORK_STATE"> permission>
> 
> 
> 
> Class
> 
> package uk.co.richarth;
> 
> import android.content.BroadcastReceiver;
> import android.content.Context;
> import android.content.Intent;
> import android.util.Log;
> 
> public class BroadcastReceiverExample extends BroadcastReceiver {
> 
>   @Override
>   public void onReceive(Context arg0, Intent arg1) {
>   Log.d("debug", "working");
> 
>   }
> 
> }
> 
> Thanks for the help

You just want your  element, not the android:permission
attribute. Also, you may wish to move that  up earlier
in the XML -- some of this stuff seems (unfortunately) a bit
position-dependent.

Nothing else leaps out at me. Check logcat and see if you get any
warnings -- if Android has difficulty invoking some component, that
tends to get logged as a warning.

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

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



[android-developers] Re: jsonarray as listview source

2009-09-28 Thread Mark Murphy

vorcigernix wrote:
> Hello,
> I made my application from various examples and sources, so now I have
> filled jsonarray and prepared listview (with custom rows formatting).
> Now I need to replace
> 
> ListAdapter myAdapter =(new ArrayAdapter
> (this,R.layout.rowlayout, R.id.TextView01, values));
> 
> with my json array based adapter. All I found is some technique to
> iterate through all json records and construct string array. It sound
> like perverse to me, is it really necessary?

Create your own adapter class from BaseAdapter, and you can traverse
your JSON however you want.

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

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

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



[android-developers] Re: zipalign : could be done at distribution or installation time ?

2009-09-28 Thread Xavier Ducrohet

On Mon, Sep 28, 2009 at 9:00 AM, Sheridan Hutchinson
 wrote:
> I just cannot undestand why the compiler doesn't zipalign
> automatically every final APK produced.

Zip align has to be done after the APK is signed. If you use ADT to
create your final, signed, release apk then it'll be aligned too.

But if you sign your APKs outside of Eclipse/Ant, there's nothing we can do.

Xav
-- 
Xavier Ducrohet
Android Developer Tools Engineer
Google Inc.

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



[android-developers] Broadcast receiver

2009-09-28 Thread richarth

Hi,

I'm trying to create a broadcast receiver which responds to system
events and change system settings.  I don't need any interaction from
the user so I don't need an activity and have been trying to do
everything through the manifest file.  I've put a log event into my
onReceive method but it never logs anything so I'm presuming my method
is never called.  I've tried this with both the 1.5 and 1.6 SDKs.  I
was hoping somebody could have a look at my code please and let me
know if there are any problems.

Manifest file


http://schemas.android.com/apk/res/android";
  package="uk.co.richarth"
  android:versionCode="1"
  android:versionName="1.0">















Class

package uk.co.richarth;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class BroadcastReceiverExample extends BroadcastReceiver {

@Override
public void onReceive(Context arg0, Intent arg1) {
Log.d("debug", "working");

}

}

Thanks for the help

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



[android-developers] Routing Audio to earpiece instead of speaker

2009-09-28 Thread Puneet

I am writing a voice application for HTC-G2 (MyTouch) phone. I am
using Audiotrack class to play audio in PCM format. It works fine but
audio comes out from speaker phone instead of earpiece. When I use
IsSpeakerPhoneOn() to query the status of speaker, it comes out to be
"off" (false).

I even tried SetSpeakerPhoneOn(true) and then SetSpeakerPhoneOn(false)
to make sure that I explicitly set the speaker to off but audio still
comes out of speaker. Interestingly, I checked IsSpeakerPhoneOn()
after setting SetSpeakerPhoneOn(true) and that API returned False.

I tried setRouting API to set ROUTE_EARPIECE but that API seems to be
deprecated.

Can someone please tell how to route audio to earpiece? I was under
the impression that earpiece shall be the default route for audio but
it does not look that way.

Thanks,
Puneet Goel
Kineto Wireless

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



[android-developers] Playing Remote video file android emulator showing still image with sound

2009-09-28 Thread Shobhit Kasliwal

Hi

I am writing an application to run a video file from a remote server.
I am getting the sound but instead of video I am getting one still
image.

Can anyone tell me what can be the problem ?

Thanks
Shobhit Kasliwal

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



[android-developers] Running camera android Emulator

2009-09-28 Thread Shobhit Kasliwal

Hi

Can anyone tell me how can I use  my computers webcam as camera in
android emulator.
Tutorial would be a great help for me.

Thanks,
Shobhit Kasliwal

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



[android-developers] Re: activity is destroyed when press home key

2009-09-28 Thread Johan Schöring

That's what the documentation says, but that's not what the
ActivityManager does.

>From what I can see, the problem lies in the following code:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/am/ActivityManagerService.java;h=a473db2740abe124b7867d0ea6313eb8c0ca7a7d;hb=5550ef48739a7bb16f80aa6b10e9c151b1438163#l

The if-statement on line  causes the activity stack to be cleared
if the launch mode is singleTask, regardless of the state of
FLAG_ACTIVITY_CLEAR_TOP... In my opinion, this is a bug, as the
documentation you quoted clearly says that the stack should be
preserved on a singleTask activity.

I'm going to submit a patch for this, but I'm writing here so others
who find this thread know that this behaviour is not their fault but a
bug.

// Johan


On Sep 24, 10:02 pm, "Justin (Google Employee)" 
wrote:
> Fromhttp://developer.android.com/guide/topics/fundamentals.html#acttask
>
> "As noted above, there's never more than one instance of a
> "singleTask" or "singleInstance" activity, so that instance is
> expected to handle all new intents. A "singleInstance" activity is
> always at the top of the stack (since it is the only activity in the
> task), so it is always in position to handle the intent. However, a
> "singleTask" activity may or may not have other activities above it in
> the stack. If it does, it is not in position to handle the intent, and
> the intent is dropped. (Even though the intent is dropped, its arrival
> would have caused the task to come to the foreground, where it would
> remain.)"
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Sep 24, 11:45 am, justinh  wrote:
>
>
>
> > When users press on your icon again to "come back" they are launching
> > your activity, not the settings activity. Where do you start the
> > settings activity in your code? If it's outside of the onCreate/
> > onStart/onResume methods then the user will have to repeat that action
> > to get back there.
>
> > On Sep 24, 2:58 am, play_net  wrote:
>
> > > My manifest:
> > >         > > android:name="MainUI" android:screenOrientation="landscape"
> > >                         android:configChanges="orientation|keyboardHidden"
> > > android:launchMode="singleTask">
> > >             
> > >                 
> > >                  > > android:name="android.intent.category.LAUNCHER" />
> > >             
> > >         
> > >         > > android:name=".view.Settings"  android:configChanges="orientation|
> > > keyboardHidden">
> > >         
>
> > >    I press program's icon to start my program,and then open the
> > > Settings activity through startActivityForResult(intent, SETTINGS).
> > > Now i press the  home key  and start my program through program's
> > > icon, at this time the Settings actitity will run OnDestroy() and be
> > > destroyed. I can't understand why Settings activity is be destroyed
> > > automatically? How can I make Settings activity still focus when users
> > > come back.
>
> > > Thank all.

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



[android-developers] Re: Closing one activity from another

2009-09-28 Thread Jeff King

Override the onActivityResult for all your activities to call finish()
if they get back RESULT_OK. Have your last activity setResult
(RESULT_OK); before it finishes.
http://developer.android.com/reference/android/app/Activity.html#onActivityResult(int,%20int,%20android.content.Intent)

On Sep 23, 3:09 pm, Boozel  wrote:
> Hi
> Is there anyway to close one activity from another?
> I want to go through a whole bunch of activities once i get to the
> last one close all the previous ones. i cant close them as i move on
> to the next one because i want to be able to go back unless ive got to
> the last one.
> Thanks for any help.

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



[android-developers] Convince Dalvik to add a class with the same canonical path as another

2009-09-28 Thread tomlotterm...@googlemail.com

Hi!
I'm using a library of a friend of mine and it is build up in a way
that some classes have the same canonical name (in other jars)... I'm
not quite sure how he does it, but it does not lead to a jar hell and
the normal sun java compiler doesn't worry about it...
Now I want to use the library in android and now dalvik comes in and
says:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lnet/xeoh/plugins/
remote/ExportResult;

Seems to be a security to prevent android from having a jar hell, and
now I wonder if i can tell dalvik that this is very nice of it, but
that I don't really care, and that it should add it anyway?

Cheers

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



[android-developers] Re: activity is destroyed when press home key

2009-09-28 Thread Johan Schöring

That's what the documentation says, but that's not what the
ActivityManager does.

>From what I can see, the problem lies in the following code:
http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=services/java/com/android/server/am/ActivityManagerService.java;h=a473db2740abe124b7867d0ea6313eb8c0ca7a7d;hb=5550ef48739a7bb16f80aa6b10e9c151b1438163#l

The if-statement on line  causes the activity stack to be cleared
if the launch mode is singleTask, regardless of the state of
FLAG_ACTIVITY_CLEAR_TOP... In my opinion, this is a bug, as the
documentation you quoted clearly says that the stack should be
preserved on a singleTask activity.

I'm going to submit a patch for this, but I'm writing here so others
who find this thread know that this behaviour is not their fault but a
bug.

// Johan


On Sep 24, 10:02 pm, "Justin (Google Employee)" 
wrote:
> Fromhttp://developer.android.com/guide/topics/fundamentals.html#acttask
>
> "As noted above, there's never more than one instance of a
> "singleTask" or "singleInstance" activity, so that instance is
> expected to handle all new intents. A "singleInstance" activity is
> always at the top of the stack (since it is the only activity in the
> task), so it is always in position to handle the intent. However, a
> "singleTask" activity may or may not have other activities above it in
> the stack. If it does, it is not in position to handle the intent, and
> the intent is dropped. (Even though the intent is dropped, its arrival
> would have caused the task to come to the foreground, where it would
> remain.)"
>
> Cheers,
> Justin
> Android Team @ Google
>
> On Sep 24, 11:45 am, justinh  wrote:
>
>
>
> > When users press on your icon again to "come back" they are launching
> > your activity, not the settings activity. Where do you start the
> > settings activity in your code? If it's outside of the onCreate/
> > onStart/onResume methods then the user will have to repeat that action
> > to get back there.
>
> > On Sep 24, 2:58 am, play_net  wrote:
>
> > > My manifest:
> > >         > > android:name="MainUI" android:screenOrientation="landscape"
> > >                         android:configChanges="orientation|keyboardHidden"
> > > android:launchMode="singleTask">
> > >             
> > >                 
> > >                  > > android:name="android.intent.category.LAUNCHER" />
> > >             
> > >         
> > >         > > android:name=".view.Settings"  android:configChanges="orientation|
> > > keyboardHidden">
> > >         
>
> > >    I press program's icon to start my program,and then open the
> > > Settings activity through startActivityForResult(intent, SETTINGS).
> > > Now i press the  home key  and start my program through program's
> > > icon, at this time the Settings actitity will run OnDestroy() and be
> > > destroyed. I can't understand why Settings activity is be destroyed
> > > automatically? How can I make Settings activity still focus when users
> > > come back.
>
> > > Thank all.

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



[android-developers] jsonarray as listview source

2009-09-28 Thread vorcigernix

Hello,
I made my application from various examples and sources, so now I have
filled jsonarray and prepared listview (with custom rows formatting).
Now I need to replace

ListAdapter myAdapter =(new ArrayAdapter
(this,R.layout.rowlayout, R.id.TextView01, values));

with my json array based adapter. All I found is some technique to
iterate through all json records and construct string array. It sound
like perverse to me, is it really necessary?

Thanks for any help
Adam

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



[android-developers] Re: map overlay issue

2009-09-28 Thread Michael Rueger

Mark Murphy wrote:

 >> so how can I do for remove one mark only?
 >
 > There is no direct API for that as far as I can see. You may need to
 > create a new ItemizedOverlay with the reduced set of marks, remove the
 > old ItemizedOverlay from the getOverlays() collection, and add in the
 > replacement. Or, you could try calling populate() again and see if that
 > will clear and re-add all of the marks (minus whichever one you are
 > trying to get rid of).

the latter one. And you need to clear the focus index, the name of the 
call escapes me right now.

Michael

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



[android-developers] Painting using Accelerometer ?

2009-09-28 Thread ginnie

Hi all,

My first post :)
needed help..

I wanted to develop an android application with which you can draw
images on screen by just moving the device (using accelerometer /
magnetic field/ orientation..)

Like AirPaint for iphone: http://www.trapcode.com/AirPaint.html

I wanted to know if thers any existing app which does this ..
Any code-snippet I can leverage..
Any place where i can get more info..


Thanks

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



[android-developers] Re: Progress bar not visible with a white background in 1.6 sdk

2009-09-28 Thread Steven Rudenko

There are some themes of activity which can help You with UI. When You
are using dark backgrounds use @android:style/Theme.Black theme
otherwise use @android:style/Theme.Light. These styles will provide
correct colors to all controls (like progress bar).

On Sep 21, 1:35 pm, And-Rider  wrote:
> when i ran my old application in 1.6 i noticed that the progress bar
> was not showing up on the screen.When i analyzed it further i found
> the issue.The progress bar is getting activated but its not visible
> since my background color is also white.When i changed the background
> color i was able to see the progress bar.Is there no other way to make
> the progress bar visible other than changing the background
> color..Shouldn't the progress bar be visible under all background
> colors??

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



[android-developers] Getting media information that is being played

2009-09-28 Thread Alex

Is there a way that I can get the media information (song title,
genre, artist, etc) that is being played in the default music player?

Does the default music player allows sharing of these kind of
information?

Thanks.

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



[android-developers] Re: Missing timezone

2009-09-28 Thread Simon

I have a similar problem.  I am in Pakistan where the timezone is
normally GMT + 5.  However at the moment we are in + 1 DST, i.e. GMT +
6.  Android thinks that Pakistan is GMT + 5 throughout the year.  I
have the same problems as you with text message and google calendar
times.  I too would appreciate any advice or suggestions to manually
correct this.

Thanks

Simon

On Sep 28, 6:07 am, Lox  wrote:
> Hello,
>
> The timezone for New Caledonia is missing from android.
>
> It is GMT +11 with  NO daylight saving time.
>
> Android auto-detects me in NewCaledonia on my Hero but automatically
> uses Magadan (GMT+11) and applies +1 hour of daylight saving time to
> it, so, it shows the wrong time...
>
> If I manually set the time back one hour, incoming SMS time is wrong
> and I have a problem of time with google calendar sync too.
>
> I had a look to Donut using SDK 1.6: it still has a problem with
> missing NewCaledonia timezone.
>
> So I went to android 1.6-rc1 source folder in /development/tools/
> zoneinfo and found what seems to be a 2008h version. I ran the
> generate script and got the two files: zoneinfo.dat and zoneinfo.idx.
>
> I pushed both on the emulated android (donut). If I go to change
> timezones in parameters, all places are showing GMT+0:00...
>
> Any advice really appreciated.
>
> Regards.

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



[android-developers] multiline TextView in TableLayout

2009-09-28 Thread alys

Hello,

I fill a TableRow with two TextViews programmatically from a HashMap,
but my text is too long and it doesn't appear in multiline.

Does anybody have a solution?

Thanks

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



[android-developers] Re: zipalign : could be done at distribution or installation time ?

2009-09-28 Thread Sheridan Hutchinson

I just cannot understand why when a developer uploads an application,
why Google themselves don't automatically zipalign the application.

I just cannot undestand why the compiler doesn't zipalign
automatically every final APK produced.

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



[android-developers] Re: ADC2: Low volume of judges

2009-09-28 Thread Warren

It's true that some apps will be rated lower because they don't apply
to the user doing the judging. For instance I judged an app that was
designed specifically for users in Paris. It was low for me on the
indispensability scale as it would be for most people not in Paris.

BUT if it is clear from the outset that the app does not apply to you,
then you might skip it. This could lead to higher concentration of
judges who say, "Ahh, an app that serves my niche!" actually scoring
the app. For instance, an app named, "Find the Closest Bathroom in
Paris" would probably be skipped quite a bit by people not in Paris.
You might end up with 75% of the judges for that app actually being
from Paris. But if the app is called "Bathroom Finder" and gives no
hint that it is geographically limited, you'd get no such effect.

 Who knows? This is all just conjecture and guessing.  The effects
might balance each other out. They might not. There won't be a clear
picture until Google releases some results... maybe not even then.


On Sep 28, 12:12 pm, "ander...@phdgaming.com" 
wrote:
> > I have really tested maybe a dozen apps for the moment, and most of
> > them did not reach more than 2 stars in every line, because they are
> > not working, are one version of a concept among a hundred similar
> > implementations, or because they don't answer MY needs. This is true
> > for every other revewers, and it has to be like this if we really want
> > to see emerging the real best apps. There is no place for poor apps,
> > this is a contest for really outstanding apps that will show all the
> > power of the android platform against the others.
>
> I don't really agree with the "MY needs" line personally. We are
> acting as judges - and therefore should also take into consideration
> how an application would be useful to others. For example, I
> personally dislike most social networking applications, and do not
> even bother to use twitter or facebook outside of Android. Rating most
> social network application badly and giving them "1s" in
> indispensability due to my personal preference would not be right, in
> my opinion. Of course, I do skip most of those related to this
> category, just saying I think there might sometimes be more to it than
> "what does this app do for me".
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: ADC2: Low volume of judges

2009-09-28 Thread ander...@phdgaming.com

> I have really tested maybe a dozen apps for the moment, and most of
> them did not reach more than 2 stars in every line, because they are
> not working, are one version of a concept among a hundred similar
> implementations, or because they don't answer MY needs. This is true
> for every other revewers, and it has to be like this if we really want
> to see emerging the real best apps. There is no place for poor apps,
> this is a contest for really outstanding apps that will show all the
> power of the android platform against the others.

I don't really agree with the "MY needs" line personally. We are
acting as judges - and therefore should also take into consideration
how an application would be useful to others. For example, I
personally dislike most social networking applications, and do not
even bother to use twitter or facebook outside of Android. Rating most
social network application badly and giving them "1s" in
indispensability due to my personal preference would not be right, in
my opinion. Of course, I do skip most of those related to this
category, just saying I think there might sometimes be more to it than
"what does this app do for me".
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: zipalign : could be done at distribution or installation time ?

2009-09-28 Thread Dianne Hackborn
I don't think market will ever run it (it really doesn't want to make any
changes to the apps it is distributing).  At some time in the future we'd
like to consider having the platform do it during install, but this is a
lower priority than a lot of other things.  If someone wants to contribute
code to do it, I am sure we'd be interested.

2009/9/28 Cédric Berger 

>
> I just noticed about zipalign
> http://developer.android.com/guide/developing/tools/zipalign.html
>
> This optimization is to be done after the apk is done / signed.
>
> Does this mean that zipalign may be run by the Market itself ?
> Or even by android at install time on the phone ?
>
> >
>


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

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

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



  1   2   >