[android-developers] ExpandableListView Groups with no children?
I have an ExpandableListView where not every group has children, however, the arrow indicator shows up for every group. I would think that returning 0 from public int getChildrenCount(int groupPosition) would be enough info for it to tell that it doesn't have any children. Does anyone know how to remove the arrow indicator for groups without children? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to launch browser activity?
I have been unable to find out how to launch the browser activity in 1.0_r1. I've found a couple of posts giving examples of how to do it, but they seem out of date as some of the functions are no longer available. Here is what I have: Intent intent = new Intent(); ComponentName comp = new ComponentName ("com.google.android.browser", "com.google.android.browser.BrowserActivity"); intent.setComponent(comp); intent.setAction("android.intent.action.VIEW"); intent.addCategory("android.intent.category.BROWSABLE"); Uri uri = Uri.parse(url); intent.setData(uri); try { startActivity(intent); } catch (Exception e) { e.printStackTrace(); } But I get an ActivityNotFound exception. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to launch browser activity?
Thanks a lot, that worked. I had tried that before, but without the protocol on the front, just "www." That makes sense now. On Dec 4, 6:19 pm, Mark Murphy <[EMAIL PROTECTED]> wrote: > junker37 wrote: > > I have been unable to find out how to launch the browser activity in > > 1.0_r1. > > startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://...";))); > > should do it, I think. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 1.9 Published! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to force screen backlight brightness change immediately?
Does anybody have an answer for this? I am looking to change the brightness level as well. On Oct 30, 9:44 am, Peli <[EMAIL PROTECTED]> wrote: > It seems changing the backlight through the following code does not > affect the lightbrightnessimmediately: > > Settings.System.putInt(getContentResolver(), > Settings.System.SCREEN_BRIGHTNESS, 255); > > but the change is only visible after a while (e.g. after screen dims > and gets bright again later). It seems the Settings / > BrightnessPreferences.java > (http://git.source.android.com/?p=platform/packages/apps/Settings.git;... > ) uses IHardwareService to changebrightnessimmediately. > > This API is not available to us. So is there an alternative way to > immediately force thebrightnesschange after setting it through > Settings.System? Is there a workaround that we could use? > > Peli --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Change screen brightness immediately
Does anyone know how to change the brightness immediately? I'm looking for a response to: http://groups.google.com/group/android-developers/browse_thread/thread/432802c9ad58d4f5/8adbb7c9c129519a?lnk=gst&q=brightness#8adbb7c9c129519a --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How to bring up the keyboard from WebViewClient
Here's my problem. I have a WebView, but I don't want a new Intent to be launched when the page is redirected, so I wrote my own WebViewClient to handle this. However, I can't figure out how to get the WebViewClient to allow keyboard input. Clicking on an input box does not bring up the soft keyboard, nor can I use the hard keyboard on the G1 to input data. I don't see any methods in WebViewClient that would handle this. Anyone have any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 bring up the keyboard from WebViewClient
Anybody have a clue? I must be totally missing something here. I can find anything on google like this and it seems so simple. If I implement my own WebViewClient, even if I don't override any methods, the soft keyboard does not come up when an input box is touched. On Oct 7, 9:02 am, junker37 wrote: > Here's my problem. I have a WebView, but I don't want a new Intent to > be launched when the page is redirected, so I wrote my own > WebViewClient to handle this. However, I can't figure out how to get > the WebViewClient to allow keyboard input. Clicking on an input box > does not bring up the soft keyboard, nor can I use the hard keyboard > on the G1 to input data. > > I don't see any methods in WebViewClient that would handle this. > Anyone have any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 determine if phone supports video capture?
How can I determine if the phone my app is running on supports video capture? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 determine if phone supports video capture?
Well, I couldn't find an official way to do this. The only way I know is to assume that all Android phones will support video capture, so if the phone is running 1.5 (3) or greater, it will support video capture. android.os.Build.VERSION.SDK_INT On Oct 12, 3:05 pm, junker37 wrote: > How can I determine if the phone my app is running on supports video > capture? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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 capture an image in Android and have it show up in the gallery?
I was capturing images before that were showing up in the gallery, but now they are not and I can't figure out why. Here is my code: ContentValues values = new ContentValues(); values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE, false); String name = "ugc_" + String.valueOf(System.currentTimeMillis()); values.put(android.provider.MediaStore.Images.Media.TITLE, name); imageURI = getContentResolver().insert (android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values); I also tried: values.put(android.provider.MediaStore.Images.Media.IS_PRIVATE, 0); as well as leaving out that value, but nothing seems to work now. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: onSearchRequested() doesn't call search activity in 1.5
Any ideas? I am attempting the same thing right now with 1.5 and am seeing the same behavior. On Oct 8, 6:42 am, Miguel Paraz wrote: > Hi, > The 1.5 AVD doesn't seem to follow the documentation > in:http://developer.android.com/reference/android/app/SearchManager.html > > which says it's enough to call onSearchRequested() to call thesearch > activity. > I need to call startSearch() to make it work. > However, when I check the source code of Activity.java, > onSearchRequested() does call startSearch(). > > This works in 1.6. > > Is this a bug in 1.5, or did I miss something? 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: android.os.Build.MANUFACTURER
This is what I have been using for a unique phone id. Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID); On Oct 20, 10:11 am, Greivin Lopez wrote: > Ok I see IMEI is not valid as a device identifier for Android > devices. What do you guys suggest to use instead of the IMEI to > identify the device? Is there any best practice in Android environment > to do that? > > I'm asking because I also working on that part of my application right > now. > > Thanks for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] How do I know when my view will be displayed?
I have a HorizontalScrollView, with a horizontal LinearLayout that contains my different Views. I want to know when the particular view is coming onto the screen so I can download an image for the view. So, when my HorizontalScrollView first loads, the first view is viewable, if the user scrolls, I want to know how I can get a call so that I can download some information for the view that is becoming viewable. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Shape with open border
I am wondering how to do this as well. Also, I can't seem to find where this is documented. On Oct 19, 4:19 am, Viktor Bresan wrote: > Hi all. > > I would like to have ashapethat has border only on 3 sides: top, > left and right, i.e. I want bottom to be open. How can I achieve that > definingshapeinXML? > > Currently I have a normal 4 side border using the followingshapeXML > definition: > > > http://schemas.android.com/apk/res/android"; > android:layout_width="fill_parent" > android:layout_height="fill_parent" > > > > /> > > android:color="#808480" > /> > > android:top="1dp" > android:right="1dp" > android:bottom="1dp" > /> > > > Many thanks, Viktor. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Data Retrieval in Android
It is important to note that you can't just package the database in your apk and start using it. You'll have to create it first (which creates an empty database at the path specified by Mark) and then manually perform the steps necessary to re-populate it. Based on a suggestion by Mark, I exported my database as a Raw string resource and executed those command on the database the first time my app is run. On Oct 23, 6:48 am, Mark Murphy wrote: > Maxood wrote: > > Where is this path: > > /data/data/your.package.here/databases? > > On your emulator or device, though you can only browse to it on the > emulator. And, of course, "your.package.here" is replaced by your own > app's package name. > > > None of the books talk about where to keep the db file? > > The "db file" is on the device or emulator. > > Bear in mind that you never really have to care where the actual > database is stored on the device, and that the above path I cite may > change in future Android releases. Just provide the name of the database > (e.g., constants.db), and Android handles the location for you. > > > Do i have to create a databases folder just like we create raw for > > video and audio files? > > You are confusing resources and databases. Resources are packaged as > part of an application and do not change. Databases are not (generally) > packaged as part of an application and (frequently) change. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android 1.5 Programming Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Two applications, same package. How?
What I am trying to do is install two applications, packaged from the same code, but with different names and different strings.xml files. I created the two apk files, however, when trying to install the second application, it fails because it says it's already installed. >From what I can tell, it thinks the two applications are the same, my guess is because of the package attribute in the manifest. I modified the manifest with a different package name, but R is generated based on that package name and that affects the rest of the code. So, my question is this: What's the process I should be using to install two applications using the same code, but with different names and different strings.xml files? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Two applications, same package. How?
Ok, here's what I did. Seems to be working now, but someone please let me know if it will cause problems later. In my manifest, I specified each activity's full path, rather than a relative path: ie versus In my manifest, I have a base package name, this is where the R gets generated, ie: Then, for each build of the app I create, I modify the package attribute, ie: , , etc. This will keep me from needing to modify any source code during my build. On Aug 27, 11:27 pm, "Mark Murphy" wrote: > > I created the two apk files, however, when trying to install the > > second application, it fails because it says it's already installed. > > From what I can tell, it thinks the two applications are the same, my > > guess is because of the package attribute in the manifest. > > Correct. > > > I modified the manifest with a different package name, but R is > > generated based on that package name and that affects the rest of the > > code. > > Correct. > > > So, my question is this: What's the process I should be using to > > install two applications using the same code, but with different names > > and different strings.xml files? > > The process you were using is correct, to the extent there is *any* good > way of doing what you are trying to do. You will need to script a means of > altering your source code (or use Eclipse's refactoring tools) to deal > with the fact that your code and R.java should wind up in some other > package. > > Depending on your code base, it may be worthwhile to package some of it as > an independent JAR file that the two applications use. Since such JAR > files cannot reliably reference R.java constants anyway, that JAR file's > code would not need to change for such a rename process. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > Android App Developer Books:http://commonsware.com/books.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Threads and Screen Orientation Change
Can you explain how to stop the android framework from destroying and re-creating the activity on a layout change? On Aug 31, 11:24 am, Marco Nelissen wrote: > On Mon, Aug 31, 2009 at 6:06 AM, ReubenH wrote: > > > Having used Android for 4 months, and now having a game doing well in > > the market, I am still wondering why a rotation change results in > > Activity creation / destruction in the first place? It has never made > > sense... why not an onLayoutChanged() type of event instead? > > You can have this too, if that's what you want. You can specify in > your manifest which configuration changes your activity can handle > itself, and you will see your Activity.onConfigurationChanged() called > when such a configuration change happens. > Note however that in that case your activity is responsible for > handling the configuration change, e.g. loading a new layout and > resources if needed, updating all the references your app has to > buttons, lists and other widgets, etc. > > > > > It seems wasteful and counterintuitive to create new activities when > > the activity hasn't actually changed... > > > I'd love to know the reason for it, am sure I am probably missing > > something obvious. > > > Thanks, > > > -- Reuben > > > On Aug 31, 2:39 am, CraigsRace wrote: > >> Dianne: Yes, using a static Handler is a solution. Although, IMO, > >> it's not the most eloquent solution. But it will work, so I should be > >> happy. :) > > >> On Aug 31, 11:19 am, Dianne Hackborn wrote: > > >> > And you shouldn't be doing this. You could have a static pointing to the > >> > currently running activity instance (which very well may be null, which > >> > is a > >> > valid state, and something your thread needs to deal with anyway). Often > >> > you do this by giving the thread just a Handler to communicate back with > >> > the > >> > main thread, which the activity implements as a static along with a > >> > static > >> > of the current activity instance. So your thread posts a message to > >> > display > >> > a dialog, and then on the main thread you get that message and handle it > >> > on > >> > whichever activity instance is the current one. > > >> > On Sun, Aug 30, 2009 at 4:10 PM, CraigsRace wrote: > > >> > > Mark: Sorry, I deleted my original post (very rude, I know!), as I > >> > > decided to just go ahead and write a solution myself (see previous > >> > > post). > > >> > > As for starting multiple threads, yes, they will hold on to the old > >> > > Activities. However, that's what happens right now, no? In fact, > >> > > that's the whole problem, when the threads try to do UI, they are > >> > > referring to the old activities. > > >> > > On Aug 31, 8:26 am, Mark Murphy wrote: > >> > > > CraigsRace wrote: > >> > > > > I'm obviously missing something, as I thought the Thread would be > >> > > > > the > >> > > > > only thing holding onto the old Activity (as it is now). When the > >> > > > > Thread dies, the old activity would be garbage collected (as it > >> > > > > does > >> > > > > now). All forwarding would be done via the Activity class. > > >> > > > Correct, but what Ms. Hackborn wrote was: > > >> > > > >> And that still means it needs to keep the old activity around so > >> > > > >> the > >> > > > thread > >> > > > >> can use it. > > >> > > > So, given that, imagine this scenario: > > >> > > > -- Activity instance A starts > >> > > > -- You fork a background thread, holding onto A, that will run for 30 > >> > > > seconds, as a result of a button click > >> > > > -- At 0:02 into the thread, the user rotates the screen > >> > > > -- Android creates a new activity instance (B), and has A point to B > >> > > > for > >> > > > the purposes of your call forwarding stuff > >> > > > -- At 0:05 into the first thread, you fork another thread, holding > >> > > > onto > >> > > > B, that will run for 30 seconds, as a result of a button click > >> > > > -- At 0:07 into the thread, the user rotates the screen again (bear > >> > > > in > >> > > > mind that for non-QWERTY devices, it doesn't take much to cause the > >> > > > screen to rotate) > >> > > > -- Android creates a new activity instance (C), and has B point to C > >> > > > for > >> > > > the purposes of your call forwarding stuff > > >> > > > At this point, we have three total instances of the activity running > >> > > > (A, > >> > > > B, C), and we still have 23 seconds of the original 30 to work with. > >> > > > Factor in the possibility of developers having threads that run for > >> > > > 30 > >> > > > days instead of 30 seconds. > > >> > > > In your specific example, coded properly, the forwarding mechanism > >> > > > may > >> > > > work fine, if your thread is very short lived (a couple of seconds), > >> > > > won't get started again, and your activities are not terribly > >> > > > complex. > >> > > > It's when you start to violate those assumptions (coded improperly, > >> > > > lotsa threads, long threads, complex activities) that me
[android-developers] Is there a way to determine which phone I'm running on?
Is there a way to get the phone type? For example, can I determine if the phone is a G1, or myTouch, etc? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Does LinearLayout support Gravity.RIGHT?
I can't seem to get views to float to the right inside a horizontal LinearLayout. Is this supported? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Pausing VideoView when launching a new intent...
I have an activity that is showing a video and when the user clicks a button, a new activity is launched. When the video activity stops, I pause the video view. When the video activity starts up again, I try to resume the video view videoView.start(), however, the video starts over from the beginning. I'm thinking that the buffer must be lost somewhere, so I now try to capture the current position via videoView.getCurrentPosition(), however, this is always returning 0. Anybody know how to resume video playback when an activity starts up again? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Pausing VideoView when launching a new intent...
I call getCurrentPosition on the onPause method of my activity. So, what you're saying is maybe before onPause is called, the video has been stopped already? That makes sense. I'll look at th activity lifecycle again and see if there is another method I should use to pause the video. On Jul 24, 5:44 am, Mark Murphy wrote: > junker37 wrote: > > I'm thinking that the buffer must be lost > > somewhere, so I now try to capture the current position via > > videoView.getCurrentPosition(), however, this is always returning 0. > > When are you calling getCurrentPosition()? > > I am using getCurrentPosition() to update an elapsed-time counter in a > video player, and it definitely works. I use MediaPlayer rather than > VideoView, so it could be that this explains the difference in behavior. > However, if you are calling getCurrentPosition() too late, it may be > the video has stopped and, therefore, is actually at position 0. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Pausing VideoView when launching a new intent...
I took a look at the activity lfiecycle again and it seems onPause would be the only place I could get the current position before the activity is paused. The video has definitely not finished playing before onPause has been called. Is it possible that videoView.getCurrentPosition has not been implemented yet? On Jul 24, 7:52 am, junker37 wrote: > I call getCurrentPosition on the onPause method of my activity. So, > what you're saying is maybe before onPause is called, the video has > been stopped already? That makes sense. I'll look at th activity > lifecycle again and see if there is another method I should use to > pause the video. > > On Jul 24, 5:44 am, Mark Murphy wrote: > > > > > junker37 wrote: > > > I'm thinking that the buffer must be lost > > > somewhere, so I now try to capture the current position via > > > videoView.getCurrentPosition(), however, this is always returning 0. > > > When are you calling getCurrentPosition()? > > > I am using getCurrentPosition() to update an elapsed-time counter in a > > video player, and it definitely works. I use MediaPlayer rather than > > VideoView, so it could be that this explains the difference in behavior. > > However, if you are calling getCurrentPosition() too late, it may be > > the video has stopped and, therefore, is actually at position 0. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > _Android Programming Tutorials_ Version 1.0 Available! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Is there a way to determine which carrier the phone is using?
Is there a way to determine which carrier the phone is using. T- Mobile, Spring, AT&T, etc? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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] Transforming password text field
I can not get an EditText view to transform a password. Here's the creation of my view: final EditText passwordEditText = new EditText(context); passwordEditText.setTransformationMethod (PasswordTransformationMethod.getInstance()); passwordEditText.setInputType (InputType.TYPE_TEXT_VARIATION_PASSWORD); What I see on the screen is what I type. The text is not transformed. What am I doing wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Transforming password text field
Thanks...That did it...I saw another post somewhere that setInputType (InputType.TYPE_TEXT_VARIATION_PASSWORD) was the way to do it for 1.5...Apparentl not. On Jul 29, 3:26 pm, Jack Ha wrote: > Have you tried removing the setInputType() call? > > -- > Jack Ha > Open Source Development Center > ・T・ ・ ・Mobile・ stick together > > The views, opinions and statements in this email are those of > the author solely in their individual capacity, and do not > necessarily represent those of T-Mobile USA, Inc. > > On Jul 29, 12:49 pm, junker37 wrote: > > > > > I can not get an EditText view to transform a password. > > > Here's the creation of my view: > > > final EditText passwordEditText = new EditText(context); > > passwordEditText.setTransformationMethod > > (PasswordTransformationMethod.getInstance()); > > passwordEditText.setInputType > > (InputType.TYPE_TEXT_VARIATION_PASSWORD); > > > What I see on the screen is what I type. The text is not transformed. > > > What am I doing wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Transforming password text field
Ok...So now I wonder how I can get the soft keyboard to have the Done button. It seems the InputType.TYPE_TEXT_VARIATION_PASSWORD gave the keyboard the done button. Is there another input type I can use that will keep the password hidden, but give me the done button? On Jul 29, 4:17 pm, junker37 wrote: > Thanks...That did it...I saw another post somewhere that setInputType > (InputType.TYPE_TEXT_VARIATION_PASSWORD) was the way to do it for > 1.5...Apparentl not. > > On Jul 29, 3:26 pm, Jack Ha wrote: > > > > > Have you tried removing the setInputType() call? > > > -- > > Jack Ha > > Open Source Development Center > > ・T・ ・ ・Mobile・ stick together > > > The views, opinions and statements in this email are those of > > the author solely in their individual capacity, and do not > > necessarily represent those of T-Mobile USA, Inc. > > > On Jul 29, 12:49 pm, junker37 wrote: > > > > I can not get an EditText view to transform a password. > > > > Here's the creation of my view: > > > > final EditText passwordEditText = new EditText(context); > > > passwordEditText.setTransformationMethod > > > (PasswordTransformationMethod.getInstance()); > > > passwordEditText.setInputType > > > (InputType.TYPE_TEXT_VARIATION_PASSWORD); > > > > What I see on the screen is what I type. The text is not transformed. > > > > What am I doing wrong? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Where are files created in the simulator stored?
I'm wondering where files that are created while running in a simulator are stored. I'm running the 1.5 simulator on Windows Vista. The real reason I want to find the files is because I am downloading an png file and trying to create a bitmap via: Bitmap bitmap = BitmapFactory.decodeFile(iconFile.getAbsolutePath()); However, the bitmap is always null. I am able to create a bitmap successfully if I have the file as a resource. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Where are files created in the simulator stored?
Yeah, the file exists and I can read it in my code. However, I want to verify it on my filesystem. The path is /data/data/example.app/ files/4de67f137f7fa92bab63569f565c888 which obviously doesn't exist on Windows. So, I'm assuming that the path is relative to the emulator data root. I believe I found where the emulator data is stored. There's a file userdata.img, however, I tried opening it with winimage, thinking it was an img file, it was not. Does anyone know how to access the contents of userdata.img? On Jun 22, 5:37 pm, Marco Nelissen wrote: > On Mon, Jun 22, 2009 at 2:32 PM, junker37 wrote: > > > I'm wondering where files that are created while running in a > > simulator are stored. > > I'm running the 1.5 simulator on Windows Vista. > > Nitpick: you're running the emulator, not the simulator. > > The real reason I want to find the files is because I am downloading > > > an png file and trying to create a bitmap via: Bitmap bitmap = > > BitmapFactory.decodeFile(iconFile.getAbsolutePath()); > > However, the bitmap is always null. > > I am able to create a bitmap successfully if I have the file as a > > resource. > > Can you access the file otherwise? I.e. can you open and read the file that > exists at iconFile.getAbsolutePath() ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google 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: Where are files created in the simulator stored?
Thanks. I was able to get the file using adb pull and by looking at it, I realized I was assuming the file was ascii and was able to fix the problem. On Jun 22, 7:48 pm, Geoff Stromberg wrote: > As Dianne said, use "adb shell" to get a shell prompt on the emulator. Then: > > cd /data/data/com.your.package/files > > If I'm remembering things correctly, that directory should contain files > created from within your app. > > As for opening the userdata.img, I think that's a flash memory device image, > and isn't easily accessible. I remember seeing some steps for mounting it on > linux, but I don't recall where. > > On Mon, Jun 22, 2009 at 5:40 PM, Dianne Hackborn wrote: > > > > > You can use "adb pull" and "adb push" to retrieve and send, respectively, > > files with the emulator. > > > You can use "adb shell" to get a command line shell in the Android system, > > allowing you to browse through the filesystem. > > > On Mon, Jun 22, 2009 at 5:36 PM, junker37 wrote: > > >> Yeah, the file exists and I can read it in my code. However, I want > >> to verify it on my filesystem. The path is /data/data/example.app/ > >> files/4de67f137f7fa92bab63569f565c888 which obviously doesn't exist on > >> Windows. So, I'm assuming that the path is relative to the emulator > >> data root. > > >> I believe I found where the emulator data is stored. There's a file > >> userdata.img, however, I tried opening it with winimage, thinking it > >> was an img file, it was not. > > >> Does anyone know how to access the contents of userdata.img? > > >> On Jun 22, 5:37 pm, Marco Nelissen wrote: > >> > On Mon, Jun 22, 2009 at 2:32 PM, junker37 wrote: > > >> > > I'm wondering where files that are created while running in a > >> > > simulator are stored. > >> > > I'm running the 1.5 simulator on Windows Vista. > > >> > Nitpick: you're running the emulator, not the simulator. > > >> > The real reason I want to find the files is because I am downloading > > >> > > an png file and trying to create a bitmap via: Bitmap bitmap = > >> > > BitmapFactory.decodeFile(iconFile.getAbsolutePath()); > >> > > However, the bitmap is always null. > >> > > I am able to create a bitmap successfully if I have the file as a > >> > > resource. > > >> > Can you access the file otherwise? I.e. can you open and read the file > >> that > >> > exists at iconFile.getAbsolutePath() ? > > > -- > > 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] Am I using startManagingCursor correctly?
I have a cursor that I create in onCreate. As soon as I create it, I call startManagingCursor(cursor), however, if I start another activity and then go back to the original activity, all the data is gone. Do I need to do something special to create the cursor? I also download new data in a background thread and then update the database. When this is done, I notify my activity and call cursor.requery(), but this causes all the data to disappear as well. -- You received this message because you are subscribed to the Google 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: Am I using startManagingCursor correctly?
An sqlitecursor, I create them like this: Cursor cursor = database.query(table, null, null, null, null, null, null); and Cursor cursor = database.rawQuery(table, null) On Nov 23, 2:47 pm, Mark Murphy wrote: > junker37 wrote: > > I have a cursor that I create in onCreate. As soon as I create it, I > > call startManagingCursor(cursor), however, if I start another activity > > and then go back to the original activity, all the data is gone. > > What kind of Cursor? How do you create it? > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Training:http://commonsware.com/training -- You received this message because you are subscribed to the Google 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: Am I using startManagingCursor correctly?
Ah, I am closing the database, because I thought I was getting exceptions if I didn't. I have a method: Cursor getCursor() which opens the database, performs the query, closes the database and returns the cursor. Is that not how I should be doing it? I checked out the examples you sited, but they all get their cursor via the content resolver. On Nov 23, 3:18 pm, Mark Murphy wrote: > junker37 wrote: > > An sqlitecursor, I create them like this: > > > Cursor cursor = database.query(table, null, null, null, null, null, > > null); > > and > > Cursor cursor = database.rawQuery(table, null) > > That should work fine, then, with startManagingCursor(). The Cursor will > be called with requery() automatically during the onResume() process, to > get the latest data. > > If your Cursor is coming back empty, perhaps your query is no longer > valid, or perhaps you closed the database, or something. > > The List2, List3, List7, and Gallery2 API Demos (found in your SDK) > demonstrate the use of startManagingCursor(). > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Training in Germany, 18-22 January 2010:http://bignerdranch.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Am I using startManagingCursor correctly?
Thanks, that's how I originally had it. I must have misinterpreted the exceptions I was getting. It's working now. Thanks! On Nov 23, 4:15 pm, Mark Murphy wrote: > junker37 wrote: > > Ah, I am closing the database, because I thought I was getting > > exceptions if I didn't. > > > I have a method: Cursor getCursor() which opens the database, performs > > the query, closes the database and returns the cursor. Is that not > > how I should be doing it? > > No. Open your database in onCreate(), close it in onDestroy(), so it > will be open for the lifespan of the Cursor. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Training:http://commonsware.com/training -- You received this message because you are subscribed to the Google 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] Combining intents in Intent.createChooser
I would like to know how I can create a chooser for the user to select from either a video or a photo. I want them to be able to capture a new video/photo or select from existing videos/photos. With the following code, I get a chooser that allows for that, but also allows audio creation/selection. Intent intent = new Intent(Intent.ACTION_GET_CONTENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("*/*"); startActivityForResult(Intent.createChooser(intent, getString (R.string.mediaChooserTitle)), REQUEST_MEDIA); If I set the type to "image/*" I can create/get a photo, and "video/* I can get/create a video. How can I combine these types? -- You received this message because you are subscribed to the Google 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] Multiple Eclipse projects no longer get included
Here's my setup. I have 1 project that has all the resources my application needs. This project has the android builder which produces the apk. This project references a few other projects that don't have resources. After updating my android SDK today, the apk that is produced no longer includes the source files from my other projects. When I try to run my app, it is looking for a utils.apk (utils is the name of 1 of my included projects). Here's the log: [2010-07-27 11:42:00 - mln] Performing com.doapps.android.mln.MLNActivity activity launch [2010-07-27 11:42:00 - mln] Automatic Target Mode: Unable to detect device compatibility. Please select a target device. [2010-07-27 11:42:01 - mln] Uploading mln.apk onto device 'HT9CXP803057' [2010-07-27 11:42:02 - mln] Installing mln.apk... [2010-07-27 11:42:06 - mln] Success! [2010-07-27 11:42:06 - utils] Could not find utils.apk! [2010-07-27 11:42:06 - mln] Starting activity com.doapps.android.mln.MLNActivity on device [2010-07-27 11:42:07 - mln] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.doapps.android.mln/.MLNActivity } Anyone know how to fix? -- You received this message because you are subscribed to the Google 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