[android-developers] Re: How to keep an eye on my application memory?
Thanks. I've used all the values in Debug.MemoryInfo class. It has already been mentioned that Android has a memory limit (16MB / 24MB) per process. My question is, which values is used by the system to determined if my application should be killed? I tried looking for the relevant source but couldn't find it. Anyone from the framework team can point to the relevant 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] How to keep an eye on my application memory?
Hi all, Recently I decided to check how much memory my application is using. For the first test I started my application and went back to the running services screen to check my process's memory. I got ~11MB. It seemed too much in my opinion. I used the Dump HPROF file from the DDMS menu, opened MAT and found the following stats: Size: 2.3 MB Classes: 3.4k Objects: 60.5k. So my first question is: Where is the rest 9MB? I searched the Web for more information and came up with this good post: http://stackoverflow.com/questions/2298208/how-to-discover-memory-usage-of-my-application-in-android So I ran: adb shell dumpsys meminfo - the results are at the end of the post. I can't find my way between all the numbers. So my second question is how much memory my app is really using ? and how can I see what is consuming the memory? Any help will be appreciated. MemInfo results: ** MEMINFO in pid 2758 [xx] ** native dalvikothertotal size: 6872 5191 N/A12063 allocated: 6088 4194 N/A10282 free: 47 997 N/A 1044 (Pss): 1547 6495 312111163 (shared dirty): 2688 4296 1016 8000 (priv dirty): 1468 3304 1916 6688 Objects Views: 59ViewRoots:0 AppContexts:4 Activities:2 Assets:2AssetManagers:2 Local Binders: 40Proxy Binders: 47 Death Recipients:0 OpenSSL Sockets:0 SQL heap: 85 dbFiles:0 numPagers:1 inactivePageKB: 62 activePageKB:0 Asset Allocations zip:/data/app/xx.apk:/resources.arsc: 166K -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Suspicious TCP RST packets while device is sleeping.
I've been seeing the same behavior myself. Can someone address this please? Thanks Guy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Why the compile task in the Ant scripts is defined to compile with debug information?
Hi, I took some time and imported all the new rules from sdk-location\tools \ant\ant_rules_r3.xml During the import I have noticed that in the compiler target, where the javac task is defined the debug property is set to true (debug=true). It doesn't use the manifest debuggable flag or has any reference to any other varaiable. I tried compiling with debug=false and so far didn't notice any problems. Can someone please explain if this is necessary ? 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] Audio internals
Hi all, I have been using the different Audio API's for sometime now. Yet there are still somethings I'm not sure of and that are behaving differently on different handsets. I failed to find good documentation on the relations between the following: 1. AudioManager Mode - which I can change using setMode. 2. AudioManager setSpeakerPhoneOn - Used to direct output to ear- piece or loud speaker. 3. AudioTrack stream - Initialize in the constructor. 4. AudioRecord AudioSource - Initialize in the constructor. All these different classes effect each other when used at the same time. The documentation is not sufficient as most of the time it only states the obvious with no real detail. Can anyone point to more detailed documentation? 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] Invalid Task Affinity name ... must have at least one '.' separator
One of my users failed to install my application, when checking the log this error is shown: Invalid taskAffinity name XXX in package XXX: must have at least one '.' separator Anyone seen this before? I've searched the SDK documentation and it doesn't mention anything like that.. Anyone can point me to some kind of official documentation stating that there must be at least one .? 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] Application name error while updating - caused by adding a color resource
I'll jump to the issue. When I update my application i.e. installing a new version from the SDCard using one of the APKInstallers around, only in the Installing screen the name (in the title) of my application is incorrect. Have anyone else saw this issue? Can anyone try this one their own devices and let me know ? Few more details: I've investigated this issue for a couple of hours now and got to some interesting conclusions: 1. Currently it happens only on the Motorols Droid Motorola Milestone. I've tested also HTC G2. 2. The bug is related to adding a new color resource for an application which didn't had any color resources in the older version. Steps to reproduce: 1. Create the default Android project in Eclipse. 2. Define your own name and icon. 3. Build your application and save the apk - this is Version 1. 4. Add a colors.xml file in your application and add one color (Whatever..) 5. Build the application again - this is Version 2. 6. Install version 1 7. Simulate an upgrade - push the Version 2 file to the device and install using one of many Installers application (I used eoeInstaller). 8. Notice ! - while you'll see the Installing progress bar screen the name of the application will change to #ff or 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] ListView scrolling issue/behavior
Hi, I've encounter some kind of behavior which I'm not sure is correct. I've created an activity which consists of a button and a ListView inside a LinearLayout (Orientation = Vertical). When the activity is displayed nothing is selected. When I move the track-ball (G2 1.6) the first record in the list get selected. When moving up the button gets selected. However, when moving back down and expecting the first record in the list view to be selected again the ListView scrolls and brings the last item displayed to the top of the screen and selects it. Anyone can try to explain this behavior? How can I change/fix 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: ListView scrolling behavior and performance
For the record I managed to solve the scrolling problem. The issue was setting an event listener to the onClick event on the item view itself. The correct method is use :setOnItemClickListener of the ListView itself. The same is correct for long press context menu. Registering for the long press listener of the item view is wrong instead use: ListView.setOnCreateContextMenuListener. I couldn't find anything regarding this in the documentation so I suggest this should be added. G'day On Feb 4, 5:46 pm, GDroid baron...@gmail.com wrote: Hi, I have a listview showing contacts. When I'm scrolling the list the scroll works pretty smooth however when/if I'm trying to continue the scroll in the middle of the last scrolling the scroll just stops and sometimes the item I clicked on is selected (I have registered an OnClickListener to the item view). I would like to get smooth scrolling just as in the device native contact list. My implementation builds each contact a view containing: 1. Big picture for the contact image. 2. Small picture for the type of the contact. 3. TextView with the Contact name 4. TextView with some extra text about that contact. My current layout for every item looks like: LinearLayout ImageView / LinearLayout/ LinearLayout/ ImageView / TextView/ /LinearLayout TextView/ /LinearLayout /LinearLayout I've tried changing the LinearLayouts to relative ones but saw no improvement in performance. I've created my own Selector in code (to eliminate the time it takes to load the resource) so that odd rows will have different background color. The code looks like: StateListDrawable draw = new StateListDrawable(); draw.addState(new int[] {android.R.attr.state_selected}, mSelectedRowDrawable); draw.addState(new int[] {-99},mOddRowBG); draw.addState(new int[] {},mRowBG); view.setBackgroundDrawable(draw); I'll be glad to give more details if needed. Thanks for the help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ListView scrolling behavior and performance
For the record I managed to solve the scrolling problem. The issue was setting an event listener to the onClick event on the item view itself. The correct method is use :setOnItemClickListener of the ListView itself. The same is correct for long press context menu. Registering for the long press listener of the item view is wrong instead use: ListView.setOnCreateContextMenuListener. I couldn't find anything regarding this in the documentation so I suggest this should be added. G'day On Feb 4, 5:46 pm, GDroid baron...@gmail.com wrote: Hi, I have a listview showing contacts. When I'm scrolling the list the scroll works pretty smooth however when/if I'm trying to continue the scroll in the middle of the last scrolling the scroll just stops and sometimes the item I clicked on is selected (I have registered an OnClickListener to the item view). I would like to get smooth scrolling just as in the device native contact list. My implementation builds each contact a view containing: 1. Big picture for the contact image. 2. Small picture for the type of the contact. 3. TextView with the Contact name 4. TextView with some extra text about that contact. My current layout for every item looks like: LinearLayout ImageView / LinearLayout/ LinearLayout/ ImageView / TextView/ /LinearLayout TextView/ /LinearLayout /LinearLayout I've tried changing the LinearLayouts to relative ones but saw no improvement in performance. I've created my own Selector in code (to eliminate the time it takes to load the resource) so that odd rows will have different background color. The code looks like: StateListDrawable draw = new StateListDrawable(); draw.addState(new int[] {android.R.attr.state_selected}, mSelectedRowDrawable); draw.addState(new int[] {-99},mOddRowBG); draw.addState(new int[] {},mRowBG); view.setBackgroundDrawable(draw); I'll be glad to give more details if needed. Thanks for the help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] ListView scrolling behavior and performance
Hi, I have a listview showing contacts. When I'm scrolling the list the scroll works pretty smooth however when/if I'm trying to continue the scroll in the middle of the last scrolling the scroll just stops and sometimes the item I clicked on is selected (I have registered an OnClickListener to the item view). I would like to get smooth scrolling just as in the device native contact list. My implementation builds each contact a view containing: 1. Big picture for the contact image. 2. Small picture for the type of the contact. 3. TextView with the Contact name 4. TextView with some extra text about that contact. My current layout for every item looks like: LinearLayout ImageView / LinearLayout/ LinearLayout/ ImageView / TextView/ /LinearLayout TextView/ /LinearLayout /LinearLayout I've tried changing the LinearLayouts to relative ones but saw no improvement in performance. I've created my own Selector in code (to eliminate the time it takes to load the resource) so that odd rows will have different background color. The code looks like: StateListDrawable draw = new StateListDrawable(); draw.addState(new int[] {android.R.attr.state_selected}, mSelectedRowDrawable); draw.addState(new int[] {-99},mOddRowBG); draw.addState(new int[] {},mRowBG); view.setBackgroundDrawable(draw); I'll be glad to give more details if needed. Thanks for the help. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Crop a Picture after Using Camera to Take It
Hi, I'm testing this code on Motorola Milestone (2.0). And I get an exception when trying to launch the Cropper: 01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.camera/com.android.camera.CropImage}; have you declared this activity in your AndroidManifest.xml? When trying the same intent without the setClassName call I get this error: 01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.camera.action.CROP dat=file:///sdcard/ tmp_contact_1264594532122.jpg (has extras) } Anyone? Also, there is no Constant for the Crop image intent. Can anyone from the Google/Android Framework team explain? It seems like it is there to be used but someone forgot to create the constant. Thanks On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote: Hi all, After doing some reading, I realized it can't be done so simply. My modded Contacts source is athttp://github.com/Wysie, you can take a look if you're interested. Also, here's what I did to get it working: private void doTakePhotoAction() { //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo //http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-... //http://www.damonkohler.com/2009/02/android-recipes.html //http://www.firstclown.us/tag/android/ // The one I used to get everything working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //Wysie_Soh: Create path for temp file mImageCaptureUri = Uri.fromFile(new File (Environment.getExternalStorageDirectory(), tmp_contact_ + String.valueOf (System.currentTimeMillis()) + .jpg)); intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); try { intent.putExtra(return-data, true); startActivityForResult(intent, PICK_FROM_CAMERA); } catch (ActivityNotFoundException e) { //Do nothing for now } } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) { return; } switch (requestCode) { case CROP_FROM_CAMERA: { //Wysie_Soh: After a picture is taken, it will go to PICK_FROM_CAMERA, which will then come here //after the image is cropped. final Bundle extras = data.getExtras(); if (extras != null) { Bitmap photo = extras.getParcelable(data); mPhoto = photo; mPhotoChanged = true; mPhotoImageView.setImageBitmap(photo); setPhotoPresent(true); } //Wysie_Soh: Delete the temporary file File f = new File(mImageCaptureUri.getPath()); if (f.exists()) { f.delete(); } InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.showSoftInput(mPhotoImageView, InputMethodManager.SHOW_IMPLICIT); break; } case PICK_FROM_CAMERA: { //Wysie_Soh: After an image is taken and saved to the location of mImageCaptureUri, come here //and load thecropeditor, with the necessary parameters (96x96, 1:1 ratio) Intent intent = new Intent (com.android.camera.action.CROP); intent.setClassName(com.android.camera, com.android.camera.CropImage); intent.setData(mImageCaptureUri); intent.putExtra(outputX, 96); intent.putExtra(outputY, 96); intent.putExtra(aspectX, 1); intent.putExtra(aspectY, 1); intent.putExtra(scale, true); intent.putExtra(return-data, true); startActivityForResult(intent, CROP_FROM_CAMERA); break; } } } Hope it helps :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Crop a Picture after Using Camera to Take It
That's what I did in the second try. As I mentioned I commented out the the setClassName method and got the second exception: 01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.camera.action.CROP dat=file:///sdcard/ tmp_contact_1264594532122.jpg (has extras) } BTW - Thanks for the quick response. On Jan 27, 4:03 pm, zero zeroo...@googlemail.com wrote: the activity is not present on all systems under that explicit package name. try calling it with just the action, leaving out package and classname in the intent On Jan 27, 1:31 pm, GDroid baron...@gmail.com wrote: Hi, I'm testing this code on Motorola Milestone (2.0). And I get an exception when trying to launch the Cropper: 01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.camera/com.android.camera.CropImage}; have you declared this activity in your AndroidManifest.xml? When trying the same intent without the setClassName call I get this error: 01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.camera.action.CROP dat=file:///sdcard/ tmp_contact_1264594532122.jpg (has extras) } Anyone? Also, there is no Constant for the Crop image intent. Can anyone from the Google/Android Framework team explain? It seems like it is there to be used but someone forgot to create the constant. Thanks On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote: Hi all, After doing some reading, I realized it can't be done so simply. My modded Contacts source is athttp://github.com/Wysie, you can take a look if you're interested. Also, here's what I did to get it working: private void doTakePhotoAction() { //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo //http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-... //http://www.damonkohler.com/2009/02/android-recipes.html //http://www.firstclown.us/tag/android/ // The one I used to get everything working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //Wysie_Soh: Create path for temp file mImageCaptureUri = Uri.fromFile(new File (Environment.getExternalStorageDirectory(), tmp_contact_ + String.valueOf (System.currentTimeMillis()) + .jpg)); intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); try { intent.putExtra(return-data, true); startActivityForResult(intent, PICK_FROM_CAMERA); } catch (ActivityNotFoundException e) { //Do nothing for now } } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) { return; } switch (requestCode) { case CROP_FROM_CAMERA: { //Wysie_Soh: After a picture is taken, it will go to PICK_FROM_CAMERA, which will then come here //after the image is cropped. final Bundle extras = data.getExtras(); if (extras != null) { Bitmap photo = extras.getParcelable(data); mPhoto = photo; mPhotoChanged = true; mPhotoImageView.setImageBitmap(photo); setPhotoPresent(true); } //Wysie_Soh: Delete the temporary file File f = new File(mImageCaptureUri.getPath()); if (f.exists()) { f.delete(); } InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); mgr.showSoftInput(mPhotoImageView, InputMethodManager.SHOW_IMPLICIT); break; } case PICK_FROM_CAMERA: { //Wysie_Soh: After an image is taken and saved to the location of mImageCaptureUri, come here //and load thecropeditor, with the necessary parameters (96x96, 1:1 ratio) Intent intent = new Intent (com.android.camera.action.CROP); intent.setClassName(com.android.camera, com.android.camera.CropImage); intent.setData(mImageCaptureUri); intent.putExtra(outputX, 96); intent.putExtra(outputY, 96); intent.putExtra(aspectX, 1); intent.putExtra(aspectY, 1); intent.putExtra(scale, true); intent.putExtra(return-data, true); startActivityForResult(intent
[android-developers] Re: Crop a Picture after Using Camera to Take It
I've tried testing it with the code from the 1st post. Looks like: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, MediaStore.Images.Media.EXTERNAL_CONTENT_URI.toString()); intent.putExtra(crop, true); .. .. If i'm not wrong, this tells the Camera activity to call the crop activity right after (I also looked at the sources). It returns the same exception. Which is very odd. It means that the Camera activity failed to launch the crop activity ?! BTW - A simple test of trying to set an image to a contact in my contact list works just fine (with croping). According to the Android sources, the contacts application is doing the same thing as me example. So now I call to Motorola developers, what's your 5-cents? Thanks On Jan 27, 5:20 pm, Streets Of Boston flyingdutc...@gmail.com wrote: ... The name of the action looks good... In my app, the image-Uri in the setData is different. You use a 'file:' uri. In my app, I use a 'content:' uri. Maybe the CROP action cannot handle 'file:' uris and can only handle images that are inserted into the Images content-provider. On Jan 27, 9:57 am, GDroid baron...@gmail.com wrote: That's what I did in the second try. As I mentioned I commented out the the setClassName method and got the second exception: 01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.camera.action.CROP dat=file:///sdcard/ tmp_contact_1264594532122.jpg (has extras) } BTW - Thanks for the quick response. On Jan 27, 4:03 pm, zero zeroo...@googlemail.com wrote: the activity is not present on all systems under that explicit package name. try calling it with just the action, leaving out package and classname in the intent On Jan 27, 1:31 pm, GDroid baron...@gmail.com wrote: Hi, I'm testing this code on Motorola Milestone (2.0). And I get an exception when trying to launch the Cropper: 01-27 14:29:24.210: ERROR/AndroidRuntime(1895): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.camera/com.android.camera.CropImage}; have you declared this activity in your AndroidManifest.xml? When trying the same intent without the setClassName call I get this error: 01-27 14:15:46.483: ERROR/AndroidRuntime(1813): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.camera.action.CROP dat=file:///sdcard/ tmp_contact_1264594532122.jpg (has extras) } Anyone? Also, there is no Constant for the Crop image intent. Can anyone from the Google/Android Framework team explain? It seems like it is there to be used but someone forgot to create the constant. Thanks On Dec 29 2009, 8:30 pm, Wysie sohyuanc...@gmail.com wrote: Hi all, After doing some reading, I realized it can't be done so simply. My modded Contacts source is athttp://github.com/Wysie, you can take a look if you're interested. Also, here's what I did to get it working: private void doTakePhotoAction() { //http://2009.hfoss.org/Tutorial:Camera_and_Gallery_Demo //http://stackoverflow.com/questions/1050297/how-to-get-the-url-of-the-... //http://www.damonkohler.com/2009/02/android-recipes.html //http://www.firstclown.us/tag/android/ // The one I used to get everything working:http://groups.google.com/group/android-developers/msg/2ab62c12ee99ba30 Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); //Wysie_Soh: Create path for temp file mImageCaptureUri = Uri.fromFile(new File (Environment.getExternalStorageDirectory(), tmp_contact_ + String.valueOf (System.currentTimeMillis()) + .jpg)); intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mImageCaptureUri); try { intent.putExtra(return-data, true); startActivityForResult(intent, PICK_FROM_CAMERA); } catch (ActivityNotFoundException e) { //Do nothing for now } } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode != RESULT_OK) { return; } switch (requestCode) { case CROP_FROM_CAMERA: { //Wysie_Soh: After a picture is taken, it will go to PICK_FROM_CAMERA, which will then come here //after the image is cropped. final Bundle extras = data.getExtras(); if (extras != null) { Bitmap photo = extras.getParcelable(data); mPhoto = photo
[android-developers] Re: EditText hint shows extra spaces when inputType=textpassword
No. Any one from the Google Team have a response? On Jan 5, 4:33 am, csyperski csyper...@gmail.com wrote: I am seeing the same behavior, did you find any fix for this? On Dec 23 2009, 7:22 am, GDroid baron...@gmail.com wrote: Hi, Just wondered, am I the only one to encounter this strange behavior. When placing an EditText inside my activity and setting its inputType=textPassword as follow: EditText android:text= android:id=@+id/EditText01 android:hint=This is a hint android:inputType=textPassword android:layout_width=wrap_content android:layout_height=wrap_content/EditText The hint is displayed with bigger/double spaces between the words. If I remove the inputType attribute it all goes back to normal. I couldn't find a known issue regarding this behavior. BTW- If you wonder why this is important (it isn't that much) try putting two EditText widgets one below the other and set the inputType of one of them to textpassword it doesn't look good. Any comments? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Playing live video from a buffer
Hi guys, I'm interested in playing live video. That is, I have my own buffer (frame) and I would like to send it to the screen. As far as I've found the Media Player class supports playing from a file or a URL. So my question is should I try using OpenGL, override the onDraw of my View, or is there a nice way to implement a stream (Content provider maybe?) that the Media Player can interact with? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] EditText hint shows extra spaces when inputType=textpassword
Hi, Just wondered, am I the only one to encounter this strange behavior. When placing an EditText inside my activity and setting its inputType=textPassword as follow: EditText android:text= android:id=@+id/EditText01 android:hint=This is a hint android:inputType=textPassword android:layout_width=wrap_content android:layout_height=wrap_content/EditText The hint is displayed with bigger/double spaces between the words. If I remove the inputType attribute it all goes back to normal. I couldn't find a known issue regarding this behavior. BTW- If you wonder why this is important (it isn't that much) try putting two EditText widgets one below the other and set the inputType of one of them to textpassword it doesn't look good. Any comments? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Picking up a PhoneBook entry under Android 2.0 !!!
I've tested this code as well and it is indeed backward. Using this solution, I need to set your API Target Level to 5 (Android 2.0), and set the minimum (android:minSdkVersion) to 3 (Android 1.5). This way I am able to compile code which reference API 5 methods and run on older devices. However, there is a major problem with that. I can't run or debug this code on older devices (2.0) using the Eclipse plug-in. Anyone having the same problem? This makes testing and debugging applications on older devices difficult. Aren't we doing all the extra work for the application to run on the older platforms?? Anyway, I think I have a solution (and I would like to get feedback from google guys as well): - Create a new Java Project - Add the ..platforms\android-2.0\Android.Jar to the Libraries. - Write your 2.0 code in this project. - In your main project, reference the new project. - Now you can compile, run and Debug on all devices. * Whatever design pattern you choose for the loading of the new code - Don't forget to instantiate the classes by name (as in the examples above). Any other ideas? On Nov 20, 6:46 pm, stanlick stanl...@gmail.com wrote: Thanks Dmitri -- Is this test correct? int sdkVersion = Integer.parseInt (Build.VERSION.SDK); // Cupcake style if (sdkVersion = Build.VERSION_CODES.ECLAIR) { className = ...ContactAccessorSdk3_4; } else { className = ...ContactAccessorSdk5; } It looks backward? Peace, Scott On Nov 3, 3:44 pm, Dmitri Plotnikov dplotni...@google.com wrote: I just published some sample code illustrating this use of both legacy and new Contacts APIs in the same app. Seehttp://code.google.com/p/android-business-card Cheers, - Dmitri On Mon, Nov 2, 2009 at 9:31 AM, Mark Murphy mmur...@commonsware.com wrote: jarkman wrote: int sdkVersion = Integer.parseInt(Build.VERSION.SDK); Note that if you are using API version 4 (1.6 and newer), there is Build.VERSION.SDK_INT, which already converts this to an integer. If you are still using API version 3, you'll need to parse the String as shown above. -- Mark Murphy (a Commons Guy) http://commonsware.com|http://twitter.com/commonsguy Android 1.6 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Contacts FAQ?
Thanks jarkman. I've continued the discussion in the thread you have mentioned. http://groups.google.com/group/android-developers/msg/f3b24f3a0748a622 On Nov 19, 12:27 pm, jarkman jark...@gmail.com wrote: GDroid - here's a recipe for supporting two SDK versions in one app: http://groups.google.com/group/android-developers/msg/f3b24f3a0748a622 Richard On Nov 18, 9:43 am, GDroid baron...@gmail.com wrote: I would like to add one more question to this issue: 15) What is the best way to write the code so in case the API Level is below 5, some of the contacts actions can still be done correctly. As far as I've checked when publishing an application on the market there is no way to publish two apks, for different API levels. As noted in other threads, the only Phone I know of currently running Android 2.0 is the Motorola Droid. My guess is that every developer would like to be able to support other/older phones as well. On Nov 17, 8:38 pm, Rachel Blackman ceruleanspa...@gmail.com wrote: On Nov 17, 2009, at 10:21 AM, Jeff Sharkey wrote: [ ... snip ... ] Thank you! I'll try to write up an updated FAQ this evening, with some short examples written for various queries, and post a draft. :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 2.0] Contacts FAQ?
I would like to add one more question to this issue: 15) What is the best way to write the code so in case the API Level is below 5, some of the contacts actions can still be done correctly. As far as I've checked when publishing an application on the market there is no way to publish two apks, for different API levels. As noted in other threads, the only Phone I know of currently running Android 2.0 is the Motorola Droid. My guess is that every developer would like to be able to support other/older phones as well. On Nov 17, 8:38 pm, Rachel Blackman ceruleanspa...@gmail.com wrote: On Nov 17, 2009, at 10:21 AM, Jeff Sharkey wrote: [ ... snip ... ] Thank you! I'll try to write up an updated FAQ this evening, with some short examples written for various queries, and post a draft. :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: DalvikVM could not find field after ProGuard Obfuscation
I was testing against 1.5. I removed the - overloadaggressively and it worked. Thanks for the help. On Nov 6, 11:52 pm, fadden fad...@android.com wrote: On Nov 4, 8:37 am, GDroid baron...@gmail.com wrote: Currently I've managed to build the correct build.xml file and run ProGuard 4.4. However, every time I install my apk I get multiple errors from the dalvikvm such as Found field 'e' but sig is 'J' not 'B' or .. sig is 'Lc' not '[c' (Which has something to do with arrays and enums). If these are static fields, I'm guessing you've run afoul of this: http://code.google.com/p/android/issues/detail?id=2422 In short, the VM spec allows you to have multiple fields with the same name but different types, but Dalvik was rejecting them. The fix should be in 2.0. What version of the Android software are you testing against? ProGuard is very good about letting you configure specific things. Looking through the online manual, it looks like turning off - overloadaggressively may avoid this behavior. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Obfuscation of Android project
Hi, I'm new to Java, eclipse and android so please understand if I'm asking some stupid questions. I already have an Android Project created with eclipse and the android plug-in. I would like to make my apk file obfuscate. I search google a lot and found out: 1. ProGuard is an open-source obfuscation application. 2. Some of you already managed to obfuscate your applications using ProGuard. 3.I have a good configuration for Proguard (Example at the bottom) and managed to run it manually on my *.class files in my projects bin folder. However, when running the ProGuard manually I'm running it on the class files and creating new class files but I am not changing my apk. If I'm correct during the build eclipse create one .dex file (how?) and then packs it with all the projects resources into an *.apk. How can I get inside this process? Is the only way to run ProGuard and later packing the *.apk file is using Ant and an Build.xml file. If yes, what's the best way to do that? Waiting for your help, 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] DalvikVM could not find field after ProGuard Obfuscation
: couldn't find static field 11-04 15:59:16.634: WARN/dalvikvm(1444): Found field 'a', but sig is 'B' not 'Lcom/OF/GCompany/Logger/ILogger;' 11-04 15:59:16.634: DEBUG/dalvikvm(1444): DexOpt: couldn't find static field 11-04 15:59:16.825: WARN/dalvikvm(1444): Found field 'e', but sig is 'Lcom/GCompany/CallState;' not 'Z' 11-04 15:59:16.835: DEBUG/dalvikvm(1444): DexOpt: couldn't find static field 11-04 15:59:16.854: WARN/dalvikvm(1444): Found field 'e', but sig is 'Lcom/GCompany/CallState;' not 'Z' 11-04 15:59:16.854: DEBUG/dalvikvm(1444): DexOpt: couldn't find static field 11-04 15:59:16.864: WARN/dalvikvm(1444): Found field 'a', but sig is 'J' not 'Lcom/OF/GCompany/TServiceId;' 11-04 15:59:16.874: DEBUG/dalvikvm(1444): DexOpt: couldn't find static field 11-04 15:59:16.884: WARN/dalvikvm(1444): Found field 'e', but sig is 'Lcom/GCompany/CallState;' not 'Z' 11-04 15:59:16.894: DEBUG/dalvikvm(1444): DexOpt: couldn't find static field 11-04 15:59:17.025: WARN/dalvikvm(1444): Found field 'a', but sig is 'Landroid/net/wifi/WifiManager$WifiLock;' not 'Landroid/net/wifi/ WifiManager;' 11-04 15:59:17.035: DEBUG/dalvikvm(1444): DexOpt: couldn't find static field 11-04 15:59:17.145: WARN/dalvikvm(1444): Found field 'a', but sig is 'Lcom/OF/GCompany/Logger/ILogger;' not 'Lcom/GCompany/comm/ CommHandler;' 11-04 15:59:17.154: DEBUG/dalvikvm(1444): DexOpt: couldn't find static field 11-04 15:59:17.315: WARN/dalvikvm(1444): Found field 'e', but sig is 'Lcom/GCompany/CallState;' not 'Z' Also, when trying to run the application I get one 11-04 16:17:25.074: WARN/dalvikvm(1448): Found field 'a', but sig is 'Landroid/net/wifi/WifiManager$WifiLock;' not 'Landroid/net/wifi/ WifiManager;' And the application exit with: 11-04 16:17:25.134: ERROR/AndroidRuntime(1448): Uncaught handler: thread main exiting due to uncaught exception 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): java.lang.VerifyError: com.GCompany.GCompanyStart 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at java.lang.Class.newInstanceImpl(Native Method) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at java.lang.Class.newInstance(Class.java:1472) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.app.Instrumentation.newActivity(Instrumentation.java:1097) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2186) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2284) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.app.ActivityThread.access$1800(ActivityThread.java:112) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.os.Handler.dispatchMessage(Handler.java:99) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.os.Looper.loop(Looper.java:123) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at android.app.ActivityThread.main(ActivityThread.java:3948) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at java.lang.reflect.Method.invokeNative(Native Method) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at java.lang.reflect.Method.invoke(Method.java:521) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:782) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540) 11-04 16:17:25.173: ERROR/AndroidRuntime(1448): at dalvik.system.NativeStart.main(Native Method) When skipping the obfuscate target during the build I don't get these errors. Any help will be appreciated… Thank you GDroid -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en