[android-developers] Re: New sales have come to a halt Re: Developer console stopped updating?
Hi all, I always considered the developper consolel too be just a shameless, wrote under-a-day, new intern-assignement, we're way behind schedule, kind of way to put some apps on the market. For the first two weeks I thought it was normal, then I thought nobody works on that, then now I know : It's the lamest tool any developper for any platforms as ever had :S But as soon as you just see it for what it is, an simple access to the market for your app, then it's ok. We just have to find others ways to know what's happening with our apps. I personnaly use flurry(flurry.com) which gives analytics and I believe Admob does as well. Of course if you're on the race to be in the top 25, then it's a real problem that your downloads are not counted...For others, well, not so much :D Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Layout Highlight For Already Background Set
On Feb 13, 4:58 am, Sasikumar.S sasikumar.it1...@gmail.com wrote: Thank You pskink. can u tell how to use that?.. the easiest way is to define your StateListDrawable in xml in drawable folder and assign it to your layout's background: LinearLayout ... android:background=@drawable/my_selector / see StateListDrawable docs pskink -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Select wallpaper from..
yes.. I want that to be configurable. sometimes to show and sometimes not to show in the list of select wallpaper from On Sat, Feb 13, 2010 at 12:07 PM, venkat ranjit ranjit0...@gmail.comwrote: Hi manjuntha ur question is not clear , tell me clearly, in my understanding u want shortcut of ur activity (custom activity). in wallpaper , i want clarity k Regards, Ranjit On Sat, Feb 13, 2010 at 10:03 AM, Manjunatha M man...@gmail.com wrote: Hi Folks, I want to show my Activity in HomeScreen-Menu Press-Wallpapers. This should be dynamic, so that, for some check this should show, and otherwise it should not show. Could anyone please help on this?? -- Regards, Manjunatha -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Manjunatha -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: unable to bind to a service
anybody help? On 13 Φεβ, 00:44, dane131 orestis...@gmail.com wrote: hallo i have aservicethat provides gps coordinates.Here is the code : package app.suite.gps; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import app.suite.gps.IGps; public class Service_impl extendsServiceimplements LocationListener{ double lat=37.96568 ; double lng=23.71382; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 500.0f, this); return mBinder; } private final IGps.Stub mBinder = new IGps.Stub() { @Override public double getLat() throws RemoteException { return lat; } @Override public double getLng() throws RemoteException { return lng; } }; public void onLocationChanged(Location location) { if (location != null) { lat = location.getLatitude(); ; lng = location.getLongitude(); } } @Override public void onProviderDisabled(String arg0) { // TODO Auto-generated method stub } @Override public void onProviderEnabled(String arg0) { // TODO Auto-generated method stub } @Override public void onStatusChanged(String arg0, int arg1, Bundle arg2) { // TODO Auto-generated method stub } } i want tobindto thisservicefrom another application which uses the following piece of code : package app.suite.client; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Client extends Activity { IGps mservice=null; ServiceConnection conn=new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { Log.e(TAG,DISCONNECTED); } @Override public void onServiceConnected(ComponentName name, IBinderservice) { mservice=IGps.Stub.asInterface(service); try { double a=mservice.getLat(); String a_str=Double.toString(a); Log.e(TAG,a_str); } catch(RemoteException e) { } } }; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); Intentservice= new Intent(); service.setComponent(new ComponentName(app.suite.gps,app.suite.gps.Service_impl)); bindService(service, conn, BIND_AUTO_CREATE); } } When i run the code i get the security exception unabletobindtoservice (I have included the IGps.aidl file in both applications and generated the interfaces) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Dev Tools app crashes on entering Dev Settings menu (htc tattoo)
This is pretty bad news for me - I'd really like to be able to debug on-device, monitor CPU usage etc. Is there any workaround (e.g. disable certain app functionality, use a different version)? I can't afford multiple devices. If it emerges that the Dev Tools app simply cannot be run on this device then maybe we should build up a community list of devices which are known to work / not work with the app. Dan On Feb 13, 2:31 am, Dianne Hackborn hack...@android.com wrote: The app uses private APIs, so may not be compatible with a particular device. On Sun, Jan 31, 2010 at 11:33 PM, Dan S danstow...@gmail.com wrote: Hi - On a HTC Tattoo (android 1.6) I install the Dev Tools app by copying it out of an emulated 1.6 machine. Opening the app works, but then when I go into the Development Settings menu it crashes with The application Dev Tools (process com.android.development) has stopped unexpectedly. Please try again. Using adb logcat I got the stack trace given below, suggesting a security restriction. Is this fixable? Thanks Dan D/WindowManager( 81): interceptKeyTq event=android.view.rawinputev...@437f08f0 keycode=0 screenIsOn=true keyguardShowing=false D/KeyInputQueue( 81): DebugMonitor keycode=0 value=1 D/WindowManager( 81): interceptKeyTq event=android.view.rawinputev...@437f08f0 keycode=0 screenIsOn=true keyguardShowing=false D/KeyInputQueue( 81): DebugMonitor keycode=0 value=0 I/ActivityManager( 81): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.TEST] flg=0x1000 cmp=com.android.development/.DevelopmentSettings } W/ServiceManager( 81): Permission failure: android.permission.HARDWARE_TEST from uid=10049 pid=436 E/SurfaceFlinger( 81): Permission Denial: pid=436, uid=10049 D/AndroidRuntime( 436): Shutting down VM W/dalvikvm( 436): threadid=3: thread exiting with uncaught exception (group=0x4001db88) E/AndroidRuntime( 436): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 436): java.lang.RuntimeException: Unable to resume activity {com.android.development/ com.android.development.DevelopmentSettings}: java.lang.SecurityException E/AndroidRuntime( 436): at android.app.ActivityThread.performResumeActivity(ActivityThread.java: 2931) E/AndroidRuntime( 436): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java: 2953) E/AndroidRuntime( 436): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2489) E/AndroidRuntime( 436): at android.app.ActivityThread.access $2100(ActivityThread.java:123) E/AndroidRuntime( 436): at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1843) E/AndroidRuntime( 436): at android.os.Handler.dispatchMessage (Handler.java:99) E/AndroidRuntime( 436): at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 436): at android.app.ActivityThread.main (ActivityThread.java:4321) E/AndroidRuntime( 436): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 436): at java.lang.reflect.Method.invoke (Method.java:521) E/AndroidRuntime( 436): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) E/AndroidRuntime( 436): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) E/AndroidRuntime( 436): at dalvik.system.NativeStart.main (Native Method) E/AndroidRuntime( 436): Caused by: java.lang.SecurityException E/AndroidRuntime( 436): at android.os.BinderProxy.transact (Native Method) E/AndroidRuntime( 436): at com.android.development.DevelopmentSettings.updateFlingerOptions (DevelopmentSettings.java:246) E/AndroidRuntime( 436): at com.android.development.DevelopmentSettings.onResume (DevelopmentSettings.java:169) E/AndroidRuntime( 436): at android.app.Instrumentation.callActivityOnResume(Instrumentation.java: 1225) E/AndroidRuntime( 436): at android.app.Activity.performResume (Activity.java:3559) E/AndroidRuntime( 436): at android.app.ActivityThread.performResumeActivity(ActivityThread.java: 2917) E/AndroidRuntime( 436): ... 12 more -- You received this message because you are subscribed to the Google Groups Android Developers group. 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
[android-developers] Re: onActivityResult is called immediately after startActivityForResult
I have problem too while attempting to return a result from my child activity. From the logs it appears that my sub-activity does execute setResult() and finish(). However, it still fails to execute onActivityResult in the main (calling) activity. -- Here is the Manifest code for the child activity: !-- This activity displays the 'About' screen to the user. -- activity android:launchMode=standard android:name=.TFTAbout android:label=@string/about /activity The child activity's code: @Override public void onCreate( Bundle savedInstanceState ) { Log.d( LOG_TAG, onCreate: START ); super.onCreate( savedInstanceState ); /* Set what to do when the user presses a key but the key press is * not handled by the application. */ setDefaultKeyMode( DEFAULT_KEYS_DISABLE ); /* Connect the appropriate resource to this activity. */ setContentView( R.layout.about ); /* Define the click listener for the Close button. */ Button b = (Button) findViewById( R.id.bt_close ); b.setOnClickListener ( new View.OnClickListener() { /** Implement the OnClickListener callback to handle the press of a button. */ public void onClick( View v ) { Log.d( LOG_TAG, bt_close.onClick: START. ); setResult( 2, (new Intent()).setAction(About activity has finished!) ); Log.d( LOG_TAG, onClick: 'Close' button pressed; returning to calling activity. ); finish(); Log.d( LOG_TAG, bt_close.onClick: END. ); } } ); } And the parent activity's code: @Override protected void onActivityResult( int request_code, int result_code, Intent i ) { Log.d( LOG_TAG, onActivityResult: START. ); super.onActivityResult( request_code, result_code, i ); /* Use the request code to select between multiple child activities we * may have started. Here there is only one thing we launch. */ if ( request_code == Activity.RESULT_FIRST_USER ) { Log.d( LOG_TAG, onActivityResult: 'About' activity has returned. ); } } Logcat: 02-13 13:55:42.057: DEBUG/TFT(6716): onOptionsItemSelected: 'About' item selected. 02-13 13:55:42.070: INFO/ActivityManager(564): Starting activity: Intent { comp={com.wirel.tft/com.wirel.tft.TFTAbout} } 02-13 13:55:42.146: DEBUG/TFTAbout(6716): onCreate: START 02-13 13:55:42.178: DEBUG/TFTAbout(6716): onCreate: END 02-13 13:55:42.326: INFO/ActivityManager(564): Displayed activity com.wirel.tft/.TFTAbout: 254 ms 02-13 13:55:43.089: DEBUG/TFTAbout(6716): bt_close.onClick: START. 02-13 13:55:43.097: DEBUG/TFTAbout(6716): onClick: 'Close' button pressed; returning to calling activity. 02-13 13:55:43.106: DEBUG/TFTAbout(6716): bt_close.onClick: END. -- The sub-activity has it's lauchMode set to 'standard'. I confirmed that I am passing a valid request code ( which is 0 ). Also I ensured that the sub-activity's action is neither ACTION_MAIN or ACTION_VIEW as is stated in the documentation for startActivityForResult. Can someone please help? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: help me
Hey Can u elaborate on the emulator problem ? What issue are you facing exactly? On Feb 13, 8:51 am, kamran Manzoor kamranmanzoor...@gmail.com wrote: the code is here with emulator problrm package com.net.login; import android.app.Activity; import android.content.DialogInterface.OnClickListener; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class login extends Activity { /** Called when the activity is first created. */ String username , password; Button login; TextView tv = new TextView(this); EditText name = new EditText(this); EditText pass =new EditText(this); �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // // name = (EditText)findViewById(R.id.user_name); pass = (EditText)findViewById(R.id.password); login = (Button)this.findViewById(R.id.login); username = name.getText().toString(); password = pass.getText().toString(); login.setOnClickListener((android.view.View.OnClickListener) loginListener); } private OnClickListener loginListener = new OnClickListener() { public void onClick(View v) { if (username == kami password == kami) { //TextView tv = new TextView(this); tv.setText( Login is Proved); setContentView(tv); //System.out.println(login proved); } else { // TextView tv = new TextView(this); tv.setText( Passwod is incorrect ); setContentView(tv); } //System.out.println(login proved); } }; } plz help me if anyone know? thanx kamran Manzoor FAST-NU -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Layout supporting word wrap for Views?
I found this question asked over a year ago but no solution was found: http://groups.google.com/group/android-developers/browse_thread/thread/15d8e7e8bc46d279/4e11259e78e6d654 Essentially, I want to use a LinearLayout with horizontal orientation, but when the child views' total width is greater than the width of the screen, to wrap to the next line/row. In particular, I'm using a RadioGroup (with radio buttons determined at runtime) where it would be much better to do this wrapping rather than use vertical orientation. Is there a layout that supports 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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Layout supporting word wrap for Views?
I found this question asked over a year ago but no solution was found: http://groups.google.com/group/android-developers/browse_thread/thread/15d8e7e8bc46d279/4e11259e78e6d654 Essentially, I want to use a LinearLayout with horizontal orientation, but when the child views' total width is greater than the width of the screen, to wrap to the next line/row. In particular, I'm using a RadioGroup (with radio buttons determined at runtime) where it would be much better to do this wrapping rather than use vertical orientation. Is there a layout that supports this? No, sorry. You theoretically can create your own custom layout that has this property. -- Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer Books: http://commonsware.com/books.html -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] MapView Overlay that does always keeps an item selected?
Hi, I want to add an ItemizedOverlay to a MapView that always keeps one OverlayItem as the selected one. I indicate this by using a StateListDrawable with two different marker drawables. But right now, whenever I tap on the map and not hitting a marker, the last selected item will get deselected. But I always want to keep the last item selected until a new one is hit. I already tried to intercept e.g. onTap, but this only lets me completely disable the tap handling. Any suggestions what to do about this? Thanks a lot, Fabian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Hey Mr or Ms Moderator...
So , Yes, This One did appear in the group! Has anyone gotten a feel for when/how-many/etc posts before you no longer go thru the moderator? thanks, tob On Feb 12, 9:26 am, tony obrien tobsourcecode...@gmail.com wrote: Hi, I have been attempting to operate within the android-developers and android-beginners Groups. I understand that new members are moderated, and completely agree with the concept. But to date, NONE of my posts have appeared. Is this normal? I am a new developer (thus the groups I am trying to participate in) and would *really* like to get active. Anything you can do to hasten my acceptance would be greatly appreciated. thanks, tony obrien -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: New sales have come to a halt Re: Developer console stopped updating?
Oh yes and i forgot : www.androlib.com now lets you register as the developper of an app. You can then add a longer description which I don't find that useful, but you can see all the comments made by people on your apps on all languages. I find that absolutely amazing that this was not build-in on the developper console :s Yahel On 13 fév, 09:44, Hekki kaye...@gmail.com wrote: Hi all, I always considered the developper consolel too be just a shameless, wrote under-a-day, new intern-assignement, we're way behind schedule, kind of way to put some apps on the market. For the first two weeks I thought it was normal, then I thought nobody works on that, then now I know : It's the lamest tool any developper for any platforms as ever had :S But as soon as you just see it for what it is, an simple access to the market for your app, then it's ok. We just have to find others ways to know what's happening with our apps. I personnaly use flurry(flurry.com) which gives analytics and I believe Admob does as well. Of course if you're on the race to be in the top 25, then it's a real problem that your downloads are not counted...For others, well, not so much :D Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: No light sensor and/or proximity sensor detected on Hero?
ell that may be your problem.. what makes you think the Proximity sensor app you downloaded uses the Light sensor? On Feb 12, 6:07 am, mileoresko mileore...@gmail.com wrote: Hi Simon, sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT) returns: null On Feb 12, 2:12 am, Simon simon.drab...@gmail.com wrote: What is the result of calling sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT) ? -- Simon -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to start an Activity from a Service and getting a result from it
OK. I'll be explain my needs: I'm the author of AnySoftKeyboard (http:// softkeyboard.googlecode.com). The reason I made this keyboard, is to provide alternative layouts in the on-screen keyboard (e.g., Hebrew, Russian, DVORAK, etc. and of course, qwerty). But the keyboard APK gets bloated with all the layouts, and dictionaries etc So, I wanted to move all layouts to external packages: one layout (or several) per package. All the data I need to create a layout are the resource IDs of the layout, the dictionary and several other stuff, all of which can be retrieved using a ContentProvider. But I need the ContentProvider's URI. So I thought that starting an Activity and getting a result from it (startActivityForResult call) will be perfect for me. I do not need any UI to popuup (actually, I prefer that none will), I get need to get some data from the external package. So, these are my needs. Anyone can suggest a way? Thanks, Menny On Feb 12, 10:35 am, Kevin Duffey andjar...@gmail.com wrote: The whole purpose of a service is to stay in the background doing something, so not sure why you would want to display a UI in a non-UI based app. As Dianne said, post a notification that shows up on the status bar... when the user slides it down and clicks on it, that can launch an activity... which can then bind to the service to pass it info if need be. I'd still argue that would not be a good idea either. Can you elaborate on why you need some user interaction with your service.. is it something that can't be, perhaps set in a user preferences within an activity that the user launches the first time (or later to change settings)? On Thu, Feb 11, 2010 at 7:53 PM, Dianne Hackborn hack...@android.comwrote: You can't do this, nor should you. This would pop your UI in front of the user, disrupting whatever they are doing. This is highly discouraged. The proper way to do this is to post a notification, which the user can respond to when desired and can cause your own activity to be launched, which can then launch the other activity. On Thu, Feb 11, 2010 at 11:17 AM, Menny menn...@gmail.com wrote: Hi, I have a Service which needs to receive data from external packages. So, to locate the data providing external packages, I use activity- filter and PackageManager.queryIntentActivities function to locate the interesting packages. Now, from each such package, I need to get a ContentProvider URI. So I want to start the external Activity and the external activity will return a result to my service - something like startActivityForResult. The problem is that there is no way to call startActivityForResult from a Service, only Activity can do that, and my project does not have any Activity, and probably can't show UI for the user. The bottom line: Can anyone suggest a way to get ContentProvider URI from an external package, while my package has only a Service? Thanks, Menny. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.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: No light sensor and/or proximity sensor detected on Hero?
I used the ddms tool, and I am not sure what the Proximity Sensor app uses. As far as I can see it reads something from a file, then does some character decoding and stuff like that, so I don't think it uses the SensorManger API at all. Nonetheless, I would like to use the SensorManager API to fetch data from the Light Sensor. If that is not possible, I would like to know why it isn't. If there is an alternative way to access this sensor's readings, I would appreciate if someone could share it with me. Thanks On Feb 13, 5:02 pm, Simon simon.drab...@gmail.com wrote: ell that may be your problem.. what makes you think the Proximity sensor app you downloaded uses the Light sensor? On Feb 12, 6:07 am, mileoresko mileore...@gmail.com wrote: Hi Simon, sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT) returns: null On Feb 12, 2:12 am, Simon simon.drab...@gmail.com wrote: What is the result of calling sensorManager.getDefaultSensor(Sensor.TYPE_LIGHT) ? -- Simon -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] is charset decoding terminal dependant?? (UTF8/iso-8859-1 question)
Hello, I'm having troubles to correctly display strings with é è ... characters extracted from an html page (iso-8859-1). I am reading the html page as iso-8859-1 (using xerces XMLInputSource(null, null, null, myHTTPRequestContent, iso-8859-1), searching and extracting some specific strings with a nekohtml sax filter, then display the result in some view with something like: myString.getBytes(iso-8859-1) This is working pretty good on some devices, but in some other, like all my AVD, the french é è etc. characters are incorrectly displayed. More strangely, it is working on my HTC Hero, but not on my wife's own HTC Hero (not bought at same place). I tried to change the locale to french on the AVD but it did not changed anything. On these devices, it seems that using directly myString ( or myString.getBytes(UTF8) ) is correct. I see other applications that seems to handle this issue by providing an option force UTF8, but i would prefer definitly a generic one! Any clue? -- Thierry. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Help needed with parsing some XML data !
Hi, I have a similar problem. I am parsing iso-8859-1 html page with a sax parser but having trouble to display it on _some_ devices (characters é è ... are replaced by random symbols). On some devide i have to use myString.getBytes(iso-8859-1) to display it correctly, and on some other devices, myString will be displayed correctly. The best solution i cold ifnd so far is to provide a user option like force utf8 or force iso-8859-1 that the user can check if having problem. Thierry. 2010/2/4 MobDev developm...@mobilaria.com Well, to be honest your first idea was also mine :P So I already looked via Google but to be honest I haven't found that many clear discussions/ explanations... I also tried idea 2 and this is what I got : Congratulations The document located at http://x was successfully checked as well-formed XML. This means that we were not able to determine the exact document type, but that the document passed the XML well- formedness syntax check. If you wish to wish to perform formal validation of the document, you can use the Document Type: option of the validator. But also this has been found, even though I do not know how important this is : The DOCTYPE Declaration was not recognized or is missing. This probably means that the Formal Public Identifier contains a spelling error, or that the Declaration is not using correct syntax, or that your XML document is not using a DOCTYPE Declaration. Validation of the document has been skipped, and a simple check of the well-formedness of the XML syntax has been performed instead. Als, just to point out, at this point i CAN read out the XML stream by using the Xml.parse(is, Xml.Encoding.ISO_8859_1, new ExampleHandler(myAdapter)); method... The only problem that remains is when I try to write on-screen the values... Btw, is there a way to trasform such a String (for example from a Country ID=2 CName=Åland eilanden/ tag) to utf-8 ? I have experienced such a problem on the iPhone some time ago, it also received the data as ISO-8859-1 but the STring had to be encoded to UTF8 to be shown correctly onscreen On 4 feb, 11:47, Frank Weiss fewe...@gmail.com wrote: I have two ideas for you, Mobdev: 1) Google for not well-formed (invalid token) and see what other people have found regarding this error. 2) Go to validator.w3.org and see if the XML file in question is indeed valid or not. Please let us know what you find out. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Thierry. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Hey Mr or Ms Moderator...
I'm in the same boat. Hoping, but not expecting to see this reply posted. On Feb 13, 7:07 am, tony obrien tobsourcecode...@gmail.com wrote: So , Yes, This One did appear in the group! Has anyone gotten a feel for when/how-many/etc posts before you no longer go thru the moderator? thanks, tob On Feb 12, 9:26 am, tony obrien tobsourcecode...@gmail.com wrote: Hi, I have been attempting to operate within the android-developers and android-beginners Groups. I understand that new members are moderated, and completely agree with the concept. But to date, NONE of my posts have appeared. Is this normal? I am a new developer (thus the groups I am trying to participate in) and would *really* like to get active. Anything you can do to hasten my acceptance would be greatly appreciated. thanks, tony obrien -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with ListActivity in TabActivity
There was something wrong in the manifest file and this was causing the problem. The code which I originally posted works now. Mark and TreKing thank you for your replies. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Force Close just restarts the app?
I've noticed that whenever I introduce some new awful bug to my app and it crashes, Android just keeps starting it up over and over again. I eventually have to hit the dial button on the phone just to make my app lose focus. I searched this group's posts and the developer documents... I can't find anything about this. Is this usual behavior? If so, is there some way to disable it? Maybe it's just my coming from a desktop background, but I kind of think that when something is closed, it should stay closed, especially if the reason it was closed was that it crashed. And of course, I hope my final app never force closes, but with all the different hardware you never know... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Hey Mr or Ms Moderator...
I can comment on how the groups system works in general but not specifically how this group is handled... Usually, when a new member makes a valid post, the option to always allow is selected which not only posts the message but also takes the new member off of moderation. If the post is iffy then it may be allowed, removed or posted. Removed or posted doesn't take the member off of moderation. If a message is off topic, the choices are to remove the message or mark it as spam. A spam selection both removes the message and bans the member. I moderate on the maps forum, that's how we handle it. This forum is probably handled in a similar manner. One thing to take into consideration is how long it takes for a moderator to get to your message. Many members post a message, it doesn't show immediately, then they post it again two, three even more times hoping that somehow it will get through but all that does is fill the moderation queue up with duplicate messages. Once you make a post, you'll just have to wait for one of the moderators to get around to releasing it. Remember, forum moderation isn't their primary or only job. Be patient and your message will get posted eventually, probably within a day or so. -John Coryat -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: sending scancode values from linuxapplication (using sendevent)
http://pdk.android.com/online-pdk/guide/keymaps_keyboard_input.html Check keyevent.cpp file also. Check this out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Extended Resources Strategy
Hey guy, I was wondering if some of the experts out there could help me with an extended resource strategy? I'm interested to hear about some of the accepted best practices that everyone is using to tackle some of the issues that arise when you've got a ton of graphics/resources. I just recently upgraded all the resources in my application to have separate hdpi and mdpi graphics. After struggling with and figuring out the dpi-based methodology that android employs I have to say that I'm very impressed with the design. The application looks absolutely fantastic and renders great on a number of devices. Really not that much additional coding once you get it all figured out. The problem I have now is that my application is over 4mb. The application is heavily PNG driven and, even after punypng* optimizing everything, it is still a huge amount of graphics. There are over 150 different icons and headers used in the application. When you add another set for high resolution, you're looking at over 300 images that drive the user experience. Currently, everything is thrown in the /res folder and managed from there through a lookup dictionary. Functionally it works 100%, but I'm worried about the massive amount of transfer time when people upgrade. Has anyone tried breaking out the images and then downloading those separately from the main application? What I'd like to do is publish the APK to the market and have it managed as usual. Then, depending on the device, I'd like to go to an S3 store and download a ZIP of the graphics. Once the download was complete (1.3mb for hdpi, 500k for mdpi) I would like to move the graphics to the storage card and unzip them there, referencing them from the main application on the card. Is this a good strategy? Am I missing anything regarding the auto- scaling and such? Other than the various synchronization issues does anyone see any problems with this approach? Would there be a noticeable performance hit loading the graphics from the SD Card as opposed to memory? Does Android include native zip/unzip libraries? Thanks for all your help and input! Evan Ruff *best optimization tool on the web: http://www.gracepointafterfive.com/punypng/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] MapView Overlay that does always keeps an item selected?
On Sat, Feb 13, 2010 at 8:31 AM, Fabian Sturm f...@rtfs.org wrote: I want to add an ItemizedOverlay to a MapView that always keeps one OverlayItem as the selected one. Are you sure you want to do this? This goes against the standard behavior of deselecting when clicking somewhere on the map (possible to remove a popup or other obstructing view). But if you really want to... But right now, whenever I tap on the map and not hitting a marker, the last selected item will get deselected. But I always want to keep the last item selected until a new one is hit. I already tried to intercept e.g. onTap, but this only lets me completely disable the tap handling. Any suggestions what to do about this? Keep track of the last selected item. In onTap() if the currentFocus() is null, setFocus() to the last selected item you saved. If it's not null, update your reference. You can also use the same idea but using the OnFocusChangeListener on the ItemizedOverlay to determine if a new item has been focuses or not. - 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: adb can't list my attached device
Its possible that the server is not running or there is some error w.r.t. it.U can try : adb kill-server adb start-server commands to restart it. This works for HTC phones and the emulator. On Feb 12, 4:29 am, zeeshan genx...@gmail.com wrote: Hi Dear, i am trying to install an app to my Android Sony Ericsson Xperia device but not able to connect it to adb. i can access phone's sdcard drive in windows but adb devices command doesn't show any device connected, not even through eclipse. i figured out that i need to install device driver. tried android usb driver but it doesn't seem to pick up for Xperia. could anyone guide how can i connect my device to adb? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Recording into Direct ByteBuffer with offset
Hi, Is there a way to capture the audio using AudioRecord or any other API into a Direct ByteBuffer created using ByteBuffer.allocatedirect call with an offset? From the documentation it is not clear that at which offset, calling the following method, will place the data: audiorecord.read(directbytebuffer, size); I would appreciate any help, Thanks, Divkis -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Is there any changes in crop image activity
Hi, We are facing problem with cropimage activity, is there any changes? it gives error related to permission. java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.EDIT dat=content:// media/external/images/media/12 cmp=com.android.camera/.CropImage (has extras) } from ProcessRecord{43b72040 374:com.abc/10028} (pid=374, uid=10028) requires null -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Broken Meshes / not synchronous while rendering GlSurfaceView
Thank you for your hints. I already reposition to 0 in my getBuffer methods similar to this: public Buffer getBufferVtx() { m_VtxBuffer.position(0); return m_VtxBuffer; } Also, the buffers do not get recycled between glDrawElements calls. What did you mean with this : Another rough one was that in Android 1.5 putting an array into a buffer using a non-zero offset into the array to start from doesn't work. Works in later versions of Android, however. I am not using multiplexed arrays, thus each array starts at index 0 (for color, vertices and texcoords). The data it self is absolutely fine - I validated this in my PC version. Is there any way to force that the GL interface on Android has rendered all data provided during the OnDraw event of the render? How bad/important are the clientstates (glEnableClientState) on Android? Can I recycle the ByteBuffers every frame or should I have several that get swapped each frame - I`ve read somewhere that GlSurfaceView gets double-buffered - maybe I simply change the bytebuffers in an OnDraw call where it gets used by a native render call? On 13 Feb., 07:24, Lance Nanek lna...@gmail.com wrote: I haven't run into anything like that myself. I do often run into issues that can cause the data to be incorrectly offset or otherwise messed up, however, which might look similar. The position of the buffer is important when you call glVertexPointer, for example. So if the way you filled the buffer changed the position, it has to be rewound or otherwise set back to where you want it before you call glVertexPointer. Another rough one was that in Android 1.5 putting an array into a buffer using a non-zero offset into the array to start from doesn't work. Works in later versions of Android, however. Another issue is that the way the glVertexPointer call works is that it doesn't consume the actual data. It is just setting the pointer to the data. So changing the data before your other calls actually cause it be used later on would cause trouble. On Feb 12, 5:02 am, Clankrieger tob...@googlemail.com wrote: Hi, I got an issue while rendering a number of meshes on aGlSurfaceView renderer: The meshes are sometimes broken or are not updated on screen during my render call. The whole 1.6 application is running single threaded, rendering is done with vertexpointers like this: glVertexPointer(3, GL10.GL_FIXED, 0, (IntBuffer)_pMesh.getBufferVtx()); It looks a bit like the native interfaced get spammed by my render calls and do not get enough time to natively actually draw the data? It behaves completely the same on emulator and an actual phone. I am using the rendering pipeline on a PC project as well were is works absolutely fine. I begun feeling really desperate and dumb because I can't get this working properly since days. :( 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] is charset decoding terminal dependant?? (UTF8/iso-8859-1 question)
First, some clarifications. Locale has nothing to do with character encoding. Java stores all character data internally as 16-bit Unicode, regardless of locale. I suspect that myString.getBytes(iso-8859-1) is erroneous. I'm assuming that myString is of type java.lang.String. What are you doing with the result and why do you want to encode a sequence of Unicode characters back to ISO-8859-1 (Latin1)? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Force Close just restarts the app?
What generally happen when a process crashes is that it is killed, the crashing activity removed, and then the system restarts the next thing on the activity stack. If you had an activity before that one on the stack then that activity will be restarted. This does allow you to write a pathological case where you have one activity, that starts another, and the second activity crashing during initialization. That activity will be removed, the processed killed, and then the process restarted to display the previous activity which again launches the crashing activity. A future version of the platform will probably just remove all activities owned by the app when it crashes. This is a little excessive and I would like to be a little better about it, but yes this case is annoying. (For example if a browser has multiple activities for each tab/window, it would be unfortunately to lose all of them if you get a crash while using one of them.) On Sat, Feb 13, 2010 at 9:28 AM, Steeler cowboyd...@yahoo.com wrote: I've noticed that whenever I introduce some new awful bug to my app and it crashes, Android just keeps starting it up over and over again. I eventually have to hit the dial button on the phone just to make my app lose focus. I searched this group's posts and the developer documents... I can't find anything about this. Is this usual behavior? If so, is there some way to disable it? Maybe it's just my coming from a desktop background, but I kind of think that when something is closed, it should stay closed, especially if the reason it was closed was that it crashed. And of course, I hope my final app never force closes, but with all the different hardware you never know... -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it
This sounds much more complicated than you need. If you just want to load resources from another .apk, you don't need any code in it at all -- just use Context.createPackageContext() to get the context for the other package and load its resources from there. And if you don't need any UI, and really do need to execute code in the other .apk, then you said you already have a content provider so why not just call that? Or a broadcast receiver? Or a service? Also if you really do need to run the code in the other .apk, please consider using android:sharedUserId with all of your .apks and having them all run in the same process, so you don't need to spin up multiple processes. On Sat, Feb 13, 2010 at 8:06 AM, Menny menn...@gmail.com wrote: OK. I'll be explain my needs: I'm the author of AnySoftKeyboard (http:// softkeyboard.googlecode.com). The reason I made this keyboard, is to provide alternative layouts in the on-screen keyboard (e.g., Hebrew, Russian, DVORAK, etc. and of course, qwerty). But the keyboard APK gets bloated with all the layouts, and dictionaries etc So, I wanted to move all layouts to external packages: one layout (or several) per package. All the data I need to create a layout are the resource IDs of the layout, the dictionary and several other stuff, all of which can be retrieved using a ContentProvider. But I need the ContentProvider's URI. So I thought that starting an Activity and getting a result from it (startActivityForResult call) will be perfect for me. I do not need any UI to popuup (actually, I prefer that none will), I get need to get some data from the external package. So, these are my needs. Anyone can suggest a way? Thanks, Menny On Feb 12, 10:35 am, Kevin Duffey andjar...@gmail.com wrote: The whole purpose of a service is to stay in the background doing something, so not sure why you would want to display a UI in a non-UI based app. As Dianne said, post a notification that shows up on the status bar... when the user slides it down and clicks on it, that can launch an activity... which can then bind to the service to pass it info if need be. I'd still argue that would not be a good idea either. Can you elaborate on why you need some user interaction with your service.. is it something that can't be, perhaps set in a user preferences within an activity that the user launches the first time (or later to change settings)? On Thu, Feb 11, 2010 at 7:53 PM, Dianne Hackborn hack...@android.com wrote: You can't do this, nor should you. This would pop your UI in front of the user, disrupting whatever they are doing. This is highly discouraged. The proper way to do this is to post a notification, which the user can respond to when desired and can cause your own activity to be launched, which can then launch the other activity. On Thu, Feb 11, 2010 at 11:17 AM, Menny menn...@gmail.com wrote: Hi, I have a Service which needs to receive data from external packages. So, to locate the data providing external packages, I use activity- filter and PackageManager.queryIntentActivities function to locate the interesting packages. Now, from each such package, I need to get a ContentProvider URI. So I want to start the external Activity and the external activity will return a result to my service - something like startActivityForResult. The problem is that there is no way to call startActivityForResult from a Service, only Activity can do that, and my project does not have any Activity, and probably can't show UI for the user. The bottom line: Can anyone suggest a way to get ContentProvider URI from an external package, while my package has only a Service? Thanks, Menny. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- 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
Re: [android-developers] Re: Dev Tools app crashes on entering Dev Settings menu (htc tattoo)
The source code is in the open source tree in the development project under apps/Development. You can build and modify it. You can also look at how it is poking things to get the specific features you want and write your own app to do that. (But please if you are using non-public APIs do not put such apps up on market.) On Sat, Feb 13, 2010 at 4:07 AM, Dan S danstow...@gmail.com wrote: This is pretty bad news for me - I'd really like to be able to debug on-device, monitor CPU usage etc. Is there any workaround (e.g. disable certain app functionality, use a different version)? I can't afford multiple devices. If it emerges that the Dev Tools app simply cannot be run on this device then maybe we should build up a community list of devices which are known to work / not work with the app. Dan On Feb 13, 2:31 am, Dianne Hackborn hack...@android.com wrote: The app uses private APIs, so may not be compatible with a particular device. On Sun, Jan 31, 2010 at 11:33 PM, Dan S danstow...@gmail.com wrote: Hi - On a HTC Tattoo (android 1.6) I install the Dev Tools app by copying it out of an emulated 1.6 machine. Opening the app works, but then when I go into the Development Settings menu it crashes with The application Dev Tools (process com.android.development) has stopped unexpectedly. Please try again. Using adb logcat I got the stack trace given below, suggesting a security restriction. Is this fixable? Thanks Dan D/WindowManager( 81): interceptKeyTq event=android.view.rawinputev...@437f08f0 keycode=0 screenIsOn=true keyguardShowing=false D/KeyInputQueue( 81): DebugMonitor keycode=0 value=1 D/WindowManager( 81): interceptKeyTq event=android.view.rawinputev...@437f08f0 keycode=0 screenIsOn=true keyguardShowing=false D/KeyInputQueue( 81): DebugMonitor keycode=0 value=0 I/ActivityManager( 81): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.TEST] flg=0x1000 cmp=com.android.development/.DevelopmentSettings } W/ServiceManager( 81): Permission failure: android.permission.HARDWARE_TEST from uid=10049 pid=436 E/SurfaceFlinger( 81): Permission Denial: pid=436, uid=10049 D/AndroidRuntime( 436): Shutting down VM W/dalvikvm( 436): threadid=3: thread exiting with uncaught exception (group=0x4001db88) E/AndroidRuntime( 436): Uncaught handler: thread main exiting due to uncaught exception E/AndroidRuntime( 436): java.lang.RuntimeException: Unable to resume activity {com.android.development/ com.android.development.DevelopmentSettings}: java.lang.SecurityException E/AndroidRuntime( 436):at android.app.ActivityThread.performResumeActivity(ActivityThread.java: 2931) E/AndroidRuntime( 436):at android.app.ActivityThread.handleResumeActivity(ActivityThread.java: 2953) E/AndroidRuntime( 436):at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2489) E/AndroidRuntime( 436):at android.app.ActivityThread.access $2100(ActivityThread.java:123) E/AndroidRuntime( 436):at android.app.ActivityThread $H.handleMessage(ActivityThread.java:1843) E/AndroidRuntime( 436):at android.os.Handler.dispatchMessage (Handler.java:99) E/AndroidRuntime( 436):at android.os.Looper.loop(Looper.java: 123) E/AndroidRuntime( 436):at android.app.ActivityThread.main (ActivityThread.java:4321) E/AndroidRuntime( 436):at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 436):at java.lang.reflect.Method.invoke (Method.java:521) E/AndroidRuntime( 436):at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:791) E/AndroidRuntime( 436):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549) E/AndroidRuntime( 436):at dalvik.system.NativeStart.main (Native Method) E/AndroidRuntime( 436): Caused by: java.lang.SecurityException E/AndroidRuntime( 436):at android.os.BinderProxy.transact (Native Method) E/AndroidRuntime( 436):at com.android.development.DevelopmentSettings.updateFlingerOptions (DevelopmentSettings.java:246) E/AndroidRuntime( 436):at com.android.development.DevelopmentSettings.onResume (DevelopmentSettings.java:169) E/AndroidRuntime( 436):at android.app.Instrumentation.callActivityOnResume(Instrumentation.java: 1225) E/AndroidRuntime( 436):at android.app.Activity.performResume (Activity.java:3559) E/AndroidRuntime( 436):at android.app.ActivityThread.performResumeActivity(ActivityThread.java: 2917) E/AndroidRuntime( 436):... 12 more -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to
Re: [android-developers] Re: onActivityResult is called immediately after startActivityForResult
The action or category (or data or mime type) in the launching intent doesn't matter at all for what will happen with the result. When you are in your second activity, you can try adb shell dumpsys activity to see the current activity stacks (they are the first thing printed; there is a lot more). Your sub-activity should be on top, and it will include where its result will go to, if there is a target. The code you posted look okay to me, but you didn't include your code that actually starts the activity and that is the most likely culprit -- if you use startActivityForResult() you should be guaranteed to get -some- result back, no matter what. On Sat, Feb 13, 2010 at 4:36 AM, WirelSys panka...@gmail.com wrote: I have problem too while attempting to return a result from my child activity. From the logs it appears that my sub-activity does execute setResult() and finish(). However, it still fails to execute onActivityResult in the main (calling) activity. -- Here is the Manifest code for the child activity: !-- This activity displays the 'About' screen to the user. -- activity android:launchMode=standard android:name=.TFTAbout android:label=@string/about /activity The child activity's code: @Override public void onCreate( Bundle savedInstanceState ) { Log.d( LOG_TAG, onCreate: START ); super.onCreate( savedInstanceState ); /* Set what to do when the user presses a key but the key press is * not handled by the application. */ setDefaultKeyMode( DEFAULT_KEYS_DISABLE ); /* Connect the appropriate resource to this activity. */ setContentView( R.layout.about ); /* Define the click listener for the Close button. */ Button b = (Button) findViewById( R.id.bt_close ); b.setOnClickListener ( new View.OnClickListener() { /** Implement the OnClickListener callback to handle the press of a button. */ public void onClick( View v ) { Log.d( LOG_TAG, bt_close.onClick: START. ); setResult( 2, (new Intent()).setAction(About activity has finished!) ); Log.d( LOG_TAG, onClick: 'Close' button pressed; returning to calling activity. ); finish(); Log.d( LOG_TAG, bt_close.onClick: END. ); } } ); } And the parent activity's code: @Override protected void onActivityResult( int request_code, int result_code, Intent i ) { Log.d( LOG_TAG, onActivityResult: START. ); super.onActivityResult( request_code, result_code, i ); /* Use the request code to select between multiple child activities we * may have started. Here there is only one thing we launch. */ if ( request_code == Activity.RESULT_FIRST_USER ) { Log.d( LOG_TAG, onActivityResult: 'About' activity has returned. ); } } Logcat: 02-13 13:55:42.057: DEBUG/TFT(6716): onOptionsItemSelected: 'About' item selected. 02-13 13:55:42.070: INFO/ActivityManager(564): Starting activity: Intent { comp={com.wirel.tft/com.wirel.tft.TFTAbout} } 02-13 13:55:42.146: DEBUG/TFTAbout(6716): onCreate: START 02-13 13:55:42.178: DEBUG/TFTAbout(6716): onCreate: END 02-13 13:55:42.326: INFO/ActivityManager(564): Displayed activity com.wirel.tft/.TFTAbout: 254 ms 02-13 13:55:43.089: DEBUG/TFTAbout(6716): bt_close.onClick: START. 02-13 13:55:43.097: DEBUG/TFTAbout(6716): onClick: 'Close' button pressed; returning to calling activity. 02-13 13:55:43.106: DEBUG/TFTAbout(6716): bt_close.onClick: END. -- The sub-activity has it's lauchMode set to 'standard'. I confirmed that I am passing a valid request code ( which is 0 ). Also I ensured that the sub-activity's action is neither ACTION_MAIN or ACTION_VIEW as is stated in the documentation for startActivityForResult. Can someone please help? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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
Re: [android-developers] is charset decoding terminal dependant?? (UTF8/iso-8859-1 question)
Thanks for your reply. yes this is a java.lang.String. Indeed all i want to do is to correctly display the string in some View. Ok i got the point about java String being 16 bits. If so, and as it is not well displayed, i guess this means it was not properly created at first. Maybe this issue is more related to my (bad) use of xerces when i initialize the xerces XMLDocumentFilter object. XMLParserConfiguration parser = new HTMLConfiguration(); parser.setDocumentHandler(filter); // filter is a XMLDocumentFilter XMLInputSource source = new XMLInputSource(null, null, null,myHttpResponse.getEntity().getContent(), iso-8859-1); parser.parse(source); I will check more in detail in xerces ressources, this probably is not an Android related topic after all. Thierry. 2010/2/13 Frank Weiss fewe...@gmail.com First, some clarifications. Locale has nothing to do with character encoding. Java stores all character data internally as 16-bit Unicode, regardless of locale. I suspect that myString.getBytes(iso-8859-1) is erroneous. I'm assuming that myString is of type java.lang.String. What are you doing with the result and why do you want to encode a sequence of Unicode characters back to ISO-8859-1 (Latin1)? -- You received this message because you are subscribed to the Google Groups Android Developers group. 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] selecting language from within the app rather than by locale of the system settings
Hi, Any help on this would be much appreciated. I would like to give the users of my app the possibility of selecting a language from within the application. All languages are supplied the standard way via the values-?? resource directory. However, I don't want Android to select which resource directory to use but let the user decide instead. Any ideas how to accomplish that? The rationale for this: - some languages are not supported by the Android framework and can not be selected as a locale via the system settings - if you buy a phone in Spain, it will typically not have a system setting for Russian language, if you purchase in Russia, you will have that setting. So a Russian person in Spain would prefer using the Russian language included with the app, but can't access it thanks for any suggestions, Martin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Select wallpaper from..
Use PackageManager.setComponentEnabledSetting() to disable that activity when you don't want it displayed. On Sat, Feb 13, 2010 at 1:44 AM, Manjunatha M man...@gmail.com wrote: yes.. I want that to be configurable. sometimes to show and sometimes not to show in the list of select wallpaper from On Sat, Feb 13, 2010 at 12:07 PM, venkat ranjit ranjit0...@gmail.comwrote: Hi manjuntha ur question is not clear , tell me clearly, in my understanding u want shortcut of ur activity (custom activity). in wallpaper , i want clarity k Regards, Ranjit On Sat, Feb 13, 2010 at 10:03 AM, Manjunatha M man...@gmail.com wrote: Hi Folks, I want to show my Activity in HomeScreen-Menu Press-Wallpapers. This should be dynamic, so that, for some check this should show, and otherwise it should not show. Could anyone please help on this?? -- Regards, Manjunatha -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards, Manjunatha -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: unable to bind to a service
If you haven't declared an intent-filter in your manifest, then the component will be private to that .apk. You can make it public with either android:exported=true or defining an intent-filter. HOWEVER.. PLEASE be super careful about doing this. Did you realize that you are in the process of creating a nice big security hole, where you let any application get the user's current location without needing permission? Why are you doing this? The location APIs let applications get the current location. Why are you republishing that information in your own service? And why does this need to be in a separate .apk? My first instinct is for you to just not do this. Please. If you really think you need to do it, you need to seriously think about what you are doing with security. You would be very much best off putting all of this stuff in one .apk so you don't leak information to others. If for some reason you really think you need to have this separate (and take the overhead of multiple processes and all that), then you need to step back and take serious consideration of security and applying permissions to enforce it, how your .apks are signed, install ordering issues with granting permissions, etc. 2010/2/13 dane131 orestis...@gmail.com anybody help? On 13 Φεβ, 00:44, dane131 orestis...@gmail.com wrote: hallo i have aservicethat provides gps coordinates.Here is the code : package app.suite.gps; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import app.suite.gps.IGps; public class Service_impl extendsServiceimplements LocationListener{ double lat=37.96568 ; double lng=23.71382; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 500.0f, this); return mBinder; } private final IGps.Stub mBinder = new IGps.Stub() { @Override public double getLat() throws RemoteException { return lat; } @Override public double getLng() throws RemoteException { return lng; } }; public void onLocationChanged(Location location) { if (location != null) { lat = location.getLatitude(); ; lng = location.getLongitude(); } } @Override public void onProviderDisabled(String arg0) { // TODO Auto-generated method stub } @Override public void onProviderEnabled(String arg0) { // TODO Auto-generated method stub } @Override public void onStatusChanged(String arg0, int arg1, Bundle arg2) { // TODO Auto-generated method stub } } i want tobindto thisservicefrom another application which uses the following piece of code : package app.suite.client; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Client extends Activity { IGps mservice=null; ServiceConnection conn=new ServiceConnection() { @Override public void onServiceDisconnected(ComponentName name) { Log.e(TAG,DISCONNECTED); } @Override public void onServiceConnected(ComponentName name, IBinderservice) { mservice=IGps.Stub.asInterface(service); try { double a=mservice.getLat(); String a_str=Double.toString(a); Log.e(TAG,a_str); } catch(RemoteException e) { } } }; public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.main); Intentservice= new Intent(); service.setComponent(new
Re: [android-developers] MapView Overlay that does always keeps an item selected?
Hi, thanks for the hint! I already tried to implement this, but am now stuck with that setFocus works, but it does not raise the OverlayItem to the top. As is done if I select the item with a tap. So is there any chance to really select an item and not merely focusing it? Are you sure you want to do this? This goes against the standard behavior of deselecting when clicking somewhere on the map (possible to remove a popup or other obstructing view). But if you really want to... The reasoning behind this is, that I don't have a popup when I select an item. But I have a statusbar which is permanently visible and shows details to the selected item. Therefore it makes sense to always have one item selected. Thanks a lot, Fabian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Force Close just restarts the app?
I only have one activity in this app, but it still does it. Wouldn't a better way to go be just to have a manifest attribute for each activity that says whether it should be removed, restarted, or left alone? On Feb 13, 1:31 pm, Dianne Hackborn hack...@android.com wrote: What generally happen when a process crashes is that it is killed, the crashing activity removed, and then the system restarts the next thing on the activity stack. If you had an activity before that one on the stack then that activity will be restarted. This does allow you to write a pathological case where you have one activity, that starts another, and the second activity crashing during initialization. That activity will be removed, the processed killed, and then the process restarted to display the previous activity which again launches the crashing activity. A future version of the platform will probably just remove all activities owned by the app when it crashes. This is a little excessive and I would like to be a little better about it, but yes this case is annoying. (For example if a browser has multiple activities for each tab/window, it would be unfortunately to lose all of them if you get a crash while using one of them.) On Sat, Feb 13, 2010 at 9:28 AM, Steeler cowboyd...@yahoo.com wrote: I've noticed that whenever I introduce some new awful bug to my app and it crashes, Android just keeps starting it up over and over again. I eventually have to hit the dial button on the phone just to make my app lose focus. I searched this group's posts and the developer documents... I can't find anything about this. Is this usual behavior? If so, is there some way to disable it? Maybe it's just my coming from a desktop background, but I kind of think that when something is closed, it should stay closed, especially if the reason it was closed was that it crashed. And of course, I hope my final app never force closes, but with all the different hardware you never know... -- You received this message because you are subscribed to the Google Groups Android Developers group. 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.- Hide quoted text - - Show quoted text - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Pinch-zooming on maps gives no feedback
I just tested this out, and it seems like it does work (that is, draw() IS getting called after a zoom). And, it doesn't seem to be hogging on system resources, calling draw repeatedly. So all in all, I'd say it's a workable workaround, though a cleaner interface in the API would be more convenient. Thanks! On Feb 12, 2:02 am, Hugo Visser botte...@gmail.com wrote: As a work around, you don't need to poll...You can register an overlay that doesn't draw anything and checks the current zoom level against the previous draw zoom level and take it from there...On zooming there will be a redraw of the map so it should work out fine. On Feb 11, 8:23 pm, CaptainSpam captains...@gmail.com wrote: Ever since the update that allows multitouch gestures on the Maps app (pinch-zooming, mostly), I've noticed that apps using the Google Maps API also seem to automatically support it. That, in and of itself, is good. Convenient! However, my app has a need to know when the user has zoomed the map. As it stands now, I've just been watching over the only way this has been possible before: The zoom control buttons. It appears that there's no callback to know when the map has been zoomed (only MapController commands to MAKE the map zoom), so developers don't appear to have any way of knowing if the zoom level was changed outside of their control (i.e. pinch-zooming) apart from constantly polling the MapView. Is there any good way around this, or is an update like this in the cards for the API? Or am I just missing something obvious? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Picture while starting app
Hello everybody, I´ve got a problem with my current app. I want to see a picture while starting the app. I´ve already tried to use use a while-method but if I launch the app it ´ll wait a few seconds but it will not appear my picture. In a simple Java project I would use this command and I also don´t know what kind of command I´ll have to use to see the picture: public class waiting { public static void main(String[] args) { int seconds = 5; System.out.println(Waiting: + seconds); try { Thread.sleep(5000); } catch (InterruptedException e) {} System.out.println(Done); } } But if I use the command in Android it will not work!!! Do you know what to do? Please help me!!! With kind regards Viktor B. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] MapView Overlay that does always keeps an item selected?
Hmm ... it should, as the currently focused item should be drawn last (on top) by default. Maybe try invalidating the view after resetting the focus to force a redraw and see if that works? On Sat, Feb 13, 2010 at 2:37 PM, Fabian Sturm f...@rtfs.org wrote: Hi, thanks for the hint! I already tried to implement this, but am now stuck with that setFocus works, but it does not raise the OverlayItem to the top. As is done if I select the item with a tap. So is there any chance to really select an item and not merely focusing it? Are you sure you want to do this? This goes against the standard behavior of deselecting when clicking somewhere on the map (possible to remove a popup or other obstructing view). But if you really want to... The reasoning behind this is, that I don't have a popup when I select an item. But I have a statusbar which is permanently visible and shows details to the selected item. Therefore it makes sense to always have one item selected. Thanks a lot, Fabian -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- - 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] Picture while starting app
Nox wrote: In a simple Java project I would use this command and I also don´t know what kind of command I´ll have to use to see the picture: public class waiting { public static void main(String[] args) { int seconds = 5; System.out.println(Waiting: + seconds); try { Thread.sleep(5000); } catch (InterruptedException e) {} System.out.println(Done); } } Virtually none of that should be used in an Android application. Bear in mind that *nothing* you do in, say, onCreate() to affect the UI will take effect until *after you return from onCreate()*. Sleeping on the main application (UI) thread will only make things worse. Do you know what to do? No, because you haven't really defined the problem in Android terms. Saying I want to see a picture while starting the app leaves many possibilities. What is the trigger for making the picture go away? Is it a user event (e.g., a click)? Is it the passage of a fixed amount of time? Is it when something you are doing in a background thread (e.g., AsyncTask) completes? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to start an Activity from a Service and getting a result from it
I don't know what the other ContentProviders URI are. They can be anything, I want to release my keyboard service, and then release layouts as I need. This means that, somehow, the keyboard service needs to know which layout packages are installed on the device, and what are the URI of their content-providers. I don't want to use sharedUserId, since I want to give other developers the option to create their own layouts. On Feb 13, 9:36 pm, Dianne Hackborn hack...@android.com wrote: This sounds much more complicated than you need. If you just want to load resources from another .apk, you don't need any code in it at all -- just use Context.createPackageContext() to get the context for the other package and load its resources from there. And if you don't need any UI, and really do need to execute code in the other .apk, then you said you already have a content provider so why not just call that? Or a broadcast receiver? Or a service? Also if you really do need to run the code in the other .apk, please consider using android:sharedUserId with all of your .apks and having them all run in the same process, so you don't need to spin up multiple processes. On Sat, Feb 13, 2010 at 8:06 AM, Menny menn...@gmail.com wrote: OK. I'll be explain my needs: I'm the author of AnySoftKeyboard (http:// softkeyboard.googlecode.com). The reason I made this keyboard, is to provide alternative layouts in the on-screen keyboard (e.g., Hebrew, Russian, DVORAK, etc. and of course, qwerty). But the keyboard APK gets bloated with all the layouts, and dictionaries etc So, I wanted to move all layouts to external packages: one layout (or several) per package. All the data I need to create a layout are the resource IDs of the layout, the dictionary and several other stuff, all of which can be retrieved using a ContentProvider. But I need the ContentProvider's URI. So I thought that starting an Activity and getting a result from it (startActivityForResult call) will be perfect for me. I do not need any UI to popuup (actually, I prefer that none will), I get need to get some data from the external package. So, these are my needs. Anyone can suggest a way? Thanks, Menny On Feb 12, 10:35 am, Kevin Duffey andjar...@gmail.com wrote: The whole purpose of a service is to stay in the background doing something, so not sure why you would want to display a UI in a non-UI based app. As Dianne said, post a notification that shows up on the status bar... when the user slides it down and clicks on it, that can launch an activity... which can then bind to the service to pass it info if need be. I'd still argue that would not be a good idea either. Can you elaborate on why you need some user interaction with your service.. is it something that can't be, perhaps set in a user preferences within an activity that the user launches the first time (or later to change settings)? On Thu, Feb 11, 2010 at 7:53 PM, Dianne Hackborn hack...@android.com wrote: You can't do this, nor should you. This would pop your UI in front of the user, disrupting whatever they are doing. This is highly discouraged. The proper way to do this is to post a notification, which the user can respond to when desired and can cause your own activity to be launched, which can then launch the other activity. On Thu, Feb 11, 2010 at 11:17 AM, Menny menn...@gmail.com wrote: Hi, I have a Service which needs to receive data from external packages. So, to locate the data providing external packages, I use activity- filter and PackageManager.queryIntentActivities function to locate the interesting packages. Now, from each such package, I need to get a ContentProvider URI. So I want to start the external Activity and the external activity will return a result to my service - something like startActivityForResult. The problem is that there is no way to call startActivityForResult from a Service, only Activity can do that, and my project does not have any Activity, and probably can't show UI for the user. The bottom line: Can anyone suggest a way to get ContentProvider URI from an external package, while my package has only a Service? Thanks, Menny. -- You received this message because you are subscribed to the Google Groups Android Developers group. 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 -- Dianne Hackborn Android framework engineer hack...@android.com
Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it
Menny wrote: I don't know what the other ContentProviders URI are. Then don't use a ContentProvider. Follow Ms. Hackborn's directions instead and use Context.createPackageContext() and access the other APKs' resources that way. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Training in US: 8-12 February 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
Re: [android-developers] Re: How to start an Activity from a Service and getting a result from it
Menny wrote: I don't know what the other ContentProviders URI are. They can be anything, I want to release my keyboard service, and then release layouts as I need. This means that, somehow, the keyboard service needs to know which layout packages are installed on the device, and what are the URI of their content-providers. Another alternative is to still use Context.createPackageContext(), but primarily as a bootstrap. The APK would publish its content URI in a pre-determined resource (e.g., R.string.any_soft_keyboard_provider_uri), which you would then use. -- 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: unable to bind to a service
well ok i understand the risk..and i will change the architecture but anyway i have a problem to bind to a service of another apk even if its attribute is exported=true i wonder if i do someting wrong in my procedure: in the remote apk i generate an interface from an aidl file and make a service and with an anonymous class in it that extends MyInterface.Stub. In the client package i have an activity that has an object of type MyInterface (that is the mservice object of type IGps in the example above ) that i use it in order to call the methods exposed by my remote service.However i don't have visibility of that interface since it is in a remote package so i copy/paste the aidl from the remote package into my client package and generate the interface as well ( i also change the package name in the aidl file to that of my client package) so now i have visibility of the ineterface..but this does not seem to work ..do i make any mistake? On 13 Φεβ, 22:07, Dianne Hackborn hack...@android.com wrote: If you haven't declared an intent-filter in your manifest, then the component will be private to that .apk. You can make it public with either android:exported=true or defining an intent-filter. HOWEVER.. PLEASE be super careful about doing this. Did you realize that you are in the process of creating a nice big security hole, where you let any application get the user's current location without needing permission? Why are you doing this? The location APIs let applications get the current location. Why are you republishing that information in your own service? And why does this need to be in a separate .apk? My first instinct is for you to just not do this. Please. If you really think you need to do it, you need to seriously think about what you are doing with security. You would be very much best off putting all of this stuff in one .apk so you don't leak information to others. If for some reason you really think you need to have this separate (and take the overhead of multiple processes and all that), then you need to step back and take serious consideration of security and applying permissions to enforce it, how your .apks are signed, install ordering issues with granting permissions, etc. 2010/2/13 dane131 orestis...@gmail.com anybody help? On 13 Φεβ, 00:44, dane131 orestis...@gmail.com wrote: hallo i have aservicethat provides gps coordinates.Here is the code : package app.suite.gps; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import app.suite.gps.IGps; public class Service_impl extendsServiceimplements LocationListener{ double lat=37.96568 ; double lng=23.71382; @Override public IBinder onBind(Intent arg0) { // TODO Auto-generated method stub LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000L, 500.0f, this); return mBinder; } private final IGps.Stub mBinder = new IGps.Stub() { @Override public double getLat() throws RemoteException { return lat; } @Override public double getLng() throws RemoteException { return lng; } }; public void onLocationChanged(Location location) { if (location != null) { lat = location.getLatitude(); ; lng = location.getLongitude(); } } @Override public void onProviderDisabled(String arg0) { // TODO Auto-generated method stub } @Override public void onProviderEnabled(String arg0) { // TODO Auto-generated method stub } @Override public void onStatusChanged(String arg0, int arg1, Bundle arg2) { // TODO Auto-generated method stub } } i want tobindto thisservicefrom another application which uses the following piece of code : package app.suite.client; import android.app.Activity; import android.content.ComponentName; import android.content.Intent; import android.content.ServiceConnection; import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.TextView; public class Client
Re: [android-developers] Re: unable to bind to a service
dane131 wrote: do i make any mistake? That is difficult to answer, as remote services are difficult to debug via email. You should compare your implementation to others that demonstrably work. I would imagine there is a remote service sample in the SDK samples someplace -- search for AIDL files. Here are another pair of projects implementing a remote service and a client for it: http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/RemoteService/ http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/RemoteClient/ -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _Beginning Android_ from Apress Now Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Picture while starting app
I am guessing he wants a splash screen... show an image while he loads some data or something in the background.. then when all done, starts up and the image goes away. Do a search here for splash screen. There are plenty of examples that show how to do it. On Sat, Feb 13, 2010 at 1:24 PM, Mark Murphy mmur...@commonsware.comwrote: Nox wrote: In a simple Java project I would use this command and I also don´t know what kind of command I´ll have to use to see the picture: public class waiting { public static void main(String[] args) { int seconds = 5; System.out.println(Waiting: + seconds); try { Thread.sleep(5000); } catch (InterruptedException e) {} System.out.println(Done); } } Virtually none of that should be used in an Android application. Bear in mind that *nothing* you do in, say, onCreate() to affect the UI will take effect until *after you return from onCreate()*. Sleeping on the main application (UI) thread will only make things worse. Do you know what to do? No, because you haven't really defined the problem in Android terms. Saying I want to see a picture while starting the app leaves many possibilities. What is the trigger for making the picture go away? Is it a user event (e.g., a click)? Is it the passage of a fixed amount of time? Is it when something you are doing in a background thread (e.g., AsyncTask) completes? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.3 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.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: New sales have come to a halt Re: Developer console stopped updating?
I am curious why the heck Nexus 1 already got an update and yet Moto Droid, which is supposed to be an Android experience device STILL hasn't got the 2.1 update. There seems to be no communication what so ever from Moto about the update. We were told that within days after 2.1 came out we'd see it. Then we had strong rumors that it would be end of January. Now it's completely quiet with no info at all. Anyone heard about this supposed 2.1 update for Droid? I am fine if it takes another month if they are fixing issues, like the big problem with multi-touch.. but at least some for of communication would be nice. On Sat, Feb 13, 2010 at 7:19 AM, Hekki kaye...@gmail.com wrote: Oh yes and i forgot : www.androlib.com now lets you register as the developper of an app. You can then add a longer description which I don't find that useful, but you can see all the comments made by people on your apps on all languages. I find that absolutely amazing that this was not build-in on the developper console :s Yahel On 13 fév, 09:44, Hekki kaye...@gmail.com wrote: Hi all, I always considered the developper consolel too be just a shameless, wrote under-a-day, new intern-assignement, we're way behind schedule, kind of way to put some apps on the market. For the first two weeks I thought it was normal, then I thought nobody works on that, then now I know : It's the lamest tool any developper for any platforms as ever had :S But as soon as you just see it for what it is, an simple access to the market for your app, then it's ok. We just have to find others ways to know what's happening with our apps. I personnaly use flurry(flurry.com) which gives analytics and I believe Admob does as well. Of course if you're on the race to be in the top 25, then it's a real problem that your downloads are not counted...For others, well, not so much :D Yahel -- You received this message because you are subscribed to the Google Groups Android Developers group. 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: Broken Meshes / not synchronous while rendering GlSurfaceView
glFlush or glFinish might allow something like that: http://java.sun.com/javame/reference/apis/jsr239/javax/microedition/khronos/opengles/GL10.html#glFinish() http://java.sun.com/javame/reference/apis/jsr239/javax/microedition/khronos/opengles/GL10.html#glFlush() I've never had to use or look into them myself. Maybe because GLSurfaceView calls eglSwapBuffers between onDrawFrame calls, which does an implicit flush anyway, and I only modify the buffers pointed to by the pointer methods in those onDrawFrame calls right before use. Re the Android 1.5 issue, I was referring to this method: http://developer.android.com/intl/fr/reference/java/nio/IntBuffer.html#put%28int[],%20int,%20int%29 I use methods like that a lot because I benchmarked that it was faster to update the vales in an array and then put the array into a buffer than it was to put a lot of values into a buffer one by one. So, for example, I have an atlas texture generation script that also generates an array of all the texture coordinates my sprites might ever want. I tend to arraycopy whole sections of that array into other arrays or put them into the single shared texture buffer I use. Similarly, in the latest game I'm working on, all the positions for all the near screen sprites get set in one array which only gets put into the single shared vertex buffer they all use right before use in onDrawFrame. Using the same buffer for multiple entities allows you to use one draw command for each group of them that needs various state, like different blending functions, rather than one draw command for each of them. On Feb 13, 2:08 pm, Clankrieger tob...@googlemail.com wrote: Thank you for your hints. I already reposition to 0 in my getBuffer methods similar to this: public Buffer getBufferVtx() { m_VtxBuffer.position(0); return m_VtxBuffer; } Also, the buffers do not get recycled between glDrawElements calls. What did you mean with this : Another rough one was that in Android 1.5 putting an array into a buffer using a non-zero offset into the array to start from doesn't work. Works in later versions of Android, however. I am not using multiplexed arrays, thus each array starts at index 0 (for color, vertices and texcoords). The data it self is absolutely fine - I validated this in my PC version. Is there any way to force that the GL interface on Android has rendered all data provided during the OnDraw event of the render? How bad/important are the clientstates (glEnableClientState) on Android? Can I recycle the ByteBuffers every frame or should I have several that get swapped each frame - I`ve read somewhere that GlSurfaceView gets double-buffered - maybe I simply change the bytebuffers in an OnDraw call where it gets used by a native render call? On 13 Feb., 07:24, Lance Nanek lna...@gmail.com wrote: I haven't run into anything like that myself. I do often run into issues that can cause the data to be incorrectly offset or otherwise messed up, however, which might look similar. The position of the buffer is important when you call glVertexPointer, for example. So if the way you filled the buffer changed the position, it has to be rewound or otherwise set back to where you want it before you call glVertexPointer. Another rough one was that in Android 1.5 putting an array into a buffer using a non-zero offset into the array to start from doesn't work. Works in later versions of Android, however. Another issue is that the way the glVertexPointer call works is that it doesn't consume the actual data. It is just setting the pointer to the data. So changing the data before your other calls actually cause it be used later on would cause trouble. On Feb 12, 5:02 am, Clankrieger tob...@googlemail.com wrote: Hi, I got an issue while rendering a number of meshes on aGlSurfaceView renderer: The meshes are sometimes broken or are not updated on screen during my render call. The whole 1.6 application is running single threaded, rendering is done with vertexpointers like this: glVertexPointer(3, GL10.GL_FIXED, 0, (IntBuffer)_pMesh.getBufferVtx()); It looks a bit like the native interfaced get spammed by my render calls and do not get enough time to natively actually draw the data? It behaves completely the same on emulator and an actual phone. I am using the rendering pipeline on a PC project as well were is works absolutely fine. I begun feeling really desperate and dumb because I can't get this working properly since days. :( 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: Multitouch seems badly broken on Nexus One 2.1-update1
So Robert.. is this a platform issue in your mind.. being that it happens on all android devices currently regardless of manufacturer? Or is it a driver issue for each hand set and just oddly happens to be coincidental that various manufacturers have the exact same issue with multi-touch? I am sure what Diane says is accurate... but yet it seems odd that different manufacturers have the same problem. On a slightly different note.. what is the stance of the Android platform team as a whole towards game developers? By this I mean, if this is indeed an issue on different manufacturer's handsets.. is it important enough that game developers, which for sure will be a large segment of popularity for android as it is on iPhone.. can get this escalated enough to get some platform/driver developers looking into it and if possible, tap the community (such as Robert) to help, so we can figure out exactly what is going on? It just seems too crucial of an issue to overlook being that it directly makes it impossible as of now for game developers to really utilize multi touch. Robert (et all)... an app I want to eventually get around doing is a drum machine app.. with multiple drum pads. On the iPhone, an app called BeatMaker allows for 5 pads at once to be touched. Would this issue possibly make an app like this not work? I don't even know if Android can handle more than two touches at once.. but there are plenty of apps out there that will use more than two simultaneous touches at once. On Fri, Feb 12, 2010 at 4:20 PM, Robert Green rbgrn@gmail.com wrote: Ok if you guys want to see what I'm talking about, check out the app I just published called Multitouch Visible Test. Play around with that and you'll see the problems. If you're interested in developing a multitouch app, check that out first so that you know the limitations of the data you'll be working with. On Feb 12, 4:55 pm, Robert Green rbgrn@gmail.com wrote: Luke's code cleans up some basic stuff like gestures involving pinching but it can not fix the two independent point problem. Currently, even with his code which filters out some noise, it is impossible to have a reliable control system involving two independent virtual joysticks placed along the same axis. So many iPhone games have that and I was actually planning it for my new release but unfortunately it will not work. I'm talking about the controls where you've got a touchable joystick on the bottom left and another one on the bottom right. It's very common but currently impossible on Android because of the hardware (though I'd really like to see some raw data because looking through the core service classes, there is a LOT of difficult-to-read code that seems to hack up the values quite a bit). I'll wrote a littlemultitouchvisualizer kind of like Luke's but aimed more at showing what you can and can't do with a game control system. I'll post the APK so everyone can see what I'm talking about. Multitouchdefinitely works better on the Droid than on the HTC screens but I saw many similar issues involving interactions between the two touched spots. It doesn't seem to flip axis as much as the HTC screens, though. This really is unfortunate for the platform as a whole that the screens are so weak with this feature. I guess us game guys will just have to get a little more creative with our designs. On Feb 12, 2:30 pm, Kevin Duffey andjar...@gmail.com wrote: Ok.. thanks for the pointer Sean. So question for you and Dianne.. being on the platform team.. if his code works so well.. supposedly better than the OTA updates for Nexus.. why not just replace what is in Android.. or add it some how so that all of us developers can have this corrected data? Maybe I read incorrectly, but from what you and Dianne are saying, the issues the rest of the guys talk about.. where by touching one place, then a 2nd.. then lifting one finger, then touch again and the wrong data being sent.. this has to do with the massive events being sent and the confusion lies in that the MotionEvent is reporting incorrect data..but somewhere in there is the correct data.. and from what it looks like, Lukehutch's code resolves that issue? If that is correct, great.. maybe Robert Green and others can take that class of his and retrofit it and report back on this thread if it works. But if so, why not put that into the core of the framework for all to benefit? Clearly this has been a problem for the likes of Robert and others who have done great work with game development and are complaining that it's ruining the ability to develop comparable (at least in multi-touch) games as iPhone.. so why not provide the corrected data within Android itself? Or.. why not require that all touch manufacturers.. devices.. report the right data in some specific way such that the framework provides
[android-developers] Re: Multitouch seems badly broken on Nexus One 2.1-update1
A more capable multitouch screen probably costs more. If that is the case, it isn't really surprising that multiple manufacturers would go with a cheaper, less capable one. On Feb 13, 6:51 pm, Kevin Duffey andjar...@gmail.com wrote: So Robert.. is this a platform issue in your mind.. being that it happens on all android devices currently regardless of manufacturer? Or is it a driver issue for each hand set and just oddly happens to be coincidental that various manufacturers have the exact same issue with multi-touch? I am sure what Diane says is accurate... but yet it seems odd that different manufacturers have the same problem. On a slightly different note.. what is the stance of the Android platform team as a whole towards game developers? By this I mean, if this is indeed an issue on different manufacturer's handsets.. is it important enough that game developers, which for sure will be a large segment of popularity for android as it is on iPhone.. can get this escalated enough to get some platform/driver developers looking into it and if possible, tap the community (such as Robert) to help, so we can figure out exactly what is going on? It just seems too crucial of an issue to overlook being that it directly makes it impossible as of now for game developers to really utilize multi touch. Robert (et all)... an app I want to eventually get around doing is a drum machine app.. with multiple drum pads. On the iPhone, an app called BeatMaker allows for 5 pads at once to be touched. Would this issue possibly make an app like this not work? I don't even know if Android can handle more than two touches at once.. but there are plenty of apps out there that will use more than two simultaneous touches at once. On Fri, Feb 12, 2010 at 4:20 PM, Robert Green rbgrn@gmail.com wrote: Ok if you guys want to see what I'm talking about, check out the app I just published called Multitouch Visible Test. Play around with that and you'll see the problems. If you're interested in developing a multitouch app, check that out first so that you know the limitations of the data you'll be working with. On Feb 12, 4:55 pm, Robert Green rbgrn@gmail.com wrote: Luke's code cleans up some basic stuff like gestures involving pinching but it can not fix the two independent point problem. Currently, even with his code which filters out some noise, it is impossible to have a reliable control system involving two independent virtual joysticks placed along the same axis. So many iPhone games have that and I was actually planning it for my new release but unfortunately it will not work. I'm talking about the controls where you've got a touchable joystick on the bottom left and another one on the bottom right. It's very common but currently impossible on Android because of the hardware (though I'd really like to see some raw data because looking through the core service classes, there is a LOT of difficult-to-read code that seems to hack up the values quite a bit). I'll wrote a littlemultitouchvisualizer kind of like Luke's but aimed more at showing what you can and can't do with a game control system. I'll post the APK so everyone can see what I'm talking about. Multitouchdefinitely works better on the Droid than on the HTC screens but I saw many similar issues involving interactions between the two touched spots. It doesn't seem to flip axis as much as the HTC screens, though. This really is unfortunate for the platform as a whole that the screens are so weak with this feature. I guess us game guys will just have to get a little more creative with our designs. On Feb 12, 2:30 pm, Kevin Duffey andjar...@gmail.com wrote: Ok.. thanks for the pointer Sean. So question for you and Dianne.. being on the platform team.. if his code works so well.. supposedly better than the OTA updates for Nexus.. why not just replace what is in Android.. or add it some how so that all of us developers can have this corrected data? Maybe I read incorrectly, but from what you and Dianne are saying, the issues the rest of the guys talk about.. where by touching one place, then a 2nd.. then lifting one finger, then touch again and the wrong data being sent.. this has to do with the massive events being sent and the confusion lies in that the MotionEvent is reporting incorrect data..but somewhere in there is the correct data.. and from what it looks like, Lukehutch's code resolves that issue? If that is correct, great.. maybe Robert Green and others can take that class of his and retrofit it and report back on this thread if it works. But if so, why not put that into the core of the framework for all to benefit? Clearly this has been a problem for the likes of Robert and others who have done great work with game development and are complaining that
Re: [android-developers] MapView Overlay that does always keeps an item selected?
Hi, wow thanks a lot, your guess was right, I was missing an invalidate. Most of the time I would do an animateTo and that itself would trigger an invalidate :-) But unfortunately still not everything works. There seems to be a problem with focus handling. I can set the different items focus by taping on them or by calling setFocus. But if an item has focus, I then tap on an empty region so that the item looses it's focus, you can neither set the focus by taping on it nor by calling setFocus. The only thing that helps to get it out of this broken state is if you tap on a different item and then on the original. I traced it down and it seems that the correct item gets the focus set internally. I can check this with getFocus. But during the getMarker call you see the bitSet is wrongly 0. So maybe this time it is a real bug in mapview? Thanks a lot, Fabian And sorry for those many posts :-( Am Samstag, den 13.02.2010, 15:01 -0600 schrieb TreKing: Hmm ... it should, as the currently focused item should be drawn last (on top) by default. Maybe try invalidating the view after resetting the focus to force a redraw and see if that works? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Need Samsung Moment user to help troubleshoot problems
Hi all - I'm currently getting some problem comments from people claiming that my game FRG crashes on the Samsung Moment immediately when a bullet hits an enemy. Anybody have a Samsung Moment who could help me figure out the issue? I'd use DeviceAnywhere but their Samsung Moment has been offline for the past 1.5 weeks. :-\ Thanks in advance. Ernest Woo Woo Games http://www.woogames.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] Lazy Loading Images in a ListView - consensus approach?
Here are 4 references that I have found for lazy-loading images into a listview in Android. The idea is to display a placeholder image, get the actual image in the background, update the ImageView in the list when the image is available. I've tried to do this in the simplest way possible using an AsyncTask in an Adapter. The outline of that approach is below. Is it flawed? Is there an agreed approach to handling this common task? Thanks, Carmen http://blog.jteam.nl/2009/09/17/exploring-the-world-of-android-part-2/ Tom van Zummeren http://evancharlton.com/thoughts/lazy-loading-images-in-a-listview/ Evan Charlton http://code.google.com/p/shelves/ from Romain Guy http://github.com/commonsguy/cwac-thumbnail from Mark Murphy Approach using AsyncTask within an Adapter Somewhere in the Adapter. Add info about the URL for the image to fetch to the ImageView. Execute an AsyncTask to get the image in the background and load the ImageView. AsyncTask uses the tag to fetch the image. It uses the tag to find the correct view within the ListView. ImageView imageViewByTag = (ImageView) myListView.findViewWithTag(tag); ImageView is updated. Somewhere in the Adapter: myImageView.setTag(http://someimage.jpg;); // try { new GetImage().execute(myImageView); } catch(RejectedExecutionException e) { } // Asynctask private class GetImageInBackground extends AsyncTaskImageView , ImageView , Long { Drawable drawable; String tag; @Override protected void onProgressUpdate (ImageView... params){ if (drawable!=null){ ImageView imageViewByTag = (ImageView) myListView.findViewWithTag(tag); // find the ImageView if (imageViewByTag != null) { imageViewByTag.setImageDrawable(drawable); //update it } } } @Override protected Long doInBackground(ImageView... params) { tag = (String) params[0].getTag(); // get the tag from the ImageView if (tag==null){ drawable = getPlaceholder(); // get a default drawable }else{ bm =getDrawablefromURL(String (tag); // a method to get drawable from a URL } publishProgress(params[0]); return null; } } -- Carmen http://www.twitter.com/CarmenDelessio http://www.talkingandroid.com http://www.facebook.com/BFFPhoto http://www.twitter.com/DroidDrop -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Lazy Loading Images in a ListView - consensus approach?
I haven't looked in details at the 3 other approaches but I know that a big difference between what I do in Shelves and what I've seen done in other places is how user interaction is handled. Shelves listens to scroll events on the ListView and tries to identify taps vs scrolls vs fling to always give priority to the UI. For instance, when you touch the screen to stop a fling, Shelves starts loading images, but does so only after a very short delay so that if you are touching the screen to fling some more, the fling animation won't stutter because of the extra work load. But that's details. On Sat, Feb 13, 2010 at 8:01 PM, Carmen Delessio carmendeles...@gmail.com wrote: Here are 4 references that I have found for lazy-loading images into a listview in Android. The idea is to display a placeholder image, get the actual image in the background, update the ImageView in the list when the image is available. I've tried to do this in the simplest way possible using an AsyncTask in an Adapter. The outline of that approach is below. Is it flawed? Is there an agreed approach to handling this common task? Thanks, Carmen http://blog.jteam.nl/2009/09/17/exploring-the-world-of-android-part-2/ Tom van Zummeren http://evancharlton.com/thoughts/lazy-loading-images-in-a-listview/ Evan Charlton http://code.google.com/p/shelves/ from Romain Guy http://github.com/commonsguy/cwac-thumbnail from Mark Murphy Approach using AsyncTask within an Adapter Somewhere in the Adapter. Add info about the URL for the image to fetch to the ImageView. Execute an AsyncTask to get the image in the background and load the ImageView. AsyncTask uses the tag to fetch the image. It uses the tag to find the correct view within the ListView. ImageView imageViewByTag = (ImageView) myListView.findViewWithTag(tag); ImageView is updated. Somewhere in the Adapter: myImageView.setTag(http://someimage.jpg;); // try { new GetImage().execute(myImageView); } catch(RejectedExecutionException e) { } // Asynctask private class GetImageInBackground extends AsyncTaskImageView , ImageView , Long { Drawable drawable; String tag; @Override protected void onProgressUpdate (ImageView... params){ if (drawable!=null){ ImageView imageViewByTag = (ImageView) myListView.findViewWithTag(tag); // find the ImageView if (imageViewByTag != null) { imageViewByTag.setImageDrawable(drawable); //update it } } } @Override protected Long doInBackground(ImageView... params) { tag = (String) params[0].getTag(); // get the tag from the ImageView if (tag==null){ drawable = getPlaceholder(); // get a default drawable }else{ bm =getDrawablefromURL(String (tag); // a method to get drawable from a URL } publishProgress(params[0]); return null; } } -- Carmen http://www.twitter.com/CarmenDelessio http://www.talkingandroid.com http://www.facebook.com/BFFPhoto http://www.twitter.com/DroidDrop -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Romain Guy Android framework engineer romain...@android.com Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Pinch-zooming on maps gives no feedback
Correct. I don't get any draw()'s in an Overlay during pinch-to-zoom action. Once released, the map snaps to the next zoom level (as driven by the MapView et al). This triggers draw()'s and the app has an opportunity to catch up. Can you confirm draw()'s are indeed fired during pinch-to-zoom, as long as multiple locations are touched? On Feb 12, 8:35 am, CaptainSpam captains...@gmail.com wrote: Oh, wait, hang on, you're saying the draw()s AREN'T being dispatched in the Overlays during pinch-zoom? Huh. Well, if that's true, then that wouldn't work at all. I'll have to test it later. On Feb 12, 2:16 am, JP joachim.pfeif...@gmail.com wrote: Not sure if I follow. As nothing is fired in the way of an Overlay - how would it know to do anything? On Feb 11, 11:02 pm, Hugo Visser botte...@gmail.com wrote: As a work around, you don't need to poll...You can register an overlay that doesn't draw anything and checks the current zoom level against the previous draw zoom level and take it from there...On zooming there will be a redraw of the map so it should work out fine. On Feb 11, 8:23 pm, CaptainSpam captains...@gmail.com wrote: Ever since the update that allows multitouch gestures on the Maps app (pinch-zooming, mostly), I've noticed that apps using the Google Maps API also seem to automatically support it. That, in and of itself, is good. Convenient! However, my app has a need to know when the user has zoomed the map. As it stands now, I've just been watching over the only way this has been possible before: The zoom control buttons. It appears that there's no callback to know when the map has been zoomed (only MapController commands to MAKE the map zoom), so developers don't appear to have any way of knowing if the zoom level was changed outside of their control (i.e. pinch-zooming) apart from constantly polling the MapView. Is there any good way around this, or is an update like this in the cards for the API? Or am I just missing something obvious? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multitouch seems badly broken on Nexus One 2.1-update1
So are they all using the same company for the screen? On Sat, Feb 13, 2010 at 5:10 PM, Lance Nanek lna...@gmail.com wrote: A more capable multitouch screen probably costs more. If that is the case, it isn't really surprising that multiple manufacturers would go with a cheaper, less capable one. On Feb 13, 6:51 pm, Kevin Duffey andjar...@gmail.com wrote: So Robert.. is this a platform issue in your mind.. being that it happens on all android devices currently regardless of manufacturer? Or is it a driver issue for each hand set and just oddly happens to be coincidental that various manufacturers have the exact same issue with multi-touch? I am sure what Diane says is accurate... but yet it seems odd that different manufacturers have the same problem. On a slightly different note.. what is the stance of the Android platform team as a whole towards game developers? By this I mean, if this is indeed an issue on different manufacturer's handsets.. is it important enough that game developers, which for sure will be a large segment of popularity for android as it is on iPhone.. can get this escalated enough to get some platform/driver developers looking into it and if possible, tap the community (such as Robert) to help, so we can figure out exactly what is going on? It just seems too crucial of an issue to overlook being that it directly makes it impossible as of now for game developers to really utilize multi touch. Robert (et all)... an app I want to eventually get around doing is a drum machine app.. with multiple drum pads. On the iPhone, an app called BeatMaker allows for 5 pads at once to be touched. Would this issue possibly make an app like this not work? I don't even know if Android can handle more than two touches at once.. but there are plenty of apps out there that will use more than two simultaneous touches at once. On Fri, Feb 12, 2010 at 4:20 PM, Robert Green rbgrn@gmail.com wrote: Ok if you guys want to see what I'm talking about, check out the app I just published called Multitouch Visible Test. Play around with that and you'll see the problems. If you're interested in developing a multitouch app, check that out first so that you know the limitations of the data you'll be working with. On Feb 12, 4:55 pm, Robert Green rbgrn@gmail.com wrote: Luke's code cleans up some basic stuff like gestures involving pinching but it can not fix the two independent point problem. Currently, even with his code which filters out some noise, it is impossible to have a reliable control system involving two independent virtual joysticks placed along the same axis. So many iPhone games have that and I was actually planning it for my new release but unfortunately it will not work. I'm talking about the controls where you've got a touchable joystick on the bottom left and another one on the bottom right. It's very common but currently impossible on Android because of the hardware (though I'd really like to see some raw data because looking through the core service classes, there is a LOT of difficult-to-read code that seems to hack up the values quite a bit). I'll wrote a littlemultitouchvisualizer kind of like Luke's but aimed more at showing what you can and can't do with a game control system. I'll post the APK so everyone can see what I'm talking about. Multitouchdefinitely works better on the Droid than on the HTC screens but I saw many similar issues involving interactions between the two touched spots. It doesn't seem to flip axis as much as the HTC screens, though. This really is unfortunate for the platform as a whole that the screens are so weak with this feature. I guess us game guys will just have to get a little more creative with our designs. On Feb 12, 2:30 pm, Kevin Duffey andjar...@gmail.com wrote: Ok.. thanks for the pointer Sean. So question for you and Dianne.. being on the platform team.. if his code works so well.. supposedly better than the OTA updates for Nexus.. why not just replace what is in Android.. or add it some how so that all of us developers can have this corrected data? Maybe I read incorrectly, but from what you and Dianne are saying, the issues the rest of the guys talk about.. where by touching one place, then a 2nd.. then lifting one finger, then touch again and the wrong data being sent.. this has to do with the massive events being sent and the confusion lies in that the MotionEvent is reporting incorrect data..but somewhere in there is the correct data.. and from what it looks like, Lukehutch's code resolves that issue? If that is correct, great.. maybe Robert Green and others can take that class of his and retrofit it and report back on this thread if it
[android-developers] Re: How to start an Activity from a Service and getting a result from it
So you suggest that I'll have a pre-define resource which will hold all the information I need (let's say it is an XML resource) for creating the external keyboard. This sounds OK. The only problem is how to query for packages which have this resource? I can still create an Activity which have another pre-defined activity- filter which I can query for. Is this a reasonable method? Or is there a clearer way (I mean, I create an activity just for query usages)? Thanks, Menny On Feb 14, 12:44 am, Mark Murphy mmur...@commonsware.com wrote: Menny wrote: I don't know what the other ContentProviders URI are. They can be anything, I want to release my keyboard service, and then release layouts as I need. This means that, somehow, the keyboard service needs to know which layout packages are installed on the device, and what are the URI of their content-providers. Another alternative is to still use Context.createPackageContext(), but primarily as a bootstrap. The APK would publish its content URI in a pre-determined resource (e.g., R.string.any_soft_keyboard_provider_uri), which you would then use. -- 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