[android-developers] Re: multiple successive queries to a database
What's the error message in the system log? On Tue, Apr 14, 2009 at 10:38 PM, iki qui.af...@gmail.com wrote: The application has stopped unexpectedly. Please try again. One query always works. Two consecutive queries works about 75% of the time. Three consecutive queries works about a third. Four consecutive queries works about 10% Five doesn't seem to work at all (it worked once out of many tries). On Apr 13, 12:15 am, Ralf ralfo...@gmail.com wrote: What kind of crash do you get? Is this a force close or an exception? R/ On Thu, Apr 9, 2009 at 9:26 PM, iki qui.af...@gmail.com wrote: Has anyone other than me needed to make consecutivequeriesto a sqlitedatabase? My application works sometimes but other times (about 98% of the time), the app will crash. What I'm doing is using the sqlitedatabase.query(..) to return a cursor which I parse, I makemultiplesuccessivequeriesto the database and parse different recordsets/cursors. My question would be does a sqlitedatabase need to recover or clean up after a .query is issued? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Place to feedback to Android Engineers?
There is an indication that after cupcake goes gold the open repository may be the centre of development [1]. This should mean that once a fix is in you can roll your own SDK if you need it, or make use of one of the nightly builds that Mark Murphy is trying to organise [2]. Al. [1] http://groups.google.com/group/android-developers/msg/ad7c51e390dce980 [2] http://groups.google.com/group/android-discuss/browse_thread/thread/5ae1b9b7 f32431b8 --- * Written an Android App? - List it at http://andappstore.com/ * == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Zi Yong Chua Sent: 15 April 2009 03:57 To: Android Developers Subject: [android-developers] Place to feedback to Android Engineers? Hi people, I was looking at how iPhone 3.0 beta is doing and I was pleasantly surprise how fast Apple is able to push out bug fixes and UI changes that matters within the short time span (i think they already had 2 beta updates). Taking off from that, I am wondering is there a streamlined channel for developers to feedback similar issues to the Android engineers at Google in this way to improve on not just the SDK but also the overall UI and experience... Just thinking a loud =) If there is one, pls let me know too. I am now running on the cupcake firmware done by Haykuro from XDA (http://www.codeandroid.org/ 2009/04/13/htc-dream-running-on-version-15-aka-cupcake-magic-build/) and is loving the update. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 to signature for Camera.setPreviewDisplay() in 1.5
Camera.setPreviewDisplay() now throws an IOException. Is there a reason this had to be a checked exception (looking at the source code I can't an see an immediate one)? Or is it just an oversight that will be fixed before releasing the final SDK? The consequence is that one cannot have code that will compile for both 1.1 and 1.5 without doing something ugly like adding a blanket try/catch, or a dummy throw like: try { mCamera.setPreviewDisplay(holder); if (false) throw new IOException(); } catch (IOException e) { /*handle exception*/ } Tom. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: multiple successive queries to a database
Please look at the adb logcat error message (also Eclipse DDMS perspective logcat). R/ On Tue, Apr 14, 2009 at 10:38 PM, iki qui.af...@gmail.com wrote: The application has stopped unexpectedly. Please try again. One query always works. Two consecutive queries works about 75% of the time. Three consecutive queries works about a third. Four consecutive queries works about 10% Five doesn't seem to work at all (it worked once out of many tries). On Apr 13, 12:15 am, Ralf ralfo...@gmail.com wrote: What kind of crash do you get? Is this a force close or an exception? R/ On Thu, Apr 9, 2009 at 9:26 PM, iki qui.af...@gmail.com wrote: Has anyone other than me needed to make consecutivequeriesto a sqlitedatabase? My application works sometimes but other times (about 98% of the time), the app will crash. What I'm doing is using the sqlitedatabase.query(..) to return a cursor which I parse, I makemultiplesuccessivequeriesto the database and parse different recordsets/cursors. My question would be does a sqlitedatabase need to recover or clean up after a .query is issued? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 XMLRPC client
Hey thanks for the reply. Do you mean that WSDL files need to be parsed only using a SOAP library and not the XML RPC library? Is this XML RPC client to parse just pure XML files? On Apr 8, 4:02 pm, skink psk...@gmail.com wrote: Sandy wrote: seems there has some bugs when parsering struct data. Sandy, did you download sources via svn? attached tar.gz may have some problems when parsing structs from old legacy servers --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] HttpsURLConnection
Hi, I need to open a HttpsURLConnection with my own certificate. I've found this for Java (not Android) on http://forums.sun.com/thread.jspa?threadID=411937messageID=1886339 public static String readFromURL( String httpsUrl, String login, String password ) throws NoSuchAlgorithmException, KeyManagementException, MalformedURLException, UnknownHostException, IOException { // Variabeln TrustManager[] trustAllCerts; SSLContext sc; URL url; HttpsURLConnection connection; String s; String base64; BufferedReader reader; StringBufferstr; String line; trustAllCerts = new TrustManager[] { new X509TrustManagerImpl() }; // Let us create the factory where we can set some parameters for the connection sc = SSLContext.getInstance( SSL ); sc.init( null, trustAllCerts, new SecureRandom() ); // Create the socket connection and open it to the secure remote web server url = new URL( httpsUrl ); HttpsURLConnection.setDefaultSSLSocketFactory( sc.getSocketFactory () ); connection = (HttpsURLConnection)url.openConnection(); // Once the connection is open to the remote server we have to replace the default HostnameVerifier // with one of our own since we want the client to bypass the peer and submitted host checks even // if they are not equal. If this routine were not here, then this client would claim that the submitted // host and the peer host are not equal. connection.setHostnameVerifier( new HostnameVerifierImpl() ); // Make this URL connection available for input and output connection.setDoOutput( true ); // Login s = login + : + password; base64 = Basic + new BASE64Encoder().encode( s.getBytes () ); connection.setRequestProperty( Authorization, base64 ); connection.connect(); // vom Stream lesen und als String zurückgeben reader = new BufferedReader( new InputStreamReader ( connection.getInputStream() ) ); str= new StringBuffer(); while( (line = reader.readLine()) != null ) { str.append( line + \n ); } return( str.toString() ); } public class X509TrustManagerImpl implements X509TrustManager { // Log4J private static Logger logger = Logger.getLogger ( X509TrustManagerImpl.class ); /** * Return an array of certificate authority certificates which are trusted * for authenticating peers. * @return codeX509Certificate[]/code - Return an array of certificate * authority certificates which are trusted for authenticating peers. */ public X509Certificate[] getAcceptedIssuers() { return( null ); } /** * Given the partial or complete certificate chain provided by the peer, * build a certificate path to a trusted root and return if it can be * validated and is trusted for client SSL authentication based on the * authentication type. The authentication type is determined by the * actual certificate used. For instance, if RSAPublicKey is used, the * authType should be RSA. Checking is case-sensitive. * @param chain codeX509Certificate[]/code the peer certificate chain * @param authType codeString/code the authentication type based on * the client certificate */ public void checkClientTrusted( X509Certificate[] chain, String authType ) { } /** * Given
[android-developers] Re: Use SDK 1.5 features while maintaining SDK 1.0,1.1 backward compatibility
If the amount of 1.5 code is small, you can use reflection to make the calls in order to fool the verifier. This quickly becomes a pain in the butt when you have to call more than a few 1.5 methods or work with multiple 1.5 objects though. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Related about progrssbar
Hi Android developer My Question is related about progressbar(Horizantal) . i have created a progressbar using XMl Code but i want to change the Progress Color(yello) .plz tel me how to change the progress Color from Yellow to Blue thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 on earth do you access command line?
That error may mean two things: 1- Do you have Java installed? You probably got one for Eclipse. If not, get the latest from java.sun.com. 2- If you have java installed, it's not in the path by default. To fix #2: - open Control Panel System, - Advanced tab - Environment Variables button at the bottom - Add the JRE bin to the path, e.g. edit the path variable to add something like this at the end: ;C:\Program Files\Java\jre1.6.0_07\bin - Say OK tons of time - Re-open your command prompt and try again. R/ On Tue, Apr 14, 2009 at 9:22 PM, schwiz sch...@gmail.com wrote: thanks for the reply but when I am getting an error. Here is a copy of the command and the error. Any ideas? C:\Users\...\Desktop\eclipse\android-sdk-windows-1.5_pre \toolsandroid create avd --name myAVD2 --target 2 'java' is not recognized as an internal or external command, operable program or batch file. On Apr 14, 12:18 am, Raphael r...@android.com wrote: First open a dos box, also called a Command prompt: Under XP: Start menu all programs accessories command prompt Under Vista just search for command prompt in the Start seach box. Then use the cd command (=change dir) to change the directory to where you installed the SDK. If you want to make things easy, just place the sdk in c:\sdk using the windows explorer and type this: c: return cd \sdk\tools return Then you can create your AVD like this: android create avd --name myAVD1 --target 1 return android create avd --name myAVD2 --target 2 return The target 1 will be for Android 1.1 and target 2 for Android 1.5 Let us know if that helps. Google command prompt tutorial for more help :-) R/ On Mon, Apr 13, 2009 at 9:53 PM, schwiz sch...@gmail.com wrote: So im wanting to fiddle around with the new sdk but I never learned how to use command line in any IDE (does my school just suck or is it not very common) Anyways I need to create an AVD with the command line can someone please tell me the steps or tell me somewhere I can read up on this. Ive tried google searching command line eclipse, but the only results I get are nifty commands I can use once I actually find out how to get a command line. Im using windows. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] What the difference of this pointer?
I see some of the examples contain such code to refer to this pointer: mProgressDialog = new ProgressDialog(AlertDialogSamples.this); So this usage has some special meaning other than the standalone this? Thanks. Bin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: set activity label in activity code
On Tue, Apr 14, 2009 at 7:54 AM, zeeshan genx...@gmail.com wrote: Hi Experts, i need to change activity label on the title bar in my code. Activity.setTitle() R/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Use SDK 1.5 features while maintaining SDK 1.0,1.1 backward compatibility
A more straightforward approach that should work is to isolate the affected code behind an interface, with separate implementations for 1.1 and 1.5. A factory method can be used to opaquely return the correct instance based on the build's sdk version. This has the advantage that you can usually hold onto a reference to the appropriate implementation and avoid repeatedly checking the version number. It does add the cost of a interface method call, but that's perfectly acceptable in most instances - if not, it's usually because the work is being done in an inner loop, in that case you generally need to replicate the loop for both implementations. Tom. 2009/4/15 Pieter s...@gamesquare.nl If the amount of 1.5 code is small, you can use reflection to make the calls in order to fool the verifier. This quickly becomes a pain in the butt when you have to call more than a few 1.5 methods or work with multiple 1.5 objects though. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SDK 1.5, Unable to load XML wizard
Which version of Eclipse are you using? Could you check the workspace/.metadata/.log for any detailed error and post them or send privately? R/ On Tue, Apr 14, 2009 at 6:43 AM, Al alcapw...@googlemail.com wrote: I'm trying to make a new XML file and have selected New-Android XML File, but each time I get this message: The selected wizard could not be started. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.editors.wizards.NewXmlFileWizard. com.android.ide.eclipse.editors.wizards.NewXmlFileWizard The problem is only with the XML file creator, I can create a new Android Project fine. I'm using ADT 0.9 Pre release and have installed it as per the instructions on the doc page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Related about progrssbar
Take a peek at how the default progress bar drawable is defined in XML: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/res/res/drawable/progress_horizontal.xml;hb=cupcake Make your own drawable with custom colors, then reference it using android:progressDrawable. j On Apr 14, 11:22 pm, Rahul nakate.ra...@gmail.com wrote: Hi Android developer My Question is related about progressbar(Horizantal) . i have created a progressbar using XMl Code but i want to change the Progress Color(yello) .plz tel me how to change the progress Color from Yellow to Blue thank you --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 built a resident app ??
On Mon, Apr 13, 2009 at 11:22 PM, QQ d9147...@gmail.com wrote: I have to built a resident application, but I have no idea to do that Look for services here: http://developer.android.com/guide/topics/fundamentals.html R/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add view in new layer?
On Tue, Apr 14, 2009 at 2:58 AM, alexander.ku...@gmail.com alexander.ku...@gmail.com wrote: I need show ads in application. Ads in my custom view must move from bottom of screen with animation. How can I add my view in bottom of screen as new layer or help me find other method? Check the various Layout classes to see if they provide the screen layout you have in mind. It's not clear what you want. If you want to stack things, try the FrameLayout. R/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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:style/Theme.Translucent stumped
Yea, sadly this is a known issue. It ends up the activity history stack is somehow deciding that the window is fullscreen (and therefore doesn't need to render anything behind it, leaving it black). This only happens when you try /inheriting/ from the framework themes. Using @android:style directly will still treat them as non- fullscreen, which punches through the black background as expected. One workaround is to start with a nearly-blank theme (like Panel or Transluent) and then render what you need in your own layout (such as dialog edges, etc). I spent a few days tracking this down, and I didn't find any other workarounds. Hope this helps. j On Apr 14, 8:23 pm, William william.caine...@gmail.com wrote: OK I am trying to overload the android:style/Theme.Translucent theme but when I do so the background becomes black, not translucent. styles.xml has this. simple enough right? style name=Theme.Translucent parent=android:style/ Theme.Translucent /style when my AndroidManifest.xml has this using the system translucent it works fine activity android:name=.tabs.ViewItem android:theme=@android:style/Theme.Translucent /activity BUT when my AndroidManifest.xml has this using my overridden translucent theme from style.xml it makes the background black??? all i did was override the theme. i didn't change anything yet? activity android:name=.tabs.ViewItem android:theme=@style/Theme.Translucent /activity --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: What the difference of this pointer?
It's necessary to use the AlertDialogSamples.this syntax in an inner class when you want to refer to an ancestor class instance. Basically it disambiguates this which becomes overloaded when you have nested class instances. Because field accesses and method calls on an enclosing class are automatically inferred for an inner class, you usually only need this special syntax when you need a reference to the enclosing instance (as in the example you give). Tom. 2009/4/15 Bin Chen binary.c...@gmail.com I see some of the examples contain such code to refer to this pointer: mProgressDialog = new ProgressDialog(AlertDialogSamples.this); So this usage has some special meaning other than the standalone this? Thanks. Bin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: App widgets and remote views
Awesome, great to hear people are jumping into it. :) For performance, the one thing to keep in mind is that each widget update will spin up your process, which is somewhat expensive. (So you probably want to avoid updating more often than once per hour to help save battery.) Also, while pushing bitmaps across RemoteViews is possible, it /is/ expensive. We experimented with pushing modified full-size album art to a larger desktop widget and started triggering ANRs in other foreground apps because it was so expensive. One lightweight method to write a clock would be to use a combination of animated/leveled drawables. Using an example of a single digit from a base-10 clock, you might have something like this: level-list xmlns:android=http://schemas.android.com/apk/res/ android item android:maxLevel=0 animation-list xmlns:android=http://schemas.android.com/apk/ res/android android:oneshot=false item android:drawable=@drawable/digit0 android:duration=6 / item android:drawable=@drawable/digit1 android:duration=6 / ... item android:drawable=@drawable/digit9 android:duration=6 / /animation-list /item ... item android:maxLevel=5 animation-list xmlns:android=http://schemas.android.com/apk/ res/android android:oneshot=true item android:drawable=@drawable/digit5 android:duration=6 / ... item android:drawable=@drawable/digit9 android:duration=6 / /animation-list /item /level-list Where the levels would be used when performing a clock update mid- cycle. Then, performing an exact update at an hour edge to start it down the full 0-9 repeating cycle. Each of the digits above lasts for a full minute before changing, so you would bump that to 60ms for the minute 10's digit. And updating the hour digits manually each hour might work nicely. However, I'm not sure if it the animated drawable will correctly catch up if you leave the screen for a period of time, as it might continue the animation where you left off. Worth peeking into. :) Also is there a way for thewidgetprovider to know (receive a hint for) the size at which thewidgetwill be rendered? This is useful in this instance since one doesn't want to make the bitmap any larger than necessary. There isn't right now, but if you use drawables defined using shape instead of bitmaps, it should scale nicely. A final question: is there a way for a provider to request that a wedget be 'oversized' (like the search bar or media control)? When you say oversized, you mean filling multiple cells? Setting the minimum size should let you take up multiple cells. Here's a quick equation that should work: Minimum size in dip = (Number of cells * 74dip) - 2dip j --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: emulator speed
Note that if you use Eclipse, there's a huge difference whether you use the debug launch mode or the run launch mode. The debug mode can be 2 to 20 times slower depending on the kind of computation done by your application compared to the run mode. R/ On Tue, Apr 14, 2009 at 1:03 PM, Dianne Hackborn hack...@android.com wrote: Basically, no. There is a simulator, but it is very poorly supported, has no integration with eclipse, and has pretty poor fidelity with the behavior of a real system since it does things like run the entire system and applications in a single process. Also the emulator should run with at least the speed of the actual device (not taking into account things that use hardware acceleration like OpenGL) on reasonably decent desktop hardware. Finally, developing directly on a device is for the most part not much different than developing for the emulator, so if your machine is too slow to run the emulator, it is perfectly viable to just do all your development with the real device as your target. On Tue, Apr 14, 2009 at 8:34 AM, a druid klausf...@gmail.com wrote: Hi, Just a small newbie question: I understand, that the Android emulator is by definition and scope slower than an I-phone simulator. However: There are apps, which have to run on an emulator in order to emulate hte entire HW. However for a lot of algorithmic / GUI stuff a simulator would be more than enough. Is there any alternative to the emulator, which could be used for verifying the GUI / algorithmic part or the part, which just interacts with API's, that exist also on a PC? Basically is there something like a dalvik viewer for linux / windows ? thannks ina dvance for any pointers. This might help to accelerate development. On Apr 14, 10:59 am, walterc weih...@gmail.com wrote: we use emulator in android sdk which emulates the entire hardware stack, down to cpu instructions. iphone sdk uses simulator which does nothing of the sort. On Apr 14, 4:33 pm, admin.androidsl...@googlemail.com admin.androidsl...@googlemail.com wrote: PC is fairly up-to-date spec - AMD Athlon X2 2 GHz, 2 GB's of RAM. Mac I don't have (yet), but I have been trolling on iPhone forums and have heard that iPhone emulator is unrealistically fast. On Apr 14, 9:04 am, Al Sutton a...@funkyandroid.com wrote: What are the specs of the PC and Mac you're trying it on? Al. --- * Written an Android App? - List it athttp://andappstore.com/* == Funky Android Limited is registered in England Wales with the company number 6741909. The registered head office is Kemp House, 152-160 City Road, London, EC1V 2NX, UK. The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -Original Message- From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of admin.androidsl...@googlemail.com Sent: 14 April 2009 09:04 To: Android Developers Subject: [android-developers] emulator speed Why is pc android emulator slower than real device but mac iphone emulator faster than real device? I can understand the latter but not the former! -- 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: Developing absolute layout - no drag drop click drag in eclipse ??
However if you display the Outline view you can do some basic re-ordering of the XML elements. R/ On Tue, Apr 14, 2009 at 1:34 PM, Xavier Ducrohet x...@android.com wrote: Not at this time. The layout editor is a work in progress. In 0.9, we added basic drag'n'drop support but we haven't added support for manipulating views in the layout directly yet. Xav On Thu, Mar 26, 2009 at 12:21 AM, quakeboy prasna...@gmail.com wrote: Hi I am developing an application which uses absolute layout with image views. I am not able to click and drag the images in the layout preview in eclipse. Is there a setting which can enable that ? -- Xavier Ducrohet Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 XMLRPC client
On 15 Kwi, 04:13, Saravanan.K saravinfot...@gmail.com wrote: Hey thanks for the reply. Do you mean that WSDL files need to be parsed only using a SOAP library and not the XML RPC library? Is this XML RPC client to parse just pure XML files? wsdl files describe soap server's services both xmlrpc and soap use xml but with well defined syntax, so you cannot use them to parse any 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: App widgets and remote views
I tried setting various combinations of android:minWidth and android:minHeight on the appwidget-provider element and on my ImageView, but nothing seemed to have an effect... ...okay I've just worked out why - obvious in retrospect - the minimum dimensions specified by the appwidget provider are only applied when the widget is first added to the host. I'd tested it without removing the widget and re-adding it. Tom. 2009/4/15 Jeffrey Sharkey jeffrey.shar...@gmail.com Awesome, great to hear people are jumping into it. :) For performance, the one thing to keep in mind is that each widget update will spin up your process, which is somewhat expensive. (So you probably want to avoid updating more often than once per hour to help save battery.) Also, while pushing bitmaps across RemoteViews is possible, it /is/ expensive. We experimented with pushing modified full-size album art to a larger desktop widget and started triggering ANRs in other foreground apps because it was so expensive. One lightweight method to write a clock would be to use a combination of animated/leveled drawables. Using an example of a single digit from a base-10 clock, you might have something like this: level-list xmlns:android=http://schemas.android.com/apk/res/ android item android:maxLevel=0 animation-list xmlns:android=http://schemas.android.com/apk/ res/android android:oneshot=false item android:drawable=@drawable/digit0 android:duration=6 / item android:drawable=@drawable/digit1 android:duration=6 / ... item android:drawable=@drawable/digit9 android:duration=6 / /animation-list /item ... item android:maxLevel=5 animation-list xmlns:android=http://schemas.android.com/apk/ res/android android:oneshot=true item android:drawable=@drawable/digit5 android:duration=6 / ... item android:drawable=@drawable/digit9 android:duration=6 / /animation-list /item /level-list Where the levels would be used when performing a clock update mid- cycle. Then, performing an exact update at an hour edge to start it down the full 0-9 repeating cycle. Each of the digits above lasts for a full minute before changing, so you would bump that to 60ms for the minute 10's digit. And updating the hour digits manually each hour might work nicely. However, I'm not sure if it the animated drawable will correctly catch up if you leave the screen for a period of time, as it might continue the animation where you left off. Worth peeking into. :) Also is there a way for thewidgetprovider to know (receive a hint for) the size at which thewidgetwill be rendered? This is useful in this instance since one doesn't want to make the bitmap any larger than necessary. There isn't right now, but if you use drawables defined using shape instead of bitmaps, it should scale nicely. A final question: is there a way for a provider to request that a wedget be 'oversized' (like the search bar or media control)? When you say oversized, you mean filling multiple cells? Setting the minimum size should let you take up multiple cells. Here's a quick equation that should work: Minimum size in dip = (Number of cells * 74dip) - 2dip j --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Re: how on earth do you access command line?
So first, these variables are case-insensitive so PATH or Path doesn't make a difference here. Next, it doesn't matter which you choose to modifiy unless you have multiple user accounts. If you have a single user account, simply modify the user account one and leave the system one alone. Third, you don't want to replace what's already there, just add to it -- that way it won't break existing stuff. The path syntax is path1;path2;path3... The semi-colon is the separator, so just add a ; and then the jre/bin path at the end. HTH R/ On Tue, Apr 14, 2009 at 11:46 PM, sch...@gmail.com wrote: I really appreciate this help. Yes I do have the latest JDK installed. When I goto the enviroment variables I have variables for my user account and also system variables. Both of them have a Path variable, which one should I edit? Also, just to be clear they are 'PATH' for the user account and 'Path' for the system variable, no 'path'. And another question? If I edit these and change them to the jdk are they most likely going to break the other programs that it was set too? Thanks again for your time! On Apr 15, 2009 1:24am, Raphael r...@android.com wrote: That error may mean two things: 1- Do you have Java installed? You probably got one for Eclipse. If not, get the latest from java.sun.com. 2- If you have java installed, it's not in the path by default. To fix #2: - open Control Panel System, - Advanced tab - Environment Variables button at the bottom - Add the JRE bin to the path, e.g. edit the path variable to add something like this at the end: ;C:\Program Files\Java\jre1.6.0_07\bin - Say OK tons of time - Re-open your command prompt and try again. R/ On Tue, Apr 14, 2009 at 9:22 PM, schwiz sch...@gmail.com wrote: thanks for the reply but when I am getting an error. Here is a copy of the command and the error. Any ideas? C:\Users\...\Desktop\eclipse\android-sdk-windows-1.5_pre \toolsandroid create avd --name myAVD2 --target 2 'java' is not recognized as an internal or external command, operable program or batch file. On Apr 14, 12:18 am, Raphael r...@android.com wrote: First open a dos box, also called a Command prompt: Under XP: Start menu all programs accessories command prompt Under Vista just search for command prompt in the Start seach box. Then use the cd command (=change dir) to change the directory to where you installed the SDK. If you want to make things easy, just place the sdk in c:\sdk using the windows explorer and type this: c: cd \sdk\tools Then you can create your AVD like this: android create avd --name myAVD1 --target 1 android create avd --name myAVD2 --target 2 The target 1 will be for Android 1.1 and target 2 for Android 1.5 Let us know if that helps. Google command prompt tutorial for more help :-) R/ On Mon, Apr 13, 2009 at 9:53 PM, schwiz sch...@gmail.com wrote: So im wanting to fiddle around with the new sdk but I never learned how to use command line in any IDE (does my school just suck or is it not very common) Anyways I need to create an AVD with the command line can someone please tell me the steps or tell me somewhere I can read up on this. Ive tried google searching command line eclipse, but the only results I get are nifty commands I can use once I actually find out how to get a command line. Im using windows. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Early Look Android 1.5 SDK
On Tue, Apr 14, 2009 at 11:56 PM, clark clarkd...@gmail.com wrote: I recently flashed my phone with the firmware found on the upcoming HTC Saphire, which says it is version 1.5. Does anyone know if I will be able to try out the features from the 1.5 SDK with this phone? It would be great to test directly on the hardware rather than use an emulator. Since firmware found on the upcoming HTC Sapphire means absolutely nothing to us (really), you'd better ask to the person who provided you this nice piece of software instead :-) I would not assume anything from a random binary image though. Also, I am willing to try other apps out on the actual hardware (if it indeed matches the features in the 1.5 SDK), so if any developer would like to know how their app performs, just shoot me a message. I'd be able to provide logcat info as well as screenshots. Regards, ~clark On Apr 14, 1:03 pm, Stoyan Damov stoyan.da...@gmail.com wrote: On Tue, Apr 14, 2009 at 9:28 AM, Al Sutton a...@funkyandroid.com wrote: To Xav, Dave, JBQ, Dianne, Romain, and anyone else involved in getting this out there. THANK YOU. You may not literally get a thousand thank yous in your mail box, but it'll probably be said a thousand times in various ways by developers around the world. Here's a THOUSAND THANKS! to all Android engineers from the grumpiest dev on the list ;) 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: Black Screen problem with graphics update using unlockCanvasAndPost()
The problem is your line Thread.currentThread().sleep(1000);//sleep for 1000 ms I believe with SurfaceView you have to draw your whole view on every screen refresh. You just need to loop as fast as possible and the system will throttle the speed in the calls to lockCanvas(). By sleeping for 1 second you are failing to provide a canvas for every refresh so the screen appears blank. What I don't know is whether there is any guidance on how quickly you have to get through your loop, i.e. what the maximum refresh rate is --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 ScrollView
i have a problem about ScrollView i want add myView(extends View) to the ScrollView, myView i will draw something, image or text, but when i create myView and add it in the scrollView ,but get the Height = 0 onSizeChanged(), i don't know why? (1) myActivity final LinearLayout layout = new LinearLayout(this); layout.setOrientation(LinearLayout.VERTICAL); layout.setLayoutParams(new ViewGroup.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT)); LinearLayout.LayoutParams paramS = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT,1); scroll = new ScrollView(this); ViewGroup.LayoutParams paramSvLp = new ScrollView.LayoutParams ( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); scroll.setLayoutParams(paramS); layout.addView(scroll); history = new HistoryTextView(this); history.setLayoutParams(paramSvLp); scroll.addView(history); (2) HistoryTextView public class HistoryTextView extends LinearLayout{ private Activity activity; private EmotionTextView topText; public HistoryTextView(Context context){ super(context); activity = (Activity) context; setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT)); setOrientation(LinearLayout.VERTICAL); setGravity(Gravity.FILL); addItem(str); } public void addItem(String str) { LayoutParams params1 = new LayoutParams (ViewGroup.LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.FILL_PARENT); EmotionTextView etv1 = new EmotionTextView(getContext(), null); String show1= 12345678 :) ; etv1.setLayoutParams(params1); // etv1.invalidate(); addView(etv1); etv1.setShowText(show1); } } (3) EmotionTextView public class EmotionTextView extends View{ public String showText; public Paint paint; public EmotionTextView(Context context, AttributeSet attrs) { super(context, attrs); // TODO Auto-generated constructor stub //setFocusable(true); paint = new Paint(); paint.setTextSize(20); paint.setColor(Color.BLUE); paint.setAntiAlias(true); } public void setShowText(String showText) { this.showText=showText; } protected void onSizeChanged(int w, int h, int oldw, int oldh) { width=w; //w = 0??? init(); } @Override public void onDraw(Canvas canvas) { super.onDraw(canvas); canvas.drawColor(0xfff00fff); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: problem ScrollView
i think may be this EmotionTextView is my own View ,so the system can't get the height, i need set determinate height for 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: Using SQLite for caching and serialization options
Hi, On Apr 14, 4:27 am, nEx.Software justin.shapc...@gmail.com wrote: You could use an object-oriented database such ashttp://www.db4o.com/android/, of course this one requires GPL. Interesting link, thanks. Though at this stage I won't be releasing this under GPL so that's not an option yet. Does anyone have suggestions regarding this? Information on overhead of serializing would be hugely helpful in deciding how to approach this. Cheers, Alan. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Best way for debugging
Hi! I have a background service which sometimes does not work properly. I need a logfile which displays me information so that i am able to find the error! But when i use Log.d() then ddms shows me only a few hours of the logfile. Is there a way to expand this? Or is there a more suitable way for my problem? 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: Can't use the findViewById() in an second view
It's weird, if I change the code into: new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String user; String password; setContentView(R.layout.alert_dialog_text_entry); EditText user_edit = (EditText)findViewById (R.id.username_edit); EditText password_edit = (EditText)findViewById (R.id.password_edit); user = user_edit.getText().toString(); setContentView(R.layout.main); } Then the button in the main view has no effect at all, is it a bug? Or the way I do is wrong? On Apr 15, 5:16 pm, Bin Chen binary.c...@gmail.com wrote: Sovled by adding a setContentView()... On Apr 15, 5:10 pm, Bin Chen binary.c...@gmail.com wrote: I have a main.xml as the main view and another alert_dialog_text_entry.xml for one dialog when a button is clicked in the main.xml view. In the click handler of the button, the findViewById () can't work, the returned vaule is null, the code is like this: protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_ACCOUNT_SETTING: LayoutInflater factory = LayoutInflater.from(mymsn.GetContext()); View textEntryView = factory.inflate( R.layout.alert_dialog_text_entry, null); return new AlertDialog.Builder(this) .setIcon(R.drawable.icon) .setTitle(R.string.alert_dialog_text_entry) .setView(textEntryView) .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String user; String password; EditText user_edit = (EditText)findViewById (R.id.username_edit); EditText password_edit = (EditText)findViewById (R.id.password_edit); user = user_edit.getText().toString(); } }) .setNegativeButton(R.string.alert_dialog_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .create(); } The alert_dialog_text_entry.xml: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical TextView android:id=@+id/username_view android:layout_height=wrap_content android:layout_width=wrap_content android:layout_marginLeft=20dip android:layout_marginRight=20dip android:text=@string/alert_dialog_username android:gravity=left android:textAppearance=?android:attr/textAppearanceMedium / EditText android:id=@+id/username_edit android:layout_height=wrap_content android:layout_width=fill_parent android:layout_marginLeft=20dip android:layout_marginRight=20dip
[android-developers] Re: which is gps provider for real device?
the provider is also called gps on a real device. The rest is implementation details that the application should not care about. On Wed, Apr 15, 2009 at 11:54 AM, jj jagtap...@gmail.com wrote: On emulator for simulations of GPS there is mock provider gps But which is provider for real device , which provider name requires to give? Is it not require to give provider name for appl of real device, will somebody clear for this issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Issue in reading rtsp stream
Hello there, I encountered some difficulties with rtsp streaming on the G1. When i open a link to a rtsp link, the G1 opens a first TCP connection with the command OPTION and It receives an answer from the server. The G1 let this connexion open and starts a 2nd connection in which it uses commands DESCRIBE, SETUP and PLAY. At this point the video plays correctly. After 70 seconds, the server sees that the first connection is still open and unused, so it sends a request to close it, butThe G1 seems to interpret it as a request to close all stream so the video stops! Is there any way to correct this issue? Regards, Patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] no location folder found under data directory for 1.1
no location folder found under data-location-gps directory for 1.1, which contains the mock provider 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-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] PackageManager.setComponentEnabledSetting method need which permission??
When i use PackageManager.setComponentEnabledSetting method to enable a service like this : PackageManager pm = getPackageManager(); ComponentName cc = new ComponentName(getApplicationContext (),ServiceTest.class); pm.setComponentEnabledSetting(cc, PackageManager.COMPONENT_ENABLED_STATE_DEFAULT, PackageManager.DONT_KILL_APP); but the exception is java.lang.SecurityException: Permission Denial: attempt to change component state from pid=258, uid=10020, package uid=10018 i set the permission in Androidmanifest.xml : permission android:name=android.permission.CHANGE_COMPONENT_ENABLED_STATE/ permission why still has exception?? i wanna know which permissiom i need in Androidmanifest.xml THX. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: finish() not killing Activity
Let me give an example of a different kind of app.. I have already read the main thread where this touchscreen consuming CPU issue is discussed... Now I have a game which is completely single threaded.. for rendering I use a timer and use handler.post and call invalidate/ postInvalidate of a View with a resolution of 30 fps. Now using my touch screen events, I implement a kind of pick, drag and drop of my game elements. In the touch event handler I just change the x,y positions of the elements. I feel as the touch happens too many times when I click and drag, It is reducing the time given to the drawing.. As someone said, the system processes events as soon as it receives it.. So when too many touch events are received, the time is consumed mostly by that.. I have to avoid only some intermediate MOVE EVENTS, and how do I do that is the question. On Apr 13, 10:11 pm, Dianne Hackborn hack...@android.com wrote: In general, you shouldn't be starting an activity at all passed on movements. Probably not on downs either. Only on ups. And at that point, if you want to abort the operation based on movement, just look at how far the up event x and y is away from the original down event. On Mon, Apr 13, 2009 at 5:04 AM, quakeboy prasna...@gmail.com wrote: can u give some sample code, technical details about that touch thresholding, I have been trying to implement and I am missing important events On Apr 13, 7:07 am, Ralf ralfo...@gmail.com wrote: On Sun, Apr 12, 2009 at 6:28 PM, Todd Sjolander guyfantas...@gmail.com wrote: Marco, your hunch was right. I was somehow creating multiple copies of Activity C. In case anyone can benefit from this, let me explain how it went wrong. I implemented onTouch() in Activity B, which would create an Intent for Activity C, and then call startActivity(). For some reason, onTouch() would get called multiple times with each touch, launching a new Activity C each time. Ah indeed. Remember that touch on the emulator, via the mouse, is a very precise operation -- you click one pixel, once. On a real device your finger generates lots of input events due to the imprecision of the point being touched, pressure, etc. If you real on a precise touch, you might want to implement a threshold in your touch listener to filter out noise. R/ Jon, I've seen some oddities from that myself, although I can't really make sense of it. But it's helpful to keep that in mind. 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: finish() not killing Activity
Let me give an example of a different kind of app.. I have already read the main thread where this touchscreen consuming CPU issue is discussed... Now I have a game which is completely single threaded.. for rendering I use a timer and use handler.post and call invalidate/ postInvalidate of a View with a resolution of 30 fps. Now using my touch screen events, I implement a kind of pick, drag and drop of my game elements. In the touch event handler I just change the x,y positions of the elements. I feel as the touch happens too many times when I click and drag, It is reducing the time given to the drawing.. As someone said, the system processes events as soon as it receives it.. So when too many touch events are received, the time is consumed mostly by that.. I have to avoid only some intermediate MOVE EVENTS, and how do I do that is the question. On Apr 13, 10:11 pm, Dianne Hackborn hack...@android.com wrote: In general, you shouldn't be starting an activity at all passed on movements. Probably not on downs either. Only on ups. And at that point, if you want to abort the operation based on movement, just look at how far the up event x and y is away from the original down event. On Mon, Apr 13, 2009 at 5:04 AM, quakeboy prasna...@gmail.com wrote: can u give some sample code, technical details about that touch thresholding, I have been trying to implement and I am missing important events On Apr 13, 7:07 am, Ralf ralfo...@gmail.com wrote: On Sun, Apr 12, 2009 at 6:28 PM, Todd Sjolander guyfantas...@gmail.com wrote: Marco, your hunch was right. I was somehow creating multiple copies of Activity C. In case anyone can benefit from this, let me explain how it went wrong. I implemented onTouch() in Activity B, which would create an Intent for Activity C, and then call startActivity(). For some reason, onTouch() would get called multiple times with each touch, launching a new Activity C each time. Ah indeed. Remember that touch on the emulator, via the mouse, is a very precise operation -- you click one pixel, once. On a real device your finger generates lots of input events due to the imprecision of the point being touched, pressure, etc. If you real on a precise touch, you might want to implement a threshold in your touch listener to filter out noise. R/ Jon, I've seen some oddities from that myself, although I can't really make sense of it. But it's helpful to keep that in mind. 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: Developing absolute layout - no drag drop click drag in eclipse ??
I have asked the Flex team in our company to make some app which can import images and you can drag and drop them with options like locking movement and hiding.. Then the app will generate an xml with all ImageViews and positions in it.. I can post it here if someone requests for the application.. On Apr 15, 2:28 pm, Boba S sbob...@googlemail.com wrote: Can I use another GUI Editor and which can I use for drag'n'drop? 2009/4/14 Xavier Ducrohet x...@android.com Not at this time. The layout editor is a work in progress. In 0.9, we added basic drag'n'drop support but we haven't added support for manipulating views in the layout directly yet. Xav On Thu, Mar 26, 2009 at 12:21 AM, quakeboy prasna...@gmail.com wrote: Hi I am developing an application which uses absolute layout with image views. I am not able to click and drag the images in the layout preview in eclipse. Is there a setting which can enable that ? -- Xavier Ducrohet Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Can't use the findViewById() in an second view
I have a main.xml as the main view and another alert_dialog_text_entry.xml for one dialog when a button is clicked in the main.xml view. In the click handler of the button, the findViewById () can't work, the returned vaule is null, the code is like this: protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_ACCOUNT_SETTING: LayoutInflater factory = LayoutInflater.from(mymsn.GetContext()); View textEntryView = factory.inflate( R.layout.alert_dialog_text_entry, null); return new AlertDialog.Builder(this) .setIcon(R.drawable.icon) .setTitle(R.string.alert_dialog_text_entry) .setView(textEntryView) .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String user; String password; EditText user_edit = (EditText)findViewById (R.id.username_edit); EditText password_edit = (EditText)findViewById (R.id.password_edit); user = user_edit.getText().toString(); } }) .setNegativeButton(R.string.alert_dialog_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .create(); } The alert_dialog_text_entry.xml: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical TextView android:id=@+id/username_view android:layout_height=wrap_content android:layout_width=wrap_content android:layout_marginLeft=20dip android:layout_marginRight=20dip android:text=@string/alert_dialog_username android:gravity=left android:textAppearance=?android:attr/textAppearanceMedium / EditText android:id=@+id/username_edit android:layout_height=wrap_content android:layout_width=fill_parent android:layout_marginLeft=20dip android:layout_marginRight=20dip android:scrollHorizontally=true android:autoText=false android:capitalize=none android:gravity=fill_horizontal android:textAppearance=?android:attr/textAppearanceMedium / TextView android:id=@+id/password_view android:layout_height=wrap_content android:layout_width=wrap_content android:layout_marginLeft=20dip android:layout_marginRight=20dip android:text=@string/alert_dialog_password android:gravity=left android:textAppearance=?android:attr/textAppearanceMedium / EditText android:id=@+id/password_edit android:layout_height=wrap_content android:layout_width=fill_parent android:layout_marginLeft=20dip android:layout_marginRight=20dip android:scrollHorizontally=true android:autoText=false android:capitalize=none android:gravity=fill_horizontal android:password=true android:textAppearance=?android:attr/textAppearanceMedium / --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] which is gps provider for real device?
On emulator for simulations of GPS there is mock provider gps But which is provider for real device , which provider name requires to give? Is it not require to give provider name for appl of real device, will somebody clear for this issue. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: create aidl preprocess file for parcelable
following the thread opened by Zach solved my problem. Thx a lot! On 14 Apr., 20:22, Zach Hobbs ho...@helloandroid.com wrote: I'm having the same problem :( http://groups.google.com/group/android-developers/browse_thread/threa... -Zach On Apr 14, 3:20 am, benjamin.lehej...@googlemail.com benjamin.lehej...@googlemail.com wrote: Hello android developers, yesterday the early look Android SDK 1.5 has released and i tried to import an old project using eclipse. There are some datatypes which has been madeparcelablein order to use the datatypes in theaidl. However setting up eclipse for SDK 1.1 gives me the facility tocreate aidlpreprocessfileforparcelable. In the new plugin for eclipse i couldn't find this function-call and that seems to be the issue to take if i would like to compile my project (and i will). Could anybody tell me what i am doing wrong or what i have to do tocreateaidl preprocessfileforparcelable. Thanks a lot for your help and hope your egg-hunting on eastern was successful and is delicious.. greetings --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Developing absolute layout - no drag drop click drag in eclipse ??
It would be of great help to me 2009/4/15 quakeboy prasna...@gmail.com I have asked the Flex team in our company to make some app which can import images and you can drag and drop them with options like locking movement and hiding.. Then the app will generate an xml with all ImageViews and positions in it.. I can post it here if someone requests for the application.. On Apr 15, 2:28 pm, Boba S sbob...@googlemail.com wrote: Can I use another GUI Editor and which can I use for drag'n'drop? 2009/4/14 Xavier Ducrohet x...@android.com Not at this time. The layout editor is a work in progress. In 0.9, we added basic drag'n'drop support but we haven't added support for manipulating views in the layout directly yet. Xav On Thu, Mar 26, 2009 at 12:21 AM, quakeboy prasna...@gmail.com wrote: Hi I am developing an application which uses absolute layout with image views. I am not able to click and drag the images in the layout preview in eclipse. Is there a setting which can enable that ? -- Xavier Ducrohet Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can't use the findViewById() in an second view
Sovled by adding a setContentView()... On Apr 15, 5:10 pm, Bin Chen binary.c...@gmail.com wrote: I have a main.xml as the main view and another alert_dialog_text_entry.xml for one dialog when a button is clicked in the main.xml view. In the click handler of the button, the findViewById () can't work, the returned vaule is null, the code is like this: protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_ACCOUNT_SETTING: LayoutInflater factory = LayoutInflater.from(mymsn.GetContext()); View textEntryView = factory.inflate( R.layout.alert_dialog_text_entry, null); return new AlertDialog.Builder(this) .setIcon(R.drawable.icon) .setTitle(R.string.alert_dialog_text_entry) .setView(textEntryView) .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String user; String password; EditText user_edit = (EditText)findViewById (R.id.username_edit); EditText password_edit = (EditText)findViewById (R.id.password_edit); user = user_edit.getText().toString(); } }) .setNegativeButton(R.string.alert_dialog_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .create(); } The alert_dialog_text_entry.xml: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical TextView android:id=@+id/username_view android:layout_height=wrap_content android:layout_width=wrap_content android:layout_marginLeft=20dip android:layout_marginRight=20dip android:text=@string/alert_dialog_username android:gravity=left android:textAppearance=?android:attr/textAppearanceMedium / EditText android:id=@+id/username_edit android:layout_height=wrap_content android:layout_width=fill_parent android:layout_marginLeft=20dip android:layout_marginRight=20dip android:scrollHorizontally=true android:autoText=false android:capitalize=none android:gravity=fill_horizontal android:textAppearance=?android:attr/textAppearanceMedium / TextView android:id=@+id/password_view android:layout_height=wrap_content android:layout_width=wrap_content android:layout_marginLeft=20dip android:layout_marginRight=20dip android:text=@string/alert_dialog_password android:gravity=left android:textAppearance=?android:attr/textAppearanceMedium / EditText android:id=@+id/password_edit android:layout_height=wrap_content android:layout_width=fill_parent android:layout_marginLeft=20dip android:layout_marginRight=20dip android:scrollHorizontally=true android:autoText=false android:capitalize=none android:gravity=fill_horizontal android:password=true android:textAppearance=?android:attr/textAppearanceMedium / --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at
[android-developers] Re: Developing absolute layout - no drag drop click drag in eclipse ??
Can I use another GUI Editor and which can I use for drag'n'drop? 2009/4/14 Xavier Ducrohet x...@android.com Not at this time. The layout editor is a work in progress. In 0.9, we added basic drag'n'drop support but we haven't added support for manipulating views in the layout directly yet. Xav On Thu, Mar 26, 2009 at 12:21 AM, quakeboy prasna...@gmail.com wrote: Hi I am developing an application which uses absolute layout with image views. I am not able to click and drag the images in the layout preview in eclipse. Is there a setting which can enable that ? -- Xavier Ducrohet Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Phone call recorder
On Apr 6, 6:39 pm, Dave Sparks davidspa...@android.com wrote: You can't. The G1 firmware does not support it. Dave, do you mean G1 will never ever support call recording, or is there a chance that it will be supported with an update? On Apr 6, 6:00 am, Dilli dilliraomca...@gmail.com wrote: Hi i am developing a recorder application It works fine but when phone call comes it records only one way conversation but the caller voice is not recorded.. I found audio sources as recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); OR recorder.setAudioSource(MediaRecorder.AudioSource.MIC); How can i enable my application to record phone call ( Both conversation) Need help Thank you Dilli Rao. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Mobile Unlocking in india
Can any body help me unlocking the Android G1 mobile in india for the Vodafone Network ... can body give the APN setting to enter into the phone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Use SDK 1.5 features while maintaining SDK 1.0,1.1 backward compatibility
Thanks Tom and Pieter. I haven't tried your suggestions yet, but is there any guarantee that the phone's VM will not also verify isolated classes or methods? By analogy to http://supportforums.blackberry.com/rim/board/message?board.id=java_devmessage.id=17826 (with two Blackberry OS versions, for which the factory method did not seem to work either) I want to avoid doing two compilations (with two SDK's, which would create a future maintenance headache). Regards On Apr 15, 8:54 am, Tom Gibara m...@tomgibara.com wrote: A more straightforward approach that should work is to isolate the affected code behind an interface, with separate implementations for 1.1 and 1.5. A factory method can be used to opaquely return the correct instance based on the build's sdk version. This has the advantage that you can usually hold onto a reference to the appropriate implementation and avoid repeatedly checking the version number. It does add the cost of a interface method call, but that's perfectly acceptable in most instances - if not, it's usually because the work is being done in an inner loop, in that case you generally need to replicate the loop for both implementations. Tom. 2009/4/15 Pieter s...@gamesquare.nl If the amount of 1.5 code is small, you can use reflection to make the calls in order to fool the verifier. This quickly becomes a pain in the butt when you have to call more than a few 1.5 methods or work with multiple 1.5 objects though. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Reconstructing DALVIK Applications
Hi, I would like to transform a dex file in bytecode to be able to read with the BCEL library. DX tool lets to transform from bytecode to dex files, but I would like to make the reverse process. Is it possible with DX tool? I have read that there is a project which is called UNDX that will make this, Is there information about this? Thanks for 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: App widgets and remote views
I just started taking a closer look at what would be needed to make a well-functioning gadget and have an observation. I'm assuming that the intention of the design is that I can grab a AppWidgetManager instance for my application's context any time I want, so that I can push an update to my gadgets. I've verified that this works by creating an Activity with a button that can be clicked to update a gadget. This means I can set up my own alarm if I want regular timed updates to my widget and don't need to use the android:updatePeriodMillis attribute. I observe that there is no notification of when widgets become visible/invisible. I assume this is because you don't want to generate a storm of process creation each time home screen comes in/out of view. Somewhat surprisingly though, widgets appear to receive update notifications when they are not visible. Combining these two thoughts, why not have updates triggered by android:updatePeriodMillis only while the widget is visible? It would both reduce the number of broadcasts (and associated process launches), be useful for some gadgets to reduce the amount of work they need to do, and provide distinct functionality from the alarm notifications that are already available to widget providers via the AlarmManager. Just an idea. Tom. 2009/4/15 Jeffrey Sharkey jeffrey.shar...@gmail.com Awesome, great to hear people are jumping into it. :) For performance, the one thing to keep in mind is that each widget update will spin up your process, which is somewhat expensive. (So you probably want to avoid updating more often than once per hour to help save battery.) Also, while pushing bitmaps across RemoteViews is possible, it /is/ expensive. We experimented with pushing modified full-size album art to a larger desktop widget and started triggering ANRs in other foreground apps because it was so expensive. One lightweight method to write a clock would be to use a combination of animated/leveled drawables. Using an example of a single digit from a base-10 clock, you might have something like this: level-list xmlns:android=http://schemas.android.com/apk/res/ android item android:maxLevel=0 animation-list xmlns:android=http://schemas.android.com/apk/ res/android android:oneshot=false item android:drawable=@drawable/digit0 android:duration=6 / item android:drawable=@drawable/digit1 android:duration=6 / ... item android:drawable=@drawable/digit9 android:duration=6 / /animation-list /item ... item android:maxLevel=5 animation-list xmlns:android=http://schemas.android.com/apk/ res/android android:oneshot=true item android:drawable=@drawable/digit5 android:duration=6 / ... item android:drawable=@drawable/digit9 android:duration=6 / /animation-list /item /level-list Where the levels would be used when performing a clock update mid- cycle. Then, performing an exact update at an hour edge to start it down the full 0-9 repeating cycle. Each of the digits above lasts for a full minute before changing, so you would bump that to 60ms for the minute 10's digit. And updating the hour digits manually each hour might work nicely. However, I'm not sure if it the animated drawable will correctly catch up if you leave the screen for a period of time, as it might continue the animation where you left off. Worth peeking into. :) Also is there a way for thewidgetprovider to know (receive a hint for) the size at which thewidgetwill be rendered? This is useful in this instance since one doesn't want to make the bitmap any larger than necessary. There isn't right now, but if you use drawables defined using shape instead of bitmaps, it should scale nicely. A final question: is there a way for a provider to request that a wedget be 'oversized' (like the search bar or media control)? When you say oversized, you mean filling multiple cells? Setting the minimum size should let you take up multiple cells. Here's a quick equation that should work: Minimum size in dip = (Number of cells * 74dip) - 2dip j --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] question about orientation sensor
Hi Android Experts, i am wondering if we can change orientation just by sensing the layout position, port or land;without flip like iphone does any example would be appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Using 2 Surface Views in same activity
Hi, I am creating an application where I have 2 Surface Views (1 each in top and bottom half of the screen) along with a button. One of the Surface will be displaying a camera preview. The purpose of the action is to swap the preview between each frame. The problem I am facing is only one SurfaceView's surfaceCreated() callback is being called. So when I try to set the other SurfaceView for the camera preview, I get error as it is still not yet created. My question is when will a surface be actually created? And how can I accomplish this UI without using Intents? Regards, iblues --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Use SDK 1.5 features while maintaining SDK 1.0,1.1 backward compatibility
The JLS requires that, even if a JVM identifies a binding error early, the exception raised must be deferred until an attempt is made to use the class. I'm paraphrasing here, but it's been years since I last read the JLS. That's the basic idea anyway. Of course, the interface can only depend on classes that are available in both environments (which is the mistake made by the poster you linked to). When I say should work I mean should work for you. I know this approach works because I use it my Moseycode library. I have a Perspector interface that I back with one of: a JAI PerspectiveTransform instance, a wrapper around android.graphics.Matrix, or my own implementation if neither is available. Tom. 2009/4/15 blindfold seeingwithso...@gmail.com Thanks Tom and Pieter. I haven't tried your suggestions yet, but is there any guarantee that the phone's VM will not also verify isolated classes or methods? By analogy to http://supportforums.blackberry.com/rim/board/message?board.id=java_devmessage.id=17826 (with two Blackberry OS versions, for which the factory method did not seem to work either) I want to avoid doing two compilations (with two SDK's, which would create a future maintenance headache). Regards On Apr 15, 8:54 am, Tom Gibara m...@tomgibara.com wrote: A more straightforward approach that should work is to isolate the affected code behind an interface, with separate implementations for 1.1 and 1.5. A factory method can be used to opaquely return the correct instance based on the build's sdk version. This has the advantage that you can usually hold onto a reference to the appropriate implementation and avoid repeatedly checking the version number. It does add the cost of a interface method call, but that's perfectly acceptable in most instances - if not, it's usually because the work is being done in an inner loop, in that case you generally need to replicate the loop for both implementations. Tom. 2009/4/15 Pieter s...@gamesquare.nl If the amount of 1.5 code is small, you can use reflection to make the calls in order to fool the verifier. This quickly becomes a pain in the butt when you have to call more than a few 1.5 methods or work with multiple 1.5 objects though. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 orientation sensor
can anyone help? On Apr 15, 10:28 am, zeeshan genx...@gmail.com wrote: Hi Android Experts, i am wondering if we can change orientation just by sensing the layout position, port or land;without flip like iphone does any example would be appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Passing keyevents to the next activity in the stack
Thanks Dianne, The NOT_FOCUSABLE flag caused my app to be mistakenly recognized as not responding, I think the OS expected me to handle keys even when I'm not focusable. I eventually got what I wanted using superDispatchKeyEvent. Thanks again, Mor. On Apr 4, 11:28 pm, Dianne Hackborn hack...@android.com wrote: Setting FLAG_NOT_FOCUSABLE on the window should probably work. Make sure you are setting it before you add your content view, and using the API to add flags instead of just directly poking the LayoutParams structure. On Sat, Apr 4, 2009 at 9:43 AM, marmor gaz...@gmail.com wrote: Hi, I'm trying to create an activity which would be on top of other activities (a small dialog themed activity) and I want to get ALL key events to be ignored by my activity and handled normally by the activity beneath it. When I say all I mean the send, end and back keys too. Is this possible? I've tried setFocusable(false), setting the flag FLAG_NOT_FOCUSABLE, and adding a dummy onKeyListener but nothing doesn't seem to do the trick. -- 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: Early Look Android 1.5 SDK
Still a few rough edges to be fixed ;) - Executing emulator -wipe-data does not work (it needs an android virtual device to be specified) I still don't know if this option is needed (probably yes, because running eclipse with the new SDK doesn't start the emulator). - The release notes state that v0.8.0 of the Android toolkit plug-in used for r1.1 can also be used for r1.5. However, when I restart eclipse after updating the locatiion of the new SDK, a message pops up that the toolkit must be updated to v0.9.0. However, updating the Android plug-in indicates that 0.8.0 is the latest version of the plug-in. - Maybe because of these problems, eclipse does not start the emulator. I'll wait until the end of the month. Regards, Paul On Apr 14, 1:30 am, Xavier Ducrohet x...@android.com wrote: Hello developers! I'm pleased to announce the release of an early look of the Android 1.5 SDK. More information and download link at:http://android-developers.blogspot.com/2009/04/getting-ready-for-andr... Have fun! Xav -- Xavier Ducrohet Android Engineer, Google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 orientation sensor
maybee what you are looking for is screen orientation :sensor for your activity in your manifest. Chris On 15 avr, 13:13, zeeshan genx...@gmail.com wrote: can anyone help? On Apr 15, 10:28 am, zeeshan genx...@gmail.com wrote: Hi Android Experts, i am wondering if we can change orientation just by sensing the layout position, port or land;without flip like iphone does any example would be appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Early Look Android 1.5 SDK
On Tue, Apr 14, 2009 at 20:11, Jean-Baptiste Queru j...@android.com wrote: The latest cupcake source drop (done a few hours ago) matches the preview SDK. We're working to tag it. Note that this isn't release 1.5 of Android, it's just a code drop that matches an official preview SDK. It's not going to run on ADP1 as it lacks the proprietary files that are needed for that. Does the SDK matching the source code means that we can expect google apps binaries pulled from SDK to work with Android compiled from the open source tree ? (so that we could for example install them on an android port on phones other than G1) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Business search using Android GeoCoder APIs
Hi , As per google's saying that Android framework treats each application equally as Native application. But here native Maps application is able to retreive Business searches like pizza hut etc. But My 3rd Party Maps application is not able to retreive it. As per SDK 1.0 , there are APIs in Address class like getphone() API, But it returns null. getfromlocationname() API is also returning null in case of business search. It means it is a bug in SDK1.0 as API is exposed and documented as per google documentation. Shall i raise an issue in issue database of google? I would appreciate if some one from google can respond to this issue or give any pointers. On Apr 15, 6:12 am, JP joachim.pfeif...@gmail.com wrote: I put this on the backburner... can't give you any pointers. On Apr 14, 10:58 am,Android_Learnersunil.bha...@aricent.com wrote: Hi, Is there any chance to use Google APIs( Http Based) instead of Android APIs for doing business search? or any other 3rd party Http based APIs(Web service) for business search On Apr 14, 6:16 pm,Android_Learnersunil.bha...@aricent.com wrote: Hi, I am developing a maps application and want to search for business points like pizza hut etc as done by native android maps application. I am using getfromlocationname() API for this purpose. But i am not able to get any result for any business search. But when i search using native maps application it shows results on native maps application. May I know the reason of this behaviour of getfromlocationname() API , or do i need to use some thing different for business search. I am working on SDK 1.0. Looking forward to your reply- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] C\C++ support for application level
Hi, I want to ask to google engineers that whether future sdk releases will provide any C\C++ support for application developement?? If no.. then Can you please tell me the disadvantage of these languages?? As per my knowledge and experience, runtime environment is not needed to execute C\C++ application. So why cant we directly run any application which is written in C\C++?? Is there any way to bypass DVM to execute a code?? Core android librarys are C\C++ only... Regardz, Asif --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Audio streaming/progressive download over HTTP
When you say no support for AAC, does it mean no AAC support for pure audio stream? Can we use rtsp streaming with a MPEG-4 video containing an AAC audio channel? On Apr 14, 11:56 pm, Dave Sparks davidspa...@android.com wrote: We don't have an API for progressive download yet. Technically, the website should say progressive streaming, but from a file authoring perspective there is no distinction between the two. RTSP support is only available for MPEG-4 file formats. There is no support for raw AMR, AAC, or MP3 streams. On Apr 14, 1:12 pm, Alexander forw...@mail.ru wrote: Hi All, I have a couple questions regarding audio streaming/progressive download over HTTP. Could you please help me? 1. MediaPlayer supports progressive download according to the developer guide from this linkhttp://developer.android.com/guide/topics/media/index.html (If you're passing a URL to an online media file, the file must be capable of progressive download.). As far as I understand progressive download means media playback during download process with saving the media file to file system(SD card or internal FS) after the downloading is finished (if it's a file, not a stream in the passed URL). So, I tried to set the following URL: setDataSource (http://84.204.154.49/mmapi/music.mp3). Playback is fine, but the file isn't saved to SD card or internal phone file system. Can MediaPlayer save media content to the file system after downloading is completed? Is there a way to turn on such capability? 2. Does MediaPlayer support HTTP streaming? I tried to usehttp://217.10.32.134:8129/ultrafan128.mp3,http://62.32.66.180:8800, also AMR-, AAC- audio stream over HTTP on the local server, but playback does not work. For example, RTSP streaming works fine with AMR and AAC. Thank you, Alexander --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] related scrollbar
i am using ScrollView . so for one event i want disable a scrollview so plz tel me how to disable the scrollView. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Mobile Unlocking in india
its not possible in Vodaphone AFAIK..Only in the airtel n/w its possible On Wed, Apr 15, 2009 at 3:28 PM, vinny.s...@gmail.com vinny.s...@gmail.comwrote: Can any body help me unlocking the Android G1 mobile in india for the Vodafone Network ... can body give the APN setting to enter into the phone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Can't use the findViewById() in an second view
Finally I resolved this problem by invoking the flattened view's findViewById(), hope this can be helpful for others. On Apr 15, 5:20 pm, Bin Chen binary.c...@gmail.com wrote: It's weird, if I change the code into: new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String user; String password; setContentView(R.layout.alert_dialog_text_entry); EditText user_edit = (EditText)findViewById (R.id.username_edit); EditText password_edit = (EditText)findViewById (R.id.password_edit); user = user_edit.getText().toString(); setContentView(R.layout.main); } Then the button in the main view has no effect at all, is it a bug? Or the way I do is wrong? On Apr 15, 5:16 pm, Bin Chen binary.c...@gmail.com wrote: Sovled by adding a setContentView()... On Apr 15, 5:10 pm, Bin Chen binary.c...@gmail.com wrote: I have a main.xml as the main view and another alert_dialog_text_entry.xml for one dialog when a button is clicked in the main.xml view. In the click handler of the button, the findViewById () can't work, the returned vaule is null, the code is like this: protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_ACCOUNT_SETTING: LayoutInflater factory = LayoutInflater.from(mymsn.GetContext()); View textEntryView = factory.inflate( R.layout.alert_dialog_text_entry, null); return new AlertDialog.Builder(this) .setIcon(R.drawable.icon) .setTitle(R.string.alert_dialog_text_entry) .setView(textEntryView) .setPositiveButton(R.string.alert_dialog_ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { String user; String password; EditText user_edit = (EditText)findViewById (R.id.username_edit); EditText password_edit = (EditText)findViewById (R.id.password_edit); user = user_edit.getText().toString(); } }) .setNegativeButton(R.string.alert_dialog_cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { } }) .create(); } The alert_dialog_text_entry.xml: LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical TextView android:id=@+id/username_view android:layout_height=wrap_content android:layout_width=wrap_content android:layout_marginLeft=20dip android:layout_marginRight=20dip android:text=@string/alert_dialog_username android:gravity=left
[android-developers] Re: Writing PerformanceTestCases
What you need to do is to implement the PerformanceTestCase interface. Below is a performance test example and which I was able to run it both via adb shell What I couldn't figure out is how to get the actual time it took to execute the specific test. adb logcat reported the time it took to run all tests located in the actual package :/ Not much of a performance test but maybe it can get you going. ** import android.test.AndroidTestCase; import android.test.PerformanceTestCase; public class TimeTest extends AndroidTestCase implements PerformanceTestCase { public boolean isPerformanceOnly() { return true; } public int startPerformance(Intermediates intermediates) { intermediates.startTiming(true); // do stuff intermediates.finishTiming(true); return 0; } } ** /Magnus On Apr 12, 2:06 am, Gavin Aiken gavin.ai...@imperial.ac.uk wrote: Hi All, Does anyone have a simple example of a PerformanceTestCasehttp://www.google.co.in/codesearch/p?hl=en#uX1GffpyOZk/core/java/andr...I want to get some timing metrics for certain business logic functions in my ap. Until now I have been using the current milliseconds and logging functionality but if there is a better way to gather performance metrics I'd love to hear it. Do I have to implement the Intermediates interface or am I missing something? Kind regards, Gav --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Performance test cases
Ok, so I want to do some performance testing. I'd like to this in an automated way and would like to evaluate the available test harness by using the built in JUnit framework. I have really looked for documentation regarding this but have found very little. I figured out that I should implement the android.test.PerformanceTestCase interface in my test classes. I managed to run the test case by running adb shell am instrument -w xyz.performance.tests/android.test.InstrumentationTestRunner where my test classes are located in the xyz.performance.tests package. The output and result can be seen below: -- xyz.performance.tests.PerformanceTest:. xyz.performance.tests.TimeTest:. Test results for InstrumentationTestRunner=.. Time: 1.699 OK (2 tests) -- and logcat doesn't say anything about the time to execute the individual tests. I am clearly missing something here so any help is appreciated! /Magnus --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Early Look Android 1.5 SDK
Since firmware found on the upcoming HTC Sapphire means absolutely nothing to us (really), you'd better ask to the person who provided you this nice piece of software instead :-) Now when you say us, are you referring to google engineers, the application developers or the community? Anyhow, for what it's worth, what this means is another Android based phone is on the horizon, which I'm sure most of you are aware of. Last night I wrote some code that got the raw audio from the mic, a feature I had been waiting for. So far it looks as though this is based on Android 1.5, which it also states in the About Phone section under the settings. ~clark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Black Screen problem with graphics update using unlockCanvasAndPost()
Thanks for the comment ellipsoidmobile. If I remove the sleep, I still don't see anything until the very end. I don't need that sleep in there for the application. I only put it in so that, hopefully, I could see what was happening a little better. Also, I thought that the SurfaceView allowed you to write to the screen at your own pace, whatever that may be. So in this case, there would be nothing from the outside that's causing a screen refresh. The screen should stay how I left it until I post a new canvas. Am I misunderstanding this? What really confuses me is why the last call to unlockCanvasAndPost() does work. It seems like if an error prevented the first calls from functioning, then it would also prevent the last. On Apr 15, 3:09 am, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: The problem is your line Thread.currentThread().sleep(1000);//sleep for 1000 ms I believe with SurfaceView you have to draw your whole view on everyscreenrefresh. You just need to loop as fast as possible and the system will throttle the speed in the calls to lockCanvas(). By sleeping for 1 second you are failing to provide a canvas for every refresh so thescreenappears blank. What I don't know is whether there is any guidance on how quickly you have to get through your loop, i.e. what the maximum refresh rate is --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] bottom Tabview
Hi, I am created a Tab view ,in this the tabs are in top side. But i need a tab view which displays the tabs in the bottom ,can anybody can give me a code or related link to this 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 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: Black Screen problem with graphics update using unlockCanvasAndPost()
I may have found my problem. The SurfaceView class implements a function called draw(Canvas). I unwittingly created my own function draw() with the same signature, overriding the original. I'm guessing that the SurfaceView probably calls draw() during unlockCanvasAndPost(). But instead of executing its original draw() method and doing what it is supposed to do, it calls my function - simply overwriting the canvas buffer without affecting the Surface at all... thus the black screen. I'm still confused about why it eventually shows. Perhaps some final cleanup code... I will test this tonight when I have access to my development computer and post my findings. On Apr 15, 8:48 am, Warren warrenba...@gmail.com wrote: Thanks for the comment ellipsoidmobile. If I remove the sleep, I still don't see anything until the very end. I don't need that sleep in there for the application. I only put it in so that, hopefully, I could see what was happening a little better. Also, I thought that the SurfaceView allowed you to write to the screen at your own pace, whatever that may be. So in this case, there would be nothing from the outside that's causing a screen refresh. The screen should stay how I left it until I post a new canvas. Am I misunderstanding this? What really confuses me is why the last call to unlockCanvasAndPost() does work. It seems like if an error prevented the first calls from functioning, then it would also prevent the last. On Apr 15, 3:09 am, ellipsoidmob...@googlemail.com ellipsoidmob...@googlemail.com wrote: The problem is your line Thread.currentThread().sleep(1000);//sleep for 1000 ms I believe with SurfaceView you have to draw your whole view on everyscreenrefresh. You just need to loop as fast as possible and the system will throttle the speed in the calls to lockCanvas(). By sleeping for 1 second you are failing to provide a canvas for every refresh so thescreenappears blank. What I don't know is whether there is any guidance on how quickly you have to get through your loop, i.e. what the maximum refresh rate is --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Elan sues Apple for multitouch patent infringment... and guess what....
First, this isn't quite on-topic for this group (neither is the meta-discussion about patent laws and their interpretation that is almost guaranteed to follow), as this has no relationship to the official Android SDK. Second, more importantly, many people who read and participate in this group and other official Android discussion groups work for companies where company policy is to avoid reading or learning about any patent-related subject, and to avoid forums and sites where such discussions routinely happen. It'd be unfortunate if those people were forced to stay away from the official groups because of patterns of patent-related discussions. Let's try to be self-moderating in that area before lawyers need to get involved (as even the most friendly lawyers can't make their involvement pleasant in that case). Thanks, JBQ On Tue, Apr 14, 2009 at 6:32 PM, Streets Of Boston flyingdutc...@gmail.com wrote: ... It seems Elan had it running on Android before the iPhone. :=) http://www.phonesreview.co.uk/2009/04/13/video-multi-touch-on-android-from-elan-microelectronics/ Is there any truth in this? -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. Questions sent directly to me that have no reason for being private will likely get ignored or forwarded to a public forum with no further warning. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Note on Size of Apps
So I wrote my own calculator app because I wanted to have some different functionality than the calculator that comes with the phone. Now, I notice the calculator that came with the phone, when looking through the Manage Applications, only shows as being 4kb in size. My calculator ends up being 104kb after all is said and done. Anyone have an idea why the huge difference in size? I mean, I know I built my calculator to do more than the built in one, but I didn't think it was doing 25 times more stuff than the built in one! I can't even make an empty Word document that small (4kb). A Notepad document with 10 characters takes up 4kb on disk. I'm not complaining, just curious. Is the built in calculator app that shows up in Manage Applications just a shortcut, or whatever, into the OS, and the functionality actually resides there? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: broadcasts as communication path between custom views and activity
On 15 Kwi, 05:56, skink psk...@gmail.com wrote: hi, i have custom view and once some action occur in it (say touch/key event) i'd like to call some code in my activity. my question is if broadcasts (intent filters/broadcast receivers) are good communication mechanism for such thing? if not, what is normal/android preffered way to do it? thanks, pskink --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: broadcasts as communication path between custom views and activity
On 15 Kwi, 04:56, skink psk...@gmail.com wrote: hi, i have custom view and once some action occur in it (say touch/key event) i'd like to call some code in my activity. my question is if broadcasts (intent filters/broadcast receivers) are good communication mechanism for such thing? if not, what is normal/android preffered way to do it? thanks, pskink basically, i would like to know whether broadcasts/broadcast receivers are lightweight stuff or it involves much processing and i should use own interface based listeners. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Note on Size of Apps
Have you followed this guide: http://developer.android.com/guide/publishing/preparing.html droozen wrote: So I wrote my own calculator app because I wanted to have some different functionality than the calculator that comes with the phone. Now, I notice the calculator that came with the phone, when looking through the Manage Applications, only shows as being 4kb in size. My calculator ends up being 104kb after all is said and done. Anyone have an idea why the huge difference in size? I mean, I know I built my calculator to do more than the built in one, but I didn't think it was doing 25 times more stuff than the built in one! I can't even make an empty Word document that small (4kb). A Notepad document with 10 characters takes up 4kb on disk. I'm not complaining, just curious. Is the built in calculator app that shows up in Manage Applications just a shortcut, or whatever, into the OS, and the functionality actually resides there? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Early Look Android 1.5 SDK
On Wed, Apr 15, 2009 at 3:42 PM, clark clarkd...@gmail.com wrote: Since firmware found on the upcoming HTC Sapphire means absolutely nothing to us (really), you'd better ask to the person who provided you this nice piece of software instead :-) Now when you say us, are you referring to google engineers, the application developers or the community? I was referring to the Android team but also other people on this list. Essentially there is zero information in your post that can help us identify what this firmware is. Last night I wrote some code that got the raw audio from the mic, a feature I had been waiting for. So far it looks as though this is based on Android 1.5, which it also states in the About Phone section under the settings. I have seen reviews in print magazines that were apparently based on old cupcake-based firmware that unfortunately were touting features that have been removed or disabled since from the build (because they were not usable / stable enough for a release). And intermediate builds have been tagged 1.5 for a long time now, that doesn't make them final. I am thus not confident to tell you if such or such feature is going to be supported in the official cupcake release, especially if you test it on a build of unknown origin. You could try running your code in the preview SDK which probably is closer to the real thing that what you have on this device. However, in the specific case of acquiring mic audio, there may be an Android engineer here that could confirm that this is going to be in the released platform, it's just that I don't know the answer. ~clark --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 create home screen short cut?
I am trying this code but its not working Intent shortcutIntent = new Intent (Intent.ACTION_MAIN); shortcutIntent.setClassName(this, this.getClass ().getName()); Intent intent = new Intent(); intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, hello); Parcelable iconResource = Intent.ShortcutIconResource.fromContext( NoteView.this, R.drawable.short_icon); intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource); intent.setAction(Intent.ACTION_CREATE_SHORTCUT); getApplicationContext().sendBroadcast(intent); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Elan sues Apple for multitouch patent infringment... and guess what....
No argument here. VMS, baby, VMS. On Apr 15, 8:32 am, JP joachim.pfeif...@gmail.com wrote: On Apr 15, 7:11 am, Jean-Baptiste Queru j...@android.com wrote: Second, more importantly, many people who read and participate in this group and other official Android discussion groups work for companies where company policy is to avoid reading or learning about any patent-related subject, ... Oh boy no question the 80s HAVE been the best years in our profession. I want my VAXen back. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 make a SQL database accessable from a ContentProvider?
Hello, As a learning project for myself, I read the contents of a text file into an SQL database, and would like to make its contents accessible via a SimpleCursorAdapter. My code to read the file and store it in the DB is: public class DictionarySQLAutoComplete extends Activity { public static final String AUTHORITY = com.xxx.android.examples; public static final Uri CONTENT_URI = Uri.parse(content:// + AUTHORITY + /dictionarysqlautocomplete); @Override public void onCreate(Bundle savedInstanceState) { DictionaryDbAdapter aDbHelper = new DictionaryDbAdapter( this ); aDbHelper.open(); // Fill the DB with the file contents AssetManager assetManager = getResources().getAssets(); InputStream inStream =assetManager.open(filename.txt); DataInputStream dataInStream = new DataInputStream(inStream); BufferedReader bufReader = new BufferedReader(new InputStreamReader (dataInStream)); String aFileLine = null; while( ( aFileLine = bufReader.readLine() ) != null ) { // Copy read line to next item to the dictionary long result = aDbHelper.createDictionaryEntry(aFileLine, empty for now); } bufReader.close(); // Get the cursor for the full DB contents query Cursor aCursor = mDbHelper.fetchAllDictionaryEntries(); //Create the auto-complete text widget AutoCompleteTextView textView = (AutoCompleteTextView) findViewById (R.id.edit); // Create the adapter from the database cursor mFrom = new String[] { DictionaryDbAdapter.KEY_ROWID}; mTo = new int[] { android.R.id.text1 }; SimpleCursorAdapter adapter = new SimpleCursorAdapter( this, android.R.layout.simple_dropdown_item_1line, aCursor, mFrom, mTo ); } The DictionaryDbAdapter class is based on the one used in the Notepad tutorial sample. I would like to associate the cursor to the content provider CONTENT_URI, so that I can link its adapter to the AutoCompleteTextView. Can I do it? Thanks, Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 an AppWidget Configuration Activity required?
I'm playing around with the new AppWidget API, I get the impression from the docs that I don't need an android:configuration attribute in my AppWidgetProviderInfo xml resource. Curiously though, when I try to add my AppWidget to the home screen, I just get a black textview that reads Problem loading widget. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Elan sues Apple for multitouch patent infringment... and guess what....
I agree with you about being in the wrong group. I actually wanted to post this in Android Discuss but put it accidentally here in Android Developers. But you can't delete a post and re-post it. ... company policy is to avoid reading or learning about any patent-related subject Really!!?? I never knew about these 'policies'. What do they do? Lock their employees in air-tight cubicles with tightly moderated communications? :=) On Apr 15, 10:11 am, Jean-Baptiste Queru j...@android.com wrote: First, this isn't quite on-topic for this group (neither is the meta-discussion about patent laws and their interpretation that is almost guaranteed to follow), as this has no relationship to the official Android SDK. Second, more importantly, many people who read and participate in this group and other official Android discussion groups work for companies where company policy is to avoid reading or learning about any patent-related subject, and to avoid forums and sites where such discussions routinely happen. It'd be unfortunate if those people were forced to stay away from the official groups because of patterns of patent-related discussions. Let's try to be self-moderating in that area before lawyers need to get involved (as even the most friendly lawyers can't make their involvement pleasant in that case). Thanks, JBQ On Tue, Apr 14, 2009 at 6:32 PM, Streets Of Boston flyingdutc...@gmail.com wrote: ... It seems Elan had it running on Android before the iPhone. :=) http://www.phonesreview.co.uk/2009/04/13/video-multi-touch-on-android... Is there any truth in this? -- Jean-Baptiste M. JBQ Queru Android Engineer, Google. Questions sent directly to me that have no reason for being private will likely get ignored or forwarded to a public forum with no further warning. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 orientation sensor
thanks for reply chris, i used android:screenOrientation=sensor in manifest but it is not flipping automatically on direction change. i need to change port-land just on change direction not by opening the keypad. On Apr 15, 1:04 pm, Chris christ.pe...@gmail.com wrote: maybee what you are looking for is screen orientation :sensor for your activity in your manifest. Chris On 15 avr, 13:13, zeeshan genx...@gmail.com wrote: can anyone help? On Apr 15, 10:28 am, zeeshan genx...@gmail.com wrote: Hi Android Experts, i am wondering if we can change orientation just by sensing the layout position, port or land;without flip like iphone does any example would be appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 create home screen short cut?
Did you add the permission in the manifest? On Apr 15, 5:06 pm, havexz bali.param...@gmail.com wrote: I am trying this code but its not working Intent shortcutIntent = new Intent (Intent.ACTION_MAIN); shortcutIntent.setClassName(this, this.getClass ().getName()); Intent intent = new Intent(); intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, hello); Parcelable iconResource = Intent.ShortcutIconResource.fromContext( NoteView.this, R.drawable.short_icon); intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, iconResource); intent.setAction(Intent.ACTION_CREATE_SHORTCUT); getApplicationContext().sendBroadcast(intent); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 orientation sensor
thanks for the reply Chris this is exactly what i was looking for but it takes so long to flip the layout. On Apr 15, 1:04 pm, Chris christ.pe...@gmail.com wrote: maybee what you are looking for is screen orientation :sensor for your activity in your manifest. Chris On 15 avr, 13:13, zeeshan genx...@gmail.com wrote: can anyone help? On Apr 15, 10:28 am, zeeshan genx...@gmail.com wrote: Hi Android Experts, i am wondering if we can change orientation just by sensing the layout position, port or land;without flip like iphone does any example would be appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] call flow, events, notifications
Hi all, I'm looking for any documentation on the call flow including any notifications and intents fired. So far I haven't found much. I have some ideas for call related apps but need to know where I can hook into the system. For example I want to know whenever a call ends and if I can get some data associated with the call (phone number, length). Hopefully there's something build in that I can use and not do a hack with the call log. Thanks for any tips, -Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] device to device broadcasts possible via wi-fi?
Does anyone know of a way to broadcast a message via Wi-Fi from one Android device to all of its neighbors that are within Wi-Fi range? If not, does anyone know if this type of functionality is planned for a future release? Thanks for any insights. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Please enable SVG Support in the Android Webkit Browser
Hi, I think it could be interesting The Sneak Preview to TinyLine SVG 2.2 for Android http://www.tinyline.com/forum/index.php?topic=73.0 and from here http://www.tinyline.com/ The TinyLine SVG Viewer is an example from the TinyLine SVG 2.2 for Android. It supports user interaction, SMIL animations and hyper linking. TinyLine SVG 2.2 implements an SVG Tiny 1.1+ engine for Android platform. -Dov- On Mar 22, 5:00 am, Paper Coder paperga...@gmail.com wrote: Thanks Diane. At think point I don't think it will be worth it to try and use SVG - due to the performance changes on different devices. Perhaps when someone codes an efficient, pre-compiled, SVG renderer it will be acceptable to do so. I don't like the thought of working in Flash, either (when it's released). So I'll wait until SVG is supported more efficiently. On Sun, Mar 22, 2009 at 8:33 AM, Dianne Hackborn hack...@android.comwrote: On Fri, Mar 20, 2009 at 10:02 AM, Paper Coder paperga...@gmail.comwrote: What about simple animations? I can see extensive animations bogging things down, but how about simple artwork and png animations for the fast stuff? It depends. But just assume that vector-based graphics are going to be significantly slower than PNG images. I can't tell you how much slower -- in fact if your vector image is just a rectangle, it could be a bit faster. But it is likely to be more complicated, and the more complicated it is, the slower it will be. And let's not even get in to XML descriptions of vector images. Parsing XML is slow as well. This is why we compile all XML resources into a binary format -- even though that binary format is fairly general-purpose and closely matches the XML format, it is about 100x faster to process on the device. And to put that in perspective, inflating a view hierarchy from a binary layout file is probable still 10x slower than if you were to hand-code Java to instantiate the view objects and configure them yourself. -- 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. All such questions should be posted on public forums, where I and others can see and answer them.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] where can i get the source code of the command monkey?
Hello group, I don't have a option -f in my command monkey(/system/bin/monkey). example: adb shell monkey -f script_file_name. But the command unknown option -f. So I want to get the source code of the command monkey, then open this option and rebuild it. Regards, Adrian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] com.android.dx.cf.code.SimException: local variable type mismatch
While dex-ing a jar I am getting the the following. Does anyone knows how to fix it? Supposedly build-no-debug should help but I cannot find any reference to this flag in android source. Any help appreciated Tomasz [apply] UNEXPECTED TOP-LEVEL EXCEPTION: [apply] com.android.dx.cf.code.SimException: local variable type mismatch: attempt to set or access a value of type groovy.lang.Reference using a local variable of type java.lang.Object[]. This is symptomatic of .class transformation tools that ignore local variable information. [apply] at com.android.dx.cf.code.BaseMachine.throwLocalMismatch(BaseMachine.java:537) [apply] at com.android.dx.cf.code.BaseMachine.getLocalTarget(BaseMachine.java:392) [apply] at com.android.dx.cf.code.BaseMachine.storeResults(BaseMachine.java:519) [apply] at com.android.dx.cf.code.ValueAwareMachine.run(ValueAwareMachine.java:196) [apply] at com.android.dx.cf.code.RopperMachine.run(RopperMachine.java:290) [apply] at com.android.dx.cf.code.Simulator$SimVisitor.visitLocal(Simulator.java:542) [apply] at com.android.dx.cf.code.BytecodeArray.parseInstruction(BytecodeArray.java:517) [apply] at com.android.dx.cf.code.Simulator.simulate(Simulator.java:96) [apply] at com.android.dx.cf.code.Ropper.processBlock(Ropper.java:681) [apply] at com.android.dx.cf.code.Ropper.doit(Ropper.java:636) [apply] at com.android.dx.cf.code.Ropper.convert(Ropper.java:253) [apply] at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:252) [apply] at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:131) [apply] at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:85) [apply] at com.android.dx.command.dexer.Main.processClass(Main.java:297) [apply] at com.android.dx.command.dexer.Main.processFileBytes(Main.java:276) [apply] at com.android.dx.command.dexer.Main.access$100(Main.java:56) [apply] at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:228) [apply] at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245) [apply] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:130) [apply] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:108) [apply] at com.android.dx.command.dexer.Main.processOne(Main.java:245) [apply] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:183) [apply] at com.android.dx.command.dexer.Main.run(Main.java:139) [apply] at com.android.dx.command.dexer.Main.main(Main.java:120) [apply] at com.android.dx.command.Main.main(Main.java:87) [apply] ...at bytecode offset 0057 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How can I call methods in Activity from an event listener of a custom Adapter?
Hi everyone, I have created a ListView and a custom Adapter with ImageButton widget in each row. I set the ImageButton OnClick Listener in getView method to trigger each ImageButton's OnClick event of each ListView row. Everything goes well, but I have no idea how to call Activity methods from ImageButtons' OnClickListener handler. I initial my ListView as following code in MyActivity class: protected void onCreate(Bundle savedInstanceState) { MyListAdapter myListAdapter = new MyListAdapter ( MyActivity.this, R.layout.list_row, myList ); myListView.setAdapter(myListAdapter); } in MyListAdapter class: public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflate = LayoutInflater.from( context ); View v = inflate.inflate( rowResID, parent, false); ImageButton button1 = (ImageButton)v.findViewById( R.id.button1 ); button1.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { //How to call MyActivity class methods from here?? } }); } Thank you for your kindly help in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Emulator Camera Issues in 1.5
Howdy, sorry if this turns into a crosspost - a previous post i attempted never showed up. I'm developing in Eclipse with dev kit 1.5 on Kubuntu 9.04 (64bit) My camera-based app and the included camera app are behaving strangely - sometimes they simply lock up - regardless of whether they lock up or run i get the following errors: 04-15 00:39:52.320: ERROR/MediaPlayer(555): Unable to to create media player 04-15 00:39:52.320: ERROR/CameraService(555): Failed to load CameraService sounds. 04-15 00:39:52.330: ERROR/MediaPlayer(555): Unable to to create media player 04-15 00:39:52.350: ERROR/CameraService(555): Failed to load CameraService sounds. 04-15 00:39:52.460: ERROR/QemuSensors(766): sensors__get_sensors_list: no qemud connection 04-15 00:39:52.930: WARN/OrientationEventListener(766): Cannot detect sensors. Not enabled 04-15 00:39:53.630: WARN/IInputConnectionWrapper(629): showStatusIcon on inactive InputConnection 04-15 00:39:53.800: ERROR/Camera(766): _getParameters: picture- format=jpeg;picture-size=213x350;preview-format=yuv422sp;preview-frame- rate=15;preview-size=176x144 04-15 00:39:53.800: ERROR/Camera(766): setParameters() The camcorder never works, but at least the error message seems to make sense: 04-15 00:36:00.243: ERROR/videocamera(762): prepare failed for /sdcard/ DCIM/Camera/video-2009-04-15-00-35-59.3gp Is this a limitation with of the emulator on my OS? Is it me =) I created my AVD as follows: android create avd --name default_1_5 --target 2 --sdcard 512M any suggestions? 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] Embedded activityGroup and Dialog box
Hello, I'm trying to run an activityGroup embedded inside another activityGroup. (Example : an activityGroup inside a tabActivity) This seems to display properly but throw an exception when i'm trying to display a modal box like an alertDialog. TabActivity - Tab1 - Tab2 - MyGroupActivity - - ChildActivity1 - - ChildActivity2 If childActivity1 or 2 try to display a dialogBox i'm getting this exception : 04-14 18:45:47.480: ERROR/AndroidRuntime(2449): android.view.WindowManager$BadTokenException: Unable to add window -- token android.app.localactivitymanager$localactivityrec...@43424620 is not valid; is your activity running? Has anyone encountered this pbm before? What am i doing wrong ? Thanks, Arnaudweb --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SDK 1.5, Unable to load XML wizard
I have it also On 14 Apr., 15:43, Al alcapw...@googlemail.com wrote: I'm trying to make a new XML file and have selected New-Android XML File, but each time I get this message: The selected wizard could not be started. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.editors.wizards.NewXmlFileWizard. com.android.ide.eclipse.editors.wizards.NewXmlFileWizard The problem is only with the XML file creator, I can create a new Android Project fine. I'm using ADT 0.9 Pre release and have installed it as per the instructions on the doc page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] [Feature Request] Zeroconf API
Hi Group, I am surprised to see that the Android doesn't yet have a zeroconf stack as part of its API. Zeroconf allows you to find services (eg Web Servers, Instant Messaging peers, SIP) on a given network with minimal effort, something a mobile device going to new places I would envisage doing alot. Obvious starting points could be Avahi (as found in most major linux distributions and jmdns). Apple also have the open source mDNSResponder. (zeroconf is found on the iPhone under the name Bonjour). For more information see: http://www.zeroconf.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] Using KSoap2 with VB.Net webservice
Hello All, I am having some serious difficulty using KSoap2 to connect to a VB.Net webservice and am hoping I could get some help from someone who is smarter than me. I have been trying to work this out for 2 weeks with no luck. So this is my problem. Using KSoap2 on the Android platform I have successfully queried a super simple web service that I created using vb.net (It can be found at http://gershwinsolutions.ftpaccess.cc/2dowebservice.asmx) I receive a XML result which looks quite reasonable to me. ReturnCustomerObject2Response{ ReturnCustomerObject2Result=anyType{CustomerID=1; FirstName=This is a test; }; } However at the point where I try to cast the object I am returning from the webservice into a KvmSerializable object (as required by KSoap2) I receive a java.lang.ClassCastException. This is my object (I have excluded imports for brevity): public class Customer extends BaseObject { private int m_CustomerID; private String m_FirstName; public static Class? extends Customer Customer_CLASS = new Customer ().getClass(); public void setCustomerID(int CustomerID) { m_CustomerID = CustomerID; } public int getCustomerID() { return m_CustomerID; } public void setFirstName(String FirstName) { m_FirstName = FirstName; } public String getFirstName() { return m_FirstName; } public void getPropertyInfo(int index, Hashtable properties, PropertyInfo info) { switch (index) { case 0: info.type = PropertyInfo.INTEGER_CLASS; info.name = CustomerID; break; case 1: info.type = PropertyInfo.STRING_CLASS; info.name = FirstName; break; default: break; } } @Override public Object getProperty(int index) { switch (index) { case 0: return m_CustomerID; case 1: return m_FirstName; default: return null; } } @Override public int getPropertyCount() { return 2; } @Override public void setProperty(int index, Object value) { switch (index) { case 0: m_CustomerID = Integer.parseInt(value.toString()); break; case 1: m_FirstName = value.toString(); break; default: break; } } } private static final String SOAP_ACTION = http://tempuri.org/ ReturnCustomerObject2; private static final String METHOD_NAME = ReturnCustomerObject2; private static final String NAMESPACE = http://tempuri.org/;; private static final String URL = http:// 10.0.2.2/2DoWebService.asmx; public Boolean ExecuteSoapAction() { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope (SoapEnvelope.VER11); envelope.encodingStyle = SoapSerializationEnvelope.XSD; envelope.setOutputSoapObject(request); envelope.addMapping(http://tempuri.org/ReturnCustomerObject2;, ReturnCustomerObject2, new Customer().getClass()); envelope.dotNet = true; Customer Cust = new Customer(); HttpTransportSE HttpTransport = new HttpTransportSE(URL); HttpTransport.debug = true; try { HttpTransport.call(SOAP_ACTION, envelope); //HERE IS WHERE IT ALL GOES HORRIBLY WRONG!! Cust = (Customer) envelope.getResponse(); } catch (Exception ex) { ex.printStackTrace(); } return false; } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Custom view or?
Hi. I need to develop some widget like a standard Gallery. On visible part of the screen should be three images. Images may be scrolled up and down or left and right in dependence on orientation. Image in focus should be larger then others. Scrolling should be realized by touching on left or right image or tilting of device. What is the best way of this solution? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 stop the fucking spam mail ?
read one mail until the end... 2009/4/15 kid197...@yahoo.com.tw Hi How can I unsubscribe this newsgroups? I recieved these spam mails everyday. Why admin send the spam mail to everybody to bother us? We can see article online. I have tried the unsubscribe mail but nobody to handle my cancel request : android-developers-unsubscr...@googlegroups.com __ 付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Mobile Unlocking in india
No need to give the APN settings and all.. You can unlock the mobile with the Airtel Sim with data service options.. thanks raj On Apr 15, 2:58 pm, vinny.s...@gmail.com vinny.s...@gmail.com wrote: Can any body help me unlocking the Android G1 mobile in india for the Vodafone Network ... can body give the APN setting to enter into the phone --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] call flow, events, notifications
Hi all, I'm looking for any documentation on the call flow including any notifications and intents fired. So far I haven't found much. I have some ideas for call related apps but need to know where I can hook into the system. For example I want to know whenever a call ends and if I can get some data associated with the call (phone number, length). Hopefully there's something build in that I can use and not do a hack with the call log. Thanks for any tips, -Rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] socket communication with android emulator and remote PC
Hi, I am trying to create a tcp connection between the android emulator and remote PC. when i use the local host i can able to connect but remote host i could not able to connect. firewall disabled for remote host i used the stcppipe for forwarding Enter the Android tools path and run: adb forward tcp:40 tcp:40 stcppipe.exe -b 192.168.0.85 127.0.0.1 40 40 but my emulator application could not able to connect. what could be the reason. Regards, Anandan N --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to 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 built a resident app ??
I think you want to develop a service. You might find the following tutorial to be useful: http://developerlife.com/tutorials/?p=356 On Apr 13, 11:22 pm, QQ d9147...@gmail.com wrote: I have to built a resident application, but I have no idea to do that If you know how to do, please do me a favor and teaching me. Thank for 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 -~--~~~~--~~--~--~---