[android-developers] help
Hello everybody, This is subrat, in my app i want 2 change the background and text color of preference screeen. in my preference screen there are 4 checkboxes 2 lists. i have used the following code to change background color: getWindow().setBackgroundDrawableResource(R.drawable.White); getListView().setBackgroundColor(Color.TRANSPARENT); getListView().setCacheColorHint(Color.TRANSPARENT); Now, background is looking white, but how i change the text color to black. i am requesting if anybody have the knowledge please help me. Thanking you, Best Regards Subrat Kumar Panda -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: glTexImage2D very slow on phones like Nexus one
Hi, I'm writing this part for video output. This is for video output at most of the time. Our decoder write the screen to a pixel buffer. And then I need to draw it to the screen. So, you mean, I can use FBO to do this? I'm not very familiar with fbo stuffs. Could you give more hint? Thank you! On 4月18日, 下午5时18分, Robert Green rbgrn@gmail.com wrote: Eong, All Mario and I are trying to say is that the thing you are trying to do (upload textures every frame) is generally not considered a good practice and workarounds usually exist that are more efficient, especially if you can target higher levels of opengl or use extensions like framebufferobjects. If you would be willing to tell us something a little bit more specific about what you're doing that requires a texture update every frame, we could potentially offer some more efficient ways of doing it. On Apr 18, 2:44 am, Eong eong.c...@gmail.com wrote: Thanks, Mario. I think it's somewrong with the driver or the chip. It's not just a bandwidth problem. If it's really a bandwidth problem, it only has 1/7 bandwidth of milestone? (150ms compare to 20ms with a full screen tex).That's very funny. I'm working on some libs, which will be used for our tools and games. When a full screen update only takes 20+ms, it's usable in some conditions as it already gets at least 40fps. On 4月17日, 下午6时22分, Mario Zechner badlogicga...@gmail.com wrote: It seems that the msm chips are notorious for having a low bandwidth. There's really no solution to that problem other than 1) lowering your texture size 2) lowering the bit depth of the texture, e.g. instead of using RGBA use RGBA444 or RGB565 2) uploading your texture in patches, e.g. split it up into 4 smaller parts and upload one part each frame. This will probably lead to artifacts if your frame rate is low but could work otherwise. Just out of curiousity: why do you have to upload such a big texture each frame? If you'd state your scenario in detail we might be able to suggest other solutions to the problem. On 17 Apr., 12:10, Eong eong.c...@gmail.com wrote: Robert, Sorry, it's not text, it's tex. I just use this to draw the background. I just want to know why nexus one is so slow with this. It takes 20ms on my milestone but it takes at least 80ms on the nexus one, for one frame. On 4月17日, 上午2时08分, Robert Green rbgrn@gmail.com wrote: Eong, You said you are uploading every frame just to draw text? There are much more efficient ways to do that. On Apr 16, 11:14 am, Eong eong.c...@gmail.com wrote: I'm afraid it's not a same problem. My problem only happenes on Snapdragon phones. It's fine on Milestone or Droid. I found a few threads about this but no solution. On 4月16日, 下午9时15分, Felipe Silveira webfel...@gmail.com wrote: Just a guess: It can be the same error reported here:http://code.google.com/p/android/issues/detail?id=7520 Take a look... Felipe Silveirahttp://www.felipesilveira.com.br On Fri, Apr 16, 2010 at 8:40 AM, Eong eong.c...@gmail.com wrote: Hi, We are developing 2D games. And we found our game works fine except the snapdragon chips, like Nexus one and Liquid A1. It even runs fine on G1. We use GLSurfaceView, and we useglTexImage2Dand glTexIsubmage2D to put on the text and then draw. TheglTexImage2Dclass take more than 100ms on Nexus one (1024x512 pix tex). It's very strange, G1 is even faster than this. If anyone know something about this? -Code snip--- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glTexSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, m_width, m_height, GL10.GL_RGB, GL_UNSIGNED_SHORT_5_6_5, m_byteCanvas); ((GL11Ext)gl).glDrawTexiOES(0, 0, 0, m_width, m_height); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Felipe Silveira Engenharia da Computação Universidade Federal de Itajubáhttp://www.felipesilveira.com.br MSN: felipeuni...@hotmail.com - -- You received this message
Re: [android-developers] Re: GetLocation of the phone
Store in a Bundle pass to your activity public void onLocationChanged(Location loc) { if (loc != null) { double lat=loc.getLatitude(); double lon=loc.getLongitude(); Bundle bundle = new Bundle(); bundle.putDouble(lat, lat); bundle.putDouble(lon, lon); // Create Intent, store Bundle into Intent and paas intent to another Activity information = +lat +lon; Toast.makeText(this, Location Changed:+information, Toast.LENGTH_LONG).show(); } } And you can extract these value in OnCreate() of another Activity. Bundle b = this.getIntent().getExtras(); - Anurag Singh On Mon, Apr 19, 2010 at 10:24 AM, raqz abdulraqee...@gmail.com wrote: yes.. its getting the locations all right..but i am unable to save the location somwhere so that i can use it later. thats the whole issue I just thought of something... if I start a service that does the onLocationChanged stuffit would get the gps locations and store it (somewhere in the system) and later if i just start an acitivity that would do getLastKnowLocation() , shouldn't that fetch the location for further use. Come some one advise please On Apr 19, 12:22 am, Anurag Singh anusingh...@gmail.com wrote: Have you set uses permission in manifiest file. uses-permission android:name=android.permission.ACCESS_FINE_LOCATION / - Anurag Singh Hi, I am trying to retrieve the GPS location of the phone. I believe I cannot create an object of the class which stores the location in a variable. So that once the class gets instantiated I use a get method and retrieve the content in the variable. So I am trying to do this locationListener = new MyLocationListener(); lm.requestLocationUpdates( LocationManager.GPS_PROVIDER,0,0,locationListener); if(!information.equals(null)){ Bundle bundle = new Bundle(); bundle.putString(hello, information); Intent intent = new Intent(LocationActivity.this, MainActivity.class); intent.putExtras(bundle); startActivity(intent); } and in the locationlistener class public void onLocationChanged(Location loc) { if (loc != null) { double lat=loc.getLatitude(); double lon=loc.getLongitude(); information = +lat +lon; Toast.makeText(getBaseContext(), Location Changed:+information, Toast.LENGTH_LONG).show(); } else information=bad luck; } The mainactivity then displays that...but its not happening...could some one please help me how to get the values of this. Thanks...Raqeeb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// 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.comandroid-developers%2bunsubscr...@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] Pass ArrayList parameters between two activities.
Hi all, Today I met a problem, I need to pass a ArrayListMyClass from an activity to another. I dont know what the Intent exactly do when I use putExtra to pass in an ArrayListMyClass object. I guess MyClass need to implement Parcelable interface, so I just did it. But still, it does not work. Maybe I need to create a Bundle and then use Bundle's putParcelableArrayList method to put my ArrayListMyClass object in, and then pass this bundle as parameter of putExtra to the intent. So crazy! I am lazy, I just want to pass an ArrayListMyClass object simply, is there a simple way?? Any suggestion would be greatly appreciated! kerl.d.w -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] help
hello everybody, This is subrat, i have some problem with preference screen. in my preference screen there are 4 checkboxes 2 lists. so, my problem is if i do any change to checkbox or list(means, if i check one unchecked checkbox or vice versa as, or i select a value from list), i want 2 post the edited data to server for save(i am using axis server), when i press the button. but here when i am pressing the back button after edited there is no change. i am expecting some help . i don't know why i am not able to connect to server. here is my code: package com.microaiddreamworks.gps; import java.io.BufferedReader; import java.io.InputStreamReader; import org.kobjects.util.Csv; import org.ksoap2.SoapEnvelope; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapSerializationEnvelope; import org.ksoap2.transport.HttpTransportSE; import com.microaiddreamworks.util.*; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.graphics.Color; import android.os.Bundle; import android.preference.CheckBoxPreference; import android.preference.ListPreference; import android.preference.Preference; import android.preference.PreferenceActivity; import android.preference.PreferenceManager; import android.preference.Preference.OnPreferenceClickListener; import android.telephony.TelephonyManager; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.CheckBox; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; public class TestPreference extends PreferenceActivity{ private SharedPreferences m_cSharedPreferences = null ; private String m_cSafeZoneAlert = 0; private String m_cOnlineTracking = 0; private String m_cSpeedAlert = 20; private String m_cBreadCrumbing = 1; private String m_cLowBatteryAlert = 0; private String m_cWhereIsLookup = 0; ServerMethods m_cObjServer_Methods = null; private String m_clRetVal = null; boolean CheckBoxPreference = false; String ListPreference = null; @Override protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); // Load the preferences from an XML resource addPreferencesFromResource(R.xml.testpreference); getWindow().setBackgroundDrawableResource(R.drawable.White); getListView().setBackgroundColor(Color.TRANSPARENT); getListView().setCacheColorHint(Color.TRANSPARENT); // getWindow().setTitleColor(Color.BLACK); //View view = ((Preference) m_cSharedPreferences).getView(null,null); // ((TextView)view.findViewWithTag(android.R.id.title)).setTextColor(Color.BLACK); m_cSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); m_cObjServer_Methods = new ServerMethods(); } private void SaveConfigToServer() { // TODO Auto-generated method stub try{ CheckBoxPreference = m_cSharedPreferences.getBoolean(checkbox_preference1, false); m_cSafeZoneAlert = String.valueOf(CheckBoxPreference); CheckBoxPreference = m_cSharedPreferences.getBoolean(checkbox_preference2, false); m_cOnlineTracking = String.valueOf(CheckBoxPreference); CheckBoxPreference = m_cSharedPreferences.getBoolean(checkbox_preference3, false); m_cLowBatteryAlert = String.valueOf(CheckBoxPreference); CheckBoxPreference = m_cSharedPreferences.getBoolean(checkbox_preference4, false); m_cWhereIsLookup = String.valueOf(CheckBoxPreference); ListPreference = m_cSharedPreferences.getString(list_preference1, speed_alert); m_cSpeedAlert = ListPreference; ListPreference = m_cSharedPreferences.getString(list_preference2, bread_crumb); m_cBreadCrumbing = ListPreference; /*m_cSpeedAlert = ((Preference) m_cSharedPreferences).getSharedPreferences().getString(list_preference1,speed_alert); m_cBreadCrumbing = ((Preference) m_cSharedPreferences).getSharedPreferences().getString(list_preference2, bread_crumb); m_cSafeZoneAlert = String.valueOfPreference) m_cSharedPreferences).getSharedPreferences().getBoolean(checkbox_preference1,
Re: [android-developers] Re: Game develop like Air Attack touching screen event
Dear Robert, How can i calls setFocusableOnTouchEvents(true)? where can i wrote? 2010/4/17 Robert Green rbgrn@gmail.com: Make sure your view calls setFocusableOnTouchEvents(true) On Apr 16, 4:44 am, a a harvey.a...@gmail.com wrote: Dear all, i tested below, but it don't work 1. I wrote my GodsendView public class GodsendView extends View implements OnTouchListener { @Override public boolean onTouch(View v, MotionEvent event) { Log.d(harvey, onTouch); return false; } } 2.wrote a xml ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent com.android.godsend.GodsendView android:id=@+id/godsend android:layout_width=fill_parent android:layout_height=fill_parent tileSize=24 / /LinearLayout 3. Activity public class GodSendActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } } but after i touch the screen, can't print my test log Log.d(harvey, onTouch); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Game develop like Air Attack touching screen event
I add android:focusableInTouchMode=true in my xml and try to override the @Override public void setFocusableInTouchMode(boolean focusableInTouchMode) { Log.d(harvey, setFocusableInTouchMode); } But still can work when touch the screen, what' wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: glTexImage2D very slow on phones like Nexus one
Sorry, I mean write the frame to a pixel buffer. I think fbo is a ES2 feature, right? What about the other ES1 phones? As a developer, you can't just give up the 75% users. On 4月19日, 下午2时20分, Eong eong.c...@gmail.com wrote: Hi, I'm writing this part for video output. This is for video output at most of the time. Our decoder write the screen to a pixel buffer. And then I need to draw it to the screen. So, you mean, I can use FBO to do this? I'm not very familiar with fbo stuffs. Could you give more hint? Thank you! On 4月18日, 下午5时18分, Robert Green rbgrn@gmail.com wrote: Eong, All Mario and I are trying to say is that the thing you are trying to do (upload textures every frame) is generally not considered a good practice and workarounds usually exist that are more efficient, especially if you can target higher levels of opengl or use extensions like framebufferobjects. If you would be willing to tell us something a little bit more specific about what you're doing that requires a texture update every frame, we could potentially offer some more efficient ways of doing it. On Apr 18, 2:44 am, Eong eong.c...@gmail.com wrote: Thanks, Mario. I think it's somewrong with the driver or the chip. It's not just a bandwidth problem. If it's really a bandwidth problem, it only has 1/7 bandwidth of milestone? (150ms compare to 20ms with a full screen tex).That's very funny. I'm working on some libs, which will be used for our tools and games. When a full screen update only takes 20+ms, it's usable in some conditions as it already gets at least 40fps. On 4月17日, 下午6时22分, Mario Zechner badlogicga...@gmail.com wrote: It seems that the msm chips are notorious for having a low bandwidth. There's really no solution to that problem other than 1) lowering your texture size 2) lowering the bit depth of the texture, e.g. instead of using RGBA use RGBA444 or RGB565 2) uploading your texture in patches, e.g. split it up into 4 smaller parts and upload one part each frame. This will probably lead to artifacts if your frame rate is low but could work otherwise. Just out of curiousity: why do you have to upload such a big texture each frame? If you'd state your scenario in detail we might be able to suggest other solutions to the problem. On 17 Apr., 12:10, Eong eong.c...@gmail.com wrote: Robert, Sorry, it's not text, it's tex. I just use this to draw the background. I just want to know why nexus one is so slow with this. It takes 20ms on my milestone but it takes at least 80ms on the nexus one, for one frame. On 4月17日, 上午2时08分, Robert Green rbgrn@gmail.com wrote: Eong, You said you are uploading every frame just to draw text? There are much more efficient ways to do that. On Apr 16, 11:14 am, Eong eong.c...@gmail.com wrote: I'm afraid it's not a same problem. My problem only happenes on Snapdragon phones. It's fine on Milestone or Droid. I found a few threads about this but no solution. On 4月16日, 下午9时15分, Felipe Silveira webfel...@gmail.com wrote: Just a guess: It can be the same error reported here:http://code.google.com/p/android/issues/detail?id=7520 Take a look... Felipe Silveirahttp://www.felipesilveira.com.br On Fri, Apr 16, 2010 at 8:40 AM, Eong eong.c...@gmail.com wrote: Hi, We are developing 2D games. And we found our game works fine except the snapdragon chips, like Nexus one and Liquid A1. It even runs fine on G1. We use GLSurfaceView, and we useglTexImage2Dand glTexIsubmage2D to put on the text and then draw. TheglTexImage2Dclass take more than 100ms on Nexus one (1024x512 pix tex). It's very strange, G1 is even faster than this. If anyone know something about this? -Code snip--- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glTexSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, m_width, m_height, GL10.GL_RGB, GL_UNSIGNED_SHORT_5_6_5, m_byteCanvas); ((GL11Ext)gl).glDrawTexiOES(0, 0, 0, m_width, m_height); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at
[android-developers] Re: Portrait/landscape question
If you'd like a quick tour of all the options for setRequestedOrientation(), my app, SmartVolume Free, does this, and lets you control what value to supply to setRequestedOrientation() in a preference setting. (The default is to not set it at all, and use the system's setting). Of course, it's not hard to throw the code into your app, but this way you can switch back and forth more quickly. I'm still not clear on how the orientation is chosen for ActivvityInfo.SCREEN_ORIENTATION_NOSENSOR. On my device (N1) it seems to always come up in Portrait. I don't know if this is intended to be a suitable default for the device, or something else. It doesn't appear to be what orientation the device was in on start, which I think would be more useful. I guess I'll go fill a documentation bug. I put this in for a couple reasons. One is that my app is more usable in portrait mode, but switching to portrait mode if you're using it in landscape may not be desirable. Another is that before 2.1 update 1, the launcher would crash (out of memory) if it was behind a window that switched to landscape and you had too many apps... On Apr 18, 1:27 pm, Mark Murphy mmur...@commonsware.com wrote: Isaac Wagner wrote: On Sun, Apr 18, 2010 at 3:25 PM, Justin Giles jtgi...@gmail.com wrote: Why would you want to allow them to set it in settings when Android handles the rotation automagically? All you have to do is have a xml file in your layout directory, then for landscape have a xml file (with the same name) in your layout-land directory. When in portrait mode Android looks to the layout directory. When the phone is flipped to its side for landscape, Android looks to the layout-land directory. Justin sigh why is it that when I ask a simple question I get harassed? This discussion list gets a lot of people asking questions where they are barking up the wrong tree. It is commonplace to inquire about their rationale for barking up that tree and steer them in the direction of more common patterns. Sometimes, the barking is indeed up the correct tree, but that may not always be obvious from the question. If you consider that to be harassment, you may wish to choose a different means of getting Android developer support. OK, since it appears I can't get a simple answer without a long explanation My application is one such that the user moves their phone around a lot. During this movement I want to keep the orientation constant -- I DON'T WANT ANDROID TO HANDLE THE ROTATION. So, in my manifest I set the orientation to portrait to prevent Android from mucking with the orientation. However, I am now making some additions and would like the user to be able to choose portrait or landscape mode, but whatever they choose needs to stick. Again, I don't want Android to handle the rotation. As the phone is moved around I want whichever orientation they chose to stick. Does that make sense? Now, how do I do this? How do I force the orientation to my preference? You can try the combination of setRequestedOrientation() in onCreate() (and from the menu or wherever the user chooses their preference) and android:configChanges=keyboardHidden|orientation in your manifest. I have not used setRequestedOrientation() personally. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in NYC: 30 April-2 May 2010:http://guruloft.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 athttp://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] Pass ArrayList parameters between two activities.
-- Forwarded message -- From: Ke Wu kerl@gmail.com Date: 2010/4/19 Subject: Pass ArrayList parameters between two activities. To: android-developers@googlegroups.com Hi all, Today I met a problem, I need to pass a ArrayListMyClass from an activity to another. I dont know what the Intent exactly do when I use putExtra to pass in an ArrayListMyClass object. I guess MyClass need to implement Parcelable interface, so I just did it. But still, it does not work. Maybe I need to create a Bundle and then use Bundle's putParcelableArrayList method to put my ArrayListMyClass object in, and then pass this bundle as parameter of putExtra to the intent. So crazy! I am lazy, I just want to pass an ArrayListMyClass object simply, is there a simple way?? Any suggestion would be greatly appreciated! kerl.d.w -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 depress the onLongClick() when drag a view
Hi, I have a View and I can drag it. It also has a onLongClick() method so it can respond to the long press on the screen. The problem is when I drag it , the onLongClick will also be triggered . Anyone have an idea to depress the long click detection when i move it . Thanks in advances. 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
[android-developers] Re: Portrait/landscape question
Well, actually, it IS explained in another location (http:// developer.android.com/intl/de/guide/topics/manifest/activity- element.html). You so often have to look in two or three different pieces of documentation to get the full story... It amounts to a suitable default for the device. I guess we could check the display dimensions and set it to Portrait or Landscape on entry to the activity. I guess there's more than one place this decision could be made, with slightly different results, anyway. On Apr 18, 11:44 pm, Bob Kerns r...@acm.org wrote: If you'd like a quick tour of all the options for setRequestedOrientation(), my app, SmartVolume Free, does this, and lets you control what value to supply to setRequestedOrientation() in a preference setting. (The default is to not set it at all, and use the system's setting). Of course, it's not hard to throw the code into your app, but this way you can switch back and forth more quickly. I'm still not clear on how the orientation is chosen for ActivvityInfo.SCREEN_ORIENTATION_NOSENSOR. On my device (N1) it seems to always come up in Portrait. I don't know if this is intended to be a suitable default for the device, or something else. It doesn't appear to be what orientation the device was in on start, which I think would be more useful. I guess I'll go fill a documentation bug. I put this in for a couple reasons. One is that my app is more usable in portrait mode, but switching to portrait mode if you're using it in landscape may not be desirable. Another is that before 2.1 update 1, the launcher would crash (out of memory) if it was behind a window that switched to landscape and you had too many apps... On Apr 18, 1:27 pm, Mark Murphy mmur...@commonsware.com wrote: Isaac Wagner wrote: On Sun, Apr 18, 2010 at 3:25 PM, Justin Giles jtgi...@gmail.com wrote: Why would you want to allow them to set it in settings when Android handles the rotation automagically? All you have to do is have a xml file in your layout directory, then for landscape have a xml file (with the same name) in your layout-land directory. When in portrait mode Android looks to the layout directory. When the phone is flipped to its side for landscape, Android looks to the layout-land directory. Justin sigh why is it that when I ask a simple question I get harassed? This discussion list gets a lot of people asking questions where they are barking up the wrong tree. It is commonplace to inquire about their rationale for barking up that tree and steer them in the direction of more common patterns. Sometimes, the barking is indeed up the correct tree, but that may not always be obvious from the question. If you consider that to be harassment, you may wish to choose a different means of getting Android developer support. OK, since it appears I can't get a simple answer without a long explanation My application is one such that the user moves their phone around a lot. During this movement I want to keep the orientation constant -- I DON'T WANT ANDROID TO HANDLE THE ROTATION. So, in my manifest I set the orientation to portrait to prevent Android from mucking with the orientation. However, I am now making some additions and would like the user to be able to choose portrait or landscape mode, but whatever they choose needs to stick. Again, I don't want Android to handle the rotation. As the phone is moved around I want whichever orientation they chose to stick. Does that make sense? Now, how do I do this? How do I force the orientation to my preference? You can try the combination of setRequestedOrientation() in onCreate() (and from the menu or wherever the user chooses their preference) and android:configChanges=keyboardHidden|orientation in your manifest. I have not used setRequestedOrientation() personally. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://twitter.com/commonsguy Android Training in NYC: 30 April-2 May 2010:http://guruloft.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 athttp://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 athttp://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] Re: requestLocationUpdates issue
What he's doing there is specific to using a timer. I'm sure internally, it tells the timer thread to stop processing tasks and exit, just like I outlined earlier. Generally speaking -- if you have a facility that provides a way to wake it up, when trying to end a task, it's good to wake it up so it can die. For example, setting a flag and calling notifyAll() to unblock a thread waiting in wait(). I expect this is what calling Timer.cancel() does, though I haven't looked at the source. If a Timer meets your needs, then I recommend using it; it will be much simpler than any approach you came up yourself. However, remember that a single timer only uses a single thread, so if it does something that takes a long time, other scheduled tasks won't run until it finishes. This can be a reason to use separate timers for different tasks. Note that this won't solve your problem above -- because calling Timer.cancel() won't do anything to terminate YOUR loop. It terminates the scheduling loop that waits on and runs tasks. It doesn't stop the tasks once they're running. On Apr 18, 8:21 pm, Tejas tej...@gmail.com wrote: Hi Bob, Thanks a lot for this. This helped me to understand a lot of things. I found out a good way for starting/stopping a service here:http://www.brighthub.com/mobile/google-android/articles/34861.aspx What do you think of this one ? Cheers, Tejas On Apr 18, 7:03 pm, Bob Kerns r...@acm.org wrote: OK, I understand your thinking a bit better, so hopefully I can explain a bit better. onDestroy() is only called when your application is idle. The system will NEVER directly call a lifecycle method except when the main thread is idle If you are running some long-lived function from, say, onStart(), or a handler in the main thread. All of these are handled one at a time by the main thread's Looper. So there will be no abrupt termination of your function when onDestroy() is called. That only happens if it kills off the process. Which is a lot more likely to happen if you block the main thread -- after a while, the user will get a dialog offering to kill or wait for the busy process! Java used to support interrupting and abruptly terminating threads. However, there is absolutely NO way to make this a safe operation. Android does kill off processes, which can leave things outside the process in an inconsistent state, but that's not as bad as having your application still running, but in an inconsistent state internally! So abruptly force-quitting a method is not part of the model of any Java system. (But you can still check, and throw an exception to get out of a loop -- that will properly invoke all finally() clauses on the way out, etc.). It's hard for me to tell you the proper way to stop your service, because it depends on just what you're doing. You have part of the idea, by checking for a termination flag in your loop. You can set that in your onDestroy() method -- akin to what you're trying to do with your call to the undocumented Looper.quit() method. But what you want to do is to set your CARuntimes.MainServiceRunFlag instead. (Except I'd make that an instance member of your Service class, rather than a static of some other class. Better modularity, though you can make it work this way). It looks to me like what you're really trying to do, is what the system already provides for you better -- IntentService. I really don't know what their intent was, calling it this -- I think I'd call it ThreadedService, since the relevant point is that it runs your code in a separate thread. Or maybe HandlerThreadService, since it uses a handler to serialize the requests for work. You still have to be careful about things that queue up things to the current thread's looper -- like Toast, for example. Any deferred processing you want to queue up to a handler you set up in the IntentService's onCreate method (i.e. on the main thread). Anyway, the purpose of HandlerThread's and Handler's is not clean shutdown, but rather the queuing of messages via a Looper and associated MessageQueue. If you're only handling one message, ever, then creating your own thread would make sense. An AsyncTask would be a good choice if you're only running for a short time (but too long for the main thread). But if this is something that runs for an extended period of time, it would potentially block other uses of AsyncTask, so your own thread is a better choice. So anyway, to summarize -- Handler's, HandlerThread's, and IntentService give you a way to do one thing at a time in another thread. AsyncTasks give you a way to do a small number of small things in parallel (in some versions of the system, one thing at a time). Long-lived things need their own threads -- HandlerThread and IntentService can provide this. You stop a thread by testing for some condition in the loop in the thread. If the thread needs
[android-developers] Re: Is the bad MotionEvent/Touch slowdown stuff actually fixed on first-gen 2.1 updates?
I filed a bug for this here - http://code.google.com/p/android/issues/detail?id=7836 I believe I did a thorough job with the report. Please star it or comment on it if it affects you. Thanks! On Apr 19, 12:52 am, Robert Green rbgrn@gmail.com wrote: Excellent work, Mario. I think it's quite clear that the input processing code in Android needs help. Eating 20-30% of a Cortex A8 is a pretty big deal. On Apr 18, 4:21 pm, Mario Zechner badlogicga...@gmail.com wrote: For fun i extended the example i posted earlier. It now feature cpu usage output derrived from /proc/stat which should be enough to given an indication of the slow down occuring due to touch events. The setup: - A GLSurfaceView - An OnTouchListener that does nothing but return true - A simple renderer thread which is throttled via a Thread.sleep(200) to 5 frames per second which outputs the frames per second as well as the cpu usage Observation on Milestone with 2.0.1: - load without touching the screen - 4%-12% - load with touching the screen - 24%-44% due to the way i measure the cpu usage it of course fluctuates quiet a bit, the overall tendency can be easily derrived though. You can find the apk athttp://www.file-pasta.com/file/1/touchflood.apk, the Eclipse project with all the source can be found athttp://www.file-pasta.com/file/0/touchflood.zip. On 18 Apr., 22:18, Robert Green rbgrn@gmail.com wrote: The fundamental issue is that there are too many instructions per event being executed. There is no way around it other than optimizing the event handling code in KeyInputQueue. No amount of waiting or sleeping will fix that because those events must run through that code and that code appears to be very slow. It surprises me because it's truly performance critical code and this issue has been known since 1.1/1.5 and it still doesn't appear to be fixed in master. I'm looking at it now and the author(s) didn't even follow Android's best optimization practices. Simple things like declaring virtuals with local variables aren't done. For a moment today I was considering taking the input stack (EventHub, KeyInputQueue and InputDevice) and hacking it into my own input stack which reads off the event devices much more efficiently but I can't find any way to stop the system stack from running and consuming CPU, so that hack is out (and probably good because I really didn't want to go there - waste of time and probably wouldn't work right anyway). In my activity: public boolean onTouchEvent(MotionEvent e) { return false; } And system_server still consumes about 36% of the CPU while moving my finger around. That proves there is nothing a developer can do to work around this. I think I'll take this issue to the platform group now and try to file more specific bugs. On Apr 18, 10:38 am, Ralf Schneider li...@gestaltgeber.com wrote: I have already talked a lot about the touch slow down in this forum. There is another observation I would like to add, may be this can help to track the problem down. One of my projects is an Argumented Reality Game. Of course this kind of App eats energy (CPU cycles) like crazy: In my app I process: The camare, OpenGL graphics, Pseudo-3D-Sound mixing (8 simultaneous samples + ogg-music), 2 constant sensor imputs (acceleration, magnetic) and additional input from trackball, hardware keys and the touch screen. The largest slow down occurs with the touch-events. But the next big slow down occurs with the accleration and magnetic events! I gained up to 4 FPS on a N1 by switching from SENSOR_DELAY_FASTEST to SENSOR_DELAY_GAME. = So I just wonder: May be the slow down is in no way specific to touch events! Instead the whole input-queue-event handling is just horribly slow. As everyonw has observed: Touching the screen will trigger (flood) lots of events - This is similar as enabling input from other sensors - which can slow down the app in a compareable way, too! The main differences is only: Touching the screen will still trigger more event than using a sesnor in *SENSOR_DELAY_FASTEST*. So the slow down appears as less drastically... After working a while with Android, I must say: The design and architecture of the Java-API seems to be nice and well done most of the time. But the execution and implementation of the software stack as a whole seems to be just slow, slow, slow, slow, All this doesn't matter if you have lots of servers with many cores (ENTERPRISE!) but for an embedded-soft-realtime-device I expect more! IMHO the OS on an embedded device with a 1 GHZ CPU should not use more than 1% of the CPU to process around thousand events per seconds - and even this i would consider slow.
[android-developers] can develop in any phone ?
i am from afric. android phones have started selling here. if i buy a tattoo device [around 300$] i can use it for developing apps ? or devices which can be used for dev/debug apps are different from devices being sold in market ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ArrayIndexOutOfBoundException while reading the file
It looks like there are a lot of things wrong with this code but have you thought of logging the values of start and end immediately before the statement that crashes the program? This isn't really an Android question, by the way. On Apr 18, 10:41 pm, pramod.deore deore.pramo...@gmail.com wrote: hello everybody, I am developing one application in that I am reading one file in parts (I am reading 102400 bytes at a time ) and sending it to server. size of file is more than 5mb. I had write following method to read the file public void readFile() { try { int size = (int)myFile.length(); noOfChunks = (size/102400); noOfChunks = noOfChunks+1; System.out.println (size of file is +size); System.out.println (size is+noOfChunks); FileInputStream fstream = new FileInputStream(myFile); DataInputStream in = new DataInputStream(fstream); byte[] byteArray = new byte[102400]; for (int i=1;i!=noOfChunks;i++) { xyz = in.skip(start); System.out.println (skipped :+start); in.readFully(byteArray, start, end);//[b]This is line no 133 here exception occurs[/b] str = new String(byteArray); sendData(0213456789_A~addressbook.txt~10~+str); start = end; end = end+102398; } } catch (IOException ioe) { ioe.printStackTrace(); } } But when this method throws IndexOutOfboundException at line 133. Actually I thought because of in.readFully(byteArray, start, end); It reads from start to end and store it to byteArray, but it is not working like that. Anybody knows what I am doing wrong? 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 athttp://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: Paint issues with matrix.polyTopoly.
Anyone??? Thanks for the help anyways On 14 Apr, 17:22, ricardolpd ricardo@gmail.com wrote: Hello everyone, I need to draw some stuff in perspective and i need it to move it around as well as moving the perspective effect, i found the nice example polytopoly on the google samples, i made some changes to the code, and i found out, the following issues: – When drawing with some perspective point sometimes i will draw the rectangles and fill them with all the content in perspective like i wanted it to, but if i move this rectangle the content of the rectangle will be draw in perspective but i cannot fill the rectangle. – I found as well that setting the paint.style(Paint.Style.FILL_AND_STROKE) it will draw and fill the rectangle in some positions but not the others, and if i set the style to just fill it wont fill anything. – Does anyone know what am I doing wrong? or is this some bug in the android framework. I don't understand why when i move horizontally my boxes one of these boxes stops filling but not the other? So when i have this peace of code: canvas.save(); doDraw(canvas, new float[] { xpos, ypos, xpos+width, ypos, xpos+width, ypos+height, xpos, ypos+height}, new float[] { xpos, ypos, xpos+width+10, ypos+10, xpos+width+10, ypos +height, xpos, ypos+height+20}); canvas.restore(); that draws a box in perspective i can fill it in any horizontal and vertical position, but only with the mPaint.setStyle(Paint.Style.FILL_AND_STROKE) if I set it just to FILL it will not fill. if call this piece of code: doDraw(canvas, new float[] { xpos, ypos, xpos+width, ypos, xpos+width, ypos+height, xpos, ypos+height}, new float[] { xpos, ypos+15, xpos+width+15, ypos, xpos+width+15, ypos+height+25, xpos, ypos+height}); canvas.restore(); when xpos120 it will not fill the box, but everything inside is in perspective. Can anyone help me with this please, i really don't understand what i'm doing wrong, if there is no way around could anyone give me some hints on how to work around this, in a efficient way. The class code is the bottom of this message: Any help would be really appreciated. Regards Ricardo Here it is my class; /* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.apis.graphics; // Need the following import to get access to the app resources, since this // class is in a sub-package. //import com.example.android.apis.R; import android.app.Activity; import android.content.Context; import android.graphics.*; import android.os.Bundle; import android.view.View; public class PolyToPoly extends GraphicsActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new SampleView(this)); } private static class SampleView extends View { private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); private Matrix mMatrix = new Matrix(); private Paint.FontMetrics mFontMetrics; int xpos=10; int ypos=160; int width=64; int height=64; private void doDraw(Canvas canvas, float src[], float dst[]) { canvas.save(); mMatrix.setPolyToPoly(src, 0, dst, 0, src.length 1); canvas.concat(mMatrix); mPaint.setColor(Color.GRAY); mPaint.setStyle(Paint.Style.FILL_AND_STROKE); Path path=new Path(); path.moveTo(xpos, ypos); path.lineTo(xpos+width, ypos); path.lineTo(xpos+width, ypos+height); path.lineTo(xpos, ypos+height); path.close(); canvas.drawPath(path, mPaint); mPaint.setColor(Color.RED); mPaint.setStyle(Paint.Style.FILL); // how to draw the text center on our square // centering in X is easy... use alignment (and X at midpoint) float x = xpos+width/2; // centering in Y, we need to measure ascent/descent first float y = ypos+height/2 - (mFontMetrics.ascent + mFontMetrics.descent)/2; canvas.drawText(blabla, x, y, mPaint); canvas.restore(); } public SampleView(Context context) { super(context); // for when the style is STROKE
[android-developers] Permission
Hi! I am devoloping an application of image editor. I allways do it by using the resources in the drawable carpet. Now I changed it to use the resources in the SD card. I don't change the code of the image access but the program allways produce an error if I intent to set the value of a pixel. The program works correctly if I try to read the pixel but if I try to modify it fails. I think this is a permissions error but I added the following: uses-permission android:name=com.android.editorImagenes.permission.WRITE_EXTERNAL_STORAGE/ uses-permission uses-permission android:name=com.android.editorImagenes.permission.WRITE_OWNER_DATA/ uses-permission And everything remains exactly the same. I'm desperate. A thing happens is that if I try to do the scaling or rotating the image using a matrix postrotate, etc, the program works correctly and as of this moment I can use the SetPixel without causing error. I need help please. Thank you very much. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: HTC Desire keyboard problem
On 4/18/2010 3:43 PM, jamesc wrote: Hi Michael It'll be the Sense UI's IME which has different behaviour to the stock Android IME. Sadly, I'd suggest that you get your hands on a Sense UI- Thanks for the hint, I found this issue for the problem: http://code.google.com/p/android/issues/detail?id=2882q=htc%20imecolspec=ID%20Type%20Status%20Owner%20Summary%20Stars equipped device (even a Hero, which whilst it has 1.5 on it, may help you track that issues). I'm afraid so... When you say that ACTION_UP doesn't work, is this for all key presses, or just some in particular? A bit more information on what you're attempting to capture with ACTION_UP would be helpful in order to allow to to get some useful debug prints out. See code below, very simple one digit entry fields. (any tips for achieving that more elegantly appreciated :-) ). On the HTC the focus doesn't move to the next field on a key press (the user tells me), so I'm assuming somehow the key event doesn't make it. Michael digit2.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_UP) { if (event.getKeyCode() == KeyEvent.KEYCODE_DEL) { digit1.requestFocus(); } else { digit3.requestFocus(); } } return false; } }); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What's wrong with this location code?
Mike- Hahah--Word. I very much respect your position, although I do have to agree with John here... And as far as other possible location providers popping up anytime in the near future, new versions of the OS will have to accompany them, along with new versions of the SDK, which would prompt me, as an active developer, to update my apps, and thanks to the Market's auto-update-prompt feature my users will receive my update. I'd rather launch a current app faster and upgrade it as new features become available than spend more time on initial development planning for future features that may never exist. It is indeed quite legit to plan for the future as you're talking about, however. For me it's just a balance of pre-release development time vs. post-release dev time. -Nick On Apr 18, 9:23 am, Maps.Huge.Info (Maps API Guru) cor...@gmail.com wrote: Personally, I wouldn't be making any coding plans for using the Galileo system for location handling any time this decade. It will be amazing if the EU manages to organize it into a working system in any lifetime of current OS's or apps for that matter. Think of how long it took to get a working engine for their A400 program, nearly 20 years and the darn thing still isn't anything but a test program. The Galileo system currently has no in operation date and only two test satellites have been launched, none of them will be used in an operational program. A functional system is at least a decade away optimistically. I think you can safely ignore that possibility as a means of location detection on current Android devices. -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 athttp://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: can develop in any phone ?
You can test out your apps on any phone. Tattoo has a different screen size than the normal sizes available. That might be a little problem for you if you are starting off. But from development point of view, there is no reason why you shouldn't be able to test your apps on a Tattoo. Thanks and Regards, Kumar Bibek On Apr 19, 12:34 pm, Jags jag...@gmail.com wrote: i am from afric. android phones have started selling here. if i buy a tattoo device [around 300$] i can use it for developing apps ? or devices which can be used for dev/debug apps are different from devices being sold in market ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Avoid restarting http request on orientation change
Michael- An interesting approach indeed. Sounds a little hacky, though... Especially if the docs vaguely advise against it as you mention. A clever hack, though :) -Nick On Apr 17, 11:25 pm, Michael Elsdörfer elsdoer...@gmail.com wrote: Depending on your specific needs, a service might make sense, but for simple cases, it's not strictly necessary. You can instead use Activity.onRetainNonConfigurationInstance(), which allows you to pass live Java objects to the new Activity instance - i.e., for example an AsyncTask object. Just make sure you don't create leaks by keeping references to old instances of your Activity around. I've been using a custom ASyncTask child class for a while that allows me to connect to the task from a new activity instance, and have the proper callbacks be executed even if the tasked finished in-between activities being available: http://github.com/miracle2k/android-autostarts/blob/master/src/com/el... Note that while the docs say that onRetainNonConfigurationInstance is only for optimization, it's not quite clear what that the official contract is. Yes, it's possible that your activity needs to restore itself without onRetainNonConfigurationInstance(). For example, if the user leaves your application via HOME and then goes into the Settings and changes the device language, your activity will be stopped and restarted, presumably without onRetainNonConfigurationInstance() being called. However, it might be ok if in those cases your api request will indeed need start again fresh, depending on it's duration, and maybe whether it changes state on the server. But for your run of the mill orientation change, onRetainNonConfigurationInstance() is apparently being reliable called, and it has been suggested on this list a number of times that it is intended to be used for objects that can't be stored in a bundle, like for example sockets. Michael -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Pass ArrayList parameters between two activities.
There's no simple way. You are on the right track. However, a cheap workaround would be to have this arraylist as a static variable of your source activity. This way, you can access this Array List from your destination activity Thanks and Regards, Kumar Bibek On Apr 19, 11:46 am, Ke Wu kerl@gmail.com wrote: -- Forwarded message -- From: Ke Wu kerl@gmail.com Date: 2010/4/19 Subject: Pass ArrayList parameters between two activities. To: android-developers@googlegroups.com Hi all, Today I met a problem, I need to pass a ArrayListMyClass from an activity to another. I dont know what the Intent exactly do when I use putExtra to pass in an ArrayListMyClass object. I guess MyClass need to implement Parcelable interface, so I just did it. But still, it does not work. Maybe I need to create a Bundle and then use Bundle's putParcelableArrayList method to put my ArrayListMyClass object in, and then pass this bundle as parameter of putExtra to the intent. So crazy! I am lazy, I just want to pass an ArrayListMyClass object simply, is there a simple way?? Any suggestion would be greatly appreciated! kerl.d.w -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Android Appending Values Received From Server
I think, you have a wrong logic in your program. Debug it through and check what the server is actually returning. If you have written the server program, check that as well. Thanks and Regards, Kumar Bibek On Apr 19, 10:35 am, Bob Kerns r...@acm.org wrote: What exactly do you mean by second usage? Just pressing the home key and then tapping your program icon won't create a new activity instance, unless the old one has been deleted. You can't depend on it being deleted, in fact, you'd prefer it not be. Study the diagram in the Activity class documentation (a screen or two down):http://developer.android.com/intl/de/reference/android/app/Activity.html Note that there are paths that take you back into the activity. Depending on what exactly what data is you're getting from the server, you may want to reinitialize in onResume() or onStart(). My guess would be onStart() -- I think you probably don't want to re-fetch data just because a dialog popped up, then returned control to your Activity. Likewise, you may want to de-initialize the data (for example, null out the variable containing it) in the onStop() method, which will allow the memory to be reclaimed sooner. On Apr 18, 7:24 pm, raqz abdulraqee...@gmail.com wrote: Hi, I am trying to receive some data from a servlet on to android. It works fine for the first run but if in case I happen to use the same activity again, the previous data is getting appended to the new data. Could some one please tell me what is wrong. Why dont the variables get re initialized in the activity on the second usage of the same Thanks, Raqeeb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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 athttp://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: Compiling FFMpeg as NDK Shared library
Would appreciate any help!!! On Apr 19, 3:16 am, sfomra sfo...@gmail.com wrote: Has any one successfully compiled ffmpeg for use as a shared library?? I tried the doing whathttp://oo-androidnews.blogspot.com/2010/02/ffmpeg-and-androidmk.html says but i keep getting the following message on compile Android NDK: Building for application 'ffmpeg-org' make: *** No rule to make target `ffmpeg-org', needed by `ndk-app- ffmpeg-org'. Stop. Has any one encountered this??? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: how to depress the onLongClick() when drag a view
hi, try disabling the longclick event using public void setLongClickable (boolean longClickable) function while ur performing the drag operation and enable it after that.. so that u can have both the functionalities.. regards, Grace. On Apr 19, 11:47 am, sheng wang banxia...@gmail.com wrote: Hi, I have a View and I can drag it. It also has a onLongClick() method so it can respond to the long press on the screen. The problem is when I drag it , the onLongClick will also be triggered . Anyone have an idea to depress the long click detection when i move it . Thanks in advances. 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 athttp://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: Settings application
Hello Dianne, Can I read somewhere more about this handling of system settings and how is it designed ? Thanks alot ! Frank On 17 Apr., 00:26, Dianne Hackborn hack...@android.com wrote: Settings are stored in a lot of different places, depending on what they are. It is done for access control reasons (the settings db is word readable, but some things should not be accessible to everyone), convenience (specific internal settings for a particular component), and other reasons such as sharing access with native code. On Thu, Apr 15, 2010 at 10:53 PM, Abhinav abhinav.abhic...@gmail.comwrote: I was exploring the settings application in android and found that the system settings were getting stored in two places, one in settings.db database and the other in settings_preferences.xml file Most of the settings are persisted in the database while a few are persisted in a shared preferences file. Any idea why this is done? Why not persist everything in the database? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 athttp://groups.google.com/group/android-developers?hl=en- Zitierten Text ausblenden - - Zitierten Text anzeigen - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 depress the onLongClick() when drag a view
hi, try disabling the longClick event using public void setLongClickable (boolean longClickable) function while ur performing the drag operation and enable it after that.. so that u can have both the functionalities.. Regards, Grace. On Apr 19, 11:47 am, sheng wang banxia...@gmail.com wrote: Hi, I have a View and I can drag it. It also has a onLongClick() method so it can respond to the long press on the screen. The problem is when I drag it , the onLongClick will also be triggered . Anyone have an idea to depress the long click detection when i move it . Thanks in advances. 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 athttp://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] Aren't focus states supposed to bubble to child Views?
Hey all- When using a View within a View, for example an ImageView within a LinearLayout, both of which have xml drawable resources (the LinearLayout as a background) specifying PNG drawables to use for the on/off states, shouldn't children Views receive the focus state when their parent gets focus? So as far as I understand, both my LinearLayout and ImageView should be switching to their focus states...right? Apparently not... Or, more likely, apparently my implementation is incorrect.. The focus state works on the LinearLayout but my ImageView never receives focus.. I have both Views set to android:focusable=true. Thanks, Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Socket + SurfaceView + multiplayer game problem. Need Help
I am new to android, I wish you could solve your problem, and may I have your project as a sample to learn? 2010/4/18 croco zeug...@gmail.com FYI, I've raised to 18 FPS by using LinkedBlockingQueue instead of 8FPS with while design in Socket writer. But we are far from 60FPS per second. Any help? Thanks Luc On 18 avr, 10:18, croco zeug...@gmail.com wrote: Hi all, I'm developping a simple realtime action game 4 Android. It works nice. but now i want deal with animation FPS and i'm facing a big problem i can't solve since couple days now. I started from the famous Lunar Android sample using facebook. got 55-60 frame per second on my G1. it smelt good for my game i thought ... BUT when i plugged the surface view in my game i got a poor 6-9 Frame per second making the game unplayable. After debugging removing all content of my doDraw used by the thread controlling the surface view i found the problem. The problem is not the quantity of sprites i displayed but the concurrency between threads used for receiving my game data over TCP and the UI thread i use to control surface view. If when i start displaying the game i stop the my socket protocol threads (reader, writer) the game is refreshed at 25 FPS which is not 50 FPS but large enought to make the game playable. So my question is how in realtime game for android i can send / received data (and not delayed of course) without killing the game refresh rate. Last thing i use canvas and not open gl but i don't need open gl and i really see the problem comes from the multithreading Thanks a Lot for your help. Luc -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// 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.comandroid-developers%2bunsubscr...@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: Pass ArrayList parameters between two activities.
Thanks, I got it. 2010/4/19 Kumar Bibek coomar@gmail.com There's no simple way. You are on the right track. However, a cheap workaround would be to have this arraylist as a static variable of your source activity. This way, you can access this Array List from your destination activity Thanks and Regards, Kumar Bibek On Apr 19, 11:46 am, Ke Wu kerl@gmail.com wrote: -- Forwarded message -- From: Ke Wu kerl@gmail.com Date: 2010/4/19 Subject: Pass ArrayList parameters between two activities. To: android-developers@googlegroups.com Hi all, Today I met a problem, I need to pass a ArrayListMyClass from an activity to another. I dont know what the Intent exactly do when I use putExtra to pass in an ArrayListMyClass object. I guess MyClass need to implement Parcelable interface, so I just did it. But still, it does not work. Maybe I need to create a Bundle and then use Bundle's putParcelableArrayList method to put my ArrayListMyClass object in, and then pass this bundle as parameter of putExtra to the intent. So crazy! I am lazy, I just want to pass an ArrayListMyClass object simply, is there a simple way?? Any suggestion would be greatly appreciated! kerl.d.w -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// 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.comandroid-developers%2bunsubscr...@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] ImageView animation: rotate a certain amount of degrees at some set interval
Hey all- First off, I'm aware a simple hack to achieve this would be to run a Thread with a sleep for however many milliseconds I want my interval to be and rotate it a certain amount of degrees every time the Thread is run... I'm looking for a built-in way to achieve this animation effect, however--or, rather, hoping there is one... The title pretty much explains it all... I have an ImageView that contains a loading spinner and I'd like to achieve the same appearance from its spin as I would get were it a gif on an AJAX Website.. A set amount of frames, each one being the image rotated a certain amount of degrees from the previous frame (this amount of degrees is static throughout the entire animation). If there is a standard way, please enlighten me.. If not, let me know and I'll pursue the hack. Thanks! Nick -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Movie class for displaying animated GIF files.
Dear all. In ApiDemo app, an animated GIF file is decoded using Movie. What I would like to know is that, 1. why didn't Google use the class to decode animated GIF file in Gallery? 2. usages of duration() and setTime() api in Movis class. Maybe, I am not sure, HTC Magic phone may use this concept as if animated GIF is decoded. Anyone know whether HTC uses this concept or not? 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: how to depress the onLongClick() when drag a view
thx for your reply but it doesn't work as will. setLongClickable() in case MotionEvent.ACTION_MOVE phrase doesn't work. But I have figure out the way. The view default implementation will cancel the long press check on ACTION_MOVE,so I just call the super.onTouchEvent to let the default implementation takes effect. 2010/4/19 grace grace.a...@wipro.com hi, try disabling the longClick event using public void setLongClickable (boolean longClickable) function while ur performing the drag operation and enable it after that.. so that u can have both the functionalities.. Regards, Grace. On Apr 19, 11:47 am, sheng wang banxia...@gmail.com wrote: Hi, I have a View and I can drag it. It also has a onLongClick() method so it can respond to the long press on the screen. The problem is when I drag it , the onLongClick will also be triggered . Anyone have an idea to depress the long click detection when i move it . Thanks in advances. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// 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.comandroid-developers%2bunsubscr...@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] access to the edittexts inside adapter
Hi, I'm facing following problem. I have a layout, which is inflated inside an adapter (extended BaseAdapter). The layout consists of TextView, EditText and of two buttons (Save and Delete). This group is for each item in database and then it's listed one by one, so it means, on screen there can be several groups of these widgets. The point is, how to access the content of the EditText in the group when I press the button Save? I've tried to put setTag() on EditText and Save button: ... public View getView(...) { ... contentEditText = (EditText) v.findViewById(R.id.ContentEditText); contentEditText.setTag(EditText + mIds.get(position)); editBtn.setTag(mIds.get(position)); editBtn.setOnClickListener(editBtnListener); } and then in the listener to access the EditText via findViewWithTag: private OnClickListener editBtnListener = new OnClickListener() { public void onClick(final View v) { logger.LogInfo(EDIT_BTN onClickListener(): + v.getTag()); EditText tmp = (EditText) v.findViewWithTag(EditText+v.getTag()); } }; The first line logger.LogInfo(EDIT_BTN onClickListener(): + v.getTag()); return the correct Tag for the pressed button (first, second row, etc.) Unfortunately, the second line where I'm trying to get the EditText object, the tmp object is null, so, the object is not found with the findViewWithTag method... Any idea how to solve this or maybe to use another approach in this situation? Thanks Frankie -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: glTexImage2D very slow on phones like Nexus one
In that case you have a problem indeed. Frame buffer objects will not be of any help in your situation. Speaking in absolutes is always a problem but i think for your problem at hand you will have to abonden OpenGL for the time being. I'm not aware of an alternative but remember another thread on here that talked about the same issue. On 19 Apr., 08:40, Eong eong.c...@gmail.com wrote: Sorry, I mean write the frame to a pixel buffer. I think fbo is a ES2 feature, right? What about the other ES1 phones? As a developer, you can't just give up the 75% users. On 4月19日, 下午2时20分, Eong eong.c...@gmail.com wrote: Hi, I'm writing this part for video output. This is for video output at most of the time. Our decoder write the screen to a pixel buffer. And then I need to draw it to the screen. So, you mean, I can use FBO to do this? I'm not very familiar with fbo stuffs. Could you give more hint? Thank you! On 4月18日, 下午5时18分, Robert Green rbgrn@gmail.com wrote: Eong, All Mario and I are trying to say is that the thing you are trying to do (upload textures every frame) is generally not considered a good practice and workarounds usually exist that are more efficient, especially if you can target higher levels of opengl or use extensions like framebufferobjects. If you would be willing to tell us something a little bit more specific about what you're doing that requires a texture update every frame, we could potentially offer some more efficient ways of doing it. On Apr 18, 2:44 am, Eong eong.c...@gmail.com wrote: Thanks, Mario. I think it's somewrong with the driver or the chip. It's not just a bandwidth problem. If it's really a bandwidth problem, it only has 1/7 bandwidth of milestone? (150ms compare to 20ms with a full screen tex).That's very funny. I'm working on some libs, which will be used for our tools and games. When a full screen update only takes 20+ms, it's usable in some conditions as it already gets at least 40fps. On 4月17日, 下午6时22分, Mario Zechner badlogicga...@gmail.com wrote: It seems that the msm chips are notorious for having a low bandwidth. There's really no solution to that problem other than 1) lowering your texture size 2) lowering the bit depth of the texture, e.g. instead of using RGBA use RGBA444 or RGB565 2) uploading your texture in patches, e.g. split it up into 4 smaller parts and upload one part each frame. This will probably lead to artifacts if your frame rate is low but could work otherwise. Just out of curiousity: why do you have to upload such a big texture each frame? If you'd state your scenario in detail we might be able to suggest other solutions to the problem. On 17 Apr., 12:10, Eong eong.c...@gmail.com wrote: Robert, Sorry, it's not text, it's tex. I just use this to draw the background. I just want to know why nexus one is so slow with this. It takes 20ms on my milestone but it takes at least 80ms on the nexus one, for one frame. On 4月17日, 上午2时08分, Robert Green rbgrn@gmail.com wrote: Eong, You said you are uploading every frame just to draw text? There are much more efficient ways to do that. On Apr 16, 11:14 am, Eong eong.c...@gmail.com wrote: I'm afraid it's not a same problem. My problem only happenes on Snapdragon phones. It's fine on Milestone or Droid. I found a few threads about this but no solution. On 4月16日, 下午9时15分, Felipe Silveira webfel...@gmail.com wrote: Just a guess: It can be the same error reported here:http://code.google.com/p/android/issues/detail?id=7520 Take a look... Felipe Silveirahttp://www.felipesilveira.com.br On Fri, Apr 16, 2010 at 8:40 AM, Eong eong.c...@gmail.com wrote: Hi, We are developing 2D games. And we found our game works fine except the snapdragon chips, like Nexus one and Liquid A1. It even runs fine on G1. We use GLSurfaceView, and we useglTexImage2Dand glTexIsubmage2D to put on the text and then draw. TheglTexImage2Dclass take more than 100ms on Nexus one (1024x512 pix tex). It's very strange, G1 is even faster than this. If anyone know something about this? -Code snip--- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glTexSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, m_width, m_height, GL10.GL_RGB, GL_UNSIGNED_SHORT_5_6_5, m_byteCanvas);
[android-developers] Re: How to get wifi account and password in code?
I highly doubt this is possible--seems like a huge security hole to me. And I don't believe the Android system has anything in place to allow you indirect access to its saved passwords (like the OS X Keychain). What would you need this info for anyway? If wifi is on, the wifi password is saved on the phone, and the wifi network is available, the system will connect to it automatically. -Nick On Apr 18, 7:11 pm, Levi limingwei...@gmail.com wrote: How to get wifi account and password in code? Please tell me if you know ,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 athttp://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: OutOfMemory problem
You say your error doesn't happen as often if you are plugged into your computer? Is that what you mean by VM? If so, that's likely because you're developing your code at the time and every time you run it on the device it kills and restarts your process.. leaving little time for memory leaks to lead to OutOfMemory errors. Just FYI. As for your OutOfMemory errors, this can be a really tough one to debug.. Your app is leaking memory somewhere, but its hard to say where. The image is not necessarily the problem, it could simply be the tipping point that finally forces your app to crash. I would recommend reading over all the articles tagged Optimization over at http://android-developers.blogspot.com -Nick On Apr 18, 8:59 am, Streets Of Boston flyingdutc...@gmail.com wrote: How big, in pixels, is the image? On Apr 18, 5:50 am, Kofa elk...@gmail.com wrote: I really don't know why it's giving me this error... I load an ImageView with an image of 692kb .jpg, using scroll options, so you can scroll it around... the strange it's that when the mobile it's connected to the VM it's less possible to happen. So...how can I prevent this? is there anyway that I can free memory when starting the app? can I tell the system to free memory before loading the image? please show me the path =Pthx a lot! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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 athttp://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] java.lang.Object in aidl
Hello, I have a aidl interface in a service. In this interface I want to create a function that can return a int, double or string. In Java I can do that with the java.lang.Object type. But this type is not a basic java type or a parceble, so I can't use this in aidl. Somebody knows a way to still do this in aidl? Kind regards, Peter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Defining an XML vertical line drawable
You could use a 1x1 Nine-Patch PNG On Apr 18, 1:08 pm, Caspa stell...@gmail.com wrote: Hello, I'm trying to figure out how to define a verical line (1px thick) to be used as a drawable. to make a horizontal one, it's pretty straightforward: shape xmlns:android=http://schemas.android.com/apk/res/android; android:shape=line stroke android:width=1dp android:color=#FF/ size android:height=50dp / /shape The question is, how to make this line vertical? Yes, there are workarounds, such as drawing a rectangle shape 1px thick, but that complicates the drawable xml, if it consists of multiple item elements. Anyone had any chance with this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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] updating a contact in 2.x Contacts API
hi all, i got a problem updating a contact's details. i use the following code to update the contact name: operations is a ArrayList of ContentProviderOperation. operations.add(ContentProviderOperation.newUpdate( ContactsContract.Data.CONTENT_URI) .withSelection(Data._ID + =?, new String[]{id}) .withValue(Data.MIMETYPE,StructuredName.CONTENT_ITEM_TYPE) .withValue(StructuredName.GIVEN_NAME, firstName) .withValue(StructuredName.FAMILY_NAME, lastName) .build()); contentResolver.applyBatch(ContactsContract.AUTHORITY, operations); but after this query, the contact name is not updated.. (at least the name did not change in the phone's addressbook) i cant figure out why...what am i doing wrong? must be a simple thing i am missing.. thanks in advance timo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Custom Themes
Hiii, How to create custom themes from scratch for an application? -- Warm Regards, Chirayu Dalwadi -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: ArrayIndexOutOfBoundException while reading the file
I suspect you've been having some trouble reading the documentation in English. I've had the experience of reading API documentation in a foreign language, so I know it can be difficult. You probably only got a couple points wrong, but then the confusions piled on top of each other, and it will be hard to sort out now. (My apologies if my assessment is incorrect -- I'm just trying to guess at the kind of help that will help you quickest). First, let me talk about the problems I see in the code. If you can't understand, don't worry! Just go to where I suggest what to do now, and come back to this later... I think you are expecting the arguments to in.readFully to be the positions in the file. They are not. They are positions in the array. The way you are using it, start should always be 0, and end should always be 102400, unless you are reading the last chunk of the file, in which case it should be the remaining size. Another problem: You should never use the String(byte[]) constructor. You NEVER want to let the system pick a character encoding for you. And I don't recommend using any encoding other than UTF-8 if you have a choice. So add UTF-8 as a second argument there. You're copying your data an extra time to create the argument string to sendData. Is there a reason to not rewrite sendData to take a string for the first part, and a byte[] for the second? I'm pretty sure your use of in.skip(start) is not what you want, either! You just skip further and further ahead in the file, first 0 bytes, and (try to) send the next block, then skip the following block, skip even more next time, then process one block, skip even more... I think maybe you think 'skip' positions the input stream at a particular position? I'm quite puzzled by the fact that you're incrementing the end by only 102398, but are reading 102400 byte chunks (or trying to). I think something is wrong there, but I'm not sure what you're intending.. I don't see any reason for using DataInputStream -- and maybe not in.skip(), except possibly with an argument of 2? Here's what I think you should do: start over. Keep it as simple as possible. In fact, I think you should start with a simpler example -- a simple text file., and a block of 100 bytes, so you can easily see how things work. Just open an InputStream, and read and write, like this: InputStream in = new FileInputStream(myFile); try { int count = 0; byte[] buf = new byte[100]; while ((count = in.read(buf)) = 0) { String str = new String(buf, 0, count, UTF-8); System.out.print(Read: ); System.out.println(str); } } finally { in.close(); } Run that on your computer, don't even bother on Android just yet. Step through it with the debugger, and watch what happens and how it works. Note I didn't supply a byte range to in.read(buf) -- you only need to use those arguments if you only want it to use a portion of the byte array. If you really need to skip a couple of bytes, you can do that a couple of ways -- new String(buf, 2, count-2), or you can do in.skip(2) to skip two bytes. I suggest using skip(2) may be easier to understand, if you really are skipping 2 bytes. Then, once you're satisfied you understand how this works -- I think you'll be ready to rewrite your code. I hope this helps. On Apr 18, 10:41 pm, pramod.deore deore.pramo...@gmail.com wrote: hello everybody, I am developing one application in that I am reading one file in parts (I am reading 102400 bytes at a time ) and sending it to server. size of file is more than 5mb. I had write following method to read the file public void readFile() { try { int size = (int)myFile.length(); noOfChunks = (size/102400); noOfChunks = noOfChunks+1; System.out.println (size of file is +size); System.out.println (size is+noOfChunks); FileInputStream fstream = new FileInputStream(myFile); DataInputStream in = new DataInputStream(fstream); byte[] byteArray = new byte[102400]; for (int i=1;i!=noOfChunks;i++) { xyz = in.skip(start); System.out.println (skipped :+start); in.readFully(byteArray, start, end);//[b]This is line no 133 here exception occurs[/b] str = new String(byteArray); sendData(0213456789_A~addressbook.txt~10~+str); start = end; end = end+102398; } } catch (IOException ioe) { ioe.printStackTrace(); } } But when this method throws IndexOutOfboundException at line 133. Actually I thought because of in.readFully(byteArray, start, end); It reads from start to end and store it to byteArray, but it is not working like that. Anybody knows what I am doing wrong? Thanks -- You received this
[android-developers] Moving to the next ImageView in HorizontalScrollview?
Hi, I have a horizontal scroll view and there are four images in it. Now what I want is the way to detect which image is focused currently. I mean, is there any way that we can distinguish between the image that is focused and other images. Currently all the images look quite similar. One more thing, how to move only to the next image on every swipe or fling. Moreover, I have tried the same thing with Gallery, but I didn't found anything in the Gallery that let me move to the next view only. In Gallery, I have tried overriding the onfling method with hardcoded value for veloctiyX but with no success. Can someone let me know how to do this? Doing the same thing with either Gallery view or HorizontalScrollview will solve my issue. Hope to get the quick response. Regards Sunil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: requestLocationUpdates issue
FWIW -- I just did go look at the source for Timer, and cancel() does exactly what I expected. It synchronizes on its internal queue, sets a flag, clears the queue, and does queue.notify(). On Apr 19, 12:20 am, Bob Kerns r...@acm.org wrote: What he's doing there is specific to using a timer. I'm sure internally, it tells the timer thread to stop processing tasks and exit, just like I outlined earlier. Generally speaking -- if you have a facility that provides a way to wake it up, when trying to end a task, it's good to wake it up so it can die. For example, setting a flag and calling notifyAll() to unblock a thread waiting in wait(). I expect this is what calling Timer.cancel() does, though I haven't looked at the source. If a Timer meets your needs, then I recommend using it; it will be much simpler than any approach you came up yourself. However, remember that a single timer only uses a single thread, so if it does something that takes a long time, other scheduled tasks won't run until it finishes. This can be a reason to use separate timers for different tasks. Note that this won't solve your problem above -- because calling Timer.cancel() won't do anything to terminate YOUR loop. It terminates the scheduling loop that waits on and runs tasks. It doesn't stop the tasks once they're running. On Apr 18, 8:21 pm, Tejas tej...@gmail.com wrote: Hi Bob, Thanks a lot for this. This helped me to understand a lot of things. I found out a good way for starting/stopping a service here:http://www.brighthub.com/mobile/google-android/articles/34861.aspx What do you think of this one ? Cheers, Tejas On Apr 18, 7:03 pm, Bob Kerns r...@acm.org wrote: OK, I understand your thinking a bit better, so hopefully I can explain a bit better. onDestroy() is only called when your application is idle. The system will NEVER directly call a lifecycle method except when the main thread is idle If you are running some long-lived function from, say, onStart(), or a handler in the main thread. All of these are handled one at a time by the main thread's Looper. So there will be no abrupt termination of your function when onDestroy() is called. That only happens if it kills off the process. Which is a lot more likely to happen if you block the main thread -- after a while, the user will get a dialog offering to kill or wait for the busy process! Java used to support interrupting and abruptly terminating threads. However, there is absolutely NO way to make this a safe operation. Android does kill off processes, which can leave things outside the process in an inconsistent state, but that's not as bad as having your application still running, but in an inconsistent state internally! So abruptly force-quitting a method is not part of the model of any Java system. (But you can still check, and throw an exception to get out of a loop -- that will properly invoke all finally() clauses on the way out, etc.). It's hard for me to tell you the proper way to stop your service, because it depends on just what you're doing. You have part of the idea, by checking for a termination flag in your loop. You can set that in your onDestroy() method -- akin to what you're trying to do with your call to the undocumented Looper.quit() method. But what you want to do is to set your CARuntimes.MainServiceRunFlag instead. (Except I'd make that an instance member of your Service class, rather than a static of some other class. Better modularity, though you can make it work this way). It looks to me like what you're really trying to do, is what the system already provides for you better -- IntentService. I really don't know what their intent was, calling it this -- I think I'd call it ThreadedService, since the relevant point is that it runs your code in a separate thread. Or maybe HandlerThreadService, since it uses a handler to serialize the requests for work. You still have to be careful about things that queue up things to the current thread's looper -- like Toast, for example. Any deferred processing you want to queue up to a handler you set up in the IntentService's onCreate method (i.e. on the main thread). Anyway, the purpose of HandlerThread's and Handler's is not clean shutdown, but rather the queuing of messages via a Looper and associated MessageQueue. If you're only handling one message, ever, then creating your own thread would make sense. An AsyncTask would be a good choice if you're only running for a short time (but too long for the main thread). But if this is something that runs for an extended period of time, it would potentially block other uses of AsyncTask, so your own thread is a better choice. So anyway, to summarize -- Handler's, HandlerThread's, and IntentService give you a way to do one thing at a time in another thread.
[android-developers] Re: ArrayIndexOutOfBoundException while reading the file
Thanks Bob and DonFrench -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Game develop like Air Attack touching screen event
No, Don't override it in your view. Call it from your view in the constructor. setFocusableInTouchMode(true) is what you want to call. On Apr 19, 1:40 am, a a harvey.a...@gmail.com wrote: I add android:focusableInTouchMode=true in my xml and try to override the @Override public void setFocusableInTouchMode(boolean focusableInTouchMode) { Log.d(harvey, setFocusableInTouchMode); } But still can work when touch the screen, what' wrong? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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] Set Image resource as package path in XML for runtime images
Hi, Can i do this :- Set the image background path as package:imageName Example.. At runtime , my package is com.test.android .Inside that i have an image whose path i want to mention in the XML layout file as android:src = com.test.android/img1 for an ImageButton. I saw an SDK reference for ImageView as android:src = @[+][package:]type:name .. But i am not getting how to use it.. I think it must not be possibe , but if there is any way , please specify.. The reason why i want to do this is that , when i specify a drawable at runtime for my image buttons, i change the images according to Focus received , or onKeyup, KeyDown.. but its not working as expected.When i mention the same thing as style under drawable , it works fine. So if my theme is going to change at runtime , i want to set the drawable at runtime , keepnig the path same in the xml. Thanks , Alok -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Accessing protected fields from View subclass
Hi, I'm implementing custom widget exdending a View class. But I've found that View's protected field (e.g. mLeft) is not accessible from subClass: import android.content.Context; import android.view.View; public class MyView extends View { public MyView(Context context) { super(context); init(); } private void init() { *mLeft* =1; // eclipse says here mLeft cannot be resolved } } Of couse, instead of mLeft I can use getLeft(). But what will I do if some protected field doesnt have a getter (like mGroupFlags in ViewGroup)? Maybe something wrong with my Eclipse setting? Please, help Thanks, Pavel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Device Seeding Program for Top Android Market Developers
Has anyone had a reply from Google regarding a potential delivery time- scale to Europe? I have been waiting 7 weeks now and cant seem to get a reply to any emails I send their way. Thanks On Apr 17, 9:12 am, Lorents iva...@gmail.com wrote: Damn Icelandic people... First they mess with the world economy, and now they spew ash around europe! (just kidding) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: can develop in any phone ?
and debug ? is tattoo a g1 ? how come so cheap ? On Apr 19, 1:20 pm, Kumar Bibek coomar@gmail.com wrote: You can test out your apps on any phone. Tattoo has a different screen size than the normal sizes available. That might be a little problem for you if you are starting off. But from development point of view, there is no reason why you shouldn't be able to test your apps on a Tattoo. Thanks and Regards, Kumar Bibek On Apr 19, 12:34 pm, Jags jag...@gmail.com wrote: i am from afric. android phones have started selling here. if i buy a tattoo device [around 300$] i can use it for developing apps ? or devices which can be used for dev/debug apps are different from devices being sold in market ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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 athttp://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: Device Seeding Program for Top Android Market Developers
Crazy, I received the same message has you : All of the phones have been shipped already. Please be patient; if your phone has not arrived yet, it is probably in transit and will arrive shortly. I am sorry, but we cannot provide individual tracking numbers for each phone. Thanks, Neel Automatic reply ? Not really fairplay... :-) David On Apr 8, 4:28 pm, gambiting gambit...@gmail.com wrote: I'm in Poland and I sent the email to google yesterday, the reply received today was: Wojciech, All of the phones have been shipped already. Please be patient; if your phone has not arrived yet, it is probably in transit and will arrive shortly. I am sorry, but we cannot provide individual tracking numbers for each phone. Thanks, Neel I guess we just have to be more patient :-) Anyhow,that's a free phone! On 8 Kwi, 10:40, fhucho fhu...@gmail.com wrote: Sorry, I put the second paragraph in my previous post accidentaly... On Apr 8, 9:07 am, fhucho fhu...@gmail.com wrote: I received something similar, the only additional info is that A lot of people in Europe have received their phones already. I'd wait another couple weeks; trust me, there is a phone assigned to you and it will get to you in due time. On Apr 8, 5:38 am, Disconnect dc.disconn...@gmail.com wrote: This is getting me too :/ Its nice that its a free month, but it'd be better if it could be used ;) On Wed, Apr 7, 2010 at 8:01 PM, Dan Sherman impact...@gmail.com wrote: Has anyone been able to get their Droid transferred off the free month of service (through a Google Account), and onto their personal Verizon account? - Dan On Wed, Apr 7, 2010 at 7:52 PM, Thomas Riley tomrile...@googlemail.comwrote: I just had a similar email. If your reading this Neel, thanks for the reply! Tom. On Apr 8, 12:38 am, Richard rtaylor...@googlemail.com wrote: I sent an email to Google, this is the reply: Hi Richard, No one has been forgotten. There's a large volume of phones being shipped out, and apparently we overestimated the capacity of our shipping vendor. We have sent them the addresses and the inventory and they are working through the list. I'd wait another couple weeks; trust me, there is a phone assigned to you and it will get to you in due time. Thanks, Neel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en To unsubscribe, reply using remove me as the subject. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Device Seeding Program for Top Android Market Developers
No news from anybody in europe? Since the phones to EU, or at least to us in sweden, are shippen from Frankfurt at least people in germany should have received theirs by now, with or without any volcano? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Device Seeding Program for Top Android Market Developers
Many people have said the phones will be shipping not from the US but from a warehouse in Europe so I agree that the volcano shouldn't have any effect on delivering the phones. They would be sent over land not by air - which makes me wonder if there is another issue delaying the phones? On Apr 19, 12:25 pm, JDS jesper.d.svens...@gmail.com wrote: No news from anybody in europe? Since the phones to EU, or at least to us in sweden, are shippen from Frankfurt at least people in germany should have received theirs by now, with or without any volcano? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Selling outside the Android Market-- Use Google Checkout to sell direct from website??? SlideMe.Org??
Shane, Seems you received just enough information from Francois to put blame and accuse me and SlideME for being dishonest publicly. I am afraid I have to disappoint you and provide the communication transcripts, so the members on this list can judge for themselves if we are dishonest or what kind of a person you are with words to mash it all up in your favor. - I have prepared a transcript of the communication with Francois (koxx). 21 Oct 2009: Sends email to Shane and Shane confirms: Just send me an invoice with the time period, contact info, method of payment, amount and then I'll take care of it. (this did not happen) 8th Nov 2009: Sends invoice within email as text and not as an invoices attachment signed as required 9th Nov 2009 : Thanks me for his payout executed from my personal account. Jan 28th, 2010: After asking if invoices were sent, confirms No, there was no 'true' invoice in 2009. Just this (an informal text in email) Jan 28th, 2010: Confirm that we issued a payout without a proper invoice from developer and that we were in error for doing so, and we needed a proper invoice. Feb 2, 2010: Issued report, again. March 28th, 2010: Followed up with developer on status and why he decided to unpublish as customers wanted an upgrade and asked Was due to any reason when previous partner 'Shane' did not remit payment to you on time? Answer: Mar 28, 2010: Confirms, and claims he forgot to issue invoice to us. March 29th, 2010: We issued up to date reports again April 4th, 2010: Assisted personally developer to prepare invoices since english is not his native language and was finding it difficult to prepare such invoices. April 6th, 2010: Received for the 1st time proper invoices for first payout and new second invoice. April 8th, 2010: Remittance sent for last invoice Assumed developer was happy now, but again not enough of my help was enough to keep him as a publisher on SlideME. Offered developer to forward his email address to users of his application that wanted an upgrade and did so as per their request. - Shane, one request. You need to retract now in public any such accusations that I and SlideME are operating a dishonest operation. I would agree you could make such accusations if you were a judge and have a clear picture from both sides. Nothing gives you the right in public without knowing both sides of the story to make such strong accusations that could be detrimental to SlideME. re: Martin's case, Martin missed reading the requirements documented clearly in the 1st email to him as explained earlier in this thread and he issued what was definitely not an invoice that we had to ignore. A human error on his behalf, does not make us dishonest. I will take blame, by not following up with him and mentioning that we could not accept this invoice, that I did not do. We have gone out of our way to assist these developers and it seems developers that are demanding, or for some reason do not like the way we conduct business tend to publicly post negative comments for their own reasons. Unfortunately, we can only stretch our hand out so much to assist them, and still we find they take a bite at it. George On Mon, Apr 19, 2010 at 1:21 AM, Shane Isbell shane.isb...@gmail.comwrote: Cool, at least something is coming out of SlideME. George, I have a general policy of not attacking people personally, but in this case, I'll make an exception because I think it is warranted. You are a dishonest individual. You came on this list and publicly accused me of being the reason developers did not get paid. And yet, it took 5 months after I left SlideME for you to resolve and pay a simple invoice. Yet you gave a completely (dishonest) impression on this list that it was my fault. You also blamed your recently botched rollout of SAM on me (4 months after I left). In addition, you were dishonest in regards to your replies to Martin on this list. SlideME needs to take responsibility for its actions. Stop pointing fingers to others. Stop spinning things. Just cleanup the payout mess. Developers are saying it's not working for them and is likely the cause of all these angry posts from developers. Deleting these posts from SlideME forums raises a lot of eyebrows and was no small factor in why I brought these issues forward. And for god's sake, stop blaming me for all SlideME's problems. I left 5 months ago. Shane On Sun, Apr 18, 2010 at 2:47 PM, Koxx kox...@gmail.com wrote: Hi, after a long talk with George and some 'lost' emails, I finally managed to be paid few days ago (April 8). The main problem was with invoice. It is very difficult to know what is needed by SlideMe to get your payout. You need to request payout balance (we should receive a summary each month ? I never received them), then edit yourself the invoice with all sales keys (!!!), print it, sign it, scan it, and sent it !!! ouch ! I had to request their help for this (thanks
[android-developers] Re: problems with custom listview adapter getView() method
Thanks Romain, getView is now called for each row only once. Just one follow up question: it seems that I am having a problem with the listviewadapter. resultsList = (ListView) this.findViewById(R.id.list); resultsList.setAdapter(new ResultsListAdapter(this,R.layout.row, currentSearch)); In my getView I am doing a request for each row to get the thumbnail image in a different thread: if (record.getImgURL().equals(none)) holder.thumbView.setImageResource(R.drawable.nothumb); else { String url = item.getImgURL(); makeRequest(position,url,null,false); } and handling the response from makeRequest() @Override public void onResponseCompleted(boolean success, int userId, int ticket, Request request) { if (success) { ... ViewHolder holder = (ViewHolder)resultsList.getChildAt(userId).getTag(); This works fine for the first 5 records, then this last line throws a null pointer exception because for some reason, even though the getview is called on the row represented by resultsList.getChildAt(userId) - which it must to call makeRequest anyway - the view hasn't been added to resultsList. Why is this happening? There are no convertViews yet / The screen fits 4 rows and I can scroll down to the fifth and it works fine, just the sixth row that isn't added to the resultsList. On Apr 14, 5:26 pm, Romain Guy romain...@android.com wrote: This is not an issue, there is absolutely no guarantee on the order in which getView() will be called nor how many times. In your particular case you are doing the worst thing possible with a ListView by giving it a height=wrap_content. This forces ListView to measure a few children out of the adapter at layout time, to know how big it should be. This is what provides ListView with the convertViews you see passed to getView() even before you scroll. On Tue, Apr 13, 2010 at 1:32 PM, edzah edzill...@gmail.com wrote: this is a cross-post from SO . haven't got much attention over there so I am posting it here. orig here: http://stackoverflow.com/questions/2618272/custom-listview-adapter-ge... -- I have a custom list adapter: class ResultsListAdapter extends ArrayAdapterRecordItem { in the overridden 'getView' method I do a print to check what position is and whether it is a convertView or not: �...@override public View getView(int position, View convertView, ViewGroup parent) { System.out.println(getView + position + + convertView); The output of this (when the list is first displayed, no user input as yet) 04-11 16:24:05.860: INFO/System.out(681): getView 0 null 04-11 16:24:29.020: INFO/System.out(681): getView 1 android.widget.relativelay...@43d415d8 04-11 16:25:48.070: INFO/System.out(681): getView 2 android.widget.relativelay...@43d415d8 04-11 16:25:49.110: INFO/System.out(681): getView 3 android.widget.relativelay...@43d415d8 04-11 16:25:49.710: INFO/System.out(681): getView 0 android.widget.relativelay...@43d415d8 04-11 16:25:50.251: INFO/System.out(681): getView 1 null 04-11 16:26:01.300: INFO/System.out(681): getView 2 null 04-11 16:26:02.020: INFO/System.out(681): getView 3 null 04-11 16:28:28.091: INFO/System.out(681): getView 0 null 04-11 16:37:46.180: INFO/System.out(681): getView 1 android.widget.relativelay...@43cff8f0 04-11 16:37:47.091: INFO/System.out(681): getView 2 android.widget.relativelay...@43cff8f0 04-11 16:37:47.730: INFO/System.out(681): getView 3 android.widget.relativelay...@43cff8f0 AFAIK, though I couldn't find it stated explicitly, getView() is only called for visible rows. Since my app starts with four visible rows at least the position numbers cycling from 0-3 makes sense. But the rest is a mess: * Why is getview called for each row three times? * Where are these convertViews coming from when I haven't scrolled yet? I did a bit of reseach, and without getting a good answer, I did notice that people were associating this issue with layout issues. So in case, here's the layout that contains the list: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_height=fill_parent android:layout_width=fill_parent android:orientation=vertical TextView android:id=@+id/pageDetails android:layout_width=fill_parent android:layout_height=wrap_content / ListView android:id=@+id/list android:layout_width=fill_parent android:layout_height=wrap_content android:drawSelectorOnTop=false / /LinearLayout and the layout of each individual row: RelativeLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=108dp android:padding=4dp ImageView android:id=@+id/thumb
[android-developers] Re: Set Image resource as package path in XML for runtime images
Attached is a sample OK button screen shot seen on the UI The left one is created using XML as follows Button android:id=@+id/btnAddPlaylistOK android:layout_height=wrap_content android:text=OK android:layout_gravity=center_horizontal android:textColor=@color/white android:textStyle=bold android:typeface=normal android:clickable=true android:background=@drawable/button_style android:drawableLeft=@drawable/button_left_style android:drawableRight=@drawable/button_right_style android:gravity=center_vertical|center_horizontal|center android:layout_width=55px android:layout_marginTop=10dip android:layout_marginLeft=30dip And in drawable ,* button_style.xml *?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:drawable=@drawable/btns_mid_up_320x480 / /selector* button_left_style.xml* ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:drawable=@drawable/btns_lft_up_320x480 / /selector ?xml version=1.0 encoding=utf-8? item android:drawable=@drawable/btns_rt_up_320x480 / /selector *button_right_style.xml* ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:drawable=@drawable/btns_rt_up_320x480 / /selector Now insead of using the style in xml , i am trying to do that in code. The defination of Button is same in the XML except the android:background=@drawable/button_style android:drawableLeft=@drawable/button_left_style android:drawableRight=@drawable/button_right_style have been removed and inseat , i have done the following in code . btn.setBackgroundDrawable(getResources().getDrawable( R.drawable.btns_mid_up_320x480)); btn.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable( R.drawable.btns_lft_up_320x480), null, getResources() .getDrawable(R.drawable.btns_rt_up_320x480), null); The right image in the attached screen shot shows that everything is distored. I tried adjusting the layout_width, layout_heighyt , but its not working.. Thanks, Alok On Mon, Apr 19, 2010 at 4:29 PM, Alok Kulkarni kulsu...@gmail.com wrote: Hi, Can i do this :- Set the image background path as package:imageName Example.. At runtime , my package is com.test.android .Inside that i have an image whose path i want to mention in the XML layout file as android:src = com.test.android/img1 for an ImageButton. I saw an SDK reference for ImageView as android:src = @[+][package:]type:name .. But i am not getting how to use it.. I think it must not be possibe , but if there is any way , please specify.. The reason why i want to do this is that , when i specify a drawable at runtime for my image buttons, i change the images according to Focus received , or onKeyup, KeyDown.. but its not working as expected.When i mention the same thing as style under drawable , it works fine. So if my theme is going to change at runtime , i want to set the drawable at runtime , keepnig the path same in the xml. Thanks , Alok -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=enattachment: Ok btn.JPG
Re: [android-developers] Re: Android Preferences
On Sat, Apr 17, 2010 at 10:37 AM, Abhinav abhinav.abhic...@gmail.comwrote: Does the PreferenceManager have any role to play in the persistence? Not really. What is the link between these three classes? Look at the documentation and see how they call each other. In addition, once the xml file has been loaded using addPreferenceFromResource() how do I access the preferences file; do I create an instance of PreferenceManager and use the getDefaultSharedPreferences() function or directly create a SharedPreferences object and use the getSharedPreferences() function? I use getDefaultSharedPreference() to ensure I use the same SharedPreferences object throughout my project. - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Opengl
The way I'm doing it right now is drawing a quad with dimensions identical to that of the world size, and texturing the whole thing with my background image. (Works pretty well because my world isn't so big.) On Apr 18, 11:42 pm, risha risha.kott...@wipro.com wrote: Let me know how to set up a background image in opengl -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Is the bad MotionEvent/Touch slowdown stuff actually fixed on first-gen 2.1 updates?
Starring it. My poor G1 has a tough enough time with hardware rendering, no need to put added strain on it. On Apr 19, 3:29 am, Robert Green rbgrn@gmail.com wrote: I filed a bug for this here -http://code.google.com/p/android/issues/detail?id=7836 I believe I did a thorough job with the report. Please star it or comment on it if it affects you. Thanks! On Apr 19, 12:52 am, Robert Green rbgrn@gmail.com wrote: Excellent work, Mario. I think it's quite clear that the input processing code in Android needs help. Eating 20-30% of a Cortex A8 is a pretty big deal. On Apr 18, 4:21 pm, Mario Zechner badlogicga...@gmail.com wrote: For fun i extended the example i posted earlier. It now feature cpu usage output derrived from /proc/stat which should be enough to given an indication of the slow down occuring due to touch events. The setup: - A GLSurfaceView - An OnTouchListener that does nothing but return true - A simple renderer thread which is throttled via a Thread.sleep(200) to 5 frames per second which outputs the frames per second as well as the cpu usage Observation on Milestone with 2.0.1: - load without touching the screen - 4%-12% - load with touching the screen - 24%-44% due to the way i measure the cpu usage it of course fluctuates quiet a bit, the overall tendency can be easily derrived though. You can find the apk athttp://www.file-pasta.com/file/1/touchflood.apk, the Eclipse project with all the source can be found athttp://www.file-pasta.com/file/0/touchflood.zip. On 18 Apr., 22:18, Robert Green rbgrn@gmail.com wrote: The fundamental issue is that there are too many instructions per event being executed. There is no way around it other than optimizing the event handling code in KeyInputQueue. No amount of waiting or sleeping will fix that because those events must run through that code and that code appears to be very slow. It surprises me because it's truly performance critical code and this issue has been known since 1.1/1.5 and it still doesn't appear to be fixed in master. I'm looking at it now and the author(s) didn't even follow Android's best optimization practices. Simple things like declaring virtuals with local variables aren't done. For a moment today I was considering taking the input stack (EventHub, KeyInputQueue and InputDevice) and hacking it into my own input stack which reads off the event devices much more efficiently but I can't find any way to stop the system stack from running and consuming CPU, so that hack is out (and probably good because I really didn't want to go there - waste of time and probably wouldn't work right anyway). In my activity: public boolean onTouchEvent(MotionEvent e) { return false; } And system_server still consumes about 36% of the CPU while moving my finger around. That proves there is nothing a developer can do to work around this. I think I'll take this issue to the platform group now and try to file more specific bugs. On Apr 18, 10:38 am, Ralf Schneider li...@gestaltgeber.com wrote: I have already talked a lot about the touch slow down in this forum. There is another observation I would like to add, may be this can help to track the problem down. One of my projects is an Argumented Reality Game. Of course this kind of App eats energy (CPU cycles) like crazy: In my app I process: The camare, OpenGL graphics, Pseudo-3D-Sound mixing (8 simultaneous samples + ogg-music), 2 constant sensor imputs (acceleration, magnetic) and additional input from trackball, hardware keys and the touch screen. The largest slow down occurs with the touch-events. But the next big slow down occurs with the accleration and magnetic events! I gained up to 4 FPS on a N1 by switching from SENSOR_DELAY_FASTEST to SENSOR_DELAY_GAME. = So I just wonder: May be the slow down is in no way specific to touch events! Instead the whole input-queue-event handling is just horribly slow. As everyonw has observed: Touching the screen will trigger (flood) lots of events - This is similar as enabling input from other sensors - which can slow down the app in a compareable way, too! The main differences is only: Touching the screen will still trigger more event than using a sesnor in *SENSOR_DELAY_FASTEST*. So the slow down appears as less drastically... After working a while with Android, I must say: The design and architecture of the Java-API seems to be nice and well done most of the time. But the execution and implementation of the software stack as a whole seems to be just slow, slow, slow, slow, All this doesn't matter if you have lots of servers with many cores
Re: [android-developers] Re: Device Seeding Program for Top Android Market Developers
Well, I have lost all hope. I realize that this was really just meant for the US. Been waiting 7 weeks a well, and can't get any info from Google, Shipping partner or FedEx. Personally I have no choice but to leave the Android platform: - No Google merchant for northern europe means I cant sell applications - No paid apps for customers in northern europe means my customers cant buy - Its been like this 2 years now - No word from Google when it will be available Its really really sad, but I can't afford spending more time on Android, without beeing able to create an income, while all my competitors in the US can steal ideas and get paid. Ove 2010/4/19 mscwd01 mscw...@gmail.com Many people have said the phones will be shipping not from the US but from a warehouse in Europe so I agree that the volcano shouldn't have any effect on delivering the phones. They would be sent over land not by air - which makes me wonder if there is another issue delaying the phones? On Apr 19, 12:25 pm, JDS jesper.d.svens...@gmail.com wrote: No news from anybody in europe? Since the phones to EU, or at least to us in sweden, are shippen from Frankfurt at least people in germany should have received theirs by now, with or without any volcano? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// 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.comandroid-developers%2bunsubscr...@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] Dialog display duration
Dear all, I need to display an alert message for no more than a half a second. As I understand it, Toast only has 2 available durations, with no way to alter them. Correct me if I'm wrong. Which leads me to sing the AlertDialog. What would be the best way of displaying a dialog for 500ms and then dismissing it? Regards Angus -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 play three images as an animation on Widget?
Dear All, I want to star an animation with three images on an app widget, and It should be pause, resume and stop. Any suggestion will be grateful. Best Regards, D.Y -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 play three images as an animation on Widget?
D.Y wrote: I want to star an animation with three images on an app widget, and It should be pause, resume and stop. Any suggestion will be grateful. You cannot have an animation on an app widget, sorry. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 14-18 June 2010: http://bignerdranch.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] grow or shrink view
Hi, I have one problem... like i want my view to grow or shrink in one direction like curtains. What animation i can use for this? is this scalling or wht is it ? please tell me thanks.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android Tablet SDK or Emulator
Thx 4 your answare ! On ápr. 14, 17:23, Kevin Duffey andjar...@gmail.com wrote: I don't know of any tablets that are available yet.. I would imagine once they become available the IDE profile will be updated, although you'd think it would be out now so we could have software available to take advantage of the bigger screen size. 2010/4/14 Károly Holczhauser holczhau...@gmail.com Hi Guys! I would like to develop for and Android Tablet, but I didn't found any SDK or Emulator for it. I think the best IDE would be the Eclipse. Can anyone tell me a solution,who can I import an Tablet Virtual Device in to the Eclipse IDE ? Thanks: Karoly -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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: Android Tablet SDK or Emulator
Hi , there is Android tablet pc is available in the market. name is Tegra. but still that is not officially launch screen size 1024*800 all the docs api r available on the site Regards sandeep 2010/4/19 Károly Holczhauser holczhau...@gmail.com Thx 4 your answare ! On ápr. 14, 17:23, Kevin Duffey andjar...@gmail.com wrote: I don't know of any tablets that are available yet.. I would imagine once they become available the IDE profile will be updated, although you'd think it would be out now so we could have software available to take advantage of the bigger screen size. 2010/4/14 Károly Holczhauser holczhau...@gmail.com Hi Guys! I would like to develop for and Android Tablet, but I didn't found any SDK or Emulator for it. I think the best IDE would be the Eclipse. Can anyone tell me a solution,who can I import an Tablet Virtual Device in to the Eclipse IDE ? Thanks: Karoly -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@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.comandroid-developers%2bunsubscr...@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] Moving to the next ImageView in HorizontalScrollview?
try setSelection On Mon, Apr 19, 2010 at 5:07 AM, javame_android su...@softwebsolutions.comwrote: Hi, I have a horizontal scroll view and there are four images in it. Now what I want is the way to detect which image is focused currently. I mean, is there any way that we can distinguish between the image that is focused and other images. Currently all the images look quite similar. One more thing, how to move only to the next image on every swipe or fling. Moreover, I have tried the same thing with Gallery, but I didn't found anything in the Gallery that let me move to the next view only. In Gallery, I have tried overriding the onfling method with hardcoded value for veloctiyX but with no success. Can someone let me know how to do this? Doing the same thing with either Gallery view or HorizontalScrollview will solve my issue. Hope to get the quick response. Regards Sunil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] updating a contact in 2.x Contacts API
What's the _id here? It should be the data row id, not the contact id. Also, you shouldn't specify the mime type in an update statement - it is not updatable. Cheers, Dmitri On Apr 19, 2010 2:44 AM, Timo Prill timo.pr...@googlemail.com wrote: hi all, i got a problem updating a contact's details. i use the following code to update the contact name: operations is a ArrayList of ContentProviderOperation. operations.add(ContentProviderOperation.newUpdate( ContactsContract.Data.CONTENT_URI) .withSelection(Data._ID + =?, new String[]{id}) .withValue(Data.MIMETYPE,StructuredName.CONTENT_ITEM_TYPE) .withValue(StructuredName.GIVEN_NAME, firstName) .withValue(StructuredName.FAMILY_NAME, lastName) .build()); contentResolver.applyBatch(ContactsContract.AUTHORITY, operations); but after this query, the contact name is not updated.. (at least the name did not change in the phone's addressbook) i cant figure out why...what am i doing wrong? must be a simple thing i am missing.. thanks in advance timo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] Custom Themes
On Mon, Apr 19, 2010 at 4:45 AM, Chirayu Dalwadi chirayu.dalw...@gmail.comwrote: How to create custom themes from scratch for an application? By reading the documentation: http://developer.android.com/intl/fr/guide/topics/ui/themes.html - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Highlight part of the text in a textview object
You can try the html way to styling This used to work for me. string =font color='#ff' bhello/b /font textview.setText(Html.fromHtml(string)) On Sun, Apr 18, 2010 at 1:17 AM, patbenatar patbena...@gmail.com wrote: Sorry, bolding and italicizing is the extent of my text formatting knowledge with Android. Anyone else know more about this? On Apr 17, 5:33 am, Sebastian Müller sebastia...@gmail.com wrote: Thanks a lot for your answer. This works great for the Bold thing, but background isnt changing...do you know why?? my Code: if (index = 0) { Spannable str = (Spannable) chapterResult.getText(); str.setSpan(new BackgroundColorSpan(0xFF), index, index + searchQuery.getAll().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); str.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), index, index + searchQuery.getAll().length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group athttp:// 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.comandroid-developers%2bunsubscr...@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] updating a contact in 2.x Contacts API
yeah, you are right, i was totally confused... already found the error myself some time later.. i mixed up contact ID and data-row ID.. volcano-ash seemed to influence me this morning ;) it now updates correctly using: oerations.add(ContentProviderOperation.newUpdate( ContactsContract.Data.CONTENT_URI).withSelection( Data.CONTACT_ID + =?, new String[] { id }).withValue( StructuredName.GIVEN_NAME, firstName) .withValue(StructuredName.FAMILY_NAME, lastName).build()); but thx anyway for your reply! stupid-me! :) cheers timo Am 19.04.2010 16:01, schrieb Dmitri Plotnikov: What's the _id here? It should be the data row id, not the contact id. Also, you shouldn't specify the mime type in an update statement - it is not updatable. Cheers, Dmitri On Apr 19, 2010 2:44 AM, Timo Prill timo.pr...@googlemail.com mailto:timo.pr...@googlemail.com wrote: hi all, i got a problem updating a contact's details. i use the following code to update the contact name: operations is a ArrayList of ContentProviderOperation. operations.add(ContentProviderOperation.newUpdate( ContactsContract.Data.CONTENT_URI) .withSelection(Data._ID + =?, new String[]{id}) .withValue(Data.MIMETYPE,StructuredName.CONTENT_ITEM_TYPE) .withValue(StructuredName.GIVEN_NAME, firstName) .withValue(StructuredName.FAMILY_NAME, lastName) .build()); contentResolver.applyBatch(ContactsContract.AUTHORITY, operations); but after this query, the contact name is not updated.. (at least the name did not change in the phone's addressbook) i cant figure out why...what am i doing wrong? must be a simple thing i am missing.. thanks in advance timo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com mailto:android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com mailto:android-developers%2bunsubscr...@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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Device Seeding Program for Top Android Market Developers
@Ove Olaavgard I completely agree with you. The worst thing is that they are not giving any information about when/if will they expand support for selling apps to more countries. Not being able to get any response from them is really frustrating. They don't even answer simple questions like Will it happen in 2010 or later?. In the Czech Republic, Google Checkout is normally working, so why it's so hard to allow Czech developers to sell their apps? I think that they are artificially delaying it, because it's a way to keep prices on the Market down. Devs from countries where selling is not allowed will put their high quality apps for free - and this will also force competitors who can sell their apps to keep the price low. On Apr 19, 2:51 pm, Ove Olavgaard ove.olavfga...@gmail.com wrote: Well, I have lost all hope. I realize that this was really just meant for the US. Been waiting 7 weeks a well, and can't get any info from Google, Shipping partner or FedEx. Personally I have no choice but to leave the Android platform: - No Google merchant for northern europe means I cant sell applications - No paid apps for customers in northern europe means my customers cant buy - Its been like this 2 years now - No word from Google when it will be available Its really really sad, but I can't afford spending more time on Android, without beeing able to create an income, while all my competitors in the US can steal ideas and get paid. Ove 2010/4/19 mscwd01 mscw...@gmail.com Many people have said the phones will be shipping not from the US but from a warehouse in Europe so I agree that the volcano shouldn't have any effect on delivering the phones. They would be sent over land not by air - which makes me wonder if there is another issue delaying the phones? On Apr 19, 12:25 pm, JDS jesper.d.svens...@gmail.com wrote: No news from anybody in europe? Since the phones to EU, or at least to us in sweden, are shippen from Frankfurt at least people in germany should have received theirs by now, with or without any volcano? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group athttp:// 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.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: listen for changes made in ContactMethod table
Any advice please? cheers in advance On Apr 16, 12:54 pm, jrichards1...@googlemail.com jrichards1...@googlemail.com wrote: Hi. i am trying tolistenout for forchangesmadeinContactMethodtableusing the code below: mPeopleObserver = new ContactContentObserver(mHandler); this.getContentResolver().registerContentObserver(Contacts.ContactMethods.CONTENT_URI, true, mPeopleObserver); It doesnt seem to work whenever i change a contacts email address or instant messanger details. i have a conentObserver method below that should catch and notify me of anychangesmadeto thetablebut it doesnt. /** * ContentObserver to get the call backs forchangesin the onChange method */ private class ContactContentObserver extends ContentObserver { public ContactContentObserver(Handler handler) { super(handler); } public void onChange(boolean selfChange) { // Excute Aggregation process try { Log.d(AggregationService, onChange fired by content observer); AggregateContacts(); } catch (Exception e) { e.printStackTrace(); } } } Cheers 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 athttp://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: how to add progress bar with media Player??????
hi i am currently working in a media player application with a progress bar. It work well but i am searching for a listener or something that will make the progressbar move each second the track is playing but have found nothing. i had tried private ProgressBar barre; private int durée; public void onClick(View view) { mMediaPlayer.start(); durée=mMediaPlayer.getDuration(); setProgress(durée); but not working help me a little plz ^^ thx a lot -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Making a Skype Call
Well Skype popped my balloon and replied that they do not support actually dialing a number from another application: We understand that you wish to initiate Skype calls via another application. At present we are not able to help you with this development nor can we provide you information how to send mobile/landline numbers from other applications to the Skype application. Our Skype for mobile applications do not support Extras. We hope that you will accept our profuse apologies. Profuse??? Wow. Anyways, does anyone know if there is a backdoor, undocumented interface? 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] how to add progress bar with media Player??????
hi i am currently working in a media player application with a progress bar. It work well but i am searching for a listener or something that will make the progressbar move each second the track is playing but have found nothing. i had tried private ProgressBar barre; private int durée; public void onClick(View view) { mMediaPlayer.start(); durée=mMediaPlayer.getDuration(); setProgress(durée); but not working help me a little plz ^^ thx a lot -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Removing application shortcut from Home
Hello, I've been trying to use the UNINSTALL_SHORTCUT intent to remove an application shortcut from the Home screen, but without success. Can anyone provide an example? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add progress bar with media Player??????
ulqui wrote: hi i am currently working in a media player application with a progress bar. It work well but i am searching for a listener or something that will make the progressbar move each second the track is playing but have found nothing. i had tried private ProgressBar barre; private int durée; public void onClick(View view) { mMediaPlayer.start(); durée=mMediaPlayer.getDuration(); setProgress(durée); but not working You cannot merely call setProgress() once. If you want the ProgressBar to update every second, you will need to call setProgress() every second. In this sample project, I am using postDelayed() to achieve this effect: http://github.com/commonsguy/vidtry -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] The public key in the certificate cannot be used for ENCRYPT_MODE
Hello, I am trying to establish a SSL connection and send messages using it. I use MINA for this however i get the following error: Caused by: java.security.InvalidKeyException: The public key in the certificate cannot be used for ENCRYPT_MODE at javax.crypto.Cipher.init(Cipher.java:815) at javax.crypto.Cipher.init(Cipher.java:747) at org.apache.harmony.xnet.provider.jsse.ClientHandshakeImpl.processServerHelloDone(ClientHandshakeImpl.java: 418) I found out in the Cipher class that this exception is thrown if I want to use the certificate for encryption and the certificate has set extension critical but doesn't have extension encipherOnly. I tried both - removing extension critical and setting it together with encipherOnly for the key that I am using. Both throw the same exception.Even though it doesnt make any sense. Interesting is that the same key works on my java server running on windows machine. Isn't it possible that there is some bug in android that is causing this? Is there any workaround for this? Thank you Palo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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: Device Seeding Program for Top Android Market Developers
On Apr 19, 12:20 pm, David C dcampi...@gmail.com wrote: I received the same message has you : All of the phones have been shipped already. Please be patient; if your phone has not arrived yet, it is probably in transit and will arrive shortly. Responses like this have been posted to this thread for some time now, long enough for the devices to have arrived by any normal shipping method. Then it struck me... What if ALL the phones were indeed shipped from the US? This is pure speculation, you understand, but it fits the facts as we've been given them. Surface mail from the US to Europe usually takes 6-8 weeks, so it's entirely possible that our phones could have been in transit since mid-March. Maybe the handsets were all with BrightPoint in the US, and rather than move them to Europe and THEN ship them, somebody decided to do it all in one step, and just ship direct. It also could explain why the vast majority of US developers got Droids rather than Nexii. Perhaps BrightPoint had approximately equal numbers in stock, but after allocating a Nexus One to each non-US recipient, it was mostly Droids left over. Is that completely crazy? :^) 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] Re: glTexImage2D very slow on phones like Nexus one
我觉得这个事情也不太妥. It's not a good choice to update texture(huge texture) every frame. (and yes, nexus one has its issues) I think the better solution for video output in game development is let your video be a standard mpeg file. And Launch a new activity to play it. On Apr 19, 2:40 pm, Eong eong.c...@gmail.com wrote: Sorry, I mean write the frame to a pixel buffer. I think fbo is a ES2 feature, right? What about the other ES1 phones? As a developer, you can't just give up the 75% users. On 4月19日, 下午2时20分, Eong eong.c...@gmail.com wrote: Hi, I'm writing this part for video output. This is for video output at most of the time. Our decoder write the screen to a pixel buffer. And then I need to draw it to the screen. So, you mean, I can use FBO to do this? I'm not very familiar with fbo stuffs. Could you give more hint? Thank you! On 4月18日, 下午5时18分, Robert Green rbgrn@gmail.com wrote: Eong, All Mario and I are trying to say is that the thing you are trying to do (upload textures every frame) is generally not considered a good practice and workarounds usually exist that are more efficient, especially if you can target higher levels of opengl or use extensions like framebufferobjects. If you would be willing to tell us something a little bit more specific about what you're doing that requires a texture update every frame, we could potentially offer some more efficient ways of doing it. On Apr 18, 2:44 am, Eong eong.c...@gmail.com wrote: Thanks, Mario. I think it's somewrong with the driver or the chip. It's not just a bandwidth problem. If it's really a bandwidth problem, it only has 1/7 bandwidth of milestone? (150ms compare to 20ms with a full screen tex).That's very funny. I'm working on some libs, which will be used for our tools and games. When a full screen update only takes 20+ms, it's usable in some conditions as it already gets at least 40fps. On 4月17日, 下午6时22分, Mario Zechner badlogicga...@gmail.com wrote: It seems that the msm chips are notorious for having a low bandwidth. There's really no solution to that problem other than 1) lowering your texture size 2) lowering the bit depth of the texture, e.g. instead of using RGBA use RGBA444 or RGB565 2) uploading your texture in patches, e.g. split it up into 4 smaller parts and upload one part each frame. This will probably lead to artifacts if your frame rate is low but could work otherwise. Just out of curiousity: why do you have to upload such a big texture each frame? If you'd state your scenario in detail we might be able to suggest other solutions to the problem. On 17 Apr., 12:10, Eong eong.c...@gmail.com wrote: Robert, Sorry, it's not text, it's tex. I just use this to draw the background. I just want to know why nexus one is so slow with this. It takes 20ms on my milestone but it takes at least 80ms on the nexus one, for one frame. On 4月17日, 上午2时08分, Robert Green rbgrn@gmail.com wrote: Eong, You said you are uploading every frame just to draw text? There are much more efficient ways to do that. On Apr 16, 11:14 am, Eong eong.c...@gmail.com wrote: I'm afraid it's not a same problem. My problem only happenes on Snapdragon phones. It's fine on Milestone or Droid. I found a few threads about this but no solution. On 4月16日, 下午9时15分, Felipe Silveira webfel...@gmail.com wrote: Just a guess: It can be the same error reported here:http://code.google.com/p/android/issues/detail?id=7520 Take a look... Felipe Silveirahttp://www.felipesilveira.com.br On Fri, Apr 16, 2010 at 8:40 AM, Eong eong.c...@gmail.com wrote: Hi, We are developing 2D games. And we found our game works fine except the snapdragon chips, like Nexus one and Liquid A1. It even runs fine on G1. We use GLSurfaceView, and we useglTexImage2Dand glTexIsubmage2D to put on the text and then draw. TheglTexImage2Dclass take more than 100ms on Nexus one (1024x512 pix tex). It's very strange, G1 is even faster than this. If anyone know something about this? -Code snip--- gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT); gl.glTexSubImage2D(GL10.GL_TEXTURE_2D, 0, 0, 0, m_width, m_height, GL10.GL_RGB, GL_UNSIGNED_SHORT_5_6_5, m_byteCanvas); ((GL11Ext)gl).glDrawTexiOES(0, 0, 0, m_width, m_height); -- You
[android-developers] Re: Device Seeding Program for Top Android Market Developers
Good theory, but the few lucky people who do have a phone in Europe (for ADC2 Top 100) said it shipped from Brightpoint Holland, and I think the google rep has also stated this to some people via email. On Apr 19, 4:04 pm, String sterling.ud...@googlemail.com wrote: On Apr 19, 12:20 pm, David C dcampi...@gmail.com wrote: I received the same message has you : All of the phones have been shipped already. Please be patient; if your phone has not arrived yet, it is probably in transit and will arrive shortly. Responses like this have been posted to this thread for some time now, long enough for the devices to have arrived by any normal shipping method. Then it struck me... What if ALL the phones were indeed shipped from the US? This is pure speculation, you understand, but it fits the facts as we've been given them. Surface mail from the US to Europe usually takes 6-8 weeks, so it's entirely possible that our phones could have been in transit since mid-March. Maybe the handsets were all with BrightPoint in the US, and rather than move them to Europe and THEN ship them, somebody decided to do it all in one step, and just ship direct. It also could explain why the vast majority of US developers got Droids rather than Nexii. Perhaps BrightPoint had approximately equal numbers in stock, but after allocating a Nexus One to each non-US recipient, it was mostly Droids left over. Is that completely crazy? :^) 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 athttp://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: spinner question: how to detect the selection of an already selected item?
Hi, Did you tried : onClick(DialogInterface dialog, int which) I think you can update your list adapter according to the wich parameter. -- Will On 19 avr, 03:45, greg sep...@eduneer.com wrote: I have an activity with a ListView check list and a spinner that controls the sort order of the items in that check list. One of the sort options is to move the checked items to the beginning of the list. I would like to allow users to check some items in the list, select the 'sort by checks' option, check some more items in the list, and select the 'sort by checks' option again. However, I don't see how to detect that second selection of the spinner's 'sort by checks' option. I've tried using setOnItemSelectedListener, but it doesn't call the onItemSelected handler unless a different item is selected. And I've tried using setOnItemClickListener, but it seems that listener cannot be used with a spinner according to following run-time exception from logcat: - - - D/AndroidRuntime( 987): Shutting down VM W/dalvikvm( 987): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) E/AndroidRuntime( 987): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 987): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.spinner/com.test.spinner.check_list}: java.lang.RuntimeException: setOnItemClickListener cannot be used with a spinner. E/AndroidRuntime( 987): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 2268) - - - Any tips on how to detect the selection of an already selected item in a spinner? Thanks, Greg -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Transfer List of specific objects across intents
Hi, The object you can put in an intent bundle must be serializable. I think you can create your List extending arrayList and wich implements serializable. Then, you will be able to use extras.put( [your list] ); -- Will On 18 avr, 23:52, raqz abdulraqee...@gmail.com wrote: Hi, I wish to send a list of type MyFriend from one activity to another. I dont find a bundle.put.. for such an requirement in the api's. Is there a way somebody could suggest through which I could transfer different kinds of data. Thanks, Raqeeb -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://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: Device Seeding Program for Top Android Market Developers
That might be the case, but I just cant understand why they would ship them by surface mail, when Google sent us mail with a 2-4 weeks timeframe. As a professional shipping partner, it should not be any problem shipping 5-20.000 units at all, considering all the other phones they ship daily. And not beeing able to deliver within 7 weeks??? Completely unbelievable. Its obvious that there some kind of big problem with Nexus-1 deliveries here. 2010/4/19 String sterling.ud...@googlemail.com On Apr 19, 12:20 pm, David C dcampi...@gmail.com wrote: I received the same message has you : All of the phones have been shipped already. Please be patient; if your phone has not arrived yet, it is probably in transit and will arrive shortly. Responses like this have been posted to this thread for some time now, long enough for the devices to have arrived by any normal shipping method. Then it struck me... What if ALL the phones were indeed shipped from the US? This is pure speculation, you understand, but it fits the facts as we've been given them. Surface mail from the US to Europe usually takes 6-8 weeks, so it's entirely possible that our phones could have been in transit since mid-March. Maybe the handsets were all with BrightPoint in the US, and rather than move them to Europe and THEN ship them, somebody decided to do it all in one step, and just ship direct. It also could explain why the vast majority of US developers got Droids rather than Nexii. Perhaps BrightPoint had approximately equal numbers in stock, but after allocating a Nexus One to each non-US recipient, it was mostly Droids left over. Is that completely crazy? :^) 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.comandroid-developers%2bunsubscr...@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: Device Seeding Program for Top Android Market Developers
On Apr 19, 4:22 pm, Ove Olavgaard ove.olavfga...@gmail.com wrote: That might be the case, but I just cant understand why they would ship them by surface mail, when Google sent us mail with a 2-4 weeks timeframe. Possible reasons: Somebody screwed up, or there was inadequate communication between the person at Google saying 2-4 weeks and the person at BrightPoint deciding how to send the phones. For the number of handsets in question, the shipping cost difference between air and surface would be considerable. Notice how none of the recent responses from Google mention 2-4 weeks. On Apr 19, 4:12 pm, Thomas Riley tomrile...@googlemail.com wrote: Good theory, but the few lucky people who do have a phone in Europe (for ADC2 Top 100) said it shipped from Brightpoint Holland The theory is that only the Market seeding phones are coming from the US via surface mail. AFAIK, the ADC2 recipients all got theirs within the 2-4 week timeframe, while none of the Market folks outside the US have. String 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] HTC Incredible no default external storage?
the HTC incredible is now available for pre order at Verizon. Engadget has already done a review at: http://www.engadget.com/2010/04/19/droid-incredible-review/ They mention that there is a storage issue with a lot of apps because it does not come with an external SD card by default. It does have a lot of separate internal storage, but apps cannot use it. Does anyone have more info about this from a developer's point of view. What path will Environment.getExternalStorageDirectory() return and what is the correct way to get the path of the internal storage? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Selling outside the Android Market-- Use Google Checkout to sell direct from website??? SlideMe.Org??
On Mon, Apr 19, 2010 at 5:02 AM, George | SlideME george.slid...@gmail.comwrote: Shane, one request. You need to retract now in public any such accusations that I and SlideME are operating a dishonest operation. I never said SlideME was dishonest. I said you, as an individual, are dishonest and I gave the reasons. Paul comes forward and asks if SlideME is good at paying people. I say I've seen developer complaints and invite other developers to give their experiences. Martin comes forward, so does Francois and we find the reason: the invoice process hard to understand. Likely, if you had let such discussions grow on your own forums, you would have found this out. But rather than taking responsibility for a broken payout process, you keep pointing the finger to other members of the community. This is dishonest. Just identify the problem and fix it! In fact, if you approach the android developer community on how to improve the payout process, I'm sure they will jump in and give valuable suggestions. But if you try to hide things, point fingers and post bizarre e-mails, well you will get nothing. Shane -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Access a Service across multiple Applications
Hey Folks, I have a service that i need to access across multiple Applications. Can anyone tell me how this can be done? Thanks, Prafull. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Selling outside the Android Market-- Use Google Checkout to sell direct from website??? SlideMe.Org??
I'll be the first one to give out a suggestion: generate the invoice automatically into a pdf from the SlideME portal. That way you can be sure it is right. Doing manual copying and pasting of transactions seems to be a big hurdle here. On Mon, Apr 19, 2010 at 8:44 AM, Shane Isbell shane.isb...@gmail.comwrote: On Mon, Apr 19, 2010 at 5:02 AM, George | SlideME george.slid...@gmail.com wrote: Shane, one request. You need to retract now in public any such accusations that I and SlideME are operating a dishonest operation. I never said SlideME was dishonest. I said you, as an individual, are dishonest and I gave the reasons. Paul comes forward and asks if SlideME is good at paying people. I say I've seen developer complaints and invite other developers to give their experiences. Martin comes forward, so does Francois and we find the reason: the invoice process hard to understand. Likely, if you had let such discussions grow on your own forums, you would have found this out. But rather than taking responsibility for a broken payout process, you keep pointing the finger to other members of the community. This is dishonest. Just identify the problem and fix it! In fact, if you approach the android developer community on how to improve the payout process, I'm sure they will jump in and give valuable suggestions. But if you try to hide things, point fingers and post bizarre e-mails, well you will get nothing. Shane -- Shane Isbell (Founder of ZappMarket) http://twitter.com/sisbell http://twitter.com/zappstore http://zappmarket.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Bluetooth stack becomes dead
Hi, Well for the moment its even worse on the HTC Desire, I cant even connect to using the SPP profile!!! I need to spend a little more time to gather more info but its not looking good :-( My understanding is that the Desire sports the same hardware as the Nexus 1 I would have thought Bluetooth was thoroughly tested on the Nexus 1. Regards, Serge On Apr 13, 11:43 pm, Rafał Grzybowski aguyngue...@gmail.com wrote: Serge, Thank you for the reply. I'd be glad to hear how it works on HTC Desire. Maybe I'll try to switch to nativeBluetoothcustom library. Best regards On 13 Kwi, 16:50, ssozonoff se...@sozonoff.com wrote: Hello Rafal, I have this exact problem with my HTC Legend as well. I wrote a post here but it never appeared?? So far I have not been able to solve the issue and I don't know if its specific to the Legend. In a few days I receive my HTC Desire and will test with that. If you close theBluetoothsocket while your are not stuck in the blocking read thestackshould be OK. Its only when closing the socket when blocked in the read that thestackgets corrupted. Sadly the only way to break out of the blocking read is to close the socket! Please keep me posted if you find anything. Thanks, Serge On Apr 13, 1:05 pm, Rafa³ Grzybowski aguyngue...@gmail.com wrote: AfterBluetoothconnection is lost.Bluetoothstackon HTC Legend is messed up. Nothing works tillBluetoothis turned off and on. Here is the sample, the problem is blocking read on the thread but InputStream.available call always returns 0 and cannot be used to implement some ugly, busy-waiting workaround. package com.example.android.disconnectproblem; import java.io.IOException; import java.io.InputStream; import java.io.InvalidObjectException; import java.io.OutputStream; import java.util.UUID; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; public class MainActivity extends Activity { private ArrayAdapterString messages = null; private BluetoothAdapter adapter = null; private BluetoothDevice device = null; private BluetoothSocket socket = null; private ConnectedThread thread = null; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { try { super.onCreate(savedInstanceState); super.setContentView(R.layout.main); } catch (Throwable throwable) { } } @Override public void onStart () { try { super.onStart(); // setup click handler Button btnConnect = (Button) super.findViewById(R.id.btnConnect); btnConnect.setOnClickListener(new OnClickListener() { public void onClick(View v) { try { MainActivity.this.doConnect(); } catch (Throwable throwable) { MainActivity.this.handleThrowable(doConnect failed, throwable); } } }); Button btnDisconnect = (Button) super.findViewById(R.id.btnDisconnect); btnDisconnect.setOnClickListener(new OnClickListener() { public void onClick(View v) { try { MainActivity.this.doDisconnect(); } catch (Throwable throwable) { MainActivity.this.handleThrowable(doDisconnect failed, throwable); } } }); // setup messages this.messages = new ArrayAdapterString(this, R.layout.message); ((ListView)super.findViewById(R.id.lstMessages)).setAdapter(this.messages); } catch (Throwable throwable) { this.handleThrowable(onStart failed, throwable); } } private void doConnect () throws Throwable{ if (this.adapter == null) { this.adapter = BluetoothAdapter.getDefaultAdapter(); this.addMessage(adapter retrieved); } if (this.device == null) { this.device = adapter.getRemoteDevice(00:18:9A:01:3E:7E);
Re: [android-developers] Access a Service across multiple Applications
madmax wrote: Hey Folks, I have a service that i need to access across multiple Applications. Can anyone tell me how this can be done? Create a remote service and expose an interface through AIDL. Here is a pair of sample applications demonstrating the technique: http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/RemoteClient/ http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/RemoteService/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: HTC Incredible no default external storage?
On Apr 19, 4:38 pm, webmonkey webmonke...@gmail.com wrote: what is the correct way to get the path of the internal storage? context.getFilesDir().getPath() works for me. 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] Account authorization for Google Health on Android
I am trying to access Google Health profile from android. What I want to do is to let the users access their Google Health Profile and modify it if they want to. I saw the documentation and saw that we need to use either AuthSub or OAuth for account authorization. I am not able to figure out which one to use/how to implement them. Can someone let me know how to do this authentication. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: HTC Incredible no default external storage?
String wrote: On Apr 19, 4:38 pm, webmonkey webmonke...@gmail.com wrote: what is the correct way to get the path of the internal storage? context.getFilesDir().getPath() works for me. That's the app-local file storage area. And if the answer is that the Incredible has a few GB of space set aside for this, that's excellent. If, however, the Incredible has your typical 512MB-or-lower space set aside for apps, we need to figure out if there's a way to get to the rest of the on-board flash. My hope is that Environment.getExternalStorageDirectory() works, but that HTC elected to rename it from /sdcard, and that apps hardwiring /sdcard are the ones that are failing. I am attempting to get some answers on this. If there's anyone out there with a pre-release Incredible, I'd like to work with you on some tests -- feel free to contact me off-list if desired. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android App Developer 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: Device Seeding Program for Top Android Market Developers
I'm from Austria and didn't receive mine yet... On Apr 15, 10:59 pm, Daniel daniel.himmel...@googlemail.com wrote: Has anybody from Germany already got his or her Android phone from the device seeding program? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Setting the text in the dialog for an EditTextPreference
On Sat, Apr 17, 2010 at 11:55 PM, Hayden hayden.stew...@gmail.com wrote: Is there a way to do this? Haven't tried this myself, but seems like something that should definitely be doable. When you reset the values, have you confirmed that that setting actually get's changed? Did you commit your changes before the user brings the EditText back up? - TreKing - Chicago transit tracking app for Android-powered devices http://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Bluetooth SPP not working on HTC Desire
Hello, I have been doing some Bluetooth SPP development with an HTC Legend which was working just fine. Today I received my HTC Desire and I cant get an SPP connection to work. The first thing I had to do is remove the mAdapter.cancelDiscovery() call in the connectThread(). It seems there is some sort of timing issue here and with the faster processor its not working like this. Below is an extract from the logs when mAdapter.cancelDiscovery() was being called just prior to mmSocket.connect(); 04-19 16:30:58.984: DEBUG/BluetoothSppService(759): Running mConnectThread 04-19 16:30:58.984: ERROR/BluetoothEventLoop.cpp(92): pollData[0] is revented, check next one 04-19 16:30:58.984: ERROR/BluetoothService.cpp(92): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session) 04-19 16:30:59.024: DEBUG/DEVICE(293): BLTA - *DiscoverServices I get a little farther after this change and it almost seems as if the connection is up because the BT Icon on my laptop changes to green but then the connection fails anyway. Here is an extract of the stack after the call to mmSocket.connect(); 04-19 16:33:40.314: DEBUG/DEVICE(293): BLTA - *DiscoverServices 04-19 16:33:40.314: INFO/DTUN_HCID_BZ4(293): dtun_client_get_remote_svc_channel: starting discovery on (uuid16=0x0011) 04-19 16:33:40.314: INFO/DTUN_HCID_BZ4(293): bdaddr=00:23:4D:F3:3B:BE 04-19 16:33:40.314: INFO/DTUN_CLNT(293): Client calling DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4) 04-19 16:33:40.314: INFO/(260): DTUN_ReceiveCtrlMsg: [DTUN] Received message [BTLIF_DTUN_METHOD_CALL] 4354 04-19 16:33:40.314: INFO/(260): handle_method_call: handle_method_call :: received DTUN_METHOD_DM_GET_REMOTE_SERVICE_CHANNEL (id 4), len 134 04-19 16:33:40.314: ERROR/BTLD(260): search UUID = 1101*** 04-19 16:33:40.314: INFO//system/bin/btld(256): btapp_dm_GetRemoteServiceChannel() 04-19 16:33:40.314: INFO//system/bin/btld(256): # USerial_Ioctl: BT_Wake, 0x8003 04-19 16:33:40.914: INFO//system/bin/btld(256): # USerial_Ioctl: BT_Sleep, 0x8004 04-19 16:33:41.394: WARN/BTLD(260): ccb timer ticks: 0 04-19 16:33:41.394: INFO//system/bin/btld(256): # USerial_Ioctl: BT_Wake, 0x8003 04-19 16:33:41.464: WARN/BTLD(260): info:x10 04-19 16:33:41.464: INFO/BTL-IFS(260): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 10 pbytes (hdl 14) 04-19 16:33:41.464: DEBUG/DTUN_HCID_BZ4(293): dtun_dm_sig_link_up() 04-19 16:33:41.464: INFO/DTUN_HCID_BZ4(293): dtun_dm_sig_link_up: dummy_handle = 260 04-19 16:33:41.464: DEBUG/ADAPTER(293): adapter_get_device(00:23:4D:F3:3B:BE) 04-19 16:33:41.464: ERROR/BluetoothEventLoop.cpp(92): pollData[0] is revented, check next one 04-19 16:33:41.464: ERROR/BluetoothEventLoop.cpp(92): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/293/ hci0/dev_00_23_4D_F3_3B_BE 04-19 16:33:41.584: WARN/BTLD(260): process_service_search_attr_rsp 04-19 16:33:41.624: INFO/BTL-IFS(260): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 13 pbytes (hdl 14) 04-19 16:33:41.624: INFO/DTUN_HCID_BZ4(293): dtun_dm_sig_rmt_service_channel: success=0, service= 04-19 16:33:41.624: ERROR/DTUN_HCID_BZ4(293): discovery unsuccessful! 04-19 16:33:42.126: INFO//system/bin/btld(256): # USerial_Ioctl: BT_Sleep, 0x8004 04-19 16:33:42.724: INFO//system/bin/btld(256): # USerial_Ioctl: BT_Wake, 0x8003 04-19 16:33:42.824: INFO/BTL-IFS(260): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 11 pbytes (hdl 14) 04-19 16:33:42.824: DEBUG/DTUN_HCID_BZ4(293): dtun_dm_sig_link_down() 04-19 16:33:42.824: INFO/DTUN_HCID_BZ4(293): dtun_dm_sig_link_down device = 0xf4f8 handle = 260 reason = 22 04-19 16:33:42.824: ERROR/BluetoothEventLoop.cpp(92): pollData[0] is revented, check next one 04-19 16:33:42.824: ERROR/BluetoothEventLoop.cpp(92): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/293/ hci0/dev_00_23_4D_F3_3B_BE 04-19 16:33:42.824: DEBUG/BluetoothA2dpService(92): Received intent Intent { act=android.bluetooth.device.action.ACL_DISCONNECTED (has extras) } 04-19 16:33:43.334: INFO//system/bin/btld(256): # USerial_Ioctl: BT_Sleep, 0x8004 04-19 16:33:46.334: DEBUG/CachedBluetoothDevice(168): updating profiles for APOLLO-4 04-19 16:33:46.344: ERROR/CachedBluetoothDevice(168): onUuidChanged: Time since last connect866040 04-19 16:33:46.344: DEBUG/BluetoothService(92): Cleaning up failed UUID channel lookup: 00:23:4D:F3:3B:BE 1101--1000-8000-00805f9b34fb 04-19 16:33:46.354: ERROR/BluetoothSppService(805): BT Connection exception java.io.IOException: Service discovery failed at android.bluetooth.BluetoothSocket $SdpHelper.doSdp(BluetoothSocket.java:377) at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:201) at com.sozonoff.android.bluetooth.BluetoothSppService
[android-developers] an update issue
Hi , Here's the problem I'm facing : trying to do my own application update I download the update apk from a web server on the sd card and then I launch the Package Installer with the downloading path ( while the old application is running) . So far after the package installer starts and the user agrees to install the application I get the following message MyApp Could not be installed on this phone and in the logcat then following message is printed : No package identifier when getting value for resource number 0x . I could not find a reason for this behaviour , so please if there is something that I'm missing do point it to me ! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en