[android-developers] SAXParser getting stuck on certain characters
I'm using a SAXParser to parse an XML document and its getting stuck on certain symbols like the 'trademark' symbol and I think even double- quotes ". I really don't need these characters so it would be fine if the parser just skips over these. Instead it throws an exception and quits parsing the document. What can I do? --~--~-~--~~~---~--~~ 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: Theme.Dialog for PreferenceScreen child does not work
Hi Dianne, Thanks for your response. I don't like Dialogs either. :) still a bug...:-) ; even if rendering is not proper, I expect at least the child PreferenceScreen to have the same Theme. Regards, Chander --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Map Server
Thanks for the reply, I appreciate any help on this. I do understand that the emulator doesn't use the machine's host file and that Android has its own read-only /etc/hosts file. I'm looking for an easier way to redirect google.com to my own fusion server that doesn't involve setting up a private DNS and using the -dns-server flag. Host files obviously make this simple. In pre r1&r2 you could adb push your own hosts file. This was obviously patched. So is the only solution to set up my own DNS? Has to be an easier way. Thanks, Nick On Jan 25, 5:54 pm, Charlie Collins wrote: > The emulator doesn't use the hosts file on the host computer, it has > it's own networking. You should be able to tweak it for what you need > there: > > http://code.google.com/android/reference/emulator.html#emulatornetwor > > On Jan 25, 3:04 pm, nknize wrote: > > > All, > > > Anyone know of a way to change the server that a MapActivity looks at > > for maps and images? By default the MapActivity it is pointed > > tohttp://www.google.com:80. If you are operating on a self contained > > network (disconnected from the open internet) google cannot be > > resolved. But if you are running your own google fusion server you > > should be able to point to it as the map server. I've already tried > > pointingwww.google.comtothe ip of the fusion server in my /etc/ > > hosts file. Appears the emulator doesn't use the hosts file. > > > Any thoughts? > > > Thanks, > > > Nick --~--~-~--~~~---~--~~ 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: automatic start using Alaram Manager problem
On Jan 24, 4:11 am, AlexeyB wrote: > Try to move your service declaration in the manifest under application > tag. Regards. > > On Jan 23, 2:00 pm, Honest wrote: > > > I hope some one will reply me as early as possible. Actually i did not declare any there so can you tell me what i am missing there ? Sorry if am asking you basic question but i am just newbie in android. --~--~-~--~~~---~--~~ 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] adb stopped working (Ubuntu 8.10)
All, I shut down my PC (running Ubuntu 8.10, fully updated) overnight and when I booted the following day, `adb devices` failed to recognize my stock, OTA-updated, RC30 G1. I followed the instructions listed here: http://code.google.com/android/intro/develop-and-debug.html#developingondevicehardware e...@evan-desktop:~$ cat /etc/udev/rules.d/50-android.rules SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" e...@evan-desktop:~$ adb kill-server && adb devices * daemon not running. starting it now * * daemon started successfully * List of devices attached emulator-5554 offline To answer some preliminary questions: - Yes, I have my phone on. - It's on a USB 2.0 port. - Yes, it sees the emulator(s), but not my device. - Yes, "USB debugging" is enabled on the phone (and I tried toggling it). - I've rebooted both the phone and the PC. - I'm using the latest the 1.0_r2 SDK from the site. - I'm on 64-bit Ubuntu, but it also fails to work in my 32-bit VM (that also previously worked). I spent a few hours in the #android-dev channel with a few very helpful people, but we got nowhere. Any help is enormously appreciated! Evan Charlton --~--~-~--~~~---~--~~ 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: After the ADT 0.9 update, Eclipse can not create R.java automatically
I am facing the same issue On Jan 24, 6:55 am, Oxygen wrote: > I build the SDK and ADT under linux. > And I met this issue too. > > On 1月23日, 下午10时08分, moontain wrote: > > > > > Does anybody have any clues on how to fix this issue? > > > 2009/1/21 moontain > > > > Hi, > > > > I checked out cupcake branch yesterday and made the full build and sdk > > > successfully, and I also built the ADT 0.9 with the command > > > cupcake/development/tools/eclipse/scripts/build_server.sh on another Linux > > > box. Then I updated the ADT 0.9 and set new SDK on Eclipse. > > >Then I created a simple Android project Test with Android Project > > > Wizard, the Eclipse created project files except the R.java and then > > > reported following errors. > > > Seems the resources are not correctly parsed. > > > > Errors: > > > > [2009-01-21 15:07:32 - Test] W/ResourceType( 267): Unable to get buffer > > > of > > > resource asset file > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No > > > resource identifier found for attribute 'orientation' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No > > > resource identifier found for attribute 'layout_width' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No > > > resource identifier found for attribute 'layout_height' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No > > > resource identifier found for attribute 'layout_width' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No > > > resource identifier found for attribute 'layout_height' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No > > > resource identifier found for attribute 'text' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:2: ERROR No > > > resource identifier found for attribute 'versionCode' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:2: ERROR No > > > resource identifier found for attribute 'versionName' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:6: ERROR No > > > resource identifier found for attribute 'icon' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:6: ERROR No > > > resource identifier found for attribute 'label' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:7: ERROR No > > > resource identifier found for attribute 'name' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:7: ERROR No > > > resource identifier found for attribute 'label' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:10: ERROR No > > > resource identifier found for attribute 'name' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:11: ERROR No > > > resource identifier found for attribute 'name' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/AndroidManifest.xml:15: ERROR No > > > resource identifier found for attribute 'minSdkVersion' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] W/ResourceType( 268): Unable to get buffer > > > of > > > resource asset file > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No > > > resource identifier found for attribute 'orientation' in package 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No > > > resource identifier found for attribute 'layout_width' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:2: ERROR No > > > resource identifier found for attribute 'layout_height' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No > > > resource identifier found for attribute 'layout_width' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/main.xml:7: ERROR No > > > resource identifier found for attribute 'layout_height' in package > > > 'android' > > > [2009-01-21 15:07:32 - Test] > > > /Volumes/DATA/workspace/myspace/Test/res/layout/m
[android-developers] android.provider.Contacts.PeopleColumns.PHOTO_VERSION
I am currently accessing the contacts from sqlite, using pre-defined CONTENT_URI, as described in: http://code.google.com/intl/fr/android/devel/data/contentproviders.html#querying In Contacts.PeopleColumns, there should be a PHOTO_VERSION ("photo_version") column, as described in: http://code.google.com/intl/fr/android/reference/android/provider/Contacts.PeopleColumns.html So, let's: Cursor c = getContentResolver().query(People.CONTENT_URI, null, null, null, " display_name ASC "); startManagingCursor(c); if( !c.moveToFirst()) { return; } int idxPhoto = c.getColumnIndex(PeopleColumns.PHOTO_VERSION); idxPhoto is set to -1... Examining c with a debugger shows that no such column exists in the query. Is it a documentation bug, or am I missing something? - Etienne www.jamdroid.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Different package name than the one in AndroidManifest.xml to the generated resource class
Not sure, if what we think would be possible or not in andorid.. However.. based on JavaME application framework, we do have different libaries and different modules to use in any application. i.e Foundation libraries, Application Modules, Application Assembly Code. In all, there are certain i18n parts.say for the foundation libaries, 'can't read a file from filesystem' etc. As foundation is used by more than one application, we do seperate all the resources needed for foundation and would Like to put them a in explicit package and class name FoundationR etc.. with in foundation sources. This would enhance readablity..and find code voilations by seeing the name during the compile time errors. It may be better approach of generating once single name for application... but we need to keep the foundation resources in every application.. Regards, Nagendra C.T.O www.tejasoft.com On Jan 25, 2:25 am, Dianne Hackborn wrote: > Yeah it's currently not possible. I can understand wanting to generate them > into a different package, but would be somewhat opposed to allowing a > different class name. The trade-off of losing consistency between > applications for allowing people to use some other name (why?) doesn't seem > worth it to me. > > > > > > On Sat, Jan 24, 2009 at 5:06 AM, Jean-Baptiste Queru wrote: > > > Right now I believe that's unfortunately not possible - and it's > > clearly a feature that would be nice to add. > > > JBQ > > > On Fri, Jan 23, 2009 at 10:06 PM, Raja Nagendra Kumar > > wrote: > > > > aapt while generating the resources, is it possible to provide a > > > different package name for the generated R.java class. Currently it > > > seems to use the same package name as the one in manfifest defination > > > of AndroidManifest.xml > > > > http://schemas.android.com/apk/res/android"; > > > package="com.tejasoft.dialer.mobile.android"> > > > > Also, is there a way to give custom class name instead of default R > > > name say Resources > > > > Regards, > > > Raja Nagendra Kumar, > > > C.T.O > > >www.tejasoft.com > > > -- > > Jean-Baptiste M. "JBQ" Queru > > Android Engineer, Google. > > -- > 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] Re: Dynamically changing the language at runtime
On Jan 25, 2:28 am, Dianne Hackborn wrote: > This isn't really supported, though you can change the language of the > Configuration used by your Resources object. Could you pl. let me know the API to make this change.. Regards, Nagendra --~--~-~--~~~---~--~~ 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: Extending a tablelayout
public class BorderedTableLayout extends TableLayout { private Rect mRect; private Paint mPaint; public BorderedTableLayout(Context context, AttributeSet attrs) { super(context, attrs); mRect = new Rect(); mPaint = new Paint(); mPaint.setStyle(Paint.Style.STROKE); mPaint.setColor(Color.BLACK); } @Override protected void onDraw(Canvas canvas) { Rect r = mRect; Paint paint = mPaint; getDrawingRect(r); r.right--; r.bottom--; canvas.drawRect(r, paint); super.onDraw(canvas); } } On Mon, Jan 26, 2009 at 2:08 AM, MaTriXy wrote: > > can you post the full solution?? > i need to show up a table with borders and bumped into your thread. > > > On Dec 19 2008, 11:41 am, "for android" wrote: > > Thank you very much it works :) > > > > On Fri, Dec 19, 2008 at 2:42 PM, Romain Guy > wrote: > > > > > This is a classic off by 1 error with the drawRect method. There was > > > an interesting presentation at JavaOne on this topic. Anyway, all you > > > need to do is the following: > > > > > getDrawingRect(r); > > > r.right--; > > > r.bottom--; > > > > > And you're done. > > > > > On Fri, Dec 19, 2008 at 10:08 AM, for android > > > wrote: > > > > Attached is a sample code of what i am trying to do.so that the prb > is > > > more > > > > clear.I hope I get some help... > > > > > > On Fri, Dec 19, 2008 at 11:47 AM, for android > > > wrote: > > > > > >> any help > > > > > >> On Thu, Dec 18, 2008 at 6:42 PM, for android > > > wrote: > > > > > >>> i need to get a customizable tablelayout with borders. Hence in the > > > >>> onDraw,I have the following code,but i get only the left side and > top > > > of the > > > >>> rectangle.but not on the right and bottom lines of the rectangle. > > > > > >>> I have layout in which the layout has a white background.And that > > > layout > > > >>> has a table with blue background.I am trying to have bordered table > > > layout > > > >>> for that:The layout is something like this: > > > > > >>> > > > >>> > > > >>> > > > > > >>> public BorderedTableLayout(Context context, AttributeSet attrs) { > > > >>> super(context, attrs); > > > >>> mRect = new Rect(); > > > >>> mPaint = new Paint(); > > > > > >>> mPaint.setStyle(Paint.Style.STROKE); > > > >>> mPaint.setColor(Color.BLACK); > > > >>> } > > > > > >>> @Override > > > >>> protected void onDraw(Canvas canvas) { > > > >>> Rect r = mRect; > > > >>> Paint paint = mPaint; > > > >>>getDrawingRect(r); > > > > > >>> canvas.drawRect(r, paint); > > > >>> super.onDraw(canvas); > > > >>> } > > > > > -- > > > Romain Guy > > > Android framework engineer > > > romain...@android.com > > > > > Note: please don't send private questions to me, as I don't have time > > > to provide private support. All such questions should be posted on > > > public forums, where I and others can see and answer them > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Marketplace Sponsorship
I have been working on an Application that displays in-game time information for a popular MMO Final Fantasy XI. Its finally complete and I wanted to release it to the market but I noticed you have to spend 25$ to activate your account. I don't really want to spend any money right now on it and was wondering if there was any kind of sponsorship program to help out with the fee. I don't mind providing all my contact information just don't want to spend all the money on it. 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] Is it possible to associate text from an editText to a EditTextPreference?
Hi guys! I would like to know if it's possible to associate text from a regular editText to a EditTextPreference? My problem is I would like to get the text from a regular EditText and then associate it to an EditTextPreference, so when the user visits the settings section, this text is shown by default in the EditTextPreference. Does anyone know how to do this? Thanks for your help! Best regards, Juan. --~--~-~--~~~---~--~~ 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: 3G network response different from Wifi
Thanks for the reply! There is apparently a port scanner for Windows Mobile, but it isn't open source so I can't take a look at it, and it doesn't mention anything about 3G or different providers anyway. This is pale in comparison to nmap, which as a bunch of low level tricks. This is just attempting to make tcp/udp connections on each successive port using the native connect() method (a port of a program called JMap). Hrmm. Other threads on this list mention something about T-Mobile running a proxy service of some sort and I'm wondering if this is important. I just don't see what would make it work on a wifi network and not on 3G! --~--~-~--~~~---~--~~ 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: 3G network response different from Wifi
Rich wrote: > Hello! > > I've written a port scanner for Android. It works properly when using > a connection over Wifi, but on the mobile (3G) connection, everything > reports a false positive. > > Why is this? I don't know very much about the way the mobile data > network is structured and I'd like to know more. Is my service > provider meddling with the connections, or have I just done something > wrong? I'd flip the question around: are you aware of port scanners that work on other mobile platforms over their 3G connections, particularly T-Mobile's? For example, is there a port scanner for Windows Mobile that works over T-Mobile's 3G? If this has been done before, just not on Android, then your problems may be an Android issue. However, it wouldn't shock me if there's something funky with the way that 3G is implemented that might confound a port scanner, or something odd in the way T-Mobile has set up firewalls and routers that might cause strange results. If that's the case, though, then there might be information associated with other port scanner projects that might explain the behavior and document any possible workarounds. The only port scanner I have much personal experience with is nmap, and I do not see much one way or the other about using nmap over T-Mobile's 3G. With luck, you'll get a more definitive response to your query -- I'm mentioning this as an alternative path of investigation. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ 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] 3G network response different from Wifi
Hello! I've written a port scanner for Android. It works properly when using a connection over Wifi, but on the mobile (3G) connection, everything reports a false positive. Why is this? I don't know very much about the way the mobile data network is structured and I'd like to know more. Is my service provider meddling with the connections, or have I just done something wrong? Thanks! Rich --~--~-~--~~~---~--~~ 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 start an activity in another package
I have an application called syncclient with two packages: net.sktechnology.android.sycnclient net.sktechnology.android.update The first is the main package (the one specified in the run configuration). I have set up the build path Libraries and Projects so that it can access the classes in the second package without a problem. The update package has an Activity called Update. I would like to be able to start the Update activity from the syncclient application. If I install Update as a separate application, I can start the Update Activity from syncclient since update has a manifist with the appropriate intent filter for the Update activity. If I do not install Update as a separate application, I believe that only the manifest of syncclient is used, and it cannot (as far as I can figure out) reference the Update Activity which is in a different package. My quesiton is: Can you have a single application with two packages and be able to start activities from both packages? On Jan 25, 6:19 pm, Dianne Hackborn wrote: > How about providing more information? :) What are the package and class > names you are actually supplying? What is the manifest of the app you are > trying to run? What is printed in the log when this failure happens? What > does Package Browser in Dev Tools show that the system knows about this > activity you are trying to launch? > > On Sun, Jan 25, 2009 at 3:17 PM, info.sktechnol...@gmail.com < > > > > > > info.sktechnol...@gmail.com> wrote: > > > OK, I tried that but it did not help. > > > Any other suggestions? > > > On Jan 25, 2:16 pm, Dianne Hackborn wrote: > > > If the activity does not define any intent filters in its manifest, make > > > sure it is accessible to other packages through android:exported="true". > > > > On Sun, Jan 25, 2009 at 9:47 AM, info.sktechnol...@gmail.com < > > > > info.sktechnol...@gmail.com> wrote: > > > > > My application has 2 packages because one is shared with my other > > > > applications. > > > > I want to start an activity of the shared package. > > > > I tried the following: > > > > Intent intent = new Intent(); > > > > intent.setClassName(shardedPackageName,sharedActivityName); > > > > startActivity(intent); > > > > > It throws an ActivityNotFoundException and suggests that the activity > > > > might not > > > > be in the manifest. But how do I list an acitivity from another > > > > package in the manifest? > > > > -- > > > 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 - > > -- > 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] Re: unzip
Thanks. I am running the android emulator on a windows bug. I think the error might have been due to having two main() entry points and have it resolved. On Jan 25, 3:56 pm, Mark Murphy wrote: > Bob wrote: > > Hi, > > I am trying to unzip a standard zip file. I have copied a couple > > standard java unzip classes from web searches but each time it creates > > a JRE parsing error. Does anyone have ideas on what is wrong or how I > > can do differently? > > > Thanks, > > Bob > > > Error: > > > # An unexpected error has been detected by Java Runtime Environment: > > # > > # Internal Error (classFileParser.cpp:2924), pid=3624, tid=6748 > > # Error: ShouldNotReachHere() > > # > > # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows- > > x86) > > # An error report file with more information is saved as: > > # G:\TestWebView\hs_err_pid3624.log > > # > > # If you would like to submit a bug report, please visit: > > # http://java.sun.com/webapps/bugreport/crash.jsp > > This error cannot be coming from Android. There is no Sun JRE in > Android, only Dalvik. And, there is no G: drive in Android, only in > Windows PCs. > > Are you sure you are running your code in an Android application? > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 2.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] Sleep on END_CALL keycode, but terminate on HOME?
Hello, I have an activity that I would like the user to be able to put to sleep once the end call button is pressed, but terminate once the back or home buttons are pressed. Since it seems that end call and home both call OnPause(), is there a good way to do this? 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: Activity Issue on G1 phone
I meant that the static variable would -hold- the current activity. Everything in your .apk runs in one process. When you declare a static variable, that is creating a global to all code in that process. You can make a static variable pointing to an Activity: static Activity mCurActivity = null; In your activity's onCreate() set it to 'this'. In onDestroy() set it to null. Now someone else -- a thread or whatever -- can come in, and retrieve the value of mCurActivity to find out the current activity that has been set. On Sun, Jan 25, 2009 at 4:47 PM, Brad Gies wrote: > Dianne, > > > > I can't quite figure out what you mean by "setting a static variable in the > current activity", and how it would work. If I set a static variable in my > activity and then pass that static variable to my thread, then the activity > is destroyed, and a new one is created…. Then what happens? The new activity > will create another static variable, but the thread won't know about it, so > how would it help? And the new activity doesn't know about the thread, so I > don't think it would have the information it needed to alert the thread that > it can now accept the information. > > > > What am I missing? > > > > What I currently do is set a static variable in my thread which is the > handler to my activity, and then if the activity is destroyed before the > thread completes, it sets the handler variable in the thread to null before > it completes. The thread then checks the Handler variable before it tries to > send the information, and just cleans up after itself if it cannot send the > information. > > > > Then, when the new activity is created it checks to see if it still needs > the information and creates a new thread if needed. > > > > BUT…. if there is a way for the new activity to get the Handle of the > Thread created by the old activity, then I could easily change the thread to > wait for a few seconds waiting for a new Handler to be assigned, and that > would be much more efficient. > > > > Do you have an example you can point me to? > > > > > > Sincerely, > > > > Brad Gies > > > > > > - > > Brad Gies > > 27415 Greenfield Rd, # 2, > > Southfield, MI, USA > > 48076 > > www.bgies.com www.truckerphone.com > > www.EDI-Easy.com www.pricebunny.com > > - > > > > Moderation in everything, including abstinence > -- > > *From:* android-developers@googlegroups.com [mailto: > android-develop...@googlegroups.com] *On Behalf Of *Dianne Hackborn > *Sent:* Friday, January 23, 2009 3:07 PM > *To:* android-developers@googlegroups.com > *Subject:* [android-developers] Re: Activity Issue on G1 phone > > > > There are two reasons for this: > > 1. Both screen rotation and keyboard shown/hidden are configuration > changes, which means that after the state changes the application's > resources can have any arbitrary new values -- anything from specific > strings (for ex in a particular language you may need a abbreviation when in > portrait mode) to layout resources and anything else. Trying to keep track > of, and update, any of these values that could have changed would require a > lot of work in the system, and a fair amount of effort from the developer to > help the system, so it is far easier to just restart the entire activity > with the new configuration. > > 2. To be a correct application, you already need to deal with saving and > restoring state so you will always be returned to the user in your previous > state after being in the background. By relying on this same mechanism for > configuration changes, we get to take advantage of the work the developer > has already done, and also further encourage them to actually do that work > which otherwise often only causes problems in the application in obscure > cases, so can often be missed. > > For the case of a thread running in the background that wants to > communicate back with the current activity, an easy way to deal with this is > to have a static variable that is the "current" activity, which you set in > your onCreate() and clear in onDestroy(). Then instead of pointing to the > activity that originally started it, the thread can just retrieve the > current value in that variable when it needs it. (And of course it will > need to deal with the race where it can temporarily be null between the old > activity being destroyed and the new one created... but if you are doing > multithreaded programming, this should be familiar territory!) > > On Fri, Jan 23, 2009 at 9:52 AM, Stanley.lei > wrote: > > > I rather agree with you! > > In fact, I could not understand why Google designs like this. The > keyboard action could impact the rotation, but why changing rotation > impacts the activity? In my case, the thread is destroyed, which will > destroy all tasks in the thread. In worst case, the user will have to
[android-developers] Re: Activity Issue on G1 phone
Dianne, I can't quite figure out what you mean by "setting a static variable in the current activity", and how it would work. If I set a static variable in my activity and then pass that static variable to my thread, then the activity is destroyed, and a new one is created.. Then what happens? The new activity will create another static variable, but the thread won't know about it, so how would it help? And the new activity doesn't know about the thread, so I don't think it would have the information it needed to alert the thread that it can now accept the information. What am I missing? What I currently do is set a static variable in my thread which is the handler to my activity, and then if the activity is destroyed before the thread completes, it sets the handler variable in the thread to null before it completes. The thread then checks the Handler variable before it tries to send the information, and just cleans up after itself if it cannot send the information. Then, when the new activity is created it checks to see if it still needs the information and creates a new thread if needed. BUT.. if there is a way for the new activity to get the Handle of the Thread created by the old activity, then I could easily change the thread to wait for a few seconds waiting for a new Handler to be assigned, and that would be much more efficient. Do you have an example you can point me to? Sincerely, Brad Gies - Brad Gies 27415 Greenfield Rd, # 2, Southfield, MI, USA 48076 www.bgies.com www.truckerphone.com www.EDI-Easy.com www.pricebunny.com - Moderation in everything, including abstinence _ From: android-developers@googlegroups.com [mailto:android-develop...@googlegroups.com] On Behalf Of Dianne Hackborn Sent: Friday, January 23, 2009 3:07 PM To: android-developers@googlegroups.com Subject: [android-developers] Re: Activity Issue on G1 phone There are two reasons for this: 1. Both screen rotation and keyboard shown/hidden are configuration changes, which means that after the state changes the application's resources can have any arbitrary new values -- anything from specific strings (for ex in a particular language you may need a abbreviation when in portrait mode) to layout resources and anything else. Trying to keep track of, and update, any of these values that could have changed would require a lot of work in the system, and a fair amount of effort from the developer to help the system, so it is far easier to just restart the entire activity with the new configuration. 2. To be a correct application, you already need to deal with saving and restoring state so you will always be returned to the user in your previous state after being in the background. By relying on this same mechanism for configuration changes, we get to take advantage of the work the developer has already done, and also further encourage them to actually do that work which otherwise often only causes problems in the application in obscure cases, so can often be missed. For the case of a thread running in the background that wants to communicate back with the current activity, an easy way to deal with this is to have a static variable that is the "current" activity, which you set in your onCreate() and clear in onDestroy(). Then instead of pointing to the activity that originally started it, the thread can just retrieve the current value in that variable when it needs it. (And of course it will need to deal with the race where it can temporarily be null between the old activity being destroyed and the new one created... but if you are doing multithreaded programming, this should be familiar territory!) On Fri, Jan 23, 2009 at 9:52 AM, Stanley.lei wrote: I rather agree with you! In fact, I could not understand why Google designs like this. The keyboard action could impact the rotation, but why changing rotation impacts the activity? In my case, the thread is destroyed, which will destroy all tasks in the thread. In worst case, the user will have to re-create their data from scratch. stanley On Jan 24, 1:47 am, cindy wrote: > Then android's implementation has problem. > > For example, if my application needs to create account, of cause, the > key board will open first. After user typed in user name and password, > then he clickes the "create" button.Request sends to server in a > thread. After that, he closes the keyboard, the activity will be > destroyed. So the callback function in thread to update UI will > crashed. > > It happens exactly in my application. > > On Jan 23, 7:20 am, "James Patillo" wrote: > > > I think what happens is that the activity's state is saved, the activity is > > destroyed, and then it is recreated with its saved state. This is the same > > thing that happens when the home button is pressed and the a
[android-developers] Re: Theme.Dialog for PreferenceScreen child does not work
I'm just beginning to use preferences. My next Alpha is going to have resolution adjustements. In 3-d a lot of people can't read the screen easily, and on the .net, they think the font is too big. If you use the editor to commit preferences, once changed, it works well. Just in the create of each activity, re-acquire the setting. As long as the change has been committed, it reads the most recent one. That's what I found. John. http://radiolistenersElectricEasel.com, Inc. On Jan 25, 3:20 pm, Dianne Hackborn wrote: > I can't help you off-hand with the problem, but for what it's worth > preferences really aren't intended to be used with a dialog theme. Actually > I would stay away from the dialog theme for all but very simple things (like > alerts), since the border takes so much space away from your UI. > > Of course in general I don't like dialogs. :) > > On Sun, Jan 25, 2009 at 4:37 AM, Stoyan Damov wrote: > > > > > > > +1 - I'm experiencing the same thing here. The PreferenceScreen is > > drawn with the black theme. BTW, preferences with the dialog theme act > > weird when scrolled (parts of the preferences are drawn on black > > background black while scrolling) but I think I can fix that - someone > > mentioned about cacheColor or something like that... > > > On Sun, Jan 25, 2009 at 12:21 PM, android_soft > > wrote: > > > > Hi All, > > > I have a PreferenceActivity defined in the manifest with > > > android:theme="@android:style/Theme.Dialog. The theme works well with > > > the first settings screen, but > > > not with the child PreferenceScreen elements (if I have several > > > screens in my preferences). The child screens have the default Theme > > > applied in this case. > > > > If the theme is changed to Theme.Light or the default, it works well > > > for all the screens(parent and children included) > > > > Is there a way to apply the theme to the children, or is this a BUG ? > > > > Thanks > > > Chander > > -- > 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. --~--~-~--~~~---~--~~ 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 start an activity in another package
How about providing more information? :) What are the package and class names you are actually supplying? What is the manifest of the app you are trying to run? What is printed in the log when this failure happens? What does Package Browser in Dev Tools show that the system knows about this activity you are trying to launch? On Sun, Jan 25, 2009 at 3:17 PM, info.sktechnol...@gmail.com < info.sktechnol...@gmail.com> wrote: > > OK, I tried that but it did not help. > > Any other suggestions? > > On Jan 25, 2:16 pm, Dianne Hackborn wrote: > > If the activity does not define any intent filters in its manifest, make > > sure it is accessible to other packages through android:exported="true". > > > > On Sun, Jan 25, 2009 at 9:47 AM, info.sktechnol...@gmail.com < > > > > > > > > > > > > info.sktechnol...@gmail.com> wrote: > > > > > My application has 2 packages because one is shared with my other > > > applications. > > > I want to start an activity of the shared package. > > > I tried the following: > > > Intent intent = new Intent(); > > > intent.setClassName(shardedPackageName,sharedActivityName); > > > startActivity(intent); > > > > > It throws an ActivityNotFoundException and suggests that the activity > > > might not > > > be in the manifest. But how do I list an acitivity from another > > > package in the manifest? > > > > -- > > 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 - > > > -- 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. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Map Server
The emulator doesn't use the hosts file on the host computer, it has it's own networking. You should be able to tweak it for what you need there: http://code.google.com/android/reference/emulator.html#emulatornetworking. On Jan 25, 3:04 pm, nknize wrote: > All, > > Anyone know of a way to change the server that a MapActivity looks at > for maps and images? By default the MapActivity it is pointed > tohttp://www.google.com:80. If you are operating on a self contained > network (disconnected from the open internet) google cannot be > resolved. But if you are running your own google fusion server you > should be able to point to it as the map server. I've already tried > pointingwww.google.comto the ip of the fusion server in my /etc/ > hosts file. Appears the emulator doesn't use the hosts file. > > Any thoughts? > > Thanks, > > Nick --~--~-~--~~~---~--~~ 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] Motion Events WebView Your Help Needed
Rather than each of us post this question numerous times.. I am dong a web page embedded in webview and using js to gather evidence in debug view of what events we have accessible via DOM SO what i need from you is look over my list and if you see nay missing that you would like tested add them to this thread.. the ones I have thus far to test: mouseout mouseover mousedown mouseup keyup keydown keypressed as you can see I needed the touch events we need to test added to the list and etc Basically test and see if object exists and etc as if it does not exist should get error undefined and if exists but not fired should be null. Than when I have results post the video and a text file of the debug output window in a wiki article so that develpoer can read and use. This way we are not spinning our wheels each month wondering about the same damn thing over and over again. Yes wil even do a Knol article for developers to use.. Thanks to those who are able to answer this thread and add to my list of events to test.. --~--~-~--~~~---~--~~ 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: getting bitmap from webview
Look at what object is returned in this case its a canvas object called Picture which means to convert you needed to stream it.. you might also need setPictureListener On Jan 25, 10:12 am, Bob wrote: > Hi, > How do I get a bitmap of a webview? I think I can use the > capturePicture but how do I then convert that picture object to a > bitmap that I can clip and manipulate? > > Thanks, > Bob --~--~-~--~~~---~--~~ 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 start an activity in another package
OK, I tried that but it did not help. Any other suggestions? On Jan 25, 2:16 pm, Dianne Hackborn wrote: > If the activity does not define any intent filters in its manifest, make > sure it is accessible to other packages through android:exported="true". > > On Sun, Jan 25, 2009 at 9:47 AM, info.sktechnol...@gmail.com < > > > > > > info.sktechnol...@gmail.com> wrote: > > > My application has 2 packages because one is shared with my other > > applications. > > I want to start an activity of the shared package. > > I tried the following: > > Intent intent = new Intent(); > > intent.setClassName(shardedPackageName,sharedActivityName); > > startActivity(intent); > > > It throws an ActivityNotFoundException and suggests that the activity > > might not > > be in the manifest. But how do I list an acitivity from another > > package in the manifest? > > -- > 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] Re: WebKit/WebView and Focus Highlighting
Thanks Grace...we owe you one On Jan 25, 1:44 pm, Grace Kloba wrote: > The trick is to use "-webkit-tap-highlight-color". If the alpha of the > color is 0, the orange ring won't be drawn. > > > > On Thu, Jan 22, 2009 at 4:33 PM, Andrew Hedges wrote: > > > I'm one of the "design guys" Mark was talking about. > > > I found scant documentation on Apple's site about -webkit-focus-ring- > > color, but from what I saw and my own tests on an Android emulator and > > Safari, it appears that this is not a writable property, but an OS- > > level constant that is applied to elements with focus. Here's the page > > I found that calls this a constant and not a property: > > >http://developer.apple.com/documentation/appleapplications/Reference/... > > > For example, I tried the following: > > > > > 1 > > > > > In Android, the focus ring remained orange. In Safari, it remained > > blue. > > > Mark, not sure what this means for us. Maybe you can hack the OS and > > set this value to transparent? C'mon, you can do magic, right? :-) > > > On Jan 23, 2:07 am, Mark Murphy wrote: > >> Fred Grott(shareme) wrote: > >> > Found it :) I hope > > >> > how about webkit-focus-ring-color > > >> > Does that sound correct Mark? > > >> > I mean there would have to be say an admin.css with webkit in Android > >> > setting this to orange correct? > > >> > Thus, the question is can we override it? > > >> In my case, I'd settle for just disabling it. Based on researching that > >> constant you cited, I thought maybe the :focus CSS pseudo-class would > >> allow me to disable the focus ring, but apparently not. > > >> Of course, my CSS-fu is weak. > > >> I'll pass this info on to the design guys and see if it gives them any > >> help. > > >> Thanks! > > >> -- > >> Mark Murphy (a Commons Guy)http://commonsware.com > >> _The Busy Coder's Guide to Android Development_ Version 2.0 Published! > > -- > thanks, > Grace --~--~-~--~~~---~--~~ 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: embed external activities using LocalActivityManager
skink wrote: >> Apparently, it is: >> >> * { >> -webkit-tap-highlight-color: rgba(0,0,0,0.0); >> >> } >> >> My CSS-fu is weak, but I suspect that means "make >> -webkit-tap-highlight-color be transparent for all styles" or some such. > > thank you! yes, orange ring dissapeared. > > but when i change it to rgba(0,0,255,0.5); it's not half transparent > blue, why? (it's again fully opaque orange) To quote Ms. Kloba: "The trick is to use "-webkit-tap-highlight-color". If the alpha of the color is 0, the orange ring won't be drawn." -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.0 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 android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Mac OsX 10.5 Installing repo (repo command not found)
On Sat, Jan 24, 2009 at 10:19 PM, Vishal Shah wrote: > > Hi, > > I'm new to Mac and android. I went through all the steps mentioned to > prepare to get android source on Mac. > > However after getting repo and changing it to executable I can't > execute repo init -u > I keep getting -bash: repo: command not found > Put a './' in front of repo, e.g. ./repo init -u ... > > my $PATH is /opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ > bin:/usr/X11/bin But the current directory ISN'T in your PATH, is it. :-) -- Faber Fedor Cloud Computing New Jersey http://cloudcomputingnj.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: Sporadic SharedPreferences reset
Yeah, Base64 encoding would certainly help until the platform bug is fixed. I guess a lot of people with strong passwords (i.e. passwords containing special characters) are in trouble with a lot of apps right now. It's funny you mention two apps I share parts of the codebase with. I stripped down ImapStore for my app and included it as a jar in my package. But it's very very unlikely that this would have an impact. Christoph On Sun, Jan 25, 2009 at 5:53 PM, Daniel wrote: > > This has been a recurring problem with K-9: > http://code.google.com/p/k9mail/issues/detail?id=143 > and apparently the core Email as well: > http://www.androidforums.com/showthread.php?p=16842 > and possibly other apps, too: > http://groups.google.com/group/android-developers/browse_thread/thread/5efd37a554f6f15a > http://www.mail-archive.com/android-developers@googlegroups.com/msg13141.html > > > Your observation about the < and > makes sense to me, as one reason > the preferences can fail to save or load is due to XML generation or > parsing problems. I've thought that perhaps Base64 encoding all of > the preference values might be a smart move. > > Dan. > > > On Jan 24, 11:56 am, Christoph Studer wrote: >> Hello, >> >> I'm making use of SharedPreferences in my application. One part is a >> PreferenceActivity and the other part is a backend that accesses the >> preferences using PreferenceManager.getDefaultSharedPreferences(...). >> Both parts are running in the same process, but potentially in >> different threads. >> >> Now, from time to time, I encounter a reset of all the preferences. It >> looks to me like this happens when my process is killed (e.g. when >> installing a new version or starting the activity or service the first >> time after a long time). However, it is not reproducible by killing >> the process manually and it does not happen consistently. >> >> Are there other people who have the same problem? Is there a race >> condition that could lead to something like this? >> >> The source code of my app can be found >> here:http://code.google.com/p/android-sms/source/browse/ >> >> The relevant files >> are:http://code.google.com/p/android-sms/source/browse/trunk/android-clie... >> andhttp://code.google.com/p/android-sms/source/browse/trunk/android-clie... >> >> Thank you, >> >> Christoph > > > > --~--~-~--~~~---~--~~ 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: embed external activities using LocalActivityManager
> > Apparently, it is: > > * { > -webkit-tap-highlight-color: rgba(0,0,0,0.0); > > } > > My CSS-fu is weak, but I suspect that means "make > -webkit-tap-highlight-color be transparent for all styles" or some such. thank you! yes, orange ring dissapeared. but when i change it to rgba(0,0,255,0.5); it's not half transparent blue, why? (it's again fully opaque orange) 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: unzip
Bob wrote: > Hi, > I am trying to unzip a standard zip file. I have copied a couple > standard java unzip classes from web searches but each time it creates > a JRE parsing error. Does anyone have ideas on what is wrong or how I > can do differently? > > Thanks, > Bob > > Error: > > # An unexpected error has been detected by Java Runtime Environment: > # > # Internal Error (classFileParser.cpp:2924), pid=3624, tid=6748 > # Error: ShouldNotReachHere() > # > # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows- > x86) > # An error report file with more information is saved as: > # G:\TestWebView\hs_err_pid3624.log > # > # If you would like to submit a bug report, please visit: > # http://java.sun.com/webapps/bugreport/crash.jsp This error cannot be coming from Android. There is no Sun JRE in Android, only Dalvik. And, there is no G: drive in Android, only in Windows PCs. Are you sure you are running your code in an Android application? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.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: NetworkInterface.getNetworkInterfaces()
adrians wrote: > I am getting a "unknown error" SocketException when calling > NetworkInterface.getNetworkInterfaces(). I notice from an old post > that this method may not have been implemented. Does anyone know the > status of this method - has it been implemented and has anyone got it > to work? Do you have the INTERNET permission in your AndroidManifest.xml file? -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.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: WebKit/WebView and Focus Highlighting
Grace Kloba wrote: > The trick is to use "-webkit-tap-highlight-color". If the alpha of the > color is 0, the orange ring won't be drawn. Many thanks! -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.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: embed external activities using LocalActivityManager
skink wrote: > btw i saw you managed to get rid/costomize WebView's focus ring. Actually, that was a colleague (Andrew Hedges), based on a solution provided by another community member (Grace Kloba). > since i'm not expert in css at all what is that magic line (or two)? > > i tried in my css: > > html { > -webkit-focus-ring-color: #0f0; > -webkit-tap-highlight-color: #00f; > } > > but with no success... Apparently, it is: * { -webkit-tap-highlight-color: rgba(0,0,0,0.0); } My CSS-fu is weak, but I suspect that means "make -webkit-tap-highlight-color be transparent for all styles" or some such. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.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] unzip
Hi, I am trying to unzip a standard zip file. I have copied a couple standard java unzip classes from web searches but each time it creates a JRE parsing error. Does anyone have ideas on what is wrong or how I can do differently? Thanks, Bob Error: # An unexpected error has been detected by Java Runtime Environment: # # Internal Error (classFileParser.cpp:2924), pid=3624, tid=6748 # Error: ShouldNotReachHere() # # Java VM: Java HotSpot(TM) Client VM (10.0-b23 mixed mode windows- x86) # An error report file with more information is saved as: # G:\TestWebView\hs_err_pid3624.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp Code: public class Unzip { public static void main(String[] args) { if (args.length != 1) { System.out.println("Usage: java Unzip zipfile"); System.exit(1); } try { byte[] buf = new byte[4096]; ZipInputStream in = new ZipInputStream( new FileInputStream(args[0])); while (true) { //Nächsten Eintrag lesen ZipEntry entry = in.getNextEntry(); if (entry == null) { break; } //Beschreibung ausgeben System.out.println( entry.getName() + " (" + entry.getCompressedSize() + "/" + entry.getSize() + ")" ); //Ausgabedatei erzeugen FileOutputStream out = new FileOutputStream( entry.getName() ); int len; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } out.close(); //Eintrag schließen in.closeEntry(); } in.close(); } catch (IOException e) { System.err.println(e.toString()); } } } --~--~-~--~~~---~--~~ 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: Sporadic SharedPreferences reset
This has been a recurring problem with K-9: http://code.google.com/p/k9mail/issues/detail?id=143 and apparently the core Email as well: http://www.androidforums.com/showthread.php?p=16842 and possibly other apps, too: http://groups.google.com/group/android-developers/browse_thread/thread/5efd37a554f6f15a http://www.mail-archive.com/android-developers@googlegroups.com/msg13141.html Your observation about the < and > makes sense to me, as one reason the preferences can fail to save or load is due to XML generation or parsing problems. I've thought that perhaps Base64 encoding all of the preference values might be a smart move. Dan. On Jan 24, 11:56 am, Christoph Studer wrote: > Hello, > > I'm making use of SharedPreferences in my application. One part is a > PreferenceActivity and the other part is a backend that accesses the > preferences using PreferenceManager.getDefaultSharedPreferences(...). > Both parts are running in the same process, but potentially in > different threads. > > Now, from time to time, I encounter a reset of all the preferences. It > looks to me like this happens when my process is killed (e.g. when > installing a new version or starting the activity or service the first > time after a long time). However, it is not reproducible by killing > the process manually and it does not happen consistently. > > Are there other people who have the same problem? Is there a race > condition that could lead to something like this? > > The source code of my app can be found > here:http://code.google.com/p/android-sms/source/browse/ > > The relevant files > are:http://code.google.com/p/android-sms/source/browse/trunk/android-clie... > andhttp://code.google.com/p/android-sms/source/browse/trunk/android-clie... > > Thank you, > > Christoph --~--~-~--~~~---~--~~ 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: Repo Client init problem ubuntu 8.10
I had same problem on ubuntu 8.04 as virtualbox guest os. In my case, curl has no problem, but it just was resolved after successful installation of librealine5-dev as Bismark advised. Thanks Bismark. On Jan 22, 10:55 am, Bismark wrote: > Try > > sudo apt-get install libreadline5-dev > > instead of lib32readline5-dev > > Bismark --~--~-~--~~~---~--~~ 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 use proxy server on the g1?
I also need the exact same help, my school uses a proxy server to access the web. Also my home wireless doesn't need a proxy to access the web. I know the iPhone and iPod touch can use multiple proxy settings depending on the network it is connected to but what about the G1 On Jan 10, 1:52 pm, "kevkev...@googlemail.com" wrote: > Does anyone know how to connect to the internet via a proxy server on > a g1 handset? I need to use a proxy server at school to get on the > internet on wifi. > > 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] getting bitmap from webview
Hi, How do I get a bitmap of a webview? I think I can use the capturePicture but how do I then convert that picture object to a bitmap that I can clip and manipulate? Thanks, Bob --~--~-~--~~~---~--~~ 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] Utah APN MMS settings
Name:CBW MMS APN:wap.gocbw.com Proxy:none Port:none username:none Password:none mmsc:http://mms.gocbw.com:8088/mms mms proxy:216.68.79.202 mms port:80 MCC:310 MNC:420 APN type:none some settings will time out just go back to the apn settings and resave the settings to refresh the connection. --~--~-~--~~~---~--~~ 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] Mac OsX 10.5 Installing repo (repo command not found)
Hi, I'm new to Mac and android. I went through all the steps mentioned to prepare to get android source on Mac. However after getting repo and changing it to executable I can't execute repo init -u I keep getting -bash: repo: command not found my $PATH is /opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/ bin:/usr/X11/bin 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] "There is a problem communicating with Google servers"
I just got the Dev. phone today and trying to get it "up and running'. I am trying to create a google account but I keep getting an error message "There is a problem communicating with Google servers This could be a temporary problem or your SIM card may not be provisioned for data services. if it continues, call Customer Care." First, I know that my SIM has a data plan. After all, I have been using text messages, navigation...etc with it. So, I don't think it is the SIM problem. It could be a "temporary problem". But, what is "a temporary problem" ? I have been trying a few times within the last hour and still getting the same error messages. It said, "if it continues, call Customer Care.". I don't know if this helps because my carrier would just say, yes I have data plan provision with the SIM card. Does anyone have any suggestion to what went wrong ? Any feedback is greatly appreciated. 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] Bitmap from webview
Hi, I would like to get a bitmap of a webview control that I can then clip and manipulate. How do I use the getpicture method or another means to do this? Thanks, Bob --~--~-~--~~~---~--~~ 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] NetworkInterface.getNetworkInterfaces()
I am getting a "unknown error" SocketException when calling NetworkInterface.getNetworkInterfaces(). I notice from an old post that this method may not have been implemented. Does anyone know the status of this method - has it been implemented and has anyone got it to work? Thanks 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] Re: embed external activities using LocalActivityManager
Mark Murphy wrote: > For security reasons, it is not possible. You can only embed activities > that you own. Mark, thank you for your quick response! btw i saw you managed to get rid/costomize WebView's focus ring. since i'm not expert in css at all what is that magic line (or two)? i tried in my css: html { -webkit-focus-ring-color: #0f0; -webkit-tap-highlight-color: #00f; } but with no success... 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: embed external activities using LocalActivityManager
skink wrote: > is it possible to embed some external activities, lets say, > com.android.calculator2.Calculator in my activity? > > i always get exception saying that my activity's uid != Calculator's > uid. should i use some permission? or from security reasons its not > possible at all? For security reasons, it is not possible. You can only embed activities that you own. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training in Sweden -- http://www.sotrium.com/training.php --~--~-~--~~~---~--~~ 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] embed external activities using LocalActivityManager
hi, is it possible to embed some external activities, lets say, com.android.calculator2.Calculator in my activity? i always get exception saying that my activity's uid != Calculator's uid. should i use some permission? or from security reasons its not possible at 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: Extending a tablelayout
can you post the full solution?? i need to show up a table with borders and bumped into your thread. On Dec 19 2008, 11:41 am, "for android" wrote: > Thank you very much it works :) > > On Fri, Dec 19, 2008 at 2:42 PM, Romain Guy wrote: > > > This is a classic off by 1 error with the drawRect method. There was > > an interesting presentation at JavaOne on this topic. Anyway, all you > > need to do is the following: > > > getDrawingRect(r); > > r.right--; > > r.bottom--; > > > And you're done. > > > On Fri, Dec 19, 2008 at 10:08 AM, for android > > wrote: > > > Attached is a sample code of what i am trying to do.so that the prb is > > more > > > clear.I hope I get some help... > > > > On Fri, Dec 19, 2008 at 11:47 AM, for android > > wrote: > > > >> any help > > > >> On Thu, Dec 18, 2008 at 6:42 PM, for android > > wrote: > > > >>> i need to get a customizable tablelayout with borders. Hence in the > > >>> onDraw,I have the following code,but i get only the left side and top > > of the > > >>> rectangle.but not on the right and bottom lines of the rectangle. > > > >>> I have layout in which the layout has a white background.And that > > layout > > >>> has a table with blue background.I am trying to have bordered table > > layout > > >>> for that:The layout is something like this: > > > >>> > > >>> > > >>> > > > >>> public BorderedTableLayout(Context context, AttributeSet attrs) { > > >>> super(context, attrs); > > >>> mRect = new Rect(); > > >>> mPaint = new Paint(); > > > >>> mPaint.setStyle(Paint.Style.STROKE); > > >>> mPaint.setColor(Color.BLACK); > > >>> } > > > >>> @Override > > >>> protected void onDraw(Canvas canvas) { > > >>> Rect r = mRect; > > >>> Paint paint = mPaint; > > >>> getDrawingRect(r); > > > >>> canvas.drawRect(r, paint); > > >>> super.onDraw(canvas); > > >>> } > > > -- > > Romain Guy > > Android framework engineer > > romain...@android.com > > > Note: please don't send private questions to me, as I don't have time > > to provide private support. All such questions should be posted on > > public forums, where I and others can see and answer them --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: WebKit/WebView and Focus Highlighting
Yep, that worked. Thanks so much, Grace! On Jan 26, 8:44 am, Grace Kloba wrote: > The trick is to use "-webkit-tap-highlight-color". If the alpha of the > color is 0, the orange ring won't be drawn. > > > > On Thu, Jan 22, 2009 at 4:33 PM, Andrew Hedges wrote: > > > I'm one of the "design guys" Mark was talking about. > > > I found scant documentation on Apple's site about -webkit-focus-ring- > > color, but from what I saw and my own tests on an Android emulator and > > Safari, it appears that this is not a writable property, but an OS- > > level constant that is applied to elements with focus. Here's the page > > I found that calls this a constant and not a property: > > >http://developer.apple.com/documentation/appleapplications/Reference/... > > > For example, I tried the following: > > > > > 1 > > > > > In Android, the focus ring remained orange. In Safari, it remained > > blue. > > > Mark, not sure what this means for us. Maybe you can hack the OS and > > set this value to transparent? C'mon, you can do magic, right? :-) > > > On Jan 23, 2:07 am, Mark Murphy wrote: > >> Fred Grott(shareme) wrote: > >> > Found it :) I hope > > >> > how about webkit-focus-ring-color > > >> > Does that sound correct Mark? > > >> > I mean there would have to be say an admin.css with webkit in Android > >> > setting this to orange correct? > > >> > Thus, the question is can we override it? > > >> In my case, I'd settle for just disabling it. Based on researching that > >> constant you cited, I thought maybe the :focus CSS pseudo-class would > >> allow me to disable the focus ring, but apparently not. > > >> Of course, my CSS-fu is weak. > > >> I'll pass this info on to the design guys and see if it gives them any > >> help. > > >> Thanks! > > >> -- > >> Mark Murphy (a Commons Guy)http://commonsware.com > >> _The Busy Coder's Guide to Android Development_ Version 2.0 Published! > > -- > thanks, > Grace --~--~-~--~~~---~--~~ 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: Theme.Dialog for PreferenceScreen child does not work
I can't help you off-hand with the problem, but for what it's worth preferences really aren't intended to be used with a dialog theme. Actually I would stay away from the dialog theme for all but very simple things (like alerts), since the border takes so much space away from your UI. Of course in general I don't like dialogs. :) On Sun, Jan 25, 2009 at 4:37 AM, Stoyan Damov wrote: > > +1 - I'm experiencing the same thing here. The PreferenceScreen is > drawn with the black theme. BTW, preferences with the dialog theme act > weird when scrolled (parts of the preferences are drawn on black > background black while scrolling) but I think I can fix that - someone > mentioned about cacheColor or something like that... > > On Sun, Jan 25, 2009 at 12:21 PM, android_soft > wrote: > > > > Hi All, > > I have a PreferenceActivity defined in the manifest with > > android:theme="@android:style/Theme.Dialog. The theme works well with > > the first settings screen, but > > not with the child PreferenceScreen elements (if I have several > > screens in my preferences). The child screens have the default Theme > > applied in this case. > > > > If the theme is changed to Theme.Light or the default, it works well > > for all the screens(parent and children included) > > > > Is there a way to apply the theme to the children, or is this a BUG ? > > > > Thanks > > Chander > > > > > > > > > -- 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. --~--~-~--~~~---~--~~ 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 start an activity in another package
If the activity does not define any intent filters in its manifest, make sure it is accessible to other packages through android:exported="true". On Sun, Jan 25, 2009 at 9:47 AM, info.sktechnol...@gmail.com < info.sktechnol...@gmail.com> wrote: > > My application has 2 packages because one is shared with my other > applications. > I want to start an activity of the shared package. > I tried the following: > Intent intent = new Intent(); > intent.setClassName(shardedPackageName,sharedActivityName); > startActivity(intent); > > It throws an ActivityNotFoundException and suggests that the activity > might not > be in the manifest. But how do I list an acitivity from another > package in the manifest? > > > > -- 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. --~--~-~--~~~---~--~~ 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] Map Server
All, Anyone know of a way to change the server that a MapActivity looks at for maps and images? By default the MapActivity it is pointed to http://www.google.com:80. If you are operating on a self contained network (disconnected from the open internet) google cannot be resolved. But if you are running your own google fusion server you should be able to point to it as the map server. I've already tried pointing www.google.com to the ip of the fusion server in my /etc/ hosts file. Appears the emulator doesn't use the hosts file. Any thoughts? Thanks, Nick --~--~-~--~~~---~--~~ 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: WebKit/WebView and Focus Highlighting
The trick is to use "-webkit-tap-highlight-color". If the alpha of the color is 0, the orange ring won't be drawn. On Thu, Jan 22, 2009 at 4:33 PM, Andrew Hedges wrote: > > I'm one of the "design guys" Mark was talking about. > > I found scant documentation on Apple's site about -webkit-focus-ring- > color, but from what I saw and my own tests on an Android emulator and > Safari, it appears that this is not a writable property, but an OS- > level constant that is applied to elements with focus. Here's the page > I found that calls this a constant and not a property: > > http://developer.apple.com/documentation/appleapplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html > > For example, I tried the following: > > > 1 > > > In Android, the focus ring remained orange. In Safari, it remained > blue. > > Mark, not sure what this means for us. Maybe you can hack the OS and > set this value to transparent? C'mon, you can do magic, right? :-) > > On Jan 23, 2:07 am, Mark Murphy wrote: >> Fred Grott(shareme) wrote: >> > Found it :) I hope >> >> > how about webkit-focus-ring-color >> >> > Does that sound correct Mark? >> >> > I mean there would have to be say an admin.css with webkit in Android >> > setting this to orange correct? >> >> > Thus, the question is can we override it? >> >> In my case, I'd settle for just disabling it. Based on researching that >> constant you cited, I thought maybe the :focus CSS pseudo-class would >> allow me to disable the focus ring, but apparently not. >> >> Of course, my CSS-fu is weak. >> >> I'll pass this info on to the design guys and see if it gives them any help. >> >> Thanks! >> >> -- >> Mark Murphy (a Commons Guy)http://commonsware.com >> _The Busy Coder's Guide to Android Development_ Version 2.0 Published! > > > > -- thanks, Grace --~--~-~--~~~---~--~~ 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: OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads
Check first, and think a bit. On Jan 25, 2:49 pm, blindfold wrote: > How can this possibly help you? You are trying to allocate 61 MB > (3200*4800*4 bytes), which lies well above the 16 MB heap limit. I > tried once to allocate, say, 12 MB at program startup to keep Android > from all the time bumping into the heap limit and possibly crashing as > a result in case its memory management is not 100% reliable, but > trying to allocate 61 MB should not offer any benefit? > > Regards > > On Jan 25, 2:23 pm, ad wrote: > > > YES YES YES!!! > > I've found solution for that bug. > > It's tricky but it works. > > Place that on the begining of your code. > > > try{ > > BitmaptmpBitmap =Bitmap.createBitmap > > (3200, 4800, > > Config.ARGB_); > > }catch(Throwable e){ > > e.printStackTrace(); > > System.out.println("CATCHED "); > > > } > > > I was fighting with that about 4 days. > > Hope anyone is happy now, that was hell. > > > Regards, > > avram. > > --~--~-~--~~~---~--~~ 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: loading html file from SDCARD in web browser
HTMLViewer should be under packages/apps/HtmlViewer. On Mon, Jan 19, 2009 at 7:33 PM, vinay wrote: > hi grace, > I could do it by copying the index.html file in Browser/assets directory and > modified private String homeUrl = "file:///android_asset/index.html"; in > BrowserSettings.java file. > > where does html viewer resides an android? > -vinay H > > On Tue, Jan 20, 2009 at 12:51 AM, Grace Kloba wrote: >> >> As you found out, you can't open local files in the browser. But you >> can open it with HTMLViewer. >> >> On Sun, Jan 18, 2009 at 11:37 PM, vinay H wrote: >> > >> > Hi, >> > How to load simple html file present in sdmmc card from web browser. >> > It is mentioned in the net that due to security reasons this is not >> > allowed. Is there any way to access the file from sdcard? >> > >> > Tried modifying private String homeUrl = "file:///sdcard/index.html"; >> > in BrowserSettings.java file but browser throws an error "could not be >> > loaded". >> > >> > -vinayh >> > >> > > >> > >> >> >> >> -- >> thanks, >> Grace >> >> > -- thanks, Grace --~--~-~--~~~---~--~~ 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: Parsing RSS feeds, encoding problems
I don't know if I am to be happy (since it works) or sad (because I wasted 8+ hours) but thanks! Now the html encoding problems works :-) Guess I have to retry the international RSS feeds and see if it was related to this. I've never used a XML library that behaves this way.. -Christer On 25 Jan, 20:02, Mark Murphy wrote: > Chister Nordvik wrote: > > The issue has still "new" status so either Google is just ignoring it > > or they think it's a bug in my code. > > > I tried a little more and I experienced similar problems when fetching > > XML that has encoded html inside the tags (typically RSS feeds). This > > code works perfectly when running on the desktop but on android it > > just refuses to give me the text after it encounters "<" in this > > node: > > Test html chars: v2.1 released. > description> > > It splits the text into several child text nodes, not just one. Hence, > don't just use getFirstChild() -- iterate over all children. > > Leastways, that worked for & when I encountered a similar phenomenon. > > -- > Mark Murphy (a Commons Guy)http://commonsware.com > _The Busy Coder's Guide to Android Development_ Version 2.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: Parsing RSS feeds, encoding problems
Chister Nordvik wrote: > The issue has still "new" status so either Google is just ignoring it > or they think it's a bug in my code. > > I tried a little more and I experienced similar problems when fetching > XML that has encoded html inside the tags (typically RSS feeds). This > code works perfectly when running on the desktop but on android it > just refuses to give me the text after it encounters "<" in this > node: > Test html chars: v2.1 released. description> It splits the text into several child text nodes, not just one. Hence, don't just use getFirstChild() -- iterate over all children. Leastways, that worked for & when I encountered a similar phenomenon. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 2.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: Parsing RSS feeds, encoding problems
The issue has still "new" status so either Google is just ignoring it or they think it's a bug in my code. I tried a little more and I experienced similar problems when fetching XML that has encoded html inside the tags (typically RSS feeds). This code works perfectly when running on the desktop but on android it just refuses to give me the text after it encounters "<" in this node: Test html chars: v2.1 released. The full sample code is included below in case someone would like to give it a try or tell me if I am missing something here!? Desktop output: * RSS: Test html chars: v2.1 released. Read about the changes here! Android output: Test html chars: Sample code: URI rssurl = URI.create("http://www.hvaerstillingen.no/docs/rss/ test.txt"); try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document doc = builder.parse(rssurl.toURL().openStream()); NodeList nodes = doc.getElementsByTagName("item"); for (int i = 0; i < nodes.getLength(); i++) { Element element = (Element) nodes.item(i); NodeList title = element.getElementsByTagName("title"); Element line = (Element) title.item(0); Element descEl = (Element) element.getElementsByTagName ("description").item(0); Node textNode = descEl.getFirstChild(); System.out.println("* RSS: "+ textNode.getNodeValue ()); } } catch (Exception e) { e.printStackTrace(); } -Christer On 1 Des 2008, 19:54, "Xavier Mathews" wrote: > Ok Great! > > Xavier A. Mathews > Student/Browser Specialist/Developer/Web-Master > Google Group Client Based Tech Support Specialist > Hazel Crest Illinois > xavieruni...@gmail.com¥xavieruni...@hotmail.com¥truestar...@yahoo.com > "Fear of a name, only increases fear of the thing itself." > > On Mon, Dec 1, 2008 at 12:58 AM, ChisterNordvik wrote: > > > It's been added: > >http://code.google.com/p/android/issues/detail?id=1398 > > > -Christer > > > On 1 Des, 01:55, "Xavier Mathews" wrote: > > > Same Problem Here. Post It In The Issue Tracker! > > > > On 11/30/2008, mobilek...@googlemail.com > > wrote: > > > > > Yes, I have also encountered the same problem. Any suggestions? > > > > > On Nov 30, 10:53 pm, ChisterNordvik wrote: > > > >> Hi! > > > > >> Does anyone have a workingRSSparser with Android? I tried doing > > > >> simple DOM parsing of the XML but the character encoding isn't handled > > > >> properly so the norwegian characters aren't displayed. I have tried > > > >> everything but when I get the description element I just get the text > > > >> until the norwegian character. Any sample code of parsing > > > >> internationalRSSfeeds would be very welcome! > > > > >> Here is the feed that I am having problems > > > >> with:http://www.dagbladet.no/rss/fotball/ > > > > >> -Christer > > > > >> Sample code that I started out with (have tried lots of encoding > > > >> tricks to no avail): > > > > >> Feed feed = createFeed(this, > > > >> new > > > >> java.net.URI("http://www.dagbladet.no/rss/fotball/";)); > > > >> ... > > > >> public Feed createFeed(Context ctx, URI rssurl) { > > > >> Feed feed = new Feed(); > > > >> try { > > > >> DocumentBuilder builder = > > > > >> DocumentBuilderFactory.newInstance().newDocumentBuilder(); > > > >> Document doc = > > > >> builder.parse(rssurl.toURL().openStream()); > > > > >> NodeList nodes = > > doc.getElementsByTagName("item"); > > > >> for (int i = 0; i < nodes.getLength(); i++) { > > > >> Element element = (Element) nodes.item(i); > > > > >> NodeList title = > > > >> element.getElementsByTagName("title"); > > > >> Element line = (Element) title.item(0); > > > > >> String feedTitle = > > > >> getCharacterDataFromElement(line); > > > >> String url = getCharacterDataFromElement > > > >> (element.getElementsByTagName("link").item(0)); > > > >> Article art = new Article(); > > > >> art.title = feedTitle; > > > >> art.url = url; > > > >> art.description = getCharacterDataFromElement > > > >> (element.getElementsByTagName("description").item(0)); > > > >> feed.articles.add(art); > > > > >> } > > > >> } > > > >> catch (Exception e) { > > > >> e.printStackTrace(); > > > >> } > > > >> return feed; > > > >> } > > > >> public static String getCharacterDataFromElement(Node e) { > > > >> Node child = e.getFirstChild(); > > > >>
[android-developers] How to start an activity in another package
My application has 2 packages because one is shared with my other applications. I want to start an activity of the shared package. I tried the following: Intent intent = new Intent(); intent.setClassName(shardedPackageName,sharedActivityName); startActivity(intent); It throws an ActivityNotFoundException and suggests that the activity might not be in the manifest. But how do I list an acitivity from another package in the manifest? --~--~-~--~~~---~--~~ 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: onProviderEnabled() not being called dynamically enabling GPS
To be more specific... is this the correct way to broadcast a GPS setting change since I can't access the updateProviders() method in the LocationManager directly? Intent intent = new Intent(Intent.ACTION_PROVIDER_CHANGED); sendBroadcast(intent); Thanks again, Ken --~--~-~--~~~---~--~~ 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: onProviderEnabled() not being called dynamically enabling GPS
To be more specific... is this the correct way to broadcast a GPS setting change since I can't access the updateProviders() method directly? Intent intent = new Intent(Intent.ACTION_PROVIDER_CHANGED); sendBroadcast(intent); Thanks again, Ken --~--~-~--~~~---~--~~ 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: onProviderEnabled() not being called dynamically enabling GPS
To be more specific... is this the correct way to broadcast a GPS setting change since I can't access the updateProviders() method directly? Intent intent = new Intent(Intent.ACTION_PROVIDER_CHANGED); sendBroadcast(intent); Thanks again, Ken --~--~-~--~~~---~--~~ 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] Request regarding release
Hello Android Team, you guys rock. The platform, the dev phone, ... ... the end less list is excellent. And I know for sure that this is already on your mind but here is a formal request: "Please DON'T release an official cupcake based firmware for ADP1 till you can provide us the procedure to get the same release level firmware by building on our own." Many developers would have observed that there is no way to build with the cupcake features and yet get a fully usable system on our own. Mainly - the build config even when building for htc_dream seems to ignore wifi, bluetooth etc. - there seem to be proprietary binaries that are incompatible with the new kernel - apparently there isn't a easy way in spite of extract_files.sh to actually back up all non-open stuff. Many apps go missing! - provide the backing up of installed apps as a step during build&install. ... or at least provide us clear documentation on this. It is ill to get most of this from xda-developers site or some other.. Internally google/android, htc and t-mob might be using a different source tree and that is absolutely fine but with Google's good motive to promote ADP1 and development on this platform, such incomplete SDKs leave a black mark. Make it simple for us by providing a date to repo sync up to on the public source branch. Provide the closed binaries that need to be included plus some scripts such that we can compile the same fully working firmware. Yes, this might not be possible with t-mob g1, but to keep htc_dream build synchronized with the ADP1 should be possible for you. Please. Am sure many other developers would appreciate such a release from the Android/Google teams. I repeat you guys rock, this is just a small push.. err.. a whiff.. in your own direction. Thanks and regards, Rajesh.S --~--~-~--~~~---~--~~ 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: Sporadic SharedPreferences reset
After removing "<" and ">" from the preferences I have not seen this problem anymore. Sorry, I don't know what else could cause your problems, Chander. Christoph On Sun, Jan 25, 2009 at 12:08 PM, android_soft wrote: > > I have noticed this behavior couple of times. But I have not been able > to reproduce, also I do not have "<" or any other special character, > except some Double values encoded as Strings. > > Chander > > On Jan 25, 12:39 am, Christoph Studer wrote: >> Okay, so my current suspicion is that I got bitten >> byhttp://code.google.com/p/android/issues/detail?id=1707 >> >> I have one preference value containing "<" and ">" which are >> improperly encoded due to above bug. My guess is that the XML parser >> chokes on this value and the pref file is ignored. I think >> SharedPreferences only reads data from disk after the process is >> killed, so the app is fully functional until it is killed. Also, it >> was not consistently reproducible because this pref value is not >> always present in my application. >> >> I've removed "<" and ">" from the pref value and see how it goes. >> >> Christoph >> >> On Sat, Jan 24, 2009 at 6:56 PM, Christoph Studer wrote: >> > Hello, >> >> > I'm making use of SharedPreferences in my application. One part is a >> > PreferenceActivity and the other part is a backend that accesses the >> > preferences using PreferenceManager.getDefaultSharedPreferences(...). >> > Both parts are running in the same process, but potentially in >> > different threads. >> >> > Now, from time to time, I encounter a reset of all the preferences. It >> > looks to me like this happens when my process is killed (e.g. when >> > installing a new version or starting the activity or service the first >> > time after a long time). However, it is not reproducible by killing >> > the process manually and it does not happen consistently. >> >> > Are there other people who have the same problem? Is there a race >> > condition that could lead to something like this? >> >> > The source code of my app can be found here: >> >http://code.google.com/p/android-sms/source/browse/ >> >> > The relevant files are: >> >http://code.google.com/p/android-sms/source/browse/trunk/android-clie... >> > and >> >http://code.google.com/p/android-sms/source/browse/trunk/android-clie... >> >> > Thank you, >> >> > Christoph > > > --~--~-~--~~~---~--~~ 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: License text to use for display in Android App under ASL 2.0
Fred's idea looks good, though lot of code bytes to it. How many users read a license any way ? Each application adding license asset files can eat up space :-) On Jan 25, 6:10 pm, "Fred Grott(shareme)" wrote: > A better solution for the end user is to set up some display > indicating wher ethe library licenses are to read, for example my > Xspot app : > > http://www.youtube.com/watch?v=wiPDOrkPCxQ > > ...it displays the name of libraries used and than points users to > wards the license for that library > > On Jan 24, 7:06 am, Kavita wrote: > > > Hi, > > > I'm working on an Android app that's licensed under Apache Software > > License 2.0. As recommended in best practice, I would like to display > > the license to the end user for acceptance before proceeding. However, > > the ASL text is large and I'm not sure whether it's a good idea to > > show the entire license. I would like to know if there are any > > recommendations for apps under ASL on what license text to use > > (perhaps an abbreviated version of ASL)? Pointers to actual license > > text would be quite helpful. > > > At a minimum, I was thinking to show the "Disclaimer of Warranty" > > section and for the whole license include the link to ASL site. Any > > better ideas? > > > Thanks, > > - Kavita --~--~-~--~~~---~--~~ 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: Theme.Dialog for PreferenceScreen child does not work
It gets even more weird if you have the landscape mode (i guess thats what you are talking above) --~--~-~--~~~---~--~~ 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: OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads
How can this possibly help you? You are trying to allocate 61 MB (3200*4800*4 bytes), which lies well above the 16 MB heap limit. I tried once to allocate, say, 12 MB at program startup to keep Android from all the time bumping into the heap limit and possibly crashing as a result in case its memory management is not 100% reliable, but trying to allocate 61 MB should not offer any benefit? Regards On Jan 25, 2:23 pm, ad wrote: > YES YES YES!!! > I've found solution for that bug. > It's tricky but it works. > Place that on the begining of your code. > > try{ > Bitmap tmpBitmap = Bitmap.createBitmap > (3200, 4800, > Config.ARGB_); > }catch(Throwable e){ > e.printStackTrace(); > System.out.println("CATCHED "); > > } > > I was fighting with that about 4 days. > Hope anyone is happy now, that was hell. > > Regards, > avram. --~--~-~--~~~---~--~~ 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 crashs when accessing sd card settings
Nope, at least not in my case. I specify one using the sdcard option, but it also fails for the "built-in" one. Anyway accessing the emulated sdcard works for me. On Sat, Jan 24, 2009 at 10:37 PM, Mark Murphy wrote: > > Jeremy Leibs wrote: > > Any progress on this? I am having the exact same problem. It is > > driving me crazy. > > Where is the image? > > I had some problems for a while trying to use an SD image stored on a > USB thumb drive formatted vfat. I just moved the image to the main drive > (ext3). > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > > Android Training on the Ranch! -- Mar 16-20, 2009 > http://www.bignerdranch.com/schedule.shtml > > > > --~--~-~--~~~---~--~~ 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: Updated app not showing up in Market's "by date" sorting?
Maybe those who figured it out don't want others knowing. It may be the case, however, that somehow a new app with the same name was added to the Market to make it appear at the top. -Original Message- From: Chister Nordvik [mailto:cnord...@gmail.com] Sent: Sunday, January 25, 2009 6:07 AM To: Android Developers Subject: [android-developers] Re: Updated app not showing up in Market's "by date" sorting? There's been multiple posts of this and no answers from Google, so is this a "hack" that someone has found? It might seem like it since nobody is willing to post examples of how to get their app to the top of the list when releasing an upgrade. I've released multiple upgrades but the "by-date" sorting isn't changed. -Christer On Jan 24, 5:15 pm, John wrote: > Yea you're right, some of them definitely do get pushed to the top > when updated. I wonder what they're doing different then you? Maybe > changing something in the package to make it seem new to the system? > > On Jan 24, 10:43 am, "Sean E. Russell" wrote: > > > That can't be true; I see updates to apps that I have already > > installed at the top of the the "by date" list regularly. For > > example, looking at the list right now, I see a new version of > > "SnapPhoto" at #11, and I've had that installed since December. > > > --- SER > > > On Jan 23, 4:41 pm, Sundog wrote: > > > > That's how it works, yes. Otherwise it would be chaos, everyone > > > pushing out trivial "updates" so they can stay on top. > > > > On Jan 23, 1:12 pm, wataru wrote: > > > > > I believe that is the correct behavior. > > > > > If you update application, > > > > it doesn't push it on top of the list. > > > > Probably "by date", it means the date you initially > > > > published your application to Android Market. > > > > > On Jan 23, 7:56 am, "Sean E.Russell" wrote: > > > > > > Has anybody else encountered this? > > > > > > I've updated (uploaded a new version) of my app, TimeTracker, twice in > > > > > the past couple of months, and in both cases, the new upload has not > > > > > shown up in the "by date" sorted list of the Market app. When I > > > > > search for the app, I see the correct version in the Market, and I can > > > > > find it in the correct category by scrolling down; it is just that the > > > > > updates aren't being correctly sorted. > > > > > > Any ideas? Has anybody else noticed this happening to their apps? > > > > > > Thanks, > > > > > > --- SER- 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] Re: OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads
YES YES YES!!! I've found solution for that bug. It's tricky but it works. Place that on the begining of your code. try{ Bitmap tmpBitmap = Bitmap.createBitmap (3200, 4800, Config.ARGB_); }catch(Throwable e){ e.printStackTrace(); System.out.println("CATCHED "); } I was fighting with that about 4 days. Hope anyone is happy now, that was hell. Regards, avram. --~--~-~--~~~---~--~~ 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: License text to use for display in Android App under ASL 2.0
A better solution for the end user is to set up some display indicating wher ethe library licenses are to read, for example my Xspot app : http://www.youtube.com/watch?v=wiPDOrkPCxQ ...it displays the name of libraries used and than points users to wards the license for that library On Jan 24, 7:06 am, Kavita wrote: > Hi, > > I'm working on an Android app that's licensed under Apache Software > License 2.0. As recommended in best practice, I would like to display > the license to the end user for acceptance before proceeding. However, > the ASL text is large and I'm not sure whether it's a good idea to > show the entire license. I would like to know if there are any > recommendations for apps under ASL on what license text to use > (perhaps an abbreviated version of ASL)? Pointers to actual license > text would be quite helpful. > > At a minimum, I was thinking to show the "Disclaimer of Warranty" > section and for the whole license include the link to ASL site. Any > better ideas? > > Thanks, > - Kavita --~--~-~--~~~---~--~~ 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: OutOfMemoryError BitmapFactory.nativeDecodeByteArray inside Threads
YES YES YES!!! I've found solution for that. It's tricky but it works. Place that on the begining of your code. try{ while (true){ Bitmap tmpBitmap = Bitmap.createBitmap(320, 4800, Config.ARGB_); } }catch(Throwable e){ e.printStackTrace(); System.out.println("CATCHED "); } I was fighting with that about 4 days. Hope anyone is happy now. Regards, avram. On Dec 15 2008, 8:29 pm, Mark K wrote: > I've run into this exact same problem a number of times myself. Not > sure if its a bug or just a limitation of the jvm, can't seem to > process more than a few large bitmaps without this occuring, this > always seems to occur when decoding bitmaps from file. Hopefully its > on the radar as a bug and will get fixed at some point. This is a > problem since de-coding bitmaps from file is a fairly common > operation. > > Mark > > On Dec 14, 9:49 am, plusminus wrote: > > > The following situation happens only in a few cases, but it does more > > than once. > > - > > > I'm receiving several OutOfMemoryError in > > BitmapFactory.nativeDecodeByteArray. > > > DDMS-Heap-View never broke the 16MB barrier. I can't even get it above > > 6MB, while going wild and smashing keys like a monkey: > > --- > > 1 5,820 MB 2,751 MB 3,069 MB 47,26% 54.433 > > --- > > > The situation is that I have a ThreadPoolExector: > > --- > > protected ExecutorService mThreadPool = Executors.newCachedThreadPool > > (); > > --- > > ... ,which load several 256x256 pngs to the RAM. (Average png-size: < > > 20kb) > > > StackTrace-Desciption: > > That OutOfMemoryError happens several times in the Threads, until the > >VMdecides its enough and stops the whole process. > > > StackTrace: > > # > > W/AudioFlinger( 24): write blocked for 49 msecs > > W/AudioFlinger( 24): write blocked for 48 msecs > > W/AudioFlinger( 24): write blocked for 49 msecs > > D/dalvikvm( 410): GC freed 31478 objects / 1613104 bytes in 196ms > > D/dalvikvm( 410): GC freed 6404 objects / 991024 bytes in 151ms > > D/dalvikvm( 410): GC freed 5224 objects / 1229888 bytes in 137ms > > E/SOCKETLOG( 410): add_recv_stats recv 0 > > E/SOCKETLOG( 410): add_recv_stats recv 0 > > E/SOCKETLOG( 410): add_recv_stats recv 0 > > E/SOCKETLOG( 410): add_recv_stats recv 0 > > E/dalvikvm-heap( 410): 65536-byte external allocation too large for > > this process. > > E/dalvikvm-heap( 410): 65536-byte external allocation too large for > > this process. > > E/ ( 410):VMwon't let us allocate 65536 bytes > > W/dalvikvm( 410): threadid=59: thread exiting with uncaught exception > > (group=0x40010e28) > > E/AndroidRuntime( 410): Uncaught handler: thread pool-8-thread-6 > > exiting due to uncaught exception > > E/ ( 410):VMwon't let us allocate 65536 bytes > > E/dalvikvm-heap( 410): 65536-byte external allocation too large for > > this process. > > W/dalvikvm( 410): threadid=65: thread exiting with uncaught exception > > (group=0x40010e28) > > E/dalvikvm-heap( 410): 65536-byte external allocation too large for > > this process. > > E/ ( 410):VMwon't let us allocate 65536 bytes > > W/dalvikvm( 410): threadid=43: thread exiting with uncaught exception > > (group=0x40010e28) > > E/AndroidRuntime( 410): Uncaught handler: thread pool-8-thread-3 > > exiting due to uncaught exception > > E/AndroidRuntime( 410):java.lang.OutOfMemoryError:bitmapsize > >exceedsVMbudget > > E/AndroidRuntime( 410): at > > android.graphics.BitmapFactory.nativeDecodeByteArray(Native Method) > > E/AndroidRuntime( 410): at > > android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:234) > > E/AndroidRuntime( 410): at > > android.graphics.BitmapFactory.decodeByteArray(BitmapFactory.java:247) > > E/AndroidRuntime( 410): at > > org.andnav2.osm.views.tiles.OSMMapTileFilesystemCache$1.run > > (OSMMapTileFilesystemCache.java:234) > > E/AndroidRuntime( 410): at > > java.util.concurrent.ThreadPoolExecutor$Worker.runTask > > (ThreadPoolExecutor.java:648) > > E/AndroidRuntime( 410): at > > java.util.concurrent.ThreadPoolExecutor$Worker.run > > (ThreadPoolExecutor.java:673) > > E/AndroidRuntime( 410): at java.lang.Thread.run(Thread.java: > > 935) > > E/ ( 410):VMwon't let us allocate 65536 bytes > > E/AndroidRuntime( 410): Uncaught handler: thread pool-8-thread-9 > > exiting due to uncaught exception > > E/dalvikvm-heap( 410): 65536-byte external allocation too large for > > this process. > > E/ ( 410):VMwon't let us allocate 65536 bytes > > W/dalvikvm( 410): threadid=61: thread exiting with u
[android-developers] Re: Please help! My game lags too much!
First of all, you should profile your game - take a look at android.os.Debug.start/stopMethodTracing and identify the bottleneck(s). Then, if you've never written a game, chances are your game loop will suck (that is, if you *had* a game loop, you're merely invalidating and redrawing the screen) - take a look at LunarLander's source code, also Alien Bloodbath, etc. - there are lots of resources on the net on the topic of writing a game loop - google for "Fix your time step" to find a very good one. HTH, Stoyan On Sun, Jan 25, 2009 at 8:49 AM, Beshoy wrote: > > Hello all, > > I haven't written in Java for about 5 years... but I've re > familiarized myself with java, and was able to write a game. The game > is 4Ever Fall. You can find it on the android market, it's free. I > am having problems with the game because it lags too much; especially > when there are background processes trying to work. The game's > simple: > > I have platforms rising, a background who's also rising, and a ball > who's falling and gets stopped by the platforms. I am using > SensorListener to get the current accelerometer readings to control > where the ball goes. From there, in my "onDraw" function, I move the > platforms, background, and ball. This seems to be an overload since > I've got 10 platforms (5 levels with 2 Drawables per level to account > for the gap in between), 2 background Drawables for smooth > transitions, and the ball's Drawable. That makes 13 objects being > maintained and moved by onDraw. This seems to really bog down the > phone when things are running in the background. > > I'm trying to figure out how to make the game run better. I've looked > at openGL and wow... that gets complex really quick and I'm not even > sure where to start. I've also looked into threading but I don't > really know too much about it. I use threads sparingly when I need to > do a ProgressBar while submitting a score or something of that sort. > If you have any ideas on how to make the game's rendering better, I > would greatly appreciate it. > > I don't quite understand how openGL works, and whether or not I can > use it to handle the platforms, move them, etc. I would like to use > images rather than drawing them, but if I have to draw them that's > fine too Anything to make this game run better... PLEASE HELP! > Thanks in advance for any help you can give! :) > > > --~--~-~--~~~---~--~~ 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: Theme.Dialog for PreferenceScreen child does not work
+1 - I'm experiencing the same thing here. The PreferenceScreen is drawn with the black theme. BTW, preferences with the dialog theme act weird when scrolled (parts of the preferences are drawn on black background black while scrolling) but I think I can fix that - someone mentioned about cacheColor or something like that... On Sun, Jan 25, 2009 at 12:21 PM, android_soft wrote: > > Hi All, > I have a PreferenceActivity defined in the manifest with > android:theme="@android:style/Theme.Dialog. The theme works well with > the first settings screen, but > not with the child PreferenceScreen elements (if I have several > screens in my preferences). The child screens have the default Theme > applied in this case. > > If the theme is changed to Theme.Light or the default, it works well > for all the screens(parent and children included) > > Is there a way to apply the theme to the children, or is this a BUG ? > > Thanks > Chander > > > --~--~-~--~~~---~--~~ 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: Updated app not showing up in Market's "by date" sorting?
There's been multiple posts of this and no answers from Google, so is this a "hack" that someone has found? It might seem like it since nobody is willing to post examples of how to get their app to the top of the list when releasing an upgrade. I've released multiple upgrades but the "by-date" sorting isn't changed. -Christer On Jan 24, 5:15 pm, John wrote: > Yea you're right, some of them definitely do get pushed to the top > when updated. I wonder what they're doing different then you? Maybe > changing something in the package to make it seem new to the system? > > On Jan 24, 10:43 am, "Sean E. Russell" wrote: > > > That can't be true; I see updates to apps that I have already > > installed at the top of the the "by date" list regularly. For > > example, looking at the list right now, I see a new version of > > "SnapPhoto" at #11, and I've had that installed since December. > > > --- SER > > > On Jan 23, 4:41 pm, Sundog wrote: > > > > That's how it works, yes. Otherwise it would be chaos, everyone > > > pushing out trivial "updates" so they can stay on top. > > > > On Jan 23, 1:12 pm, wataru wrote: > > > > > I believe that is the correct behavior. > > > > > If you update application, > > > > it doesn't push it on top of the list. > > > > Probably "by date", it means the date you initially > > > > published your application to Android Market. > > > > > On Jan 23, 7:56 am, "Sean E.Russell" wrote: > > > > > > Has anybody else encountered this? > > > > > > I've updated (uploaded a new version) of my app, TimeTracker, twice in > > > > > the past couple of months, and in both cases, the new upload has not > > > > > shown up in the "by date" sorted list of the Market app. When I > > > > > search for the app, I see the correct version in the Market, and I can > > > > > find it in the correct category by scrolling down; it is just that the > > > > > updates aren't being correctly sorted. > > > > > > Any ideas? Has anybody else noticed this happening to their apps? > > > > > > Thanks, > > > > > > --- SER- 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] Re: Sporadic SharedPreferences reset
I have noticed this behavior couple of times. But I have not been able to reproduce, also I do not have "<" or any other special character, except some Double values encoded as Strings. Chander On Jan 25, 12:39 am, Christoph Studer wrote: > Okay, so my current suspicion is that I got bitten > byhttp://code.google.com/p/android/issues/detail?id=1707 > > I have one preference value containing "<" and ">" which are > improperly encoded due to above bug. My guess is that the XML parser > chokes on this value and the pref file is ignored. I think > SharedPreferences only reads data from disk after the process is > killed, so the app is fully functional until it is killed. Also, it > was not consistently reproducible because this pref value is not > always present in my application. > > I've removed "<" and ">" from the pref value and see how it goes. > > Christoph > > On Sat, Jan 24, 2009 at 6:56 PM, Christoph Studer wrote: > > Hello, > > > I'm making use of SharedPreferences in my application. One part is a > > PreferenceActivity and the other part is a backend that accesses the > > preferences using PreferenceManager.getDefaultSharedPreferences(...). > > Both parts are running in the same process, but potentially in > > different threads. > > > Now, from time to time, I encounter a reset of all the preferences. It > > looks to me like this happens when my process is killed (e.g. when > > installing a new version or starting the activity or service the first > > time after a long time). However, it is not reproducible by killing > > the process manually and it does not happen consistently. > > > Are there other people who have the same problem? Is there a race > > condition that could lead to something like this? > > > The source code of my app can be found here: > >http://code.google.com/p/android-sms/source/browse/ > > > The relevant files are: > >http://code.google.com/p/android-sms/source/browse/trunk/android-clie... > > and > >http://code.google.com/p/android-sms/source/browse/trunk/android-clie... > > > Thank you, > > > Christoph --~--~-~--~~~---~--~~ 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] Theme.Dialog for PreferenceScreen child does not work
Hi All, I have a PreferenceActivity defined in the manifest with android:theme="@android:style/Theme.Dialog. The theme works well with the first settings screen, but not with the child PreferenceScreen elements (if I have several screens in my preferences). The child screens have the default Theme applied in this case. If the theme is changed to Theme.Light or the default, it works well for all the screens(parent and children included) Is there a way to apply the theme to the children, or is this a BUG ? Thanks Chander --~--~-~--~~~---~--~~ 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 control the width of scrollbars for DatePick?
Is there a way to control the width of the three scrollbars for DatePick? I wanted to make the following layout, but the default setup can't fit into the screen. I think there might be a way to control the width of the scrollbar so that the two DatePick can fit into the screen. Did anyone try to solve this problem before? 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 -~--~~~~--~~--~--~---