[android-developers] Re: Android shared preferences assignments not persisting between emulator sessions
No idea about the MODE_PRIVATE stuff, but I use PreferenceManager.getDefaultSharedPreferences() and it works fiine. Why do you need to control the file name? On Apr 23, 12:15 pm, roschler robert.osch...@gmail.com wrote: I am using the following code to save data to my Android application's shared preferences: private SharedPreferences getOurSharedPreferences() { return getSharedPreferences(SHARED_PREFS_FILENAME, MODE_PRIVATE); } SharedPreferences sharedPrefs = getOurSharedPreferences(); SharedPreferences.Editor editor = sharedPrefs.edit(); editor.putString(keyName, theString); if (!editor.commit()) throw new RuntimeException(Unable to save new string.); // Get it back as a test. String s2 = getStringFromStorage(keyName); Where SHARED_PREFS_FILENAME is a private final static string and keyName is the name of whatever key I'm currently using as a field name. The commit works fine, I don't get an exception. As you can see I added a test that retrieves the recently committed string and when I check it (s2) the value is fine. So I am not having any problems with shared preferences storage during the lifetime of my app. However, when I relaunch the application in the emulator the shared preferences storage area is empty and I can't find the values I stored in the last emulator session. I did some reading and as far as I can see the stored values should persist across sessions, apparently they are saved in an XML file belonging to the emulator. Yet I am having problems. Can anyone tell me why my shared preferences storage values are not persisting between Android emulator sessions? -- roshcler -- 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: Heap size - why so small?
You know what they say -- it's not the heap size, but how you use it. On Apr 23, 4:30 am, Fabio Yasusi Yamamoto fabi...@gmail.com wrote: Hi I'm trying to understand why the heap size of a single application is so small. I mean, there are phones with limited RAM, and the heap size is about 16mb. Small but not so bad. The new devices and even the motorola XOOM with 1GB RAM, is limited to 48mb of heap space. What the hell were they thinking?, They really expect that i will open 21 simultaneous applications? I'm also a iOS developer, and 48mb was about the memory limit of IPHONE first gen. , that was 4 years ago!! ( and the iphone had 128mb ) I know a lot of people will say that i can use NDK, mmap, texttures but hey, why? if i can use more ram using the NDK, why the limit in java heap? Now ( using the NDK ) i will need to put a extra layer of complexity ( libraries, leaks, plataforms, armv5, armv7, debugging... etc ) to do something that should be very simple. Wh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Android shared preferences assignments not persisting between emulator sessions
Robert, Do you start the emulator with Wipe data option, by any chance? If you are, that explains it, as wiping the data means well, wiping the data. The preferences are stored in the file system of the emulated Android device, just like on a real phone, not directly within the host computer's file system. You can find the files under: /data/data/your package name/shared_prefs -- Kostya 23.04.2011 10:02, Zsolt Vasvari пишет: No idea about the MODE_PRIVATE stuff, but I use PreferenceManager.getDefaultSharedPreferences() and it works fiine. Why do you need to control the file name? On Apr 23, 12:15 pm, roschlerrobert.osch...@gmail.com wrote: I am using the following code to save data to my Android application's shared preferences: private SharedPreferences getOurSharedPreferences() { return getSharedPreferences(SHARED_PREFS_FILENAME, MODE_PRIVATE); } SharedPreferences sharedPrefs = getOurSharedPreferences(); SharedPreferences.Editor editor = sharedPrefs.edit(); editor.putString(keyName, theString); if (!editor.commit()) throw new RuntimeException(Unable to save new string.); // Get it back as a test. String s2 = getStringFromStorage(keyName); Where SHARED_PREFS_FILENAME is a private final static string and keyName is the name of whatever key I'm currently using as a field name. The commit works fine, I don't get an exception. As you can see I added a test that retrieves the recently committed string and when I check it (s2) the value is fine. So I am not having any problems with shared preferences storage during the lifetime of my app. However, when I relaunch the application in the emulator the shared preferences storage area is empty and I can't find the values I stored in the last emulator session. I did some reading and as far as I can see the stored values should persist across sessions, apparently they are saved in an XML file belonging to the emulator. Yet I am having problems. Can anyone tell me why my shared preferences storage values are not persisting between Android emulator sessions? -- roshcler -- Kostya Vasilyev -- http://kmansoft.wordpress.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] Fwd: Handle Multi Screen
-- Forwarded message -- From: Me tonasirin...@gmail.com Date: Wed, Apr 20, 2011 at 6:11 PM Subject: Handle Multi Screen To: android-developers@googlegroups.com Hi Community I am using smack for a chatting module in my application … Now there is need to handle the multi chat screens. Right now I am opening my chat screen activity as below Intent chatIntent=new Intent(HomeActivity.this,ChatActivity.class); startActivity(chatIntent); When a user press back button/receive call/other function to that away him/her from current screen There I need to handle the activity GUI with data.. What should I do for this ? Is there other way I can user other View else start to new activity for chat windows . . . . How I can handle the multi chat screens …. Thanks . . --- Regards : Aftab --- -- --- Regards : Muhammad Nasir Aftab --- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: java
On 23 April 2011 07:24, hoss7 hoss...@gmail.com wrote: php and c++ and c# Learning java would possibly make your development easier though. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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: Heap size - why so small?
48MB is (or better should be) good enough memory for any app. What do you want to keep in memory? The world map with a rich set of POIs? On Apr 22, 10:30 pm, Fabio Yasusi Yamamoto fabi...@gmail.com wrote: Hi I'm trying to understand why the heap size of a single application is so small. I mean, there are phones with limited RAM, and the heap size is about 16mb. Small but not so bad. The new devices and even the motorola XOOM with 1GB RAM, is limited to 48mb of heap space. What the hell were they thinking?, They really expect that i will open 21 simultaneous applications? I'm also a iOS developer, and 48mb was about the memory limit of IPHONE first gen. , that was 4 years ago!! ( and the iphone had 128mb ) I know a lot of people will say that i can use NDK, mmap, texttures but hey, why? if i can use more ram using the NDK, why the limit in java heap? Now ( using the NDK ) i will need to put a extra layer of complexity ( libraries, leaks, plataforms, armv5, armv7, debugging... etc ) to do something that should be very simple. Wh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: java
Well, I think C# and Java are quite similar, maybe I would start by doing some examples in pure Java (J2SE) just to feel comfortable with the syntax and then try following some Android examples. You could also tru monodroid if you want to develop just one particular app :) Good luck! El 23/04/2011 10:25, Marcin Orlowski webnet.andr...@gmail.com escribió: On 23 April 2011 07:24, hoss7 hoss...@gmail.com wrote: php and c++ and c# Learning java would possibly make your development easier though. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Heap size - why so small?
I think (as in I'm not sure at all xD) it's for saving memory, I mean: 48Mb sounds enough for almost everything and if it used more, will be draining battery I need to make it to the end of the day :P El 23/04/2011 12:13, Ali Chousein ali.chous...@gmail.com escribió: 48MB is (or better should be) good enough memory for any app. What do you want to keep in memory? The world map with a rich set of POIs? On Apr 22, 10:30 pm, Fabio Yasusi Yamamoto fabi...@gmail.com wrote: Hi I'm trying to understand why the heap size of a single application is so small. I mean, there are phones with limited RAM, and the heap size is about 16mb. Small but not so bad. The new devices and even the motorola XOOM with 1GB RAM, is limited to 48mb of heap space. What the hell were they thinking?, They really expect that i will open 21 simultaneous applications? I'm also a iOS developer, and 48mb was about the memory limit of IPHONE first gen. , that was 4 years ago!! ( and the iphone had 128mb ) I know a lot of people will say that i can use NDK, mmap, texttures but hey, why? if i can use more ram using the NDK, why the limit in java heap? Now ( using the NDK ) i will need to put a extra layer of complexity ( libraries, leaks, plataforms, armv5, armv7, debugging... etc ) to do something that should be very simple. Wh -- 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 -- 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] ListActivity Memory leak with onConfigurationChanged
Hi, I'm using a ListActivity, with onConfigurationChanged. I'm doing this because I don't want onCreate to be called so i don't have to reload data in the list view every time I change orientation. I've found that when I call setListAdapter in the onCreate method of my ListActivity , after a Number of orientation changes I get an out of memory error. If I don't set the ListAdapter I don't see the out of memory error. Just wondering if anyone else has seen this and knows of a way to solve it? Thanks, Example of the Code is Below: public class MyActivity extends ListActivity { private MyAdapter myAdapter; private ArrayListString data = new ArrayListString(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.dictionary); this.myAdapter= new MyAdapter(this, R.layout.mylayout, data); setListAdapter(this.myAdapter);//--- If I remove this line I do not see the memory leak on rotation of the screen } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setContentView(R.layout.main); // -- Needed to load portrait/landscape layout } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] apps-for-android.googlecode.com/svn
Run: android update project -p . from the directory containing AndroidManifest.xml -- this will generate default.properties for you. Most likely, it'll complain about not having a target, which means you'll need to also add the -t switch with an appropriate build target API level. On Fri, Apr 22, 2011 at 9:43 PM, J Handal jhand...@gmail.com wrote: Hi All, http://apps-for-android.googlecode.com/svn is not building. file default.properties are not found, I tried all the tricks checkout,import,clean,build,import jars,libraries,build path,etc. Other repositories built fine like http://myandroidwidgets.googlecode.com/svn -- 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: TabActivity not the main activity
Thank you! Actually, my tabActivity was not complete, my mistake. Problem solved. On 23 avr, 00:35, Mark Murphy mmur...@commonsware.com wrote: Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and look at the stack trace associated with your error. On Fri, Apr 22, 2011 at 5:19 AM, Axel B axel.bour...@gmail.com wrote: Hello everyone, I hope someone will be able to help me with this issue. I'm developing a program that starts with a first Activity, which is my welcome screen. I would like to call an activity from here (using a start button on this screen), that would be a TabActivity. But I keep having problems when I do so (program stops unexpectedly). Plus I don't see any examples where a TabActivity is not the main activity of the program. Hence, I really wonder if this is possible. Anyone can help me? Thanks by advance. Axel -- 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 -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in NYC:http://marakana.com/training/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
Re: [android-developers] ListActivity Memory leak with onConfigurationChanged
On Sat, Apr 23, 2011 at 6:55 AM, Taf neild...@gmail.com wrote: I'm using a ListActivity, with onConfigurationChanged. I'm doing this because I don't want onCreate to be called so i don't have to reload data in the list view every time I change orientation. That is a poor rationale. Use onSaveInstanceState() and onRetainNonConfigurationInstance() to hold onto your data model between the old and new instances, please. I've found that when I call setListAdapter in the onCreate method of my ListActivity , after a Number of orientation changes I get an out of memory error. If I don't set the ListAdapter I don't see the out of memory error. Just wondering if anyone else has seen this and knows of a way to solve it? Fix your Adapter implementation. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Is there a min SDK level for android.hardware.telephony feature?
On Fri, Apr 22, 2011 at 11:46 PM, Zsolt Vasvari zvasv...@gmail.com wrote: However, I notice this does not work (returns false) for some devices that definitely do have telephony (e.g. HTC Legend and Motorola Milestone). In both cases, they are running SDK 7, so I wonder whether this particular feature is an SDK 8+ thing? I'd say these devices simply have a firmware bug or something returning the wrong value. Agreed. I don't remember the Legend, but the Milestone would have shipped with an earlier version of Android than 2.1, then got OTA upgraded (or the equivalent). It may be that Motorola missed whatever corner of the firmware has the value that gets returned here. For the Milestone specifically, you might consider asking your question on the MOTODEV support boards. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to point a marker on google map according to our choice.
Your question is ambiguous. Please state the problem you have and what you have tried to solve it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: java
I'd suggest you get a decent book on Java and play around with it a bit before tackling Android. Shouldn't take a lot with your background, but a few days doing that would be time well spent. (Trying to think of an application to implement, but nothing coming to mind at present. Maybe someone else has an idea for a command line Java app/toy?) On Apr 22, 10:09 am, hoss7 hoss...@gmail.com wrote: hi i want start develop android app can i develop android app if i dont know java? -- 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: ListActivity Memory leak with onConfigurationChanged
Hi Mark, Yes, I think I'll have to look at using the the way you've suggested. It was just that onConfigurationChanged seemed like a really nice and simple way of achieving what I wanted. Though it does say somewhere in the docs that it should be used as a last resort. Not sure why? I guess it circumnavigates all the Activity life cycle calls and hence you can end up getting memory leaks as I am seeing. Thanks for the quick response. On Apr 23, 12:05 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Apr 23, 2011 at 6:55 AM, Taf neild...@gmail.com wrote: I'm using a ListActivity, with onConfigurationChanged. I'm doing this because I don't want onCreate to be called so i don't have to reload data in the list view every time I change orientation. That is a poor rationale. Use onSaveInstanceState() and onRetainNonConfigurationInstance() to hold onto your data model between the old and new instances, please. I've found that when I call setListAdapter in the onCreate method of my ListActivity , after a Number of orientation changes I get an out of memory error. If I don't set the ListAdapter I don't see the out of memory error. Just wondering if anyone else has seen this and knows of a way to solve it? Fix your Adapter implementation. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.0 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: replace transparent color bitmap with alpha
OK, color me confused. Why are you expecting to do this with PorterDuff? PorterDuff works on images (or colors) with alpha to combine them. The alpha controls how they combine. I don't see any way to get information from the color channels to the alpha channel via PorterDuff. The output alpha channel is always a function of the source and destination alpha channels -- and not of the color channels. Even if there were modes that derived alpha from color -- what you're looking to do is very different than the sort of operations involved in PorterDuff. Except for clamping the result between full-on and full-off (however you choose to represent those values), PorterDuff operations are linear. Have you considered painting using AvoidXfermode? I.e. construct your paint with an Xfermode of new AvoidXfermode(your transparent color, 0, AvoidXfermode.Mode.TARGET). Here's a twisted little app that demonstrates, It constructs two changing bitmaps -- a background gradient and a foreground. It alternates between two modes -- Opaque and Transparent. In Transparent mode, the Color.MAGENTA circles are replaced using AvoidXfermode with transparent regions, showing the background. It also replaces a square region with half-transparency of the same color via the same general technique. Please view responsibly. package com.example.transparent; import java.util.Random; import android.app.Activity; import android.graphics.AvoidXfermode; import android.graphics.AvoidXfermode.Mode; import android.graphics.Bitmap; import android.graphics.Bitmap.Config; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.LinearGradient; import android.graphics.Paint; import android.graphics.PorterDuff; import android.graphics.PorterDuffXfermode; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Shader; import android.graphics.Shader.TileMode; import android.graphics.Xfermode; import android.graphics.drawable.BitmapDrawable; import android.os.Bundle; import android.os.Handler; import android.widget.ImageView; import android.widget.TextView; public class Transparent extends Activity { private final Random m_random = new Random(); int m_bg_color_1 = Color.RED; int m_bg_color_1_delta = 0; int m_bg_color_2 = Color.BLUE; int m_bg_color_2_delta = 0; int m_state = 0; final Bitmap m_foreground = Bitmap.createBitmap(300, 300, Config.ARGB_); final Bitmap m_background = Bitmap.createBitmap(300, 300, Config.ARGB_); private int clamp(int c) { return Math.max(0, Math.min(255, c)); } private int add(int c, int delta) { if (delta 128) { return clamp(c - (256 - delta)); } else { return clamp(c + delta); } } private int nextColor(int c, int delta) { return Color.rgb( add(Color.red(c), Color.red(delta)), add(Color.green(c), Color.green(delta)), add(Color.blue(c), Color.blue(delta)) ); } private final int MAX_VELOCITY = 5; private int newDeltaComponent(int c) { if (c == 0) return m_random.nextInt(MAX_VELOCITY-1) + 1; if (c == 255) return 255 - m_random.nextInt(MAX_VELOCITY); return c; } private int newDelta(int c) { return Color.rgb(newDeltaComponent( Color.red(c)), newDeltaComponent(Color.green(c)), newDeltaComponent(Color.blue(c))); } private boolean atLimit(int c) { return Color.red(c) == 0 || Color.red(c) == 255 || Color.green(c) == 0 || Color.green(c) == 255 || Color.blue(c) == 0 || Color.blue(c) == 255; } /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); final ImageView iv = (ImageView)findViewById(R.id.image); final Handler h = new Handler(); Runnable animate = new Runnable() { @Override public void run() { Bitmap background = createBackground(); iv.setBackgroundDrawable(new BitmapDrawable(background)); boolean transparent = ((m_state / 50) 1) == 1; Bitmap bm = createForeground(transparent); iv.setImageBitmap(bm); m_state++; m_bg_color_1 =
Re: [android-developers] Re: ListActivity Memory leak with onConfigurationChanged
On Sat, Apr 23, 2011 at 7:19 AM, Taf neild...@gmail.com wrote: Hi Mark, Yes, I think I'll have to look at using the the way you've suggested. It was just that onConfigurationChanged seemed like a really nice and simple way of achieving what I wanted. Though it does say somewhere in the docs that it should be used as a last resort. Not sure why? It does not force you to reload all of your resources. Hence, you have to do all that yourself. You might think well, gee, it's portrait - landscape, so I just fiddle with my layout, how tough can that be?. But then, what happens if the user changes their locale while your app is in memory? They come back to your app, and either: 1. You added locale to your android:configChanges attribute, in which case you have to have all of the code yourself to reload all of your visible strings, and not miss any 2. You only have rotation-related values in android:configChanges, in which case your app probably crashes or otherwise has results that you don't like, because the old activity will be destroyed and a new activity created There are a fair number of configuration changes (see the docs for android:configChanges). One way or another, you have to handle all of them. Using android:configChanges, therefore, is best for places where the pain of manual resource management (and getting right now and as you change resources in the coming months) is still less than the pain caused by destroying and recreating an activity. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Is there a min SDK level for android.hardware.telephony feature?
I've experienced this with the following devices: Motorola Milestone (7), Spice Mi-310 (8), HTC Desire (7), Samsung Galaxy Apollo (7), T-Mobile myTouch 3G Slide (7), ZTE Racer (7), Nokia N90 (10), Taiwan Mobile T2 (7), Samsung Galaxy 5 (7), HTC Legend (7) I expect some more devices will pop up over the next few days. Side note - Nokia N90!? To summarise, I think there are too many devices to hardcode these special cases. The sim card check may be enough though I'm still open to other suggestions... Actually, the main reason I'm checking for this is to know whether or not to show a list of SMS messages. So maybe a better approach would be to do a quick check for what the SMS content provider returns. Won't be good enough to check for the presence of messages (i.e. no messages won't prove anything) but maybe there is something else to check for in this regard to discover whether SMS messages are applicable to the device? 2011/4/23 Mark Murphy mmur...@commonsware.com On Fri, Apr 22, 2011 at 11:46 PM, Zsolt Vasvari zvasv...@gmail.com wrote: However, I notice this does not work (returns false) for some devices that definitely do have telephony (e.g. HTC Legend and Motorola Milestone). In both cases, they are running SDK 7, so I wonder whether this particular feature is an SDK 8+ thing? I'd say these devices simply have a firmware bug or something returning the wrong value. Agreed. I don't remember the Legend, but the Milestone would have shipped with an earlier version of Android than 2.1, then got OTA upgraded (or the equivalent). It may be that Motorola missed whatever corner of the firmware has the value that gets returned here. For the Milestone specifically, you might consider asking your question on the MOTODEV support boards. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: java
WIth those 3 languages you should be good. I had trouble wrapping my head around the Android Activity Lifecycle. Suggest you read the following and reference often: http://developer.android.com/guide/topics/fundamentals.html http://developer.android.com/guide/topics/fundamentals/activities.html particularly http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle To understand the lifecycle I found it helpful to put in stubs for the routines like OnPause OnResume OnStart, OnDestroy and others with nothing other than a Log.d message to show when they were called. (including Log.d in OnCreate). I was really surprised to see that OnCreate is NOT called every time that the launch icon is touched and that OnPause is called when going to the settings, OnResume when coming back. Orientation change is even more interesting. It's one thing to read it, but much more concrete when you see it in your own program. The Lifecycle does matter when writing code since the program is a living entity that may be around for days on your phone and never totally start from scratch. I came to Android/Java from 30 years of Assembler, COBOL, FORTRAN, PHP. The concept of objects having methods (that look like what I knew as subroutines in the code) and programs that don't end when finished (COBOL Stop Run, Java: finish() ) was a bit different. After a couple of months using Google's App Inventor (http:// appinventor.googlelabs.com/about/) then I totally understood the concept of objects and their related code. I've gone from thinking that Object Oriented programming is the next level of dumbing down programmers to that's way cool and a good successor to what we used to call structured programming . So in summary: - Use App Inventor for a couple of apps - read the suggested documentation - do the tutorials as another person as suggested - find a tutorial that does something you want in your program and use it as the basis Robert -- 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: Display list of saved tables to be opened
Well I would put the names into a table that you can read (and maybe some descriptive info too) but you didn't look far to find your answer. A quick google for sqlite select tables found: http://www.sqlite.org/sqlite.htmlin there is a section Querying the database schema go read that and you'll find a SELECT that does exactly what you want (actually more than you probably need). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: java
What we do with students is implementing a common command-line database (of employees, cars etc) or a sudoku solver/generator. Practices most of the basic Java stuff, not bad for a beginner. And I'm pretty sure there are a lot of other options (possibly more interesting), although these are easy to comprehend as what is the input, output, expected behaviour etc and one can focus on the Java itself while coding it. Best regards, Filip Havlicek 2011/4/23 DanH danhi...@ieee.org I'd suggest you get a decent book on Java and play around with it a bit before tackling Android. Shouldn't take a lot with your background, but a few days doing that would be time well spent. (Trying to think of an application to implement, but nothing coming to mind at present. Maybe someone else has an idea for a command line Java app/toy?) On Apr 22, 10:09 am, hoss7 hoss...@gmail.com wrote: hi i want start develop android app can i develop android app if i dont know java? -- 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 -- 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] Ignoring magnetic field sensor, calibrating the accelerometer
I'm trying to use the accelerometer sensor for a game. 1) I am currently ignoring the magnetometer and using a static value for the magnetic field vector. My reasoning is that the magnetometer is subject to interference and will likely give more varied values than the accelerometer, so I'd like to not use it if possible. I'm also not sure that it is necessary for most motion-based game control. Does this make sense? 2) I'm attempting to get a baseline accelerometer value, but it appears as if the sensor returns a junk/default value for a given axis unless a change is detected along that axis. So it seems as if I can't get an accurate baseline value while the phone is lying perfectly still -- am I understanding this right? Is there any way to work around this problem? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: peculiar or undocumented behavior of ExifInterface?
Looks like the know issue in android. http://code.google.com/p/android/issues/detail?id=14772q=exifcolspec=ID%20Type%20Status%20Owner%20Summary%20Stars -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to disable key press events!!
Hi Marcin, For the In-flight entertainment kind of device. When ever there is any accoutrement to be made, the android based unit must get muted and all key ( mounted on the device + external key pad ) must get disabled for that much time. Any effective solution? Regards, Pratik Prajapati On Fri, Apr 22, 2011 at 4:35 PM, Marcin Orlowski webnet.andr...@gmail.comwrote: Use own listener and eat all releated events. But anyway, this does not sound as good idea though. What for you need this (especially most devices got nothing like keys available all the time) for? Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * On 22 April 2011 12:08, Pratik pratik.prajap...@gmail.com wrote: Dear all, I need to disable the key events (any key pressed) for some predefined time. How the key pressed events be disabled? Regards, Pratik -- 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 -- 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 -- Regards, Pratik Prajapati -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Where can I find the new widget template PSDs for Android 2.X?
Hi, The widget frame PSDs found in Widget Design Guidelines are outdated as the style has been changed since Android 2.X. Where can I obtain those Android 2.X style PSDs like the one below? Thanks. Regards, Eric https://lh6.googleusercontent.com/_OwNjPHS8dpw/TbLaf4TYEAI/C74/ShYeFcSEFMU/res_drawable-hdpi-finger_appwidget_bg.9.png -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to disable key press events!!
On Sat, Apr 23, 2011 at 9:51 AM, Pratik Prajapati pratik.prajap...@gmail.com wrote: For the In-flight entertainment kind of device. When ever there is any accoutrement to be made, the android based unit must get muted and all key ( mounted on the device + external key pad ) must get disabled for that much time. Any effective solution? An in-flight entertainment kind of device is custom hardware running custom firmware and therefore will solve this problem via that custom firmware. Android SDK applications should not be involved in the process at all. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: how to access desktop files from android app remotely?
On Thu, Apr 21, 2011 at 3:50 PM, Peter Webb r.peter.w...@gmail.com wrote: You can't plug your droid into your home Windows network and use Windows networking to access file systems (as far as I know); presumably because it is either very difficult or impossible. Sure you can. Most file manager apps have a Samba plugin, so you can mount windows shares. If you have a rooted phone, you can do it the other way around too -- install the 'Samba filesharing on Android' app and you can turn your phone into a Samba server. -- 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: Ignoring magnetic field sensor, calibrating the accelerometer
1. Yes, there are a lot of issues related to the magnetic sensor but people still use it for thousands years so the real question is do you need it or not. 2. I don't know what does it mean baseline values. Accelerometer always returns noise values (as well as any other sensor) - this is a nature of any real data source. There is no work around this problem but there are many methods to filter noise out. All of them requires certain level of knowledge in math, statistics, etc. and they are very complicated. Take a look at Kalman filter on Wikipedia to get some feeling about this area. -- 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: Timezone Question
No offense, Bob (and I do mean that, I value your posts on this forum), but I think we can safely assume that the OP knows how to calculate times of sunrise and sunset. He's already showing that in his app, from the sound of things, and is probably doing OK with that aspect. The issue at hand is how (and maybe whether) to work around a user having set their phone to a different zone than the one they're actually in. Nobody says this is affecting the absolute (UTC) time of sunrise/sunset in the calculations, it's purely about display. String -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem setting file permissions when filename has a space
I have a question over at StackOverflow that's been sitting there for over a month, and wondered if maybe someone here (or a Googlite) could answer it. http://stackoverflow.com/questions/5149739/android-problem-setting-file-permissions-when-filename-has-a-space I have an app where I store .png images in the app's cache directory, and as I am sharing these files via messaging, etc, I need to make the files readable temporarily by everyone (i.e. chmod 755). As suggested in another thread, I am running Runtime.getRuntime.exec() to do this: Runtime.getRuntime().exec(setperm chmod 755 /path/to/filename.png); This works fine, and as I am filtering / and \, any name works... except a name with a space, unsurpisingly. This fails: Runtime.getRuntime().exec(setperm chmod 755 /path/to/file name.png); So, coming from linux, I try wrapping the file path in quotes, which works on linux, but still fails to change the file perms on Android: Runtime.getRuntime().exec(setperm chmod 755 \/path/to/file name.png \); or Runtime.getRuntime().exec(setperm chmod 755 '/path/to/file name.png'); Any ideas? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Problem setting file permissions when filename has a space
I have put an answer in the SO question. In a nutshell, don't put them in the cache dir. Use openFileOutput() and set MODE_WORLD_READABLE. On Sat, Apr 23, 2011 at 11:43 AM, Paul pmmen...@gmail.com wrote: I have a question over at StackOverflow that's been sitting there for over a month, and wondered if maybe someone here (or a Googlite) could answer it. http://stackoverflow.com/questions/5149739/android-problem-setting-file-permissions-when-filename-has-a-space I have an app where I store .png images in the app's cache directory, and as I am sharing these files via messaging, etc, I need to make the files readable temporarily by everyone (i.e. chmod 755). As suggested in another thread, I am running Runtime.getRuntime.exec() to do this: Runtime.getRuntime().exec(setperm chmod 755 /path/to/filename.png); This works fine, and as I am filtering / and \, any name works... except a name with a space, unsurpisingly. This fails: Runtime.getRuntime().exec(setperm chmod 755 /path/to/file name.png); So, coming from linux, I try wrapping the file path in quotes, which works on linux, but still fails to change the file perms on Android: Runtime.getRuntime().exec(setperm chmod 755 \/path/to/file name.png \); or Runtime.getRuntime().exec(setperm chmod 755 '/path/to/file name.png'); Any ideas? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem setting file permissions when filename has a space
Have you tried escaping the space? path/to/file\ name.png -John Coryat -- 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] Wifi manually turned off, freezes phone, requires battery removal
Users are reporting a unique bug in my Remote Control App that when they manually turn off wifi, their phone locks up, and requires battery removal. While I will work to fix this bug within my own App (Songbird Remote), I would think this is a bug in the Android OS, and there should be no way a java App even if it wanted to, should be able to freeze a phone, and lock it up requiring battery removal. Any body else encounter similar issue when wifi is turned off manually? -- 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: java
Yes, something to become familiar with SQL would be good, though the Android interfaces differ significantly from vanilla Java's. And any sort of puzzle solver would exercise the basics. On Apr 23, 8:10 am, Filip Havlicek havlicek.fi...@gmail.com wrote: What we do with students is implementing a common command-line database (of employees, cars etc) or a sudoku solver/generator. Practices most of the basic Java stuff, not bad for a beginner. And I'm pretty sure there are a lot of other options (possibly more interesting), although these are easy to comprehend as what is the input, output, expected behaviour etc and one can focus on the Java itself while coding it. Best regards, Filip Havlicek 2011/4/23 DanH danhi...@ieee.org I'd suggest you get a decent book on Java and play around with it a bit before tackling Android. Shouldn't take a lot with your background, but a few days doing that would be time well spent. (Trying to think of an application to implement, but nothing coming to mind at present. Maybe someone else has an idea for a command line Java app/toy?) On Apr 22, 10:09 am, hoss7 hoss...@gmail.com wrote: hi i want start develop android app can i develop android app if i dont know java? -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Re: Timezone Question
Jake, I have a vb project that auto detects Time Zone and Day Light Savings Time.. I found these JS files online and they seem to work great.. TimeZoneDetection.js : //Provided by http://www.michaelapproved.com/articles/timezone-detect-and-ignore-daylight- saving-time-dst/ function TimezoneDetect() { var dtDate = new Date('1/1/' + (new Date()).getUTCFullYear()); var intOffset = 1; //set initial offset high so it is adjusted on the first attempt var intMonth; var intHoursUtc; var intHours; var intDaysMultiplyBy; //go through each month to find the lowest offset to account for DST for (intMonth = 0; intMonth 12; intMonth++) { //go to the next month dtDate.setUTCMonth(dtDate.getUTCMonth() + 1); //To ignore daylight saving time look for the lowest offset. //Since, during DST, the clock moves forward, it'll be a bigger number. if (intOffset (dtDate.getTimezoneOffset() * (-1))) { intOffset = (dtDate.getTimezoneOffset() * (-1)); } } return intOffset; } DSTDetection.js: // provided by http://www.michaelapproved.com/articles/daylight-saving-time-dst-detect/ //Find start and end of DST function DstDetect() { var dtDstDetect = new Date(); var dtDstStart = ''; var dtDstEnd = ''; var dtDstStartHold = ''; //Temp date hold var intYearDayCount = 732; //366 (include leap year) * 2 (for two years) var intHourOfYear = 1; var intDayOfYear; var intOffset = TimezoneDetect(); //Custom function. Make sure you include it. //Start from a year ago to make sure we include any previously starting DST dtDstDetect = new Date() dtDstDetect.setUTCFullYear(dtDstDetect.getUTCFullYear() - 1); dtDstDetect.setUTCHours(0, 0, 0, 0); //Going hour by hour through the year will detect DST with shorter code but that could result in 8760 //FOR loops and several seconds of script execution time. Longer code narrows this down a little. //Go one day at a time and find out approx time of DST and if there even is DST on this computer. //Also need to make sure we catch the most current start and end cycle. for (intDayOfYear = 1; intDayOfYear = intYearDayCount; intDayOfYear++) { dtDstDetect.setUTCDate(dtDstDetect.getUTCDate() + 1); if ((dtDstDetect.getTimezoneOffset() * (-1)) != intOffset dtDstStartHold == '') { dtDstStartHold = new Date(dtDstDetect); } if ((dtDstDetect.getTimezoneOffset() * (-1)) == intOffset dtDstStartHold != '') { dtDstStart = new Date(dtDstStartHold); dtDstEnd = new Date(dtDstDetect); dtDstStartHold = ''; //DST is being used in this timezone. Narrow the time down to the exact hour the change happens //Remove 48 hours (a few extra to be on safe side) from the start/end date and find the exact change point //Go hour by hour until a change in the timezone offset is detected. dtDstStart.setUTCHours(dtDstStart.getUTCHours() - 48); dtDstEnd.setUTCHours(dtDstEnd.getUTCHours() - 48); //First find when DST starts for (intHourOfYear = 1; intHourOfYear = 48; intHourOfYear++) { dtDstStart.setUTCHours(dtDstStart.getUTCHours() + 1); //If we found it then exit the loop. dtDstStart will have the correct value left in it. if ((dtDstStart.getTimezoneOffset() * (-1)) != intOffset) { break; } } //Now find out when DST ends for (intHourOfYear = 1; intHourOfYear = 48; intHourOfYear++) { dtDstEnd.setUTCHours(dtDstEnd.getUTCHours() + 1); //If we found it then exit the loop. dtDstEnd will have the correct value left in it. if ((dtDstEnd.getTimezoneOffset() * (-1)) != (intOffset + 60)) { break; } } //Check if DST is currently on for this time frame. If it is then return these values. //If not then keep going. The function will either return the last values collected //or another value that is currently in effect if ((new Date()).getTime() = dtDstStart.getTime() (new Date()).getTime() = dtDstEnd.getTime()) { return new Array(dtDstStart, dtDstEnd); } } } return new Array(dtDstStart, dtDstEnd); } Hopefully this will help your situation ? From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of String Sent: Saturday, April 23, 2011 11:41 AM To: android-developers@googlegroups.com Subject: [android-developers] Re: Timezone Question No offense, Bob (and I do mean that, I value your posts on this forum),
Re: [android-developers] Problem setting file permissions when filename has a space
No shell commands are part of the SDK. Using shell commands is likely to result in your app breaking randomly across devices and platform versions. The recommended way to do this is to write a content provider, which the other app can call ContentResolver.openFileDescriptor() etc. It is actually really easy to write such a content provider -- it doesn't need a database or anything, just to implement ContentProvider.openFile(). Every situation I have seen where MODE_WORLD_* is used it causes more troubles than just writing a content provider. I regret having made that. On Sat, Apr 23, 2011 at 8:43 AM, Paul pmmen...@gmail.com wrote: I have a question over at StackOverflow that's been sitting there for over a month, and wondered if maybe someone here (or a Googlite) could answer it. http://stackoverflow.com/questions/5149739/android-problem-setting-file-permissions-when-filename-has-a-space I have an app where I store .png images in the app's cache directory, and as I am sharing these files via messaging, etc, I need to make the files readable temporarily by everyone (i.e. chmod 755). As suggested in another thread, I am running Runtime.getRuntime.exec() to do this: Runtime.getRuntime().exec(setperm chmod 755 /path/to/filename.png); This works fine, and as I am filtering / and \, any name works... except a name with a space, unsurpisingly. This fails: Runtime.getRuntime().exec(setperm chmod 755 /path/to/file name.png); So, coming from linux, I try wrapping the file path in quotes, which works on linux, but still fails to change the file perms on Android: Runtime.getRuntime().exec(setperm chmod 755 \/path/to/file name.png \); or Runtime.getRuntime().exec(setperm chmod 755 '/path/to/file name.png'); Any ideas? Thanks, Paul -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Wifi manually turned off, freezes phone, requires battery removal
Cris, FWIW - I've never seen this particular problem, but have seen WiFi get into a state where it's technically enabled, and yet does not function at all (i.e. no scans, no connectivity). -- Kostya 23.04.2011 20:10, Cris94107 пишет: Users are reporting a unique bug in my Remote Control App that when they manually turn off wifi, their phone locks up, and requires battery removal. While I will work to fix this bug within my own App (Songbird Remote), I would think this is a bug in the Android OS, and there should be no way a java App even if it wanted to, should be able to freeze a phone, and lock it up requiring battery removal. Any body else encounter similar issue when wifi is turned off manually? -- Kostya Vasilyev -- http://kmansoft.wordpress.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] progressbar spin counterclockwise?
I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] Re: Timezone Question
Forgot to mention. I'm not sure if you are already using this but the Navy has a nice pearl script you can POST to and retrieve a good bit of Sun/Moon data. They have to forms one allows you to enter the city name and state to get the data (not all cities are listed) the other allows you to specify lat/lon and a few other fields to get that sun/moon data for anyplace in the world. The forms are below: For City Name/State only: http://www.usno.navy.mil/USNO/astronomical-applications/data-services/rs-one -day-us For the more advanced form: http://www.usno.navy.mil/USNO/astronomical-applications/data-services/rs-one -day-world Let me know if you have any issues using these forms. I'll be more than happy to assist From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of String Sent: Saturday, April 23, 2011 11:41 AM To: android-developers@googlegroups.com Subject: [android-developers] Re: Timezone Question No offense, Bob (and I do mean that, I value your posts on this forum), but I think we can safely assume that the OP knows how to calculate times of sunrise and sunset. He's already showing that in his app, from the sound of things, and is probably doing OK with that aspect. The issue at hand is how (and maybe whether) to work around a user having set their phone to a different zone than the one they're actually in. Nobody says this is affecting the absolute (UTC) time of sunrise/sunset in the calculations, it's purely about display. String -- 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 -- 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] 'E-Mail Developer' button creating a lot of spam?
Hello, I added an E-Mail Developer button to my application and ever since I get random e-mails throughout the day that either have an empty message body or just one or two words in a different language (looks like Russian or something similar, sometimes an Asian language). Occasionally I get one that just reads Good. At first I thought it was just a user complimenting me, but its happened to much to be a coincidence. For what its worth, just last night I updated to version X and already the e-mails I receive are from that version, barely 24 hours old. I'm worried this means my app has been hacked and decompiled.. but thinking about it more logically I'm not getting just extra general spam as if my e-mail had been 'stolen' and spread around, it's all originating from the E-mail Developer button. Plus, my app is barely equivalent in status to Angry Birds so I cant imagine it being at the top of a hackers To Do list. Is anyone else having this problem? If not, and you have an contact button installed, how did you set it up? Maybe I went about it the wrong way.. Thank you for your help! Matt. -- 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: Ignoring magnetic field sensor, calibrating the accelerometer
Here's what I mean by a baseline value: I'm using SensorManager.getOrientation() to determine the device's orientation. I am only concerned with the difference in orientation relative to a static orientation (which I'm referring to as the baseline value) at any given time. The baseline value could be hard-coded, but I'd like to have more flexibility and set this value based on the orientation of the device when the application is started. The problem I'm facing isn't noise per se; the initial values I get from the sensor are consistently inaccurate, so I'm not sure how to obtain a baseline orientation. On Apr 23, 11:25 am, Igor Prilepov iprile...@gmail.com wrote: 1. Yes, there are a lot of issues related to the magnetic sensor but people still use it for thousands years so the real question is do you need it or not. 2. I don't know what does it mean baseline values. Accelerometer always returns noise values (as well as any other sensor) - this is a nature of any real data source. There is no work around this problem but there are many methods to filter noise out. All of them requires certain level of knowledge in math, statistics, etc. and they are very complicated. Take a look at Kalman filter on Wikipedia to get some feeling about this area. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] 'E-Mail Developer' button creating a lot of spam?
Yeah, I see it happen with my applications as well. One user was nice enough to send me emails asking who the hell I was. Several of them, actually (guess my email address was somehow added to their contact list). In recent versions of my apps I removed my email from one place and changed it from a button into a link in another. Those who really intend to get in touch with me can always find my site / email in the about window or the Market details window, and they do. 23.04.2011 21:00 пользователь Matt M matthew.mag...@gmail.com написал: Hello, I added an E-Mail Developer button to my application and ever since I get random e-mails throughout the day that either have an empty message body or just one or two words in a different language (looks like Russian or something similar, sometimes an Asian language). Occasionally I get one that just reads Good. At first I thought it was just a user complimenting me, but its happened to much to be a coincidence. For what its worth, just last night I updated to version X and already the e-mails I receive are from that version, barely 24 hours old. I'm worried this means my app has been hacked and decompiled.. but thinking about it more logically I'm not getting just extra general spam as if my e-mail had been 'stolen' and spread around, it's all originating from the E-mail Developer button. Plus, my app is barely equivalent in status to Angry Birds so I cant imagine it being at the top of a hackers To Do list. Is anyone else having this problem? If not, and you have an contact button installed, how did you set it up? Maybe I went about it the wrong way.. Thank you for your help! Matt. -- 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 -- 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: replace transparent color bitmap with alpha
I was able to get it to work with the following code: final Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); final int transparentColor = Color.parseColor(# + imageTrans); Xfermode mode = new AvoidXfermode(transparentColor, 0, Mode.TARGET); paint.setXfermode(mode); paint.setColor(Color.TRANSPARENT); final Bitmap temp = imageBitmap.copy(Bitmap.Config.ARGB_, true); final Canvas canvas = new Canvas(temp); canvas.drawBitmap(imageBitmap, 0.0f, 0.0f, paint); tilesetBuilder.imageBitmap(temp); imageBitmap.recycle(); imageBitmap = null; Thanks for the help, Shawn -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
You could not use a ProgressBar, but rather your own Drawable resource (e.g., a PNG file) and a RotateAnimation. Or, you could use a pair of AnimationDrawables, each referring to the same set of underlying PNG files, just in the opposite sequence. On Sat, Apr 23, 2011 at 12:51 PM, B Lyon bradfl...@gmail.com wrote: I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 3.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] apps-for-android.googlecode.com/svn
Thanks Mark, BTW I found the command android update project -p: @ directory: C:\Users\JH\Desktop\Android 2.2\android-sdk_r06-windows\android-sdk-windows\tools -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] apps-for-android.googlecode.com/svn
On Apr 23, 2011 1:20 PM, J Handal jhand...@gmail.com wrote: Thanks Mark, BTW I found the command android update project -p: @ directory: C:\Users\JH\Desktop\Android 2.2\android-sdk_r06-windows\android-sdk-windows\tools -- 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 It doesn't matter where the executable is located as long as its in your PATH environment variable. -- 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] parsing an image from an xml file from a network
in my app when i click a button it goes on to a url and it returns back an xml file. The xml file recieved is opened in a new activity called B as a list view. The xml file is as follows Search Searchdata id1/id First_nameRaj/First_name Last_nameKan/Last_name latitude38/latitude longitude129/longitude DatebirthApr 15, 2011/Datebirth image http://demo.greatinnovus.com/restingspot/img/add_photo.png/image /Searchdata Searchdata id2/id First_nameR/First_name Last_nameR/Last_name latitude37/latitude longitude122/longitude DatebirthApr 15, 2011/Datebirth image http://demo.greatinnovus.com/restingspot/img/add_photo.png/image /Searchdata Search From this xml file i am listing out all the first name's in activity B. When i click on any of the first name i am moving on to a new activity C where i want to display the last name,dob of the selected first name. In activity C i have a button image. When i click on it i am moving to a new activity D where i want to show the image of the selected first name. How to do this, please help me. -- Siva Shankar K -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
This is basically a special class for that progress spinner design. Which is now old. In HC the spinner looks different. If you try to hack on whatever spinner you happen to get from the platform you are running on to do something different, you will probably fail in one way or another as you encounter a different platform with a different spinner. I can't imagine why you need to have it rotate in the other direction, but if you need something different you should just make your own spinner style that has nothing to do with whatever is in the platform. On Sat, Apr 23, 2011 at 9:51 AM, B Lyon bradfl...@gmail.com wrote: I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
thanks Dianne - yeah I expected someone asking that custom seems to be where I need to go if this is to be messed with at all, and that's what I needed to know On Sat, Apr 23, 2011 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: This is basically a special class for that progress spinner design. Which is now old. In HC the spinner looks different. If you try to hack on whatever spinner you happen to get from the platform you are running on to do something different, you will probably fail in one way or another as you encounter a different platform with a different spinner. I can't imagine why you need to have it rotate in the other direction, but if you need something different you should just make your own spinner style that has nothing to do with whatever is in the platform. On Sat, Apr 23, 2011 at 9:51 AM, B Lyon bradfl...@gmail.com wrote: I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] parsing an image from an xml file from a network
pass values through bundle and intent On Sat, Apr 23, 2011 at 11:11 PM, Siva Kannabiran sivasanka...@gmail.comwrote: in my app when i click a button it goes on to a url and it returns back an xml file. The xml file recieved is opened in a new activity called B as a list view. The xml file is as follows Search Searchdata id1/id First_nameRaj/First_name Last_nameKan/Last_name latitude38/latitude longitude129/longitude DatebirthApr 15, 2011/Datebirth image http://demo.greatinnovus.com/restingspot/img/add_photo.png/image /Searchdata Searchdata id2/idnt First_nameR/First_name Last_nameR/Last_name latitude37/latitude longitude122/longitude DatebirthApr 15, 2011/Datebirth image http://demo.greatinnovus.com/restingspot/img/add_photo.png/image /Searchdata Search From this xml file i am listing out all the first name's in activity B. When i click on any of the first name i am moving on to a new activity C where i want to display the last name,dob of the selected first name. In activity C i have a button image. When i click on it i am moving to a new activity D where i want to show the image of the selected first name. How to do this, please help me. -- Siva Shankar K -- 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 -- 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: ListActivity Memory leak with onConfigurationChanged
OK, that's a fair point. I've changed my code to use onRetainNonConfigurationInstance now, and this seems to work nicely. Thanks. On Apr 23, 12:28 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Apr 23, 2011 at 7:19 AM, Taf neild...@gmail.com wrote: Hi Mark, Yes, I think I'll have to look at using the the way you've suggested. It was just that onConfigurationChanged seemed like a really nice and simple way of achieving what I wanted. Though it does say somewhere in the docs that it should be used as a last resort. Not sure why? It does not force you to reload all of your resources. Hence, you have to do all that yourself. You might think well, gee, it's portrait - landscape, so I just fiddle with my layout, how tough can that be?. But then, what happens if the user changes their locale while your app is in memory? They come back to your app, and either: 1. You added locale to your android:configChanges attribute, in which case you have to have all of the code yourself to reload all of your visible strings, and not miss any 2. You only have rotation-related values in android:configChanges, in which case your app probably crashes or otherwise has results that you don't like, because the old activity will be destroyed and a new activity created There are a fair number of configuration changes (see the docs for android:configChanges). One way or another, you have to handle all of them. Using android:configChanges, therefore, is best for places where the pain of manual resource management (and getting right now and as you change resources in the coming months) is still less than the pain caused by destroying and recreating an activity. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android 3.0 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to center aligned multiline text
:-(. I dont think it will be good workaround. I need to make my application compatible to different form factor and in case of tablet it is coming in one line. So I can't put new line character. On Apr 22, 3:10 pm, Kostya Vasilyev kmans...@gmail.com wrote: Manish, As far as I can tell, when TextView breaks text into multiple lines, it always takes as much width from the parent view as it can. One possible workaround is to include explicit linesbreaks, \n, into the string. -- Kostya 22.04.2011 22:53, Manish Garg пишет: Hi All, In my application, I am displaying some text in textview on tabs. I have customized tabs view. because of the text length it is wrapping in two line which is fine with me. But this text is getting aligned with the left and no more in center of the tab view. ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:layout_width=fill_parent android:layout_height=fill_parent android:background=@layout/mailbox_tab_bg_state android:gravity=center TextView android:id=@+id/tabTxt android:text=list view android:layout_width=wrap_content android:layout_height=wrap_content android:textColor=@layout/tab_text_color_selector /TextView /LinearLayout I tried to set text view's gravity property as center then text in two line get in center but it wasn't left aligned with respect to each other. I wish that lines should be in center of the tab view and left aligned with themselves. Thanks Regards, Manish Garg -- Kostya Vasilyev --http://kmansoft.wordpress.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
Re: [android-developers] 'E-Mail Developer' button creating a lot of spam?
I have contact form built-in (so you type there and the it launches MUA for sending). Former versions had no message length check. This resulted in flood of empty mails as these users (to not offend them more :) most likely found sending empty mail accurate entertainment. In later revisions I check message length, and if it's shorter than (iirc) 25 chars you cannot proceed and send it. Typing *that* much (even random) chars fortunately appears too much for these people. Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... *Date In Tray* http://bit.ly/dateintraypro - current date at glance... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
thanks for the tips, Mark. I'll play with it. It might need to be an animation list or whatever btw - RotateDrawable would be a two-line way to do it (custom little icon seems to get animated fine) to replace the indeterminate drawable, but RotateDrawable seems to insist on rotating clockwise, too... it sets toDegrees to max (fromDegrees, toDegrees), so you can't specify it go from 360 to 0. Dianne - in looking at your note again, I can't tell if you were suggesting that the best thing to do (for someone want to do this in the first place) would be to replace the progress bar functionality wholesale (yes overkill). Of course I want to avoid depending on internals or anything else in the API susceptible to change. On Sat, Apr 23, 2011 at 1:50 PM, B Lyon bradfl...@gmail.com wrote: thanks Dianne - yeah I expected someone asking that custom seems to be where I need to go if this is to be messed with at all, and that's what I needed to know On Sat, Apr 23, 2011 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: This is basically a special class for that progress spinner design. Which is now old. In HC the spinner looks different. If you try to hack on whatever spinner you happen to get from the platform you are running on to do something different, you will probably fail in one way or another as you encounter a different platform with a different spinner. I can't imagine why you need to have it rotate in the other direction, but if you need something different you should just make your own spinner style that has nothing to do with whatever is in the platform. On Sat, Apr 23, 2011 at 9:51 AM, B Lyon bradfl...@gmail.com wrote: I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
I don't know off-hand if progress bar has an API to set the drawable. If so, just use that. If not you'll need to roll your own. It would probably be easy to copy the code out of the framework. On Sat, Apr 23, 2011 at 12:52 PM, B Lyon bradfl...@gmail.com wrote: thanks for the tips, Mark. I'll play with it. It might need to be an animation list or whatever btw - RotateDrawable would be a two-line way to do it (custom little icon seems to get animated fine) to replace the indeterminate drawable, but RotateDrawable seems to insist on rotating clockwise, too... it sets toDegrees to max (fromDegrees, toDegrees), so you can't specify it go from 360 to 0. Dianne - in looking at your note again, I can't tell if you were suggesting that the best thing to do (for someone want to do this in the first place) would be to replace the progress bar functionality wholesale (yes overkill). Of course I want to avoid depending on internals or anything else in the API susceptible to change. On Sat, Apr 23, 2011 at 1:50 PM, B Lyon bradfl...@gmail.com wrote: thanks Dianne - yeah I expected someone asking that custom seems to be where I need to go if this is to be messed with at all, and that's what I needed to know On Sat, Apr 23, 2011 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: This is basically a special class for that progress spinner design. Which is now old. In HC the spinner looks different. If you try to hack on whatever spinner you happen to get from the platform you are running on to do something different, you will probably fail in one way or another as you encounter a different platform with a different spinner. I can't imagine why you need to have it rotate in the other direction, but if you need something different you should just make your own spinner style that has nothing to do with whatever is in the platform. On Sat, Apr 23, 2011 at 9:51 AM, B Lyon bradfl...@gmail.com wrote: I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --
Re: [android-developers] progressbar spin counterclockwise?
ProgressBar lets you change the drawables (setProgressDrawable()). On Sat, Apr 23, 2011 at 12:59 PM, Dianne Hackborn hack...@android.comwrote: I don't know off-hand if progress bar has an API to set the drawable. If so, just use that. If not you'll need to roll your own. It would probably be easy to copy the code out of the framework. On Sat, Apr 23, 2011 at 12:52 PM, B Lyon bradfl...@gmail.com wrote: thanks for the tips, Mark. I'll play with it. It might need to be an animation list or whatever btw - RotateDrawable would be a two-line way to do it (custom little icon seems to get animated fine) to replace the indeterminate drawable, but RotateDrawable seems to insist on rotating clockwise, too... it sets toDegrees to max (fromDegrees, toDegrees), so you can't specify it go from 360 to 0. Dianne - in looking at your note again, I can't tell if you were suggesting that the best thing to do (for someone want to do this in the first place) would be to replace the progress bar functionality wholesale (yes overkill). Of course I want to avoid depending on internals or anything else in the API susceptible to change. On Sat, Apr 23, 2011 at 1:50 PM, B Lyon bradfl...@gmail.com wrote: thanks Dianne - yeah I expected someone asking that custom seems to be where I need to go if this is to be messed with at all, and that's what I needed to know On Sat, Apr 23, 2011 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: This is basically a special class for that progress spinner design. Which is now old. In HC the spinner looks different. If you try to hack on whatever spinner you happen to get from the platform you are running on to do something different, you will probably fail in one way or another as you encounter a different platform with a different spinner. I can't imagine why you need to have it rotate in the other direction, but if you need something different you should just make your own spinner style that has nothing to do with whatever is in the platform. On Sat, Apr 23, 2011 at 9:51 AM, B Lyon bradfl...@gmail.com wrote: I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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 -- 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
Re: [android-developers] progressbar spin counterclockwise?
Diane it does have a public setIndeterminateDrawable - I can set it with a RotateDrawable and it works to spin whatever I want there... which is cool and easy... it just apparently does it clockwise only... I just need to replace it with something that can spin stuff backwards and I need to learn the other stuff anyway. On Sat, Apr 23, 2011 at 3:59 PM, Dianne Hackborn hack...@android.com wrote: I don't know off-hand if progress bar has an API to set the drawable. If so, just use that. If not you'll need to roll your own. It would probably be easy to copy the code out of the framework. On Sat, Apr 23, 2011 at 12:52 PM, B Lyon bradfl...@gmail.com wrote: thanks for the tips, Mark. I'll play with it. It might need to be an animation list or whatever btw - RotateDrawable would be a two-line way to do it (custom little icon seems to get animated fine) to replace the indeterminate drawable, but RotateDrawable seems to insist on rotating clockwise, too... it sets toDegrees to max (fromDegrees, toDegrees), so you can't specify it go from 360 to 0. Dianne - in looking at your note again, I can't tell if you were suggesting that the best thing to do (for someone want to do this in the first place) would be to replace the progress bar functionality wholesale (yes overkill). Of course I want to avoid depending on internals or anything else in the API susceptible to change. On Sat, Apr 23, 2011 at 1:50 PM, B Lyon bradfl...@gmail.com wrote: thanks Dianne - yeah I expected someone asking that custom seems to be where I need to go if this is to be messed with at all, and that's what I needed to know On Sat, Apr 23, 2011 at 1:45 PM, Dianne Hackborn hack...@android.com wrote: This is basically a special class for that progress spinner design. Which is now old. In HC the spinner looks different. If you try to hack on whatever spinner you happen to get from the platform you are running on to do something different, you will probably fail in one way or another as you encounter a different platform with a different spinner. I can't imagine why you need to have it rotate in the other direction, but if you need something different you should just make your own spinner style that has nothing to do with whatever is in the platform. On Sat, Apr 23, 2011 at 9:51 AM, B Lyon bradfl...@gmail.com wrote: I was looking into a simple way to get the (small) ProgressBar to spin counterclockwise, and it seems to come down to the class AnimatedRotateDrawable, which looks to be hard-coded to spin clockwise - it sets the angle increment to 360/framesCount, with no apparent option to change the sign of the increment. Most people probably have come to expect that, I guess. A lot about this (public) class AnimatedRotateDrawable seems to be kind of hands-off - two of the attributes are private somehow (framesCount and frameDuration), and I couldn't subclass it in a quick attempt to see about trying to tweak this behavior (not that subclassing would have worked). In my case, if I am showing the spinning progress bar at all (which I don't need to - I think that it's just a nice touch), then I need to be able to flip the direction. Before I get off of this little distraction for the moment, I was wondering if any one else had played with this before. I guess I could just assimilate the class, add assumed-to-be trivial changes for the flip option, and then change the indeterminate drawable on the progressbar in the code, but I was wondering if I'm missing some obviously simpler way. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to
[android-developers] Re: Codecs on Android
Um, the platform documentation? http://developer.android.com/intl/de/guide/appendix/media-formats.html Your specific device documentation, from the manufacturer, if you're interested in what additional formats are supported? Really, you kind of lost me when you start talking about people sneering, etc. It really sounds like you already know we'll point you at the easily accessible, googleable documentation. It doesn't sound you tried to find the information and failed. Masochism? I think you have a couple further questions in there after you've read the documentation, but I won't try to sort them out for you. I will note that the tablet is a nearly-meaningless phrase, as there are any number of tablet-format devices from various manufacturers running 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] Phone for development
Hi, I was thinking of buying a new phone for development and zeroed in on Samsung Galaxy Pro B7510http://www.samsung.com/in/consumer/mobile-phone/mobile-phone/smartphone/GT-B7510LKAINU/index.idx?pagetype=prd_detail. I wanted to know if this is a good choice and if any of you have used it how is it? Also will it be better than my current Optimus P500? Thanks in advance -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- 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: 'E-Mail Developer' button creating a lot of spam?
I use a link and most of the time the contact e-mails are legit. Sometimes, I get those odd character ones and of course the empty ones as well. I would say for every odd one I get twenty good ones so I'm happy with the current state of affairs. -John Coryat -- 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] Connect to emulator with Putty?
All, Is there a way to connect to the Android emulator (I am on Windows 7) with Putty? I did a search and tried connecting to ports 5554 and on the localhost, but that didn't work. -- David Williams Check out our WebOS mobile phone app for the Palm Pre and Pixi: http://www.dtw-consulting.com/GolfCaddie Golf Caddie http://www.dtw-consulting.com/GolfCaddie | Golf Caddie Forum http://www.dtw-consulting.com/GolfCaddie/forum | Golf Caddie FAQ http://www.dtw-consulting.com/GolfCaddie/faq.html by DTW-Consulting, Inc. -- 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=eninline: GClogo.png
[android-developers] WebView and geolocation questions
I have been attempting for a few days now to get a webview to work with a location based service. Every post I can find seems to say the same thing - create a webchromeclient and override onGeolocationShowPrompt(). I have gone as far as directly creating a copy of this and running it. Code: https://gist.github.com/886546 Web page used to test: http://www.sourcerebels.com/geo/ The web page loads everything up until Geolocation supported, and then does nothing. Can someone at least test that code and tell me if they are having the same problem? -- 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] path to sqlite3 database
By default, the sqlite3 database is stored at /data/data/package name/databases/database name Is it possible to change the storage location to a path on the sd card for example? If Yes, would this be something like overriding something like the sqliteopenhelper, setting some global parameter? Any suggestion/example would be greatly appreciated. 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: path to sqlite3 database
You may have to change it anyhow, as any database you in the package is readonly. You can place the database onto SD card but be aware that the card may be removed by the user. eventually you can use a simple buffer copying private void copyDataBase() throws IOException { // Open your local db as the input stream InputStream myInput = myContext.getAssets().open(DB_NAME); // Path to the just created empty db String outFileName = DB_PATH + DB_NAME; // Open the empty db as the output stream OutputStream myOutput = new FileOutputStream(outFileName); // transfer bytes from the inputfile to the outputfile byte[] buffer = new byte[1024]; int length; while ((length = myInput.read(buffer)) 0) { myOutput.write(buffer, 0, length); } // Close the streams myOutput.flush(); myOutput.close(); myInput.close(); buffer = null; } -- 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: Display list of saved tables to be opened
It's a database design question, not an Android question. That's not evading answering you -- it's probably the most helpful thing I'll tell you! Understanding that your question really has nothing in it related to Android will help you find the information you need, beyond anything I can tell you. It's also a fairly basic database schema design problem. You clearly don't know the basics of how to design the schema for a database -- so that's what you need to go learn. That's really important knowledge for any programmer these days, so it'll be well worth your time. With that said, I'll try to get you started, to connect your problem to the concepts. SQL (and SQLite) databases are *relational* databases. That means, each table defines a set of relationships, and you represent your data in terms of the relationships. Each table defines a particular type of relationship; each column in a table defines a particular role in the relationship; each row is a separate relationship of that type. Generally, I would NOT save each project in a separate table in the database. Let's look at the concrete concepts you have. (These are sometimes called entities in database design). 1) Project. 2) A main 2D array. You don't say clearly what it contains, but I infer it may be a 2D array of strings, so I'll go with that. 3) A parallel 2D array A. Again, it's a bit unclear, but it appears it may be also a 2D array of strings. 4) A parallel 2D array B -- likewise. So let's define our tables. I'm going to assume that we want fully-general 2D arrays here, of arbitrary size and content, and that we'll actually use the database to represent them. That will illustrate databases a bit better than the alternative of encoding your data into a big string, and decoding it after you retrieve it. I'm NOT going to go into the details enough to give you a concrete schema -- partly to save my time, and partly because you need to go read up on that anyway. The logical place to start here is the Project table. But I'm not going to do that, because I want to illustrate a thinking process and strategy you need to be able to go through, called normalization. So if you are feeling that's where we should start, you're right, but be patient. Let's instead start with your main 2D array. A 2D array is logically a relationship between two positive integer coordinates -- let's call them I and J -- and a value, which we'll call V since I don't know what your data means. Further, each of these bits of data is associated with a project, let's call that Project_Name So we have the following Array_Main Project_Name I J V Work 0 0 Elephant Work 0 1 Fish Work 0 2 Cow Work 1 0 Pig Work 1 1 Sheep Work 1 2 Horse Play 0 0 Cat Play 0 1 Dog Play 1 0 Hamster Play 1 1 Iguana OK, you can see we've represented two projects here and their main arrays, of two different shapes. We can do things like: SELECT I, J, V FROM Array_Main WHERE Project_Name = 'Work' to get all of the main data for the project named 'Work'. We can also select just a part of it, for example: SELECT I, J, V FROM Array_Main WHERE Project_Name = 'Work' AND I 2 AND J 2; (Thus illustrating we can store and use more data than we need to actually load at any one time). Now we can do the same for the other two arrays, in two additional tables, Array_A and Array_B. OK, now let's take a look at what we have -- we have a piece of duplicated information in every row, in three tables -- the Project_Name. Collapsing this sort of duplication is called normalization. It's a whole topic of its own, but here what we want to do is pretty simple: Replace this string with a project ID, and have a separate table that establishes the relationship between project ID and name. This has a number of benefits, most of which I won't go into -- but one very obvious one is, you can now rename the project, without touching every data row in the database! It's also more efficient, extensible, etc. etc. So now we have a table Project: Project_ID Project_Name 1 Work 2 Play and Array_Main (and _A and _B): Project_ID I J V 1 0 0 Elephant 1 0 1 Fish 1 0 2 Cow 1 1 0 Pig 1 1 1 Sheep 1 1 2 Horse 1 0 0 Cat 1 0 1 Dog 1 1 0 Hamster 1 1 1 Iguana Now, we can select our main data thus: SELECT I, J, V FROM Array_MAIN INNER JOIN Project ON Array_Main.Project_ID = Project.Project_ID WHERE Project_Name = 'Work';. We can even write: SELECT Array_Main.I, Array_Main.J, Array_Main.V as MAIN, Array_A.V as A, Array_B.V as B FROM Project INNER JOIN Array_Main ON Project.Project_ID = Array_Main.Project_ID INNER JOIN Array_A ON Project.Project_ID = Array_A.Project_ID AND Array_Main.I = Array_A.I AND Array_Main.J = Array_A.J INNER JOIN Array_B ON Project.Project_ID = Array_B.Project_ID AND
Re: [android-developers] progressbar spin counterclockwise?
why not simply transform the view of the progressbar, with a scale transform along the center vertical? -- 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: Display list of saved tables to be opened
Generally speaking, if you need to query the schema at runtime, you're probably not making good use of SQL -- unless you're making some sort of schema-agnostic general tool. Creating a table per project is not generally a good approach. It really doesn't let the database be a database, and may be very inefficient for creating/deleting projects, doesn't give you the referential integrity that you'd get with a foreign key constraint, etc. Still, knowing how to examine the schema is a very useful skill during development! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Connect to emulator with Putty?
Make sure you are using telnet, not SSH or another protocol. Putty works fine for me, with telnet on 5554, on Vista. On Sat, Apr 23, 2011 at 5:49 PM, David Williams dwilli...@dtw-consulting.com wrote: All, Is there a way to connect to the Android emulator (I am on Windows 7) with Putty? I did a search and tried connecting to ports 5554 and on the localhost, but that didn't work. -- -- David Williams Check out our WebOS mobile phone app for the Palm Pre and Pixi: http://www.dtw-consulting.com/GolfCaddie Golf Caddiehttp://www.dtw-consulting.com/GolfCaddie| Golf Caddie Forum http://www.dtw-consulting.com/GolfCaddie/forum | Golf Caddie FAQ http://www.dtw-consulting.com/GolfCaddie/faq.html by DTW-Consulting, Inc. -- 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 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: WebView and geolocation questions
Have you considered using Android code to write your own location service? You have a lot more options doing it this way. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android shared preferences assignments not persisting between emulator sessions
@Kostya, no I don't use Wipe Data. I don't know what the exact underlying problem was at this point but I managed to fix things by manually deleting the sharedpreferences file from the emulator's shared_prefs folder while in the ADB shell, and then recreating it as an empty file using echo -n app_global. Note app_global is just an arbitrary name I chose for the sharedpreferences file. I can't be certain, but it looks like the emulator will not recreate the sharedpreferences file if you delete it yourself manually, like I did when I was having trouble persisting sharedpreferences writes between emulator sessions and tried that to fix the problem. Now everything works fine. -- roschler On Apr 23, 3:28 am, Kostya Vasilyev kmans...@gmail.com wrote: Robert, Do you start the emulator with Wipe data option, by any chance? If you are, that explains it, as wiping the data means well, wiping the data. The preferences are stored in the file system of the emulated Android device, just like on a real phone, not directly within the host computer's file system. You can find the files under: /data/data/your package name/shared_prefs -- Kostya 23.04.2011 10:02, Zsolt Vasvari пишет: No idea about the MODE_PRIVATE stuff, but I use PreferenceManager.getDefaultSharedPreferences() and it works fiine. Why do you need to control the file name? On Apr 23, 12:15 pm, roschlerrobert.osch...@gmail.com wrote: I am using the following code to save data to my Android application's shared preferences: private SharedPreferences getOurSharedPreferences() { return getSharedPreferences(SHARED_PREFS_FILENAME, MODE_PRIVATE); } SharedPreferences sharedPrefs = getOurSharedPreferences(); SharedPreferences.Editor editor = sharedPrefs.edit(); editor.putString(keyName, theString); if (!editor.commit()) throw new RuntimeException(Unable to save new string.); // Get it back as a test. String s2 = getStringFromStorage(keyName); Where SHARED_PREFS_FILENAME is a private final static string and keyName is the name of whatever key I'm currently using as a field name. The commit works fine, I don't get an exception. As you can see I added a test that retrieves the recently committed string and when I check it (s2) the value is fine. So I am not having any problems with shared preferences storage during the lifetime of my app. However, when I relaunch the application in the emulator the shared preferences storage area is empty and I can't find the values I stored in the last emulator session. I did some reading and as far as I can see the stored values should persist across sessions, apparently they are saved in an XML file belonging to the emulator. Yet I am having problems. Can anyone tell me why my shared preferences storage values are not persisting between Android emulator sessions? -- roshcler -- Kostya Vasilyev --http://kmansoft.wordpress.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
Re: [android-developers] Re: Click event on Edit-Text's Right Drawable.
hey Zsolt Vasvari can you please explain in detail? and any code or example would be great help for me. Thanks On Fri, Apr 22, 2011 at 8:52 PM, Zsolt Vasvari zvasv...@gmail.com wrote: I messed around this for a long time in my app and finally I decided that the simplest way was to have a compound control that comprised of an EditText and a ImageView. It works great. On Apr 23, 9:33 am, Sunil Lakhiyani slakhiyaniandr...@gmail.com wrote: Hello Developers, I have one Edit Text with right drawable. The xml code is TextView android:id=@+id/trip_txt_to android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/addname android:layout_alignParentLeft=true android:textStyle=bold android:textColor=@color/black android:typeface=normal android:padding=10dp android:layout_below=@+id/lineview1 / test.ui.CustomEditTextActivity android:id=@+id/nameofpersonr android:layout_height=wrap_content android:hint=@string/hint android:layout_toRightOf=@+id/name android:textColor=@color/black android:typeface=normal android:layout_below=@+id/lineview1 android:drawableRight=@drawable/icon android:layout_width=180dp /test.ui.CustomEditTextActivity ImageView android:id=@+id/clearnameimage android:layout_alignParentRight=true android:layout_width=wrap_content android:layout_height=wrap_content android:scaleType=fitXY android:layout_below=@+id/lineview1 android:src=@drawable/deleteicon android:padding=5dp/ and CustomEditTextActivity.java public class CustomEditTextActivity extends EditText { private Drawable rightSideDrawable; private Rect rectangleBounds; public CustomEditTextActivity(Context context, AttributeSet attributeSet, int defStyle) { super(context, attributeSet, defStyle); } public CustomEditTextActivity(Context context, AttributeSet attributeSet) { super(context, attributeSet); } public CustomEditTextActivity(Context context) { super(context); } @Override public void setCompoundDrawables(Drawable left, Drawable top, Drawable right, Drawable bottom) { if (right != null) { rightSideDrawable = right; } super.setCompoundDrawables(left, top, right, bottom); } @Override protected void finalize() throws Throwable { rightSideDrawable = null; rectangleBounds = null; super.finalize(); } public Rect getRectBound() { return rectangleBounds; } public Drawable getRightDrawable() { return rightSideDrawable;} // on touch event code i got from some site.. @Override public boolean onTouchEvent(MotionEvent event) { if(event.getAction() == MotionEvent.ACTION_UP rightSideDrawable!=null) { rectangleBounds = rightSideDrawable.getBounds(); final int x = (int)event.getX(); final int y = (int)event.getY(); if(x=(this.getRight()-rectangleBounds.width()) x=(this.getRight()-this.getPaddingRight()) y=this.getPaddingTop() y=(this.getHeight()-this.getPaddingBottom())) { this.setText(); event.setAction(MotionEvent.ACTION_CANCEL);//use this to prevent the keyboard from coming up } } return super.onTouchEvent(event); } } Now problem is, when i open the activity, it shows me keyboard and i can right in edit text, but as soon as i touch to edit text it launches another activity, i called it InfoActivity.java. But InfoActivity.java is supposed to be launched if I click on drawable not on edit text. Can you please help me to get click event or touch event on right hand side drawable, instead of edit text? or is there any other alternative way? Also, because of this i can not use this line for keyboard.. this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); Can anyone help me in that? I have made lots of changes in ontouch event written above but fail. So please help me in that. I really appreciate it. Thank you in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- 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: WebView and geolocation questions
My purpose in developing this app is to enable access to a webapp. A particular tool in this webapp using google maps. The webapp also needs to function on a browser. I am confused by the lack of functioning samples and the unhelpful documentation available. If anyone has any experience getting this to work I would appreciate the assistance. 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
Re: [android-developers] Re: WebView and geolocation questions
On Sat, Apr 23, 2011 at 7:19 PM, Moose coatedmo...@gmail.com wrote: My purpose in developing this app is to enable access to a webapp. A particular tool in this webapp using google maps. The webapp also needs to function on a browser. Either write an HTML5 offline-cached Web app, or use PhoneGap as your container. I'm not sure what you're gaining by rolling your own container. I am confused by the lack of functioning samples and the unhelpful documentation available. If nothing else, you're not calling webView.getSettings().setGeolocationEnabled(true); -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 3.6 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: Ignoring magnetic field sensor, calibrating the accelerometer
the initial values are not inaccurate, they are just not what you think they should be. Define lying flat on the table - are you sure the table is level? in both dimensions? Etc. Instead of fighting the sensor you could include a calibration function in the app that accepts the user's statement now it lies flat on the table at face value and uses it as the baseline. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: WebView and geolocation questions
Thanks for the suggestion, I will definitely be looking into phonegap - I have seen it mentioned a lot lately. I added the call to enable geolocation - the link to the sample code I posted isn't actually my own stuff. It still doesn't make any sense that this functionality doesn't work as is though. I would really appreciate any insight into the workings of Goelocation. Maybe by pulling apart the phonegap source I'll be able to figure something out. I'm still interested in functioning examples. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
thx Are you referring to the setScaleX/Y new in SDK 11, which seems to be certainly the way to try there? On Sat, Apr 23, 2011 at 6:23 PM, lbendlin l...@bendlin.us wrote: why not simply transform the view of the progressbar, with a scale transform along the center vertical? -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
On Sat, Apr 23, 2011 at 3:23 PM, lbendlin l...@bendlin.us wrote: why not simply transform the view of the progressbar, with a scale transform along the center vertical? You don't know what it actually does. If the original poster for some reason actually needs some animation that rotates counter-clockwise there is no guarantee doing this will actually cause that to happen. For example the indeterminate indicator in the standard Honeycomb UI is not clearly rotating in one direction or the other. -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
no need for that . Use a simple Canvas scaling during dispatchdraw. That is supported all the way down to API3 @Override protected void dispatchDraw(Canvas canvas) { canvas.save(Canvas.MATRIX_SAVE_FLAG); canvas.scale(-1f,1f, getWidth() * 0.5f, getHeight() * 0.5f); super.dispatchDraw(canvas); canvas.restore(); } -- 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: 'E-Mail Developer' button creating a lot of spam?
I have just about 0% spam rate from contact e-mails. Actually, I don't remember receiving a single non-legitamate e-mail. I guess it depends on the kind of user base your app attracts. On Apr 24, 5:25 am, Maps.Huge.Info cor...@gmail.com wrote: I use a link and most of the time the contact e-mails are legit. Sometimes, I get those odd character ones and of course the empty ones as well. I would say for every odd one I get twenty good ones so I'm happy with the current state of affairs. -John Coryat -- 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] Honeycomb / 3.0 / OpenGL ES / Broken / Again!?!
Greets, I finally jumped the shark and got the G-Slate and all my 3D demos from the simplest to the much more complex result in a blank screen. I just got the G2x too and have the Nexus S, N1, G1, Droid, etc. and my engine / platform works great on every OS 1.5+... Auriga3D flies (old build too). TyphonRT, my soon to be released platform many years in the making, manages it's own GL context and doesn't use the API / SDK provided GLSurfaceView. As things go I've been in a massive refactoring operation and can't currently compile the 3D stuff for about a week more (currently using old builds that run fine on all devices including G2x). This is the exact same thing that happened with Android 2.0 w/ horrible OpenGL driver support, unannounced changed implementations of core OpenGL ES methods (was it the implementation of eglChooseConfig if I recall correctly you guys changed without telling anyone). So you guys either changed an implementation of a fundamental GL method or for some reason my GL attribute system is not requesting a proper context or falling back correctly even though it works on every other OS and device combination I have including the G2x, so it's not a Tegra 2 thing. All I got to say is that did you guys even try to test 3D / GL support using an example / test case that doesn't use the API / SDK supplied GLSurfaceView. It's obvious things are way buggy or something is not right when managing ones own context / surface. Remember exact same code runs amazingly well on all OS versions with a wide range of devices. I'm trying to pour some ice water on the back of my neck, but how can you guys let such slipshod work get released (I really do appreciate the work of the Android team, but not the poor quality / rushed aspect). I hope a 3.0.1 is coming darn soon just like 2.0.1 and you guys fix the issues just like 2.0.1.. I was delayed 2.5 - 3 weeks finding workarounds for the 2.0 release. Granted 2.0.1 fixed things too (6 weeks later; 3 after my workarounds), but guess what my bread winning client canceled my contract back then due to the unplanned 3 week delay and I had major hardship. This time I just finished a short term contract (non GL and something that got _a lot_ of press recently), so I'm not going to be out on the street because of this f'up. Can I now assume there will be major GL issues every OS release with serious GL fundamental API breakage on major point releases (let's not bring up Froyo and the borked Java bindings, so I guess it's not just major point releases)? Granted again it'll be about a week until I finish up some of the last major refactoring here and can compile the 3D demos I have for my engine / platform again and I'll get to the bottom of it and find the egl error or which method call is misbehaving. I hope it's something really simple like a wrong attribute combination. My system right now attempts to grab a context with the following params and backs off to lower parameters if nothing matches: High Quality (Droid + really all 2nd gen and up devices) EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_DEPTH_SIZE, 24, Medium Quality (G1, Hero 1st gen, etc.) EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_DEPTH_SIZE, 16, So you guys either changed the implementation to a GL method or when requesting standard high quality settings the G-Slate freaks / GL driver freaks out and it thinks it has a proper context, but things are borked. As I said everything is fine on the G2x / Tegra 2 and every other device and OS version 1.5+, so this points mostly to an unannounced underlying GL method implementation change. I'll find it in a week once I can compile my 3D tests / demos again, but if someone from Google cares to pipe up and point me to the release notes that owns up to any underlying fundamental GL API implementation changes that would be great. You guys didn't do proper release notes for 2.0 and the GL method implementation changes had to be yanked from yah on this list, so I can only assume the worst and that this may be the case again. Now the answer is _NOT_ to use the SDK / API provided GLSurfaceView. Thanks, but no thanks... I'm glad you guys have built in workarounds or whatever is making all of your platform 3D tests pass without examining the larger and more fundamental GL API usage. Raw OpenGL ES API and custom context management / usage should not break like this! I seriously want to provide you guys with a non-SDK GLSurfaceView implementation of a super simple spinning cube and it'd be nice if it was added to the test suite as clearly you guys are not testing non SDK oriented GLSurfaceView apps otherwise this would be caught _EASILY_. I'd also be a bit more gracious too if this wasn't the _4TH_ major OS release to have serious low level graphics API problems. Like I said this time I didn't lose a client over it, I can't begin to tell you how professionally unsatisfying it is to have a client blame oneself for a delay when it is out
Re: [android-developers] progressbar spin counterclockwise?
Now who would commit such a user experience continuity* atrocity? * yes, I made that up. -- 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] VP8 Codec Support GB Capabilities
Hi All, Does any one has the answer for VP8 GB support spec. like version, max bit rate support and max frame rate (ex. nexus one or nexus S based)? Regards SCS -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Timezone Question
While one hopes he does, it's not always a good assumption. But that aspect wasn't the intended focus of my remarks. The point is -- the timezone SHOULD have absolutely ZERO impact on the actual calculated times. There are really only three ways to get an error here that I can see. (Chime in if you can come up with more!) * Using the wrong location. * Doing the wrong calculation. * Displaying with the wrong timezone (including DST errors, but that shouldn't be possible as a program error that I can see). A fourth possibility is a confused user; I'm not sure how to break down the possibilities there -- though using a TZ with different DST characteristics might be included. But I think the first step in sorting out the problem is to identify which problem you have, and that was why I was covering the territory. I hope the OP understands that I don't know any details of his knowledge or app, and can disregard any aspect of my message he's confident he's adequately eliminated! On Sat, Apr 23, 2011 at 8:40 AM, String sterling.ud...@googlemail.comwrote: No offense, Bob (and I do mean that, I value your posts on this forum), but I think we can safely assume that the OP knows how to calculate times of sunrise and sunset. He's already showing that in his app, from the sound of things, and is probably doing OK with that aspect. The issue at hand is how (and maybe whether) to work around a user having set their phone to a different zone than the one they're actually in. Nobody says this is affecting the absolute (UTC) time of sunrise/sunset in the calculations, it's purely about display. String -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] progressbar spin counterclockwise?
that is pretty simple and seemed to work (I needed to put it in an overridden onDraw in this case) well, there *was* a reason I was curious to see about getting it to go counterclockwise - and I am curious to go look at the HoneyComb one now thx again all On Sat, Apr 23, 2011 at 9:36 PM, lbendlin l...@bendlin.us wrote: Now who would commit such a user experience continuity* atrocity? * yes, I made that up. -- 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Honeycomb / 3.0 / OpenGL ES / Broken / Again!?!
I am not aware of any existing GL applications that completely break like this. I have run lots and lots of the top applications on Xoom without trouble. Applications also haven't generally broken on previous platform releases, and I am pretty sure there are many applications on Market that don't use GLSurfaceView. To be honest, I don't have more time than to just scan through your long rant; it looks like most of what you are trying to do is let off steam than look for anything constructive, so I'll leave it at that. On Sat, Apr 23, 2011 at 6:36 PM, MichaelEGR foun...@egrsoftware.com wrote: Greets, I finally jumped the shark and got the G-Slate and all my 3D demos from the simplest to the much more complex result in a blank screen. I just got the G2x too and have the Nexus S, N1, G1, Droid, etc. and my engine / platform works great on every OS 1.5+... Auriga3D flies (old build too). TyphonRT, my soon to be released platform many years in the making, manages it's own GL context and doesn't use the API / SDK provided GLSurfaceView. As things go I've been in a massive refactoring operation and can't currently compile the 3D stuff for about a week more (currently using old builds that run fine on all devices including G2x). This is the exact same thing that happened with Android 2.0 w/ horrible OpenGL driver support, unannounced changed implementations of core OpenGL ES methods (was it the implementation of eglChooseConfig if I recall correctly you guys changed without telling anyone). So you guys either changed an implementation of a fundamental GL method or for some reason my GL attribute system is not requesting a proper context or falling back correctly even though it works on every other OS and device combination I have including the G2x, so it's not a Tegra 2 thing. All I got to say is that did you guys even try to test 3D / GL support using an example / test case that doesn't use the API / SDK supplied GLSurfaceView. It's obvious things are way buggy or something is not right when managing ones own context / surface. Remember exact same code runs amazingly well on all OS versions with a wide range of devices. I'm trying to pour some ice water on the back of my neck, but how can you guys let such slipshod work get released (I really do appreciate the work of the Android team, but not the poor quality / rushed aspect). I hope a 3.0.1 is coming darn soon just like 2.0.1 and you guys fix the issues just like 2.0.1.. I was delayed 2.5 - 3 weeks finding workarounds for the 2.0 release. Granted 2.0.1 fixed things too (6 weeks later; 3 after my workarounds), but guess what my bread winning client canceled my contract back then due to the unplanned 3 week delay and I had major hardship. This time I just finished a short term contract (non GL and something that got _a lot_ of press recently), so I'm not going to be out on the street because of this f'up. Can I now assume there will be major GL issues every OS release with serious GL fundamental API breakage on major point releases (let's not bring up Froyo and the borked Java bindings, so I guess it's not just major point releases)? Granted again it'll be about a week until I finish up some of the last major refactoring here and can compile the 3D demos I have for my engine / platform again and I'll get to the bottom of it and find the egl error or which method call is misbehaving. I hope it's something really simple like a wrong attribute combination. My system right now attempts to grab a context with the following params and backs off to lower parameters if nothing matches: High Quality (Droid + really all 2nd gen and up devices) EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_DEPTH_SIZE, 24, Medium Quality (G1, Hero 1st gen, etc.) EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, EGL_BLUE_SIZE, 5, EGL_DEPTH_SIZE, 16, So you guys either changed the implementation to a GL method or when requesting standard high quality settings the G-Slate freaks / GL driver freaks out and it thinks it has a proper context, but things are borked. As I said everything is fine on the G2x / Tegra 2 and every other device and OS version 1.5+, so this points mostly to an unannounced underlying GL method implementation change. I'll find it in a week once I can compile my 3D tests / demos again, but if someone from Google cares to pipe up and point me to the release notes that owns up to any underlying fundamental GL API implementation changes that would be great. You guys didn't do proper release notes for 2.0 and the GL method implementation changes had to be yanked from yah on this list, so I can only assume the worst and that this may be the case again. Now the answer is _NOT_ to use the SDK / API provided GLSurfaceView. Thanks, but no thanks... I'm glad you guys have built in workarounds or whatever is making all of your platform 3D tests pass without examining the larger and more fundamental GL
[android-developers] Re: Honeycomb / 3.0 / OpenGL ES / Broken / Again!?!
Yes apologies and thanks for your quick reply. You provide great info and are timely which is appreciated.. I'd be glad to buy a round for the Android team... um how large is it again? Android graphics team? um the really cool graphics folks? at I/O ;) I should not be allowed to post on the Internets after a long work session and these days its 6/7 days a week marching to launch as it's on my dime.. Do take it for semi-serious plus the lolz though; I know you guys work hard and Android has come a long way and it's still just beginning. I think it's spectres from Android's past that are nipping at my heels in this case due to the similarity. I'm just a little knackered that I think I know exactly the area things are failing in (init as things go) and I can't immediately fix or test it nor can I afford at the moment to get a Xoom or 3rd Tegra 2 device; will try and track a non G-Slate down though. It's just odd things work great on 1.5-2.3 OS across numerous devices, but not G-Slate / 3.0. I will let you know what I find out soon. For one brief flash while rapidly trying to rotate the screen w/ Auriga3D / quake 3 class engine I saw a flash of textures that all looked correct; I haven't been able to repeat that though and as things go though the intro screen for now is just a flat quad texture, so it should show up as it's not rocket science. The simple 3D cube demo of course is not working too, so init problem is likely and as mentioned when I get this massive refactor done (I'm about to unleash a component oriented platform of 550+ components that form a cross- platform Java middleware SDK w/ lots of goodies + base engine + component entity system support) I'll be able to test thoroughly the 3D demos in 1-2 weeks. I've been refactoring for months thoroughly moving away from strict OOP. It was much more work than I thought to create a robust component oriented platform. As I mentioned it's more spectres of Android's past haunting me and scaring me to death that something like this will happen after I release and potentially charge devs for a quality middleware platform. Basic GL init should just work across the majority of devices or failures detected and displayed to the user.. Black screen.. Not digging that so much. I'll be putting in extra effort to detect errors during init and display user actionable errors + error reporting. I actually have that in there now, so also perplexes me why nothing would pop up. Can you perhaps mention a Java based game of significant complexity that doesn't use the API/SDK GLSurfaceView.. I like to compare my efforts against Deadly Chambers, but it is using the API GLSurfaceView and works out of the box on tablets (G-Slate at least) with no / minor changes; nicely too on Tegra 2 devices. It would be good to reference other Java GL non API / GLSurfaceView oriented apps in times of crisis. Some general worries though.. I've not shipped yet, but soon and these issues again give me the jitters as I'd like to think other devs / users would understand, but not everyone is so forgiving especially when it's pro / paid middleware (GPLv3 w/ commercial license for the core). My hands are tied for now if you don't know of any specific underlying GL implementation method changes then I just have to get the demos back up and step through the init process and potentially test on another Honeycomb tablet. I'd offer sending you the simple 3D cube demo or anyone else for a head check and that would be much appreciated. Regards... On Apr 23, 7:03 pm, Dianne Hackborn hack...@android.com wrote: I am not aware of any existing GL applications that completely break like this. I have run lots and lots of the top applications on Xoom without trouble. Applications also haven't generally broken on previous platform releases, and I am pretty sure there are many applications on Market that don't use GLSurfaceView. To be honest, I don't have more time than to just scan through your long rant; it looks like most of what you are trying to do is let off steam than look for anything constructive, so I'll leave it at that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: WebView and geolocation questions
So I might have discovered my problem. I borrowed a friends phone and tested my app on it. It works. The device I had been testing it on was the motorola xoom (wifi only). By logcat, it seems that on the phone (CM6), does make the call to onGeolocationPermissionsShowPrompt, while the tablet does not (edit: and my old phone - also CM6 - does not make the call to onGeolocationPermissionsShowPrompt) . Possibilities: - no sim card? - if that is the case, can I force it to get location from wifi? - difference in permissions required? (unlikely, because dream is running the same ROM - although the dream already has issues. It got thrown across the room and hasn't been quite the same since) My company is planning on using the xoom with the data connection when we roll out, does someone own one that could test and make sure the sample works? I can export and sign the sample, or if you can make it from the source I specified at the start of the thread. That being said - is there some explanation about why the app won't perform the call to onGeolocationPermissionsShowPrompt? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Honeycomb / 3.0 / OpenGL ES / Broken / Again!?!
What exactly doesn't work in your application? We have tested many OpenGL applications and games from Market, found and fixed bugs. We also sometimes found issues that were in the apps themselves but nothing as dire as what you are describing (although I couldn't really parse what your problem is exactly.) What fails? Do you see a crash? Are things not behaving as expecting? Do you get EGL/GL errors? How exactly are you initializing your context? There are no special workarounds or behaviors in GLSurfaceView btw. On Sat, Apr 23, 2011 at 8:16 PM, MichaelEGR foun...@egrsoftware.com wrote: Yes apologies and thanks for your quick reply. You provide great info and are timely which is appreciated.. I'd be glad to buy a round for the Android team... um how large is it again? Android graphics team? um the really cool graphics folks? at I/O ;) I should not be allowed to post on the Internets after a long work session and these days its 6/7 days a week marching to launch as it's on my dime.. Do take it for semi-serious plus the lolz though; I know you guys work hard and Android has come a long way and it's still just beginning. I think it's spectres from Android's past that are nipping at my heels in this case due to the similarity. I'm just a little knackered that I think I know exactly the area things are failing in (init as things go) and I can't immediately fix or test it nor can I afford at the moment to get a Xoom or 3rd Tegra 2 device; will try and track a non G-Slate down though. It's just odd things work great on 1.5-2.3 OS across numerous devices, but not G-Slate / 3.0. I will let you know what I find out soon. For one brief flash while rapidly trying to rotate the screen w/ Auriga3D / quake 3 class engine I saw a flash of textures that all looked correct; I haven't been able to repeat that though and as things go though the intro screen for now is just a flat quad texture, so it should show up as it's not rocket science. The simple 3D cube demo of course is not working too, so init problem is likely and as mentioned when I get this massive refactor done (I'm about to unleash a component oriented platform of 550+ components that form a cross- platform Java middleware SDK w/ lots of goodies + base engine + component entity system support) I'll be able to test thoroughly the 3D demos in 1-2 weeks. I've been refactoring for months thoroughly moving away from strict OOP. It was much more work than I thought to create a robust component oriented platform. As I mentioned it's more spectres of Android's past haunting me and scaring me to death that something like this will happen after I release and potentially charge devs for a quality middleware platform. Basic GL init should just work across the majority of devices or failures detected and displayed to the user.. Black screen.. Not digging that so much. I'll be putting in extra effort to detect errors during init and display user actionable errors + error reporting. I actually have that in there now, so also perplexes me why nothing would pop up. Can you perhaps mention a Java based game of significant complexity that doesn't use the API/SDK GLSurfaceView.. I like to compare my efforts against Deadly Chambers, but it is using the API GLSurfaceView and works out of the box on tablets (G-Slate at least) with no / minor changes; nicely too on Tegra 2 devices. It would be good to reference other Java GL non API / GLSurfaceView oriented apps in times of crisis. Some general worries though.. I've not shipped yet, but soon and these issues again give me the jitters as I'd like to think other devs / users would understand, but not everyone is so forgiving especially when it's pro / paid middleware (GPLv3 w/ commercial license for the core). My hands are tied for now if you don't know of any specific underlying GL implementation method changes then I just have to get the demos back up and step through the init process and potentially test on another Honeycomb tablet. I'd offer sending you the simple 3D cube demo or anyone else for a head check and that would be much appreciated. Regards... On Apr 23, 7:03 pm, Dianne Hackborn hack...@android.com wrote: I am not aware of any existing GL applications that completely break like this. I have run lots and lots of the top applications on Xoom without trouble. Applications also haven't generally broken on previous platform releases, and I am pretty sure there are many applications on Market that don't use GLSurfaceView. To be honest, I don't have more time than to just scan through your long rant; it looks like most of what you are trying to do is let off steam than look for anything constructive, so I'll leave it at that. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send
[android-developers] How to install Sense UI into my HTC Magic
Hi Android Dev group members, I've been searching high and low about installing Sense UI into my HTC Magic (the one that is loaded with Google ION) but couldn't find any relevant search results. This is the closest I could find: http://developer.htc.com/google-io-device.html There are several terms that I do not understand, namely - root, flash, wipe. My question would be, is it even remotely possible to install Sense UI into my HTC Magic (I got that Magic phone from Google IO conference). Nicholas -- 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