[android-developers] Is it possible to make an Android device appear as a Bluetooth speaker?

2014-10-28 Thread petter
Is it possible to make an Android phone appear as a Bluetooth speaker? Any sample code or blogs describing how this can be done, if possible? 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] How to control the initial emulator window position under Linux?

2013-01-23 Thread petter
Quite often when I launch the emulator the window will be placed outside the screen. Mostly the title bar will be located above the top of my screen. In my window manager (sawfish) I can only resize the window when grabbing the sides and bottom. I don't experience this with other applications.

[android-developers] Re: How to control the initial emulator window position under Linux?

2013-01-23 Thread petter
Thank you. Using ALT and moving the window with the left mouse button seem to work fine under sawfish as well. Even though my screen is tall enough for the emulator window it will place off the top... On Wednesday, January 23, 2013 6:40:49 PM UTC+1, petter wrote: Quite often when I launch

[android-developers] Re: How to keep -pre-build across android update project?

2012-08-06 Thread petter
Is there a know work-around for this somewhat annoying problem? On Monday, January 23, 2012 8:01:26 PM UTC+1, petter wrote: How to keep -pre-build across android update project? It seems like buld.xml has a section where one can uncomment and customize the -pre-build and other targets

[android-developers] Re: How to keep -pre-build across android update project?

2012-01-24 Thread petter
Seem to be a known issue: http://code.google.com/p/android/issues/detail?id=23225 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send

[android-developers] How to keep -pre-build across android update project?

2012-01-23 Thread petter
How to keep -pre-build across android update project? It seems like buld.xml has a section where one can uncomment and customize the -pre-build and other targets: !-- extension targets. Uncomment the ones where you want to do custom work in between standard targets -- !-- target

[android-developers] How can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread petter
How can I get a user-defined sysproperty in an Android app? In a plain Java app I can do something like: target name=run depends=git.revision java classname=main fork=true sysproperty key=git.revision value=${git.revision}/ /java /target And in main.java I do:

[android-developers] Re: How can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread petter
On Jan 19, 5:19 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Fri, Jan 20, 2012 at 1:14 AM, petter petter.gus...@gmail.com wrote: How can I get a user-defined sysproperty in an Android app? In a plain Java app I can do something like:    target name=run depends=git.revision

[android-developers] Re: How can I get a user-defined sysproperty in an Android app?

2012-01-19 Thread petter
On Jan 19, 5:20 pm, Mark Murphy mmur...@commonsware.com wrote: On Thu, Jan 19, 2012 at 11:14 AM, petter petter.gus...@gmail.com wrote: How can I get a user-defined sysproperty in an Android app? There is no such concept in Android. In a plain Java app I can do something like

[android-developers] Re: How to clone a button defined in the resource file?

2012-01-02 Thread petter
use LayoutInflater Thanks a lot. Exactly what I was looking for. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] How to clone a button defined in the resource file?

2011-12-30 Thread petter
In my application I dynamically create buttons, but it would be better if I could specify a button in the resource file and then clone it to inherit its style, size, etc. But how do you clone a button or other view object? I've tried to call .clone() but I seem to get all sorts of errors and

[android-developers] Re: DataBaseHelpers and multiple tables?

2011-12-10 Thread petter
On Dec 9, 4:43 pm, Chris crehb...@gmail.com wrote: On Thursday, December 8, 2011 3:38:51 PM UTC-5, petter wrote: No guidelines or code samples for using databases with multiple tables? Simple.  Eg:, from the link you gave: For example to run a query() you can do the following:  return

[android-developers] Re: DataBaseHelpers and multiple tables?

2011-12-08 Thread petter
No guidelines or code samples for using databases with multiple tables? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] DataBaseHelpers and multiple tables?

2011-11-02 Thread petter
Most of the DataBaseHelper examples I've seen only have a single table (e.g. http://www.vogella.de/articles/AndroidSQLite/article.html). Are there any guidelines for making DataBaseHelpers where the database have multiple tables? -- You received this message because you are subscribed to the

[android-developers] Re: BufferedReader hangs on readline

2011-09-12 Thread petter
On Sep 12, 12:45 am, Nick Risaro nris...@gmail.com wrote: On Sun, Sep 11, 2011 at 5:54 PM, petter petter.gus...@gmail.com wrote: Are end of line characters handled differently in Android? Probably, the EoL is encoding dependent. Try forcing the encoding to something like UTF-8 in both ends

[android-developers] BufferedReader hangs on readline

2011-09-11 Thread petter
I'm trying to read a response from a server and BufferedReader.readline will block and never return. If I run the exact same code from the command line on my Linux host it works, but it will hang when run on my emulator or device. Here's the code try {

[android-developers] Re: BufferedReader hangs on readline

2011-09-11 Thread petter
Are the end of line characters treated differently? It seem to work fine if I use char[] buf = new char[8192]; On Sep 11, 7:14 pm, petter petter.gus...@gmail.com wrote: I'm trying to read a response from a server and BufferedReader.readline will block and never return

[android-developers] Re: BufferedReader hangs on readline

2011-09-11 Thread petter
It seem to work if I use read instead of readline like: char[] buf = new char[8192]; int charsRead; charsRead = d.read(buf,0,buf.length); Are end of line characters handled differently in Android? -- You received this message because you are

[android-developers] Samsung Galaxy Tab as a development target?

2011-07-18 Thread petter
I was planning on getting a Galaxy Tab as a development target for testing my apps etc. But I noticed that the device lacks a USB connector. How can I connect to the Tab using adb? Can I run adb over WLAN? -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: Samsung Galaxy Tab as a development target?

2011-07-18 Thread petter
Thank you for your reply. I was not aware that it came with a cable? I read a rating of the tablet somewhere and somebody said one of the cons was the lack of a USB port. On Jul 18, 8:26 pm, Chrystian Vieyra chrys.vie...@gmail.com wrote: You can use the Galaxy tab as a development target,

[android-developers] Re: Samsung Galaxy Tab as a development target?

2011-07-18 Thread petter
Again thanks. Seems like there is a docking to USB connector which comes with it. On Jul 18, 8:41 pm, Chrystian Vieyra chrys.vie...@gmail.com wrote: http://www.amazon.com/gp/customer-media/product-gallery/B00519RW1U/re... -- You received this message because you are subscribed to the Google

[android-developers] Re: Samsung Galaxy Tab as a development target?

2011-07-18 Thread petter
BTW, is it easy to replace the US power connector with an European one? On most laptop chargers one can simply replace entire cord to the charger. Is this possible with the Galaxy Tab 10.1? On Jul 18, 8:41 pm, Chrystian Vieyra chrys.vie...@gmail.com wrote:

[android-developers] Re: Samsung Galaxy Tab as a development target?

2011-07-18 Thread petter
OK great, thanks for the explanation. That means that I've probably have several power connectors already, both US and European ones... On Jul 18, 9:05 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Just use your charging cable. It functions as an USB cable as well. The proprietary

Re: [android-developers] Post on Facebook wall post for beginner

2011-02-03 Thread Mozart Petter
There's a good example that comes with the Facebook SDK. The only thing that I've changed on that code, is to publish a message on the users wall without using the webview. Here's the code: https://gist.github.com/807825 Regards Mozart Petter http://www.mozartpetter.com/ On Wed, Feb 2, 2011

[android-developers] Sample code for service?

2011-01-20 Thread petter
I'm looking for a complete minimalistic code sample for a service. Does such a thing exist? I've tried, but get some errors which I assume is related to inconsistency between my xml and java code. I'm simply using ant and and the CLI tools, e.g. not Eclipse. -- You received this message because

[android-developers] Re: Sample code for service?

2011-01-20 Thread petter
Thank you. It seem to be a problem with my xml file. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to

[android-developers] Re: Sample code for service?

2011-01-20 Thread petter
Did you try looking at the documentation? Because the Service class docs themselves have a minimalistic example. If you by documentation refer to http://developer.android.com/reference/android/app/Service.html, yes. But my problem is probably not the java code, but appears to be that my xml

[android-developers] Re: Sample code for service?

2011-01-20 Thread petter
Yes I looked at http://developer.android.com/reference/android/app/Service.html, but my problem appears to be with the xml file, and not the java code itself. Hence I wanted a complete minimalistic example to learn how these are tied together in a service. -- You received this message because

[android-developers] How do I override

2010-09-24 Thread petter
templates/android_rules.xml has a javac rule which says: javac encoding=ascii ... How can I override this to use UTF-8 from my own build.xml file? It seems like one should be able to use presetdef to override this, but I can't figure out how. //Petter -- You received this message because you

[android-developers] Re: How do I override

2010-09-24 Thread petter
Thank you for your reply Xavier. OK, I'll just duplicate the whole compile target which seem to work fine, except that I was hoping to find a way of simply overriding the single encoding attribute... //Petter -- You received this message because you are subscribed to the Google Groups Android

[android-developers] Re: Android eclair: playing videos

2010-05-19 Thread petter
nevermind i solved it On May 6, 9:39 am, petter havlenap...@gmail.com wrote: Hi I have compiled android eclair version 2.1 on my htc sapphire 32A and everything works great up to playing videos. When I ran playing a any video on device, android player starts and I see only black screen. Sound

[android-developers] Android eclair: playing videos

2010-05-06 Thread petter
Hi I have compiled android eclair version 2.1 on my htc sapphire 32A and everything works great up to playing videos. When I ran playing a any video on device, android player starts and I see only black screen. Sound is working properly, but something happens when bites from video are copied to

[android-developers] Re: AVD which resembles the Nexus One?

2010-03-18 Thread petter
On Mar 16, 6:07 pm, Kumar Bibek coomar@gmail.com wrote: Try with WVGA800 and SDK 2.1 or 2.0 Thank you for your reply. But what about flash size, ram size, touchscreen, and other properties? -- You received this message because you are subscribed to the Google Groups Android Developers

[android-developers] AVD which resembles the Nexus One?

2010-03-16 Thread petter
Where can I find an AVD or AVD spec for the emulator which match the Nexus One? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send

[android-developers] Re: how to add openobex to android

2009-09-21 Thread petter
I think too, but for me it is hard to compile for android by ./ configure and make with NDK. Yes you can create *.so file, but you must create makefile for it and it will not be easy, if you will succeed, please write me info. On Jul 23, 11:51 am, lm llming2...@sina.com wrote: I am a new man to

[android-developers] Re: fire up onKeyDown

2009-08-30 Thread petter
nevermind, I already solved it throw Instrumentation::sendKeyDownUpSync (int keyCode); On Aug 24, 2:42 pm, petter havlenap...@gmail.com wrote: Hi, I' d like to fire up onKeyDown() event from my source code (for example from Activity). I want it, because i'd like to create program for remote

[android-developers] fire up onKeyDown

2009-08-24 Thread petter
Hi, I' d like to fire up onKeyDown() event from my source code (for example from Activity). I want it, because i'd like to create program for remote keyboard, which will be PC keyboard. PC will send to mobile throw Socket message and mobile will fire up event from message in socket. Message will