Re: [android-developers] Re: App closed but notification is visible
register receiver in Manifest file and given android:enabled=true On Fri, Sep 23, 2011 at 1:12 AM, b_t bartata...@gmail.com wrote: Ok, so it is normal that when the system stops my app the notification is still visible but when I force close it then it disappears. Then my only problem is that my app isn't notified anymore about battery events. Maybe what I am doing is wrong: I register broadcast receivers in the onCreate method of my Application. And my app receive these events well for a long time, until my application stops somewhere. I don't know how to solve this problem: the updating (receiving event) should not be stopped until the user force closes my app. Is it not good to register receivers in the onCreate of my Application class? Should I use a service for it? A service is mandatory to receive these event always? Thanks, Tamás -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: plz help...!!!
when you call stopService(service). is it throwing any errors? On Fri, Sep 23, 2011 at 8:08 AM, Spiral123 cumis...@gmail.com wrote: Easy. sevice.stop(plz); On Sep 22, 1:24 pm, Divyata Panchal panchal.divyat...@gmail.com wrote: Hie.. to al Android Developers... please tell me how to stop service in one class which is already started in other class. i need to start and stop service again n again according to my conditions.. pl give proper syntax to stop service.. i am using::: Intent service= new Intent(this, myService.class); stopService(service); but this is not working... please guys reply as soon as possible.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problems with setting translucent theme for activity
Hi All, I have set translucent theme for Activity 1 through AndroidManifest.xml file activity android:name=.help.PresetSecondMessage android:theme=@android:style/ Theme.Translucent.NoTitleBar.Fullscreen /activity Activity 2 appears on top of Activity 1.But the buttons of Activity 1 has still has click actions enabled.Is this default behaviour?... I don't want to have actions for views of Activity 1... Any help? Regards Bhavani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: What exactly adb install do with apk?
Haven't checked it myself, but have a look at tools/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java. On 14 Sep., 17:05, Rahul Garg rahul.lnm...@gmail.com wrote: Hi All, Although I have been using adb install to install apk in my device. But I dont what exactly it do to apk, how it extracts information from the apk. and how does it handle the native code( lib .so file). Can you guys help me to figure it 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] Camera taking issue in LG optimus
Hi all, i am using lg optimus for taking camera and saving it .. with input stream its giving exception in out = new FileOutputStream(destination); this line can antbody help regarding this InputStream in = null; OutputStream out = null; try { File sd = new File(sourceFile); if (sd.exists() sd.canRead()) { File destination = new File(new File(context.getDir( CameraAppRootDir, Context.MODE_WORLD_READABLE), CameraAppUserDir), fileName); in = new FileInputStream(sd); out = new FileOutputStream(destination); byte[] buf = new byte[1024]; int len; while ((len = in.read(buf)) 0) { out.write(buf, 0, len); } // in.close(); // out.close(); Log.i(CAMERA APP ACTIVITY , FILE WRITTEN : + fileName); } else { Log.e(Update Manager :saveBitMap , Can not read file); } } catch (Exception e) { Log.e(Update Manager :saveBitMap , UpdateManager could not write data to disk for filename = + fileName); } finally { if (in != null) { try { in.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } if (out != null) { try { out.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How can i start a service after installing my apk.
Hi, How can i start a service after installing application.?? Thanks C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] OpenMAX codec interface +android
Hello Developers, How to create OpenMax codec ffmpeg interface in android. i am getting ffmpeg lib, Open Max lib but how to interface in android with these lib . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: OpenMAX codec interface +android
Please refer me some link regarding this issue. On Fri, Sep 23, 2011 at 12:19 PM, ProblemZone navi44...@gmail.com wrote: Hello Developers, How to create OpenMax codec ffmpeg interface in android. i am getting ffmpeg lib, Open Max lib but how to interface in android with these lib . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: plz help...!!!
post your code On Fri, Sep 23, 2011 at 11:33 AM, ashok chakravarthy ashoki...@gmail.comwrote: when you call stopService(service). is it throwing any errors? On Fri, Sep 23, 2011 at 8:08 AM, Spiral123 cumis...@gmail.com wrote: Easy. sevice.stop(plz); On Sep 22, 1:24 pm, Divyata Panchal panchal.divyat...@gmail.com wrote: Hie.. to al Android Developers... please tell me how to stop service in one class which is already started in other class. i need to start and stop service again n again according to my conditions.. pl give proper syntax to stop service.. i am using::: Intent service= new Intent(this, myService.class); stopService(service); but this is not working... please guys reply as soon as possible.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: plz help...!!!
Plz post ur source. On Sep 23, 2011 3:16 PM, Vinay Julme vinayju...@gmail.com wrote: post your code On Fri, Sep 23, 2011 at 11:33 AM, ashok chakravarthy ashoki...@gmail.com wrote: when you call stopService(service). is it throwing any errors? On Fri, Sep 23, 2011 at 8:08 AM, Spiral123 cumis...@gmail.com wrote: Easy. sevice.stop(plz); On Sep 22, 1:24 pm, Divyata Panchal panchal.divyat...@gmail.com wrote: Hie.. to al Android Developers... please tell me how to stop service in one class which is already started in other class. i need to start and stop service again n again according to my conditions.. pl give proper syntax to stop service.. i am using::: Intent service= new Intent(this, myService.class); stopService(service); but this is not working... please guys reply as soon as possible.. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How can i start a service after installing my apk.
I think it is not possible for now. see below link http://groups.google.com/group/android-developers/browse_thread/thread/97f9664f2919b411?pli=1 On Fri, Sep 23, 2011 at 12:14 PM, crajesh crajesh2...@gmail.com wrote: Hi, How can i start a service after installing application.?? Thanks C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Same problem here also
Hi, Are you sure you pressed 'publish' ? Regards On Sep 22, 11:47 pm, Eowyn Bards maria.antign...@gmail.com wrote: Just created and signed my first app, paid the market fee hours ago but does not show up anywhere. Does anyone know where and to whom can be addressed a message complaining for this? In the developers site i dont see a link or email for this, and read that someone with same problem got it fixed informing them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to add a ViewFlipper to the layout?
How can I make use of adb logcat, DDMS, or the DDMS perspective in Eclipse if I can't reproduce the error in the emulator? It doesn't crash there. Have I implemented the right aproach with the threads? I call on yield() on the 2d thread for every onResume() and onPause() call to the 2d activity. I call on yield() on the 3d thread for every onResume() and onPause() call to the 3d activity. I have set the priorities to MIN_PRIORITY. Is it better to implement the threading in some other way? I also call on finish() on the current activity after every call to startActivity. The app seems to run slower after starting the 3d activity several times. This did not happen when I used the view flipper. Is it possible that several instances of the 3d activity are on the activity stack? This is how I start the activities: Intent glIntent=new Intent(astral.worlds2.GLActivity); glIntent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); getContext().startActivity(glIntent); On Sep 22, 9:11 pm, Mark Murphy mmur...@commonsware.com wrote: Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and figure out what the crashes are. On Thu, Sep 22, 2011 at 2:43 PM, MobileVisuals eyv...@astralvisuals.com wrote: Does anyone have an idea what I can do to improve the stability of this 3d app, which has 2 activities? I want to avoid the crashes. On Sep 22, 1:14 pm, MobileVisuals eyv...@astralvisuals.com wrote: I thought that it worked like it should,but I noticed that this is not the case. This version crashes sometimes, often when onResume() is called on any of the activities. It crashes on my Samsung Galaxy device. I have tried to reproduce this on the emulator, but it doesn't crashes there. The previous version based on ViewFlipper never crashed, even on the Samsung device. Maybe the crashes are caused by the threads? I have set the priorities to MIN_PRIORITY. I call on yield() on the 2d thread for every onResume() and onPause() call to the 2d activity. I call on yield() on the 3d thread for every onResume() and onPause() call to the 3d activity. Should I implement another approach for the threading? Or do think that something else causes the crashes? On Sep 21, 8:10 pm, MobileVisuals eyv...@astralvisuals.com wrote: Thanks for the info. I have redesigned the app now and it worked. On Sep 20, 6:37 pm, Mark Murphy mmur...@commonsware.com wrote: Use startActivity(), with FLAG_ACTIVITY_REORDER_TO_FRONT, to bring an existing activity back into the foreground (or create it if it does not exist). On Tue, Sep 20, 2011 at 12:32 PM, MobileVisuals eyv...@astralvisuals.com wrote: I see, then I would have to use one SurfaceView for the first activity and a GLSurfaceView for the other activity. I searched for information about how to switch between 2 activities on the forum and found one of your threads: http://groups.google.com/group/android-developers/browse_thread/threa... You recommend using a viewflipper here, so I can not use that approach. I found another thread http://groups.google.com/group/android-developers/browse_thread/threa... where they used the StartActivityForResult method. How would you recommend that I should swith between the activites without using a ViewFlipper? On Sep 20, 4:43 pm, Mark Murphy mmur...@commonsware.com wrote: Use two activities. On Tue, Sep 20, 2011 at 9:54 AM, MobileVisuals eyv...@astralvisuals.com wrote: I got the viewflipper to work, but I found that it is not possible to use a GLSurfaceView in a viewflipper, like this thread describes: http://groups.google.com/group/android-developers/browse_thread/threa... How can I then switch between 2d and 3d rendering? On Jul 27, 2:53 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 27, 2011 at 8:49 AM, MobileVisuals eyv...@astralvisuals.com wrote: I try to add 2 views to a Viewflipper, but I get java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. when I try to add the view. I don't know why this happens. I try to remove the view from the ViewFlipper, but I still get the same message. How can I add a ViewFlipper to the layout? You can view my code and XML layout below: --- setContentView(R.layout.lunar_layout); mLunarView = (LunarView) findViewById(R.id.lunar); ViewFlipper vf=(ViewFlipper) findViewById(R.id.flip); vf.addView(mLunarView, 0); The error should be self-explanatory. You already have R.id.lunar as a child of the LinearLayout. layout: -- ?xml
[android-developers] Regarding profile
How to create our own profile with custom settings.Please provide some code for it. THanks, Sourabh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Does it possible to use multiple jni(.so) library in one SDK project?
Thanks! On 9월22일, 오후6시08분, Doug beafd...@gmail.com wrote: On Sep 21, 11:22 am, Build account newandroi...@gmail.com wrote: Hello gurus. At first, I can build single 'jni' library in one SDK project with the directory name 'jni' and make file under eclipse. But, I'm looking for - how to build multiple jni in eclipse with the setting 'property builder add cmd line'. I expect that possible. Does it possible? It does possible. Build them on your command line outside of eclipse. - and how to package multiple shared library in one apk? possible? Give them different names and load them using those different names. Doug -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problems capturing GPS position in a Augmented Reality App
I'm developing a simple AR app what must calculate user GPS position and show his latitude, longitude and compass accelerometer values on textviews on the screen (in top of the camera view). Something is going wrong, because i only can capture compass direction value, but i can't capture GPS positions (lat, lon) and also i can't capture accelerometer values (inclination, Direction2, kFilteringFactor, aboveOrBelow). I dont understand why i can't do it. When i use my code for capture GPS positions on another app, it works OK, and captures the GPS positions of the user correctly, but when i use the code here it doesn't captures nothing. I know that my working code for capturing gps positions doesn't works when i use on this AR app because this: I am writing on the screen, in the top of the camera, the values captured by compass, gps, and accelerometer, and only compass direction value is written on the screen. for the cameraView i'm using the default cameraView code written on this guide: http://www.devx.com/wireless/article/42482/1954 and this is my main class: public class AugmentedRealitySampleActivity extends Activity implements Runnable{ private CustomCameraView cv=null; private TextView tv1; private TextView tv2; private TextView tv3; private TextView tv4; private TextView tv5; private TextView tv6; public static SensorManager sensorMan; //variables para obtener mi posicion: LocationManager mLocationManager; Location mLocation; MyLocationListener mLocationListener; Location currentLocation = null; private float direction; //compass //private Location curLocation; //gps public volatile float inclination; //accelerometer double lat=-1; double lon=-1; public void onCreate(Bundle savedInstanceState) { //try{ super.onCreate(savedInstanceState); cv = new CustomCameraView(this.getApplicationContext()); FrameLayout rl = new FrameLayout(this.getApplicationContext()); LinearLayout ll= new LinearLayout(this.getApplicationContext()); ll.setOrientation(LinearLayout.VERTICAL); setContentView(rl); rl.addView(cv); rl.addView(ll); //} catch(Exception e){} tv1=new TextView(getApplicationContext()); tv2=new TextView(getApplicationContext()); tv3=new TextView(getApplicationContext()); tv4=new TextView(getApplicationContext()); tv5=new TextView(getApplicationContext()); tv6=new TextView(getApplicationContext()); tv1.setBackgroundColor(Color.BLACK); tv2.setBackgroundColor(Color.BLACK); //tv3.setBackgroundColor(Color.BLACK); //tv4.setBackgroundColor(Color.BLACK); //tv5.setBackgroundColor(Color.BLACK); //tv6.setBackgroundColor(Color.BLACK); ll.addView(tv1); ll.addView(tv2); ll.addView(tv3); ll.addView(tv4); ll.addView(tv5); ll.addView(tv6); sensorMan = (SensorManager) getSystemService(Context.SENSOR_SERVICE); sensorMan.registerListener(Compasslistener, sensorMan.getDefaultSensor(SensorManager.SENSOR_ORIENTATION), SensorManager.SENSOR_DELAY_FASTEST); sensorMan.registerListener(Accelerometerlistener, sensorMan.getDefaultSensor(Sensor.TYPE_ACCELEROMETER), SensorManager.SENSOR_DELAY_FASTEST); //LocationManager locMan; //locMan = (LocationManager)getSystemService(Context.LOCATION_SERVICE); //locMan.requestLocationUpdates(LocationManager.GPS_PROVIDER, 100, 0, gpsListener); //getLatitude(); getLongitude(); bearingTo(); distanceTo(); tv1.setText(Test1); tv2.setText(Test2); tv3.setText(Test3); tv4.setText(Test4); tv5.setText(Test5); tv6.setText(Test6); Thread thread = new Thread(this); thread.start(); } //COMPASS: SensorEventListener Compasslistener = new SensorEventListener() { public void onAccuracyChanged(Sensor arg0, int accuracy){ } public void onSensorChanged(SensorEvent evt) { float vals[] = evt.values; direction = vals[0]; tv1.setText(Direction= + direction); }
[android-developers] Re: How to add a ViewFlipper to the layout?
Or maybe the objects in the 3d activity are not garbage collected when I switch to the 2d activity? Maybe I should set the objects in the 3d activity to null, when it switches to the 2d activity? On Sep 22, 9:11 pm, Mark Murphy mmur...@commonsware.com wrote: Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and figure out what the crashes are. On Thu, Sep 22, 2011 at 2:43 PM, MobileVisuals eyv...@astralvisuals.com wrote: Does anyone have an idea what I can do to improve the stability of this 3d app, which has 2 activities? I want to avoid the crashes. On Sep 22, 1:14 pm, MobileVisuals eyv...@astralvisuals.com wrote: I thought that it worked like it should,but I noticed that this is not the case. This version crashes sometimes, often when onResume() is called on any of the activities. It crashes on my Samsung Galaxy device. I have tried to reproduce this on the emulator, but it doesn't crashes there. The previous version based on ViewFlipper never crashed, even on the Samsung device. Maybe the crashes are caused by the threads? I have set the priorities to MIN_PRIORITY. I call on yield() on the 2d thread for every onResume() and onPause() call to the 2d activity. I call on yield() on the 3d thread for every onResume() and onPause() call to the 3d activity. Should I implement another approach for the threading? Or do think that something else causes the crashes? On Sep 21, 8:10 pm, MobileVisuals eyv...@astralvisuals.com wrote: Thanks for the info. I have redesigned the app now and it worked. On Sep 20, 6:37 pm, Mark Murphy mmur...@commonsware.com wrote: Use startActivity(), with FLAG_ACTIVITY_REORDER_TO_FRONT, to bring an existing activity back into the foreground (or create it if it does not exist). On Tue, Sep 20, 2011 at 12:32 PM, MobileVisuals eyv...@astralvisuals.com wrote: I see, then I would have to use one SurfaceView for the first activity and a GLSurfaceView for the other activity. I searched for information about how to switch between 2 activities on the forum and found one of your threads: http://groups.google.com/group/android-developers/browse_thread/threa... You recommend using a viewflipper here, so I can not use that approach. I found another thread http://groups.google.com/group/android-developers/browse_thread/threa... where they used the StartActivityForResult method. How would you recommend that I should swith between the activites without using a ViewFlipper? On Sep 20, 4:43 pm, Mark Murphy mmur...@commonsware.com wrote: Use two activities. On Tue, Sep 20, 2011 at 9:54 AM, MobileVisuals eyv...@astralvisuals.com wrote: I got the viewflipper to work, but I found that it is not possible to use a GLSurfaceView in a viewflipper, like this thread describes: http://groups.google.com/group/android-developers/browse_thread/threa... How can I then switch between 2d and 3d rendering? On Jul 27, 2:53 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 27, 2011 at 8:49 AM, MobileVisuals eyv...@astralvisuals.com wrote: I try to add 2 views to a Viewflipper, but I get java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. when I try to add the view. I don't know why this happens. I try to remove the view from the ViewFlipper, but I still get the same message. How can I add a ViewFlipper to the layout? You can view my code and XML layout below: --- setContentView(R.layout.lunar_layout); mLunarView = (LunarView) findViewById(R.id.lunar); ViewFlipper vf=(ViewFlipper) findViewById(R.id.flip); vf.addView(mLunarView, 0); The error should be self-explanatory. You already have R.id.lunar as a child of the LinearLayout. layout: -- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=wrap_content android:layout_height=wrap_content ViewFlipper android:id=@+id/flip android:layout_width=fill_parent android:layout_height=fill_parent/ astral.effectsf.LunarView android:id=@+id/lunar android:layout_width=fill_parent android:layout_height=fill_parent/ /LinearLayout Make the LunarView be a child element of your ViewFlipper, and get rid of the Java code to try adding it to the ViewFlipper, and you will be set. Here are some projects demonstrating the use of a
[android-developers] Re: What exactly adb install do with apk?
Well I had a look now, check out Device.installPackage() in Device.java in the same package. I hope, as incomplete as my two answers are, they will provide at least a starting point. On 23 Sep., 08:26, FBondarenko f.bondare...@web.de wrote: Haven't checked it myself, but have a look at tools/ddms/libs/ddmlib/src/com/android/ddmlib/AndroidDebugBridge.java. On 14 Sep., 17:05, Rahul Garg rahul.lnm...@gmail.com wrote: Hi All, Although I have been using adb install to install apk in my device. But I dont what exactly it do to apk, how it extracts information from the apk. and how does it handle the native code( lib .so file). Can you guys help me to figure it 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
Re: [android-developers] Re: How to add a ViewFlipper to the layout?
You said it crashes on your Samsung device, can't you get a stack trace there? -- Kostya Vasilyev 23.09.2011 13:01 пользователь MobileVisuals eyv...@astralvisuals.com написал: Or maybe the objects in the 3d activity are not garbage collected when I switch to the 2d activity? Maybe I should set the objects in the 3d activity to null, when it switches to the 2d activity? On Sep 22, 9:11 pm, Mark Murphy mmur...@commonsware.com wrote: Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine LogCat and figure out what the crashes are. On Thu, Sep 22, 2011 at 2:43 PM, MobileVisuals eyv...@astralvisuals.com wrote: Does anyone have an idea what I can do to improve the stability of this 3d app, which has 2 activities? I want to avoid the crashes. On Sep 22, 1:14 pm, MobileVisuals eyv...@astralvisuals.com wrote: I thought that it worked like it should,but I noticed that this is not the case. This version crashes sometimes, often when onResume() is called on any of the activities. It crashes on my Samsung Galaxy device. I have tried to reproduce this on the emulator, but it doesn't crashes there. The previous version based on ViewFlipper never crashed, even on the Samsung device. Maybe the crashes are caused by the threads? I have set the priorities to MIN_PRIORITY. I call on yield() on the 2d thread for every onResume() and onPause() call to the 2d activity. I call on yield() on the 3d thread for every onResume() and onPause() call to the 3d activity. Should I implement another approach for the threading? Or do think that something else causes the crashes? On Sep 21, 8:10 pm, MobileVisuals eyv...@astralvisuals.com wrote: Thanks for the info. I have redesigned the app now and it worked. On Sep 20, 6:37 pm, Mark Murphy mmur...@commonsware.com wrote: Use startActivity(), with FLAG_ACTIVITY_REORDER_TO_FRONT, to bring an existing activity back into the foreground (or create it if it does not exist). On Tue, Sep 20, 2011 at 12:32 PM, MobileVisuals eyv...@astralvisuals.com wrote: I see, then I would have to use one SurfaceView for the first activity and a GLSurfaceView for the other activity. I searched for information about how to switch between 2 activities on the forum and found one of your threads: http://groups.google.com/group/android-developers/browse_thread/threa... You recommend using a viewflipper here, so I can not use that approach. I found another thread http://groups.google.com/group/android-developers/browse_thread/threa... where they used the StartActivityForResult method. How would you recommend that I should swith between the activites without using a ViewFlipper? On Sep 20, 4:43 pm, Mark Murphy mmur...@commonsware.com wrote: Use two activities. On Tue, Sep 20, 2011 at 9:54 AM, MobileVisuals eyv...@astralvisuals.com wrote: I got the viewflipper to work, but I found that it is not possible to use a GLSurfaceView in a viewflipper, like this thread describes: http://groups.google.com/group/android-developers/browse_thread/threa... How can I then switch between 2d and 3d rendering? On Jul 27, 2:53 pm, Mark Murphy mmur...@commonsware.com wrote: On Wed, Jul 27, 2011 at 8:49 AM, MobileVisuals eyv...@astralvisuals.com wrote: I try to add 2 views to a Viewflipper, but I get java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. when I try to add the view. I don't know why this happens. I try to remove the view from the ViewFlipper, but I still get the same message. How can I add a ViewFlipper to the layout? You can view my code and XML layout below: --- setContentView(R.layout.lunar_layout); mLunarView = (LunarView) findViewById(R.id.lunar); ViewFlipper vf=(ViewFlipper) findViewById(R.id.flip); vf.addView(mLunarView, 0); The error should be self-explanatory. You already have R.id.lunar as a child of the LinearLayout. layout: -- ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android= http://schemas.android.com/apk/res/ android android:layout_width=wrap_content android:layout_height=wrap_content ViewFlipper android:id=@+id/flip android:layout_width=fill_parent android:layout_height=fill_parent/ astral.effectsf.LunarView android:id=@+id/lunar android:layout_width=fill_parent android:layout_height=fill_parent/ /LinearLayout Make the LunarView be a child element of your ViewFlipper, and get rid of the Java code to try adding it to the ViewFlipper,
[android-developers] Saving form data to XML
Hello , developing application with form having multiple fields, at the end user need to submit the information. On this event, all the data need to be stored in XML file. thus XML write is required. plus when user asks for particular id then the data filled by that id is also to be displayed thus XML read is required.(search operation) Following is the code I tried for generating sample xml. / FileOutputStream fileos = null; try{ fileos=openFileOutput(newxml.xml,Context.MODE_PRIVATE); Log.v(info,fileoutput open); // fileos = new FileOutputStream(newxmlfile); }catch(FileNotFoundException e){ Log.e(FileNotFoundException, can't create FileOutputStream); } // create a XmlSerializer in order to write xml data XmlSerializer serializer = Xml.newSerializer(); try { //we set the FileOutputStream as output for the serializer, using UTF-8 encoding serializer.setOutput(fileos, UTF-8); //Write ?xml declaration with encoding (if encoding not null) and standalone flag (if standalone not null) serializer.startDocument(null, Boolean.valueOf(true)); //set indentation option //serializer.setFeature(http://xmlpull.org/v1/doc/ features.html#indent-output, true); //start a tag called root serializer.startTag(null, root); //i indent code just to have a view similar to xml-tree serializer.startTag(null, child1); serializer.endTag(null, child1); serializer.startTag(null, child2); //set an attribute called attribute with a value for child2 serializer.attribute(null, attribute, value); serializer.endTag(null, child2); serializer.startTag(null, child3); //write some text inside child3 serializer.text(some text inside child3); serializer.endTag(null, child3); serializer.endTag(null, root); serializer.endDocument(); //write xml data into the FileOutputStream serializer.flush(); //finally we close the file stream fileos.close(); //TextView tv = (TextView)this.findViewById(R.id.result); //tv.setText(file has been created on SD card); Log.v(info,file has been created on SD card); return true; } catch (Exception e) { Log.e(Exception,error occurred while creating xml file); return false; } // executed this with actual device but, no new xml file is created. where to store this programatically created xml file? On emulator if I want to test this application, where the xml file will get stored? Pls guide me whats going wrong? Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to get data From Status bar and disable it?
I am creating a custom lock screen so that in my activity the Status bar won't be there. At the mean time i want to get the the status bar notifications such as missed calls, new chat messages, new emails, new voicemail, etc... How to implement this ... please give me a hint .. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: multi page form
Thank you all, for help. I used view flipper and it worked as expected. Thanks Again. But still not clear with how to submit that form information and store it in XML file. Pls share. Thanks. On Sep 8, 2:12 am, rich friedel rich.frie...@gmail.com wrote: Like Mark Murphy said... use ViewFlipper to create the illusion of 'pages'http://developer.android.com/reference/android/widget/ViewFlipper.htmlthen store your data however you choose to do so...http://developer.android.com/guide/topics/data/data-storage.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] Async Task, rotation and indeterminate progressbar in custom header.
Hi! So i've been trying to get a solution for a very specific problem that involves using Async tasks and dealing with the rotation and also a custom header that contains a progressbar view(the small spinner one, including a text view saying Loading...). I've followed thishttps://github.com/commonsguy/cw-android/blob/master/Rotation/RotationAsync/src/com/commonsware/android/rotation/async/RotationAsync.java example to deal with the async tasks and the rotation, but i still have the problem of the progressbar, if activity A launches a task and i imediately go to activitity B, the progress bar in activity B should still appear visibile even though the task was launched from activity A, how do i this without a static reference for the progressbar view?, the postexecute method of the async have to consider the possibility that the progressbar reference should now be in another activity, right? Here's my code for my parent activity where subactivities extend from: public abstract class ParentClass extends Activity{ protected static ProgressBar progressHeader = null; protected static TextView progressLoading = null;; protected static int progressBarstate=ProgressBar.GONE; protected static int themeId; private ProgressBarThread task=null; //this method will get the id for the layout public abstract int getLayoutId(); //this method will launch respejcting oncreate logic for each activity public abstract void initActivity(); //thi smethod will return window header menu context text string public abstract String getWindowTitle(); //this method is used to refresh contents for a screen public abstract void updateResultsInUi(); //nethod for definined specific theme public abstract int getThemeId(); @Override protected void onCreate(Bundle savedInstanceState) { //set theme first for showing correct header setTheme(getThemeId()); super.onCreate(savedInstanceState); themeId=getThemeId(); //in case the screen will have a header if(getThemeId()!=R.style.CustomThemeNoHeader){ requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(getLayoutId()); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_window_title); //set text header ((TextView)findViewById(R.id.header_title)).setText(getWindowTitle()); progressRefreshState(progressBarstate); }else { setContentView(getLayoutId()); } //execute subactivity logic initActivity(); } /** * check for loading/spinner icon in * case there's a thread working in background */ @Override public void onRestart () { super.onRestart(); if(getThemeId()!=R.style.CustomThemeNoHeader){ //Toast.makeText(this, visible(0): + ProgressBar.VISIBLE+ : Current : + getProgressBarstate(), Toast.LENGTH_LONG).show(); progressRefreshState(progressBarstate); } } @Override public Object onRetainNonConfigurationInstance() { if(task!=null) task.detach(); return(task); } /** * refresh static references for both progress * info views and set visibility state */ private void progressRefreshState(int state) { progressHeader = (ProgressBar) findViewById(R.id.progresspinner); progressLoading = (TextView) findViewById(R.id.progresstext); progressHeader .setVisibility(state); progressLoading.setVisibility(state); } //todo change location for getting session protected String getSession(){ LogInManager login=new LogInManager(ParentClass.this); try { boolean session=login.getNewSession( QuadrosMobileApplicationContext.getInstance().getUser(), QuadrosMobileApplicationContext.getInstance().getPass()); if(session) return getString(R.string.login_sucessful); else return getString(R.string.login_failed); } catch (RequestException e) { return e.getMessage(); } } /** * do asynctask for background work */ public void doAsyncTask(){ task= (ProgressBarThread)getLastNonConfigurationInstance(); if(task==null){ task= new ProgressBarThread(this); task.execute(); //add to the set of tasks QuadrosMobileApplicationContext appliContext= (QuadrosMobileApplicationContext)getApplicationContext(); appliContext.getAsyncTasks().add(task); }else{ task.attach(this); } } static public class ProgressBarThread extends AsyncTaskVoid, Void, Void{ ParentClass activity=null; public ProgressBarThread(ParentClass activity) { attach(activity); } @Override protected void onPreExecute() { Logger.write(ProgressBarThread , AsyncTask pre execution , Logger.INFO); if(themeId!=R.style.CustomThemeNoHeader){ progressHeader.setVisibility(ProgressBar.VISIBLE); progressLoading.setVisibility(ProgressBar.VISIBLE); } progressBarstate=ProgressBar.VISIBLE; } @Override protected Void doInBackground(Void... params) { Logger.write(ProgressBarThread , initialized, Logger.INFO); activity.updateResultsInUi(); Logger.write(ProgressBarThread , Finish, Logger.INFO); return null; } @Override protected void onPostExecute(Void result) { Logger.write(ProgressBarThread , AsyncTask post execution , Logger.INFO); //remove this task from collection QuadrosMobileApplicationContext
[android-developers] Re: BitmapFactory 's decodeByteArray and decodeStream returns null
His name is Doug, not Donug. Get a clue. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] ACRA clear
What is the easiest way to clear out an ACRA report in Google Docs? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 add a ViewFlipper to the layout?
On Fri, Sep 23, 2011 at 4:11 AM, MobileVisuals eyv...@astralvisuals.com wrote: How can I make use of adb logcat, DDMS, or the DDMS perspective in Eclipse if I can't reproduce the error in the emulator? It doesn't crash there. adb logcat, DDMS, and the DDMS perspective of Eclipse are perfectly capable of examining LogCat on your phone. I also call on finish() on the current activity after every call to startActivity. The app seems to run slower after starting the 3d activity several times. Well, sure. Don't do that. The whole point behind FLAG_ACTIVITY_REORDER_TO_FRONT was to reuse the existing activity instances. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Webview is displaying an address bar
Your WebView is not displaying an address bar, as it does not have one. The user is seeing the actual browser application, most likely. A redirect or clicking a link would cause that, if you do not have shouldOverrideUrlLoading() implemented in a WebViewClient. On Thu, Sep 22, 2011 at 11:39 PM, bob b...@coolgroups.com wrote: Someone told me that on their old Android phone, my Webview is displaying an address bar. Anyone know about 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How can i start a service after installing my apk.
Correct. Particularly with Android 3.1+, nothing in your application will be tied into the system (including BroadcastReceivers) until the user runs an activity. On Fri, Sep 23, 2011 at 3:44 AM, ashok chakravarthy ashoki...@gmail.com wrote: I think it is not possible for now. see below link http://groups.google.com/group/android-developers/browse_thread/thread/97f9664f2919b411?pli=1 On Fri, Sep 23, 2011 at 12:14 PM, crajesh crajesh2...@gmail.com wrote: Hi, How can i start a service after installing application.?? Thanks C.Rajesh -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training...At Your Office: http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Break the execution
Hi How can I stop the execution at one point? For Example if (strUserName.equals()) { Toast.makeText(getBaseContext(), Enter User Name., 10).show(); } Inside this If condition I want to stop the execution and dont let the system to execute rest of the code which I have in bottom. At the same time I want to stay on the same Activity. One thing I can throw exception and do other than that is there any way? -- - Prakash. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Break the execution
use this line android.os.killprocess -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 resolve outOfMemoryError - Bitmap size exceeds VM budget
I found a solution, thanks to Streets of Boston and laminina. Since every app uses 2 images (background and other image), i created 2 images in my Application class (global variables) and not in the XML (laminina idea). Each app at the onCreate/onResume phase will call these images from the Application, destroying its previous instances and creating the new ones the way Streets of Boston said. So at most, i have 2 images in memory. Works like a charm :) Thanks to your replies! On Sep 23, 6:13 am, ashok chakravarthy ashoki...@gmail.com wrote: You can try the approach suggested by streets of bosten or you can try something like below i). create baseactivity and all remaing activities extends this activity ii). override onKeydown in the base actiivty iii).finish the previous activity when you move to next activity. and when you press the back on the activity based on the index start the previous activity. Thanks, Ashok. On Fri, Sep 23, 2011 at 6:06 AM, lbendlin l...@bendlin.us wrote: http://code.google.com/p/android/issues/detail?id=8488 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: OpenMAX codec interface +android
Please reply me someone On Fri, Sep 23, 2011 at 12:27 PM, NAVI NEW navi44...@gmail.com wrote: Please refer me some link regarding this issue. On Fri, Sep 23, 2011 at 12:19 PM, ProblemZone navi44...@gmail.com wrote: Hello Developers, How to create OpenMax codec ffmpeg interface in android. i am getting ffmpeg lib, Open Max lib but how to interface in android with these lib . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how to get child or any component from the parent view
Hi All, Currently for my Android's Application testing purpose, I got the view of the device screen then I want to fetch the child of that parent view. e.g. If I am fetching the main home screen so then can I get the menu like setting, browser, etc.? Thanks in Advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] .html filed loading problem.how to i will solve it
WebView mWebView =(WebView) findViewById(R.id.webView1); mWebView.loadUrl(file:///android_asset/html/raj.html); this my code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] .html filed loading problem.how to i will solve it
WebView mWebView =(WebView) findViewById(R.id.webView1); mWebView.loadUrl(file:///android_asset/html/raj.html); this my code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: BitmapFactory 's decodeByteArray and decodeStream returns null
Sorry for that typo. Actually it was a bug in my h264 video decoding native code ,which caused the problems And i am still a new be in C. As I now understand decodeByteArray() can decode compressed image data of format PNG and JPG and my image data is of type ARGB. Any way my problems solved. Thanks every one , for the help. Regards Siji -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Video Playing issue
ERROR/MediaPlayer(16809): Error (1,-18) WARN/QCvdec(1294): == WARN/QCvdec(1294):Open Max Statistics WARN/QCvdec(1294): == WARN/QCvdec(1294): empty this buffer rate = 5305.039551 WARN/QCvdec(1294): empty this buffer total time = 377 WARN/QCvdec(1294): empty this buffer count = 2 WARN/QCvdec(1294): == VERBOSE/PlayerDriver(1294): HandleInformationalEvent: PVMFInfoErrorHandlingComplete Please confirm me complete guideline for resolve this issue android video play. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] openmax framework android
i want to integrate openmax framework android for media player , give me guide line for implement that one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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]write data to server
Hi developers, I want to send the the id, name, score to my server ( write the records to server in a file named ranking, path is http:// ***.***.***.***/man/ranking, I am sure the file exist, i have created it before, then i use the following code to write, but it can't write into successful, Can anyone tell me why? code: private boolean updateRecord(String uid, String name, int score) { HttpURLConnection conn = null; try { URL url = new URL(http://***.***.***.***/man/ranking;); conn = (HttpURLConnection) url.openConnection(); conn.setDoOutput(true); conn.setRequestMethod(POST); DataOutputStream dos = new DataOutputStream(conn.getOutputStream()); dos.writeUTF(UPDATE); dos.writeUTF(uid); dos.writeUTF(name); dos.writeUTF(String.valueOf(score)); dos.flush(); dos.close(); DataInputStream dis = new DataInputStream(conn.getInputStream()); String resultInfo = dis.readUTF(); if (resultInfo != null !ERROR.equals(resultInfo)) { return true; } dis.close(); } catch (Exception e) { Log.e(, , e); } finally { if (conn != null) conn.disconnect(); } return false; } -- Error log following 09-23 12:01:42.041: INFO/AndroidRuntime(453): NOTE: attach of thread 'Binder Thread #3' failed 09-23 12:01:42.561: ERROR/(431): java.io.FileNotFoundException: http:// ***.***.***.***/man/ranking 09-23 12:01:42.561: ERROR/(431): at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:521) 09-23 12:01:42.561: ERROR/(431): at a.test.conn.AtestActivity.updateRecord(AtestActivity.java:36) 09-23 12:01:42.561: ERROR/(431): at a.test.conn.AtestActivity.onCreate(AtestActivity.java:18) 09-23 12:01:42.561: ERROR/(431): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 09-23 12:01:42.561: ERROR/(431): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611) 09-23 12:01:42.561: ERROR/(431): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663) 09-23 12:01:42.561: ERROR/(431): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 09-23 12:01:42.561: ERROR/(431): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931) 09-23 12:01:42.561: ERROR/(431): at android.os.Handler.dispatchMessage(Handler.java:99) 09-23 12:01:42.561: ERROR/(431): at android.os.Looper.loop(Looper.java:123) 09-23 12:01:42.561: ERROR/(431): at android.app.ActivityThread.main(ActivityThread.java:3683) 09-23 12:01:42.561: ERROR/(431): at java.lang.reflect.Method.invokeNative(Native Method) 09-23 12:01:42.561: ERROR/(431): at java.lang.reflect.Method.invoke(Method.java:507) 09-23 12:01:42.561: ERROR/(431): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 09-23 12:01:42.561: ERROR/(431): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 09-23 12:01:42.561: ERROR/(431): at dalvik.system.NativeStart.main(Native Method) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: java.lang.exceptionInInitializerError
What is the source code around TestGame01.java:369 ? On Sep 23, 4:55 am, onionbread futh...@gmail.com wrote: 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): FATAL EXCEPTION: main 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): java.lang.ExceptionInInitializerError 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): at java.lang.Class.newInstanceImpl(Native Method) 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): at java.lang.Class.newInstance(Class.java:1429) 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): Caused by: java.lang.UnsatisfiedLinkError: Library TestGame01 not found 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): at java.lang.Runtime.loadLibrary(Runtime.java:461) 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): at java.lang.System.loadLibrary(System.java:557) 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): at com.test.android.TestGame01clinit(TestGame01.java:369) 09-22 22:47:08.036: ERROR/AndroidRuntime(31237): ... 15 more On Sep 22, 7:47 pm, RichardC richard.crit...@googlemail.com wrote: You have missed out the importent bits from the ddms log. Look for a line that includes caused by and/or include more of the exception log so we can have a look at it. On Sep 21, 10:27 am, onionbread futh...@gmail.com wrote: Hi, I'm new to android development but I have background in C++ and a bit of java. I'm trying to run a game in Samsung Galaxy S but it crash. When I check the error message from ddms, it shows: FATAL EXCEPTION: main java.lang.ExceptionInInitializerError at java.lang.Class.newInstanceImpl(Native Method) at java.lang.Class.newInstance(Class.java:1429) ... and so on What I want to know is, what exactly is the meaning of this error, does it crash during an initialization? If yes, is the location in the c main file or in java file? I read some information on android developer's reference (http:// developer.android.com/reference/java/lang/ ExceptionInInitializerError.html#ExceptionInInitializerError()) But, honestly, I still don't get it. I tried google this error message but couldn't find the answer I'm looking for. Any explanation on this error will be much appreciated. Thank you very much. :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: FragmentPager Scrolling
Thank you both for your time and efforts. Best Regards, Eric -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ACRA clear
I usually just: * open the spreadsheet and save a copy (just to keep a record) * re-open the original sheet, select all the report rows and delete them On Sep 23, 11:37 am, bob b...@coolgroups.com wrote: What is the easiest way to clear out an ACRA report in Google Docs? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Unexpected Canvas Behavior when using Threads and supporting Methods
My dumb - and embarrassed. Put the clear in the wrong spot. Chris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] regarding camera issue
On Thu, Sep 22, 2011 at 10:51 PM, nageswara rao rajana nagu.raj...@gmail.com wrote: But it didnt worked on HTC(Versions are same).So please anyone suggest me solution for this issue. The error is Force close Application. That is only slightly less vague and useless than is not working. Debug your app. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] parcelable again: passing object BACK through activity stack
On Thu, Sep 22, 2011 at 7:15 PM, John Goche johngoch...@googlemail.comwrote: Not sure how to try this out on the emulator. F12 or F11 or something causes the emulator to rotate. See the emulator section in the Docs. Since the Intent is returned to the parent activity inside onActivityResult, what is the difference in using setResult and using putExtra in Activtity B on the Intent to pass back a custom result parameter to Activity A? Difference compared to what? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] org.xmlpull.v1.XmlPullParserException
here is the response plz can u guide mw how to add response or can u send me any links which will be match to my task soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:urn=urn:sap-com:document:sap:soap:functions:mc-style soapenv:Header/ soapenv:Body urn:ZemptrackEarnOview Useridxxx/Userid /urn:ZemptrackEarnOview /soapenv:Body /soapenv:Envelope -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Can Wifi be enabled on emulator?
Hi, I am trying to develop a wifi application, but when i try to turn on the wifi via code or directly through emulator, it shows error. Any fixes available for 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
[android-developers] java.lang.OutOfMemoryError: bitmap size exceeds VM budget,how to deal with it?
Hi, As i have number of images in my drawable folder.I am displaying it using R.drawble.imageid everywhere in imageviews and layouts as background. Sometimes it cause java.lang.OutOfMemoryError: bitmap size exceeds VM budget. I have seen this link from stackoverflow http://stackoverflow.com/questions/477572/android-strange-out-of-memory-issue/823966#823966,but i am not using Bitmap. So what is the workaround for this and what are the possibilities that cause this exception? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] parcelable again: passing object BACK through activity stack
You can try this on the emulator. Hit Ctrl+F11 and you'll 'rotate' the device. setResult does not immediately return results back to its parent activity (You can call setResult many times: only the last call to setResult will be effective, superseding all previous calls) The Intent you use when calling setResult will be the same Intent passed to the parent's implementation of onActivityResult later. Only when your child-activity finishes (call 'finish()' or the user hits the Back-key/button), then onActivtyResult will be called with same the Intent that was used by the last call to setResult. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 resolve outOfMemoryError - Bitmap size exceeds VM budget
Good to know you got it working. Just checking; You put images in 2 global vars in your application object. Be sure that these images are not (Bitmap)Drawables, since Drawables may hold references to a Context that could be an Activity. Holding a global (indirect) reference to an Activity may cause problems later. If these images are Bitmap instances, then it should work fine :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] org.xmlpull.v1.XmlPullParserException
I am not quite sure (i never used ksoap2), but i can come up with these possible causes: 1. Does your XML have some extra white-space before the top XML tag * Envelope*? 2. Try to set your NAMESPACE variable to http://schemas.xmlsoap.org/soap/envelope/; instead. 3. If that doesn't work, don't use NAMESPACE at all or set it to 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
Re: [android-developers] .html filed loading problem.how to i will solve it
Hi Shital Please try below code. WebView mWebView=(WebView)findViewById(R.id.mWebView); mWebView.loadUrl(file:///android_asset/html/raj.html); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setSaveFormData(true); mWebView.getSettings().setBuiltInZoomControls(true); mWebView.setWebViewClient(new MyWebViewClient()); private class MyWebViewClient extends WebViewClient { @Override //show the web page in webview but not in web browser public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl (url); return true; } } On Fri, Sep 23, 2011 at 5:07 PM, shital suryawanshi shital.andr...@gmail.com wrote: WebView mWebView =(WebView) findViewById(R.id.webView1); mWebView.loadUrl(file:///android_asset/html/raj.html); this my code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] org.xmlpull.v1.XmlPullParserException
thanks for reply it contains Content-Type: text/xml;charset=UTF-8 SOAPAction: Authorization:Basic u1JJtklWQVNVuzppbml0aWfsMQ== -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Async Task, rotation and indeterminate progressbar in custom header.
IS there a way to avoid the static references to the views, but at the same time giving the possibility of the tasks to change the visibility of the progressbar even if the current activity visible is not the one who laucnhed the task initially? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to get data From Status bar and disable it?
On Fri, Sep 23, 2011 at 4:40 AM, vishnu raj android.vis...@gmail.comwrote: At the mean time i want to get the the status bar notifications such as missed calls, new chat messages, new emails, new voicemail, etc... How to implement this ... please give me a hint .. Build your own firmware. You can't do this with the SDK. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] USB Host API on XOOM tablet
Hi All, I'm trying to get the USB Host API (introduced in sdk-version 12) working with the Motorola XOOM tablet. The details of the tablet are as follows: Model: MZ601 Android-version: 3.1 Firmware configuration version: GAS_ASIA_USAEVRSTURTIRD_P035 Build-number: H.6.3-25-5 We are using a custom USB cable (ref: http://www.youtube.com/watch?v=COkLEJGo6vo ) to convert the micro-B port of the tablet to work in USB host mode. This has been tested with USB mouse and it gets detected (we are able to navigate through the screens using the mouse). We have even connected an FTDI based device and that gets detected by the kernel (from dmesg, we can see the device enumeration messages). Now the next step was to implement a basic test application that uses USB Host mode APIs of Android to enumerate the peripheral devices connected to the host port. (Please scroll down to see the code snippet) I'm able to build the code using Eclipse with latest android-sdk. However when this application is executed, I do not see any of the USB devices attached to the host port getting detected. It would be great to know if anyone has tested Android's USB Host API on any tablet device especially Motorola XOOM. I would really appreciate your comments/suggestions. Code Snippet Log.d(USB_TEST, begin enumeration); usbman = (UsbManager) getSystemService(USB_SERVICE); HashMapString, UsbDevice deviceList = usbman.getDeviceList(); IteratorUsbDevice devIter = deviceList.values().iterator(); while(devIter.hasNext()) { UsbDevice dev = devIter.next(); Log.d(USB_TEST, dev-name: + dev.getDeviceName()); Log.d(USB_TEST, vendor-id: + dev.getVendorId()); Log.d(USB_TEST, product-id: + dev.getProductId()); } Log.d(USB_TEST, enumeration complete); /Code Snippet Warm Regards, Anil -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] org.xmlpull.v1.XmlPullParserException
On Fri, Sep 23, 2011 at 8:04 AM, arun kumar arun.kata...@gmail.com wrote: here is the response plz can u guide mw how to add response or can u send me any links which will be match to my task This has nothing to do with Android. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: USB Host mode on galaxy tab 10.1 / android 3.1 - Device repeatedly re connecting in dmesg output
Hi, I'm curious to know if you were able to get this fixed using Acer Iconia A500. Are you able to use the android application to enumerate devices using USB Host API? Warm Regards, Anil On Thu, Sep 22, 2011 at 1:05 AM, Taylor tlalexan...@gmail.com wrote: Hey! I've actually had the EXACT same problems and it was driving me nuts! I'm running a 16GB Wifi Galaxy tab with the 3.1 touchwiz update. I can connect a USB mouse and keyboard and hub all just fine, they work great. However, when I try to enumerate the devices, I get nothing. To compound the confusion, I was trying to build custom kernel drivers for an unsupported device (FTDI chips) and it was driving me crazy because I could install the module and verify it was running, but I had the same problem - the device is not supported message. I thought it was me! Specifically, I was trying to do this: http://android.serverbox.ch/?p=285 Then I tried this: http://android.serverbox.ch/?p=370 and couldn't get it to indicate that ANY devices were enumerated, even when it was just a USB mouse that was working! So then I tried BOTH of google's example apps, modifying the code to print all enumerated devices. Nothing. It printed the count value for the number of devices enumerated. Zero. Again, this was with a functioning device plugged in (In this case a keyboard). Annoyingly, I couldn't even TRY the ADB example the way its intended, because my phone is apparently a high power device and the tablet straight up tells you it refuses to mount it. Grrr. But aside from the high power device issue, which is annoying but seems to be by design, I am starting to feel like there is some problem with the USB implementation on the Galaxy Tab 10.1, and I am going to go out and buy an Acer Iconia A500 since people have reported success with that, and I am doing this for work. I will let you know how that goes. -Taylor On Aug 5, 6:58 am, wl williamoscarl...@gmail.com wrote: Hi, I'm trying to interface to a USB device from my googleIO galaxy tab 10.1. I've been through the documentation on developer.android.com and stack overflow and I can't find anything on this. Here's the problem: I connect the USB device: I've set up device filters as per the docs, and nothing happens. If I look in logcat when I connect the device, nothing happens. If getDeviceList() says there are 0 devices connected. But if I connect to my galaxy tab 10.1 using adb shell then run dmesg, I discover the device is being detected after all: 6[ 1685.332067] usb 1-1: new low speed USB device using tegra-ehci and address 45 3[ 1685.370073] usb 1-1: device v1267 p is not supported 6[ 1685.392656] host_notify: ndev name=tegra-ehci.0: from state=5 - to state=5 3[ 1685.392726] hub 1-0:1.0: unable to enumerate USB device on port 1 6[ 1685.551797] usb 1-1: new low speed USB device using tegra-ehci and address 46 3[ 1685.881732] usb 1-1: device v1267 p is not supported 6[ 1685.903018] host_notify: ndev name=tegra-ehci.0: from state=5 - to state=5 3[ 1685.903089] hub 1-0:1.0: unable to enumerate USB device on port 1 Not only is it being detected, but it seems to be repeatedly: - detecing the device - reading the vid and pid - declaring that they are not supported - giving up on enumerating the device and then starting all over again, about 5 times a second. I tried this with a different USB device (different VID/PID), and saw the same pattern. My questions are: - Could this be because I've managed to cock up setting up the intent filters, or is there some lower level problem stopping the device even getting that far? - What constraints are there on which usb devices are supported on android (e.g. are there limits to which protocols are supported? Or which VIDs/PIDs are supported? Or some other constraints?) - Is there any detailed documentation on USB on android (besides the hardware.usb. api reference)? - Has anyone else had this problem? Have they found a solution? Any help would be much appreciated W -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to read data from external device using android USB Host Api ?
Hi, Would you please let me know which Android device that you are using and what is the Android firmware version? Does USB Host APIs work fine on your Android device? I'm trying out a similar app on Motorola XOOM, but unfortunately that crappy device just does not seem to work for USB Host APIs.. Warm Regards, Anil On Wed, Aug 31, 2011 at 9:06 PM, Sam jain@gmail.com wrote: Hello , I've written an app to connect an USB Device and read data from external usb device to my android USB Host 3.1 root tab device. i used http://developer.android.com/guide/topics/usb/host.html android USB Host Api. But every time read data value got zero value in every byte from external device. can anyone send me demo or proper documentation how to read data from external device ? any encoding require for reading data ? 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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-configure/install widget on home screen
Hi, Suppose we have an area defined for widget frame. Now using ACTION_APPWIDGET_PICK intent via onLongPress() at home screen, we install a widget in that area. Now since onClick() and other events are now listened by widget itself, what can be best approach to re- launch Widget_List (using ACTION_APPWIDGET_PICK ) so that a new widget can be picked from list re-installed in same area by deleting the earlier one? Thanks for your feedback. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to obtain the GPS position of the user and actualice a textview everytime the position has changed?
I'm trying to make a simple activity that reads the GPS position of the user and actualices a simple textview everytime the position of the user changes. I find some examples en google but all of them are not nice examples, because only capture the position of the user ONE time, and i need that the textview get's actualiced everytime the position changes with the new latitude and longitude of the user. I tryed to do a thread but it fails and i think it is not necesary to do a thread, im in the wrong way. Code examples are welcome -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Async Task, rotation and indeterminate progressbar in custom header.
Don't hold static references to Activities or Views. You will run into memory issues and such. But you could put your instance of ProgressBarThread into a static reference that is accessible by Activity B. Then Activity B can register/attach and de-register/detach to this background task as well during its lifecycle. This would allow the ProgressBarThread to update both activities A and 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] Re: Async Task, rotation and indeterminate progressbar in custom header.
Ok ProgressBarThread is already a static inner class, so what you're telling is to change the instance reference to static too: private ProgressBarThread task=null; to private static ProgressBarThread task=null; But now how i tell the task initiated by activity A to attach to the current Activity???And how does rotation affects this? regards, On Fri, Sep 23, 2011 at 4:40 PM, Streets Of Boston flyingdutc...@gmail.comwrote: Don't hold static references to Activities or Views. You will run into memory issues and such. But you could put your instance of ProgressBarThread into a static reference that is accessible by Activity B. Then Activity B can register/attach and de-register/detach to this background task as well during its lifecycle. This would allow the ProgressBarThread to update both activities A and 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Using Dropbox with Android
On Thu, Sep 22, 2011 at 10:41 PM, Bishan tvbis...@gmail.com wrote: I tried to create folder in my dropbox account as below. DropboxAPI api = new DropboxAPI(); api.createFolder(sandbox, StockSys); but i got below exception. Contact DropBox. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Async Task, rotation and indeterminate progressbar in custom header.
On Fri, Sep 23, 2011 at 10:25 AM, Bluemercury joao.ro...@gmail.com wrote: IS there a way to avoid the static references to the views, but at the same time giving the possibility of the tasks to change the visibility of the progressbar even if the current activity visible is not the one who laucnhed the task initially? The activities cannot share a progress bar, period. They each have their own progress bar. When you switch between activities, put the progress value (e.g., getProgress()) in an extra, so the new activity can set its progress bar to match. When you handle rotation events, pass the progress value via onSaveInstanceState(), or possibly as part of the state you pass (along with your AsyncTask) in onRetainNonConfigurationInstance(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Async Task, rotation and indeterminate progressbar in custom header.
Its an indeterminate progressbar the only thing i need is to hide or show the animation, nothing else, but i just to reflect there background work being done from whatever activity started it, even if the current activity was not responsible... regards, On Fri, Sep 23, 2011 at 5:01 PM, Mark Murphy mmur...@commonsware.comwrote: On Fri, Sep 23, 2011 at 10:25 AM, Bluemercury joao.ro...@gmail.com wrote: IS there a way to avoid the static references to the views, but at the same time giving the possibility of the tasks to change the visibility of the progressbar even if the current activity visible is not the one who laucnhed the task initially? The activities cannot share a progress bar, period. They each have their own progress bar. When you switch between activities, put the progress value (e.g., getProgress()) in an extra, so the new activity can set its progress bar to match. When you handle rotation events, pass the progress value via onSaveInstanceState(), or possibly as part of the state you pass (along with your AsyncTask) in onRetainNonConfigurationInstance(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Async Task, rotation and indeterminate progressbar in custom header.
Sounds like this should not be an AsyncTask, but perhaps an IntentService instead. 2011/9/23 João Rossa joao.ro...@gmail.com: Its an indeterminate progressbar the only thing i need is to hide or show the animation, nothing else, but i just to reflect there background work being done from whatever activity started it, even if the current activity was not responsible... regards, On Fri, Sep 23, 2011 at 5:01 PM, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 23, 2011 at 10:25 AM, Bluemercury joao.ro...@gmail.com wrote: IS there a way to avoid the static references to the views, but at the same time giving the possibility of the tasks to change the visibility of the progressbar even if the current activity visible is not the one who laucnhed the task initially? The activities cannot share a progress bar, period. They each have their own progress bar. When you switch between activities, put the progress value (e.g., getProgress()) in an extra, so the new activity can set its progress bar to match. When you handle rotation events, pass the progress value via onSaveInstanceState(), or possibly as part of the state you pass (along with your AsyncTask) in onRetainNonConfigurationInstance(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Async Task, rotation and indeterminate progressbar in custom header.
** sorry for the bad english... ts an indeterminate progressbar the only thing i need is to hide or show the animation, nothing else, but i just want to reflect that there's background work being done from whatever activity that started it, even if the current activity was not responsible. regards, 2011/9/23 João Rossa joao.ro...@gmail.com Its an indeterminate progressbar the only thing i need is to hide or show the animation, nothing else, but i just to reflect there background work being done from whatever activity started it, even if the current activity was not responsible... regards, On Fri, Sep 23, 2011 at 5:01 PM, Mark Murphy mmur...@commonsware.comwrote: On Fri, Sep 23, 2011 at 10:25 AM, Bluemercury joao.ro...@gmail.com wrote: IS there a way to avoid the static references to the views, but at the same time giving the possibility of the tasks to change the visibility of the progressbar even if the current activity visible is not the one who laucnhed the task initially? The activities cannot share a progress bar, period. They each have their own progress bar. When you switch between activities, put the progress value (e.g., getProgress()) in an extra, so the new activity can set its progress bar to match. When you handle rotation events, pass the progress value via onSaveInstanceState(), or possibly as part of the state you pass (along with your AsyncTask) in onRetainNonConfigurationInstance(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Break the execution
On Fri, Sep 23, 2011 at 6:06 AM, Sivaprakash sivaprakashshanmu...@gmail.com wrote: Inside this If condition I want to stop the execution and dont let the system to execute rest of the code which I have in bottom. That's pretty much the exact purpose of an if condition On Fri, Sep 23, 2011 at 6:10 AM, tamil maran tam.mara...@gmail.com wrote: use this line android.os.killprocess Even discounting the fact the OP stated he wants to stay in the Activity, that's not how you exit an app in Android. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] how to get child or any component from the parent view
On Fri, Sep 23, 2011 at 6:16 AM, Addy joyy.bl...@gmail.com wrote: Currently for my Android's Application testing purpose, I got the view of the device screen then I want to fetch the child of that parent view. e.g. If I am fetching the main home screen so then can I get the menu like setting, browser, etc.? Your question does not make much sense. What are you trying to do? Setting and Browser are their own apps, not screens of anything. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Free 2 Paid
Anyone know why you can't change an Android app from Free to Paid? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Free 2 Paid
On Fri, Sep 23, 2011 at 11:46 AM, bob b...@coolgroups.com wrote: Anyone know why you can't change an Android app from Free to Paid? Because it's not allowed. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Async Task, rotation and indeterminate progressbar in custom header.
What if i create a reference of the progressbar on the application class and refresh it on the onCreate methods of the activities? On Fri, Sep 23, 2011 at 5:09 PM, Mark Murphy mmur...@commonsware.comwrote: Sounds like this should not be an AsyncTask, but perhaps an IntentService instead. 2011/9/23 João Rossa joao.ro...@gmail.com: Its an indeterminate progressbar the only thing i need is to hide or show the animation, nothing else, but i just to reflect there background work being done from whatever activity started it, even if the current activity was not responsible... regards, On Fri, Sep 23, 2011 at 5:01 PM, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 23, 2011 at 10:25 AM, Bluemercury joao.ro...@gmail.com wrote: IS there a way to avoid the static references to the views, but at the same time giving the possibility of the tasks to change the visibility of the progressbar even if the current activity visible is not the one who laucnhed the task initially? The activities cannot share a progress bar, period. They each have their own progress bar. When you switch between activities, put the progress value (e.g., getProgress()) in an extra, so the new activity can set its progress bar to match. When you handle rotation events, pass the progress value via onSaveInstanceState(), or possibly as part of the state you pass (along with your AsyncTask) in onRetainNonConfigurationInstance(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Android setImageUri not working with asset Uri
Hi Folks, I am using the following code to set an image from the assets folder. Uri numBgUri = Uri.parse(file:///android_asset/background_numbers.png); numBgImage.setImageURI(numBgUri); The background_numbers.png file definitely exists in the assets root directory. I am getting a FileNotFoundException in the log: - 09-23 17:05:23.803: WARN/ImageView(23713): Unable to open content: file:///android_asset/background_numbers.png Any ideas what I could be doing wrong? Thanks! Ash -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Free 2 Paid
You can put ads in it and create a paid version more complete. Depends of the case. 2011/9/23 TreKing treking...@gmail.com On Fri, Sep 23, 2011 at 11:46 AM, bob b...@coolgroups.com wrote: Anyone know why you can't change an Android app from Free to Paid? Because it's not allowed. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Set Wallpaper pop up
Hello, I am trying to figure out how to add that set wall paper popup into my app when people hold down on an image I have on my app. When on the internet on my g2 and I hold down on an image I get a pop up that says save image, view image, set as wallpaper, but on my app I do not get that and I want that. Is there a tutorial on this anywhere? Thanks in advance -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to get child or any component from the parent view
Thanks for your reply, I want to track the event of user interecation so I think, If I am able to get the device's screen as a view then I will get the child views of that view. And from that child view I will get the all events which will perform on that view. Or if this is impossible (As we don't have a root access of device for security resoan) so is their any alternate way from which I am able to get the user event on device, Currently from logcats I m just getting the Application name (when it Launching) but after that I didnt get any event (If user click any sub menu or any wherre on that application's screen, beco'z in adb their dont have any entry for that event ). This all things are for my testing application. Thanks all for your support. On Sep 23, 9:41 pm, TreKing treking...@gmail.com wrote: On Fri, Sep 23, 2011 at 6:16 AM, Addy joyy.bl...@gmail.com wrote: Currently for my Android's Application testing purpose, I got the view of the device screen then I want to fetch the child of that parent view. e.g. If I am fetching the main home screen so then can I get the menu like setting, browser, etc.? Your question does not make much sense. What are you trying to do? Setting and Browser are their own apps, not screens of anything. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Async Task, rotation and indeterminate progressbar in custom header.
AsyncTasks are a nifty tool but they have a fairly limited specific set of uses. The previous responses have pointed out a several problems with this code: you can't keep static refs to Activites or Views, multiple Activities can't share a progress bar, etc. I don't understand the use case, but I agree with Mark that, from the code you've supplied, this might be better done as an IntentService or as a pair of Fragments. I'm going to be giving a Webinar on the pitfalls surrounding AsyncTasks next week, on the 29th: http://oreillynet.com/pub/e/2061 -blake Programming Android, FTW! http://oreilly.com/catalog/0636920010364 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 get child or any component from the parent view
On Fri, Sep 23, 2011 at 12:45 PM, Addy joyy.bl...@gmail.com wrote: I want to track the event of user interecation so I think, If I am able to get the device's screen as a view then I will get the child views of that view. And from that child view I will get the all events which will perform on that view. That's not how it works. Or if this is impossible (As we don't have a root access of device for security resoan) Pretty much. This all things are for my testing application. You are welcome to track anything within your own app. Why you would need to track the user's action within other apps, I'm not sure, but is certainly not something you're going to be able to do with the SDK. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] parcelable again: passing object BACK through activity stack
On Fri, Sep 23, 2011 at 3:27 PM, Streets Of Boston flyingdutc...@gmail.comwrote: You can try this on the emulator. Hit Ctrl+F11 and you'll 'rotate' the device. Yes, I saw the problem pop up with my onRestart() called when I wasn't expecting it. I can see the problem here with onRestart() being called when I didn't expect it to (for all activities on the activity stack?) when the screen is rotated. Thanks for pointing it out. I can also see the emulator bug whereby I have to relaunch my application to exit landscape mode and get back to portrait mode. setResult does not immediately return results back to its parent activity (You can call setResult many times: only the last call to setResult will be effective, superseding all previous calls) This part is clear. The Intent you use when calling setResult will be the same Intent passed to the parent's implementation of onActivityResult later. Only when your child-activity finishes (call 'finish()' or the user hits the Back-key/button), then onActivtyResult will be called with same the Intent that was used by the last call to setResult. What is not clear to me at this point from the documentation is: 1. if I don't pass an intent to setResult(), ie. use the one-parameter version of setResult(), then will the null Intent be passed back to my onActivityResult callback function? 2. Can I pass activity B's intent back to activity A by a call to setResult and a call to finish() or do I have to create a new Intent in activity B to pass back to activity A in my setResult? Thanks, John Goche -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to add a ViewFlipper to the layout?
Thanks, it got stable when I removed the finish() calls and added this code to the 2d view class: @Override public void onWindowFocusChanged(boolean hasWindowFocus) { if (!hasWindowFocus) { thread.setRunning(false); thread.yield(); } else { thread.setRunning(true); thread.yield(); } } On Sep 23, 12:42 pm, Mark Murphy mmur...@commonsware.com wrote: On Fri, Sep 23, 2011 at 4:11 AM, MobileVisuals eyv...@astralvisuals.com wrote: How can I make use of adb logcat, DDMS, or the DDMS perspective in Eclipse if I can't reproduce the error in the emulator? It doesn't crash there. adb logcat, DDMS, and the DDMS perspective of Eclipse are perfectly capable of examining LogCat on your phone. I also call on finish() on the current activity after every call to startActivity. The app seems to run slower after starting the 3d activity several times. Well, sure. Don't do that. The whole point behind FLAG_ACTIVITY_REORDER_TO_FRONT was to reuse the existing activity instances. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training...At Your Office:http://commonsware.com/training -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Why doesn't HTC devices support Point attenuation?
I noticed that a lot of other new devices from LG and SonyEricsson don't support point attenuation either. Why is this the case? Shohuldn't they follow the Android standard? On Sep 20, 2:27 pm, MobileVisuals eyv...@astralvisuals.com wrote: I have implementedPointattenuationaccording to the Android specification in two of my company's apps. I have found that it works like it should on most devices, like those from Samsung. I have implementedPointattenuationon Symbian and C++ before, so I am quite sure that I have implemented it the right way. It is about the same code implementation in all OpenGL. The problem is that everything implemented withPointattenuationwill look like a blurry mess on devices fromHTCand some from LG. This happens on even the newest devices fromHTC, likeHTCDesire HD. Why is it like this? These devices should supportPointattenuationaccording to their specifications, but why don't they? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 get child or any component from the parent view
OK, Thanks. I got it. And one more thing, do you know how does ROBOTTIUM jar work for testing android application? I think it also do same, as get the screen view, from that screen It get the perticulat x,y coordinates where user touch then from that portion it will get the text.And from that text it will use in for testing play on device. So, They also achieve something similar to it, without any root access and modification of firmware. On Sep 23, 11:19 pm, TreKing treking...@gmail.com wrote: On Fri, Sep 23, 2011 at 12:45 PM, Addy joyy.bl...@gmail.com wrote: I want to track the event of user interecation so I think, If I am able to get the device's screen as a view then I will get the child views of that view. And from that child view I will get the all events which will perform on that view. That's not how it works. Or if this is impossible (As we don't have a root access of device for security resoan) Pretty much. This all things are for my testing application. You are welcome to track anything within your own app. Why you would need to track the user's action within other apps, I'm not sure, but is certainly not something you're going to be able to do with the SDK. ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] parcelable again: passing object BACK through activity stack
On Fri, Sep 23, 2011 at 1:38 PM, John Goche johngoch...@googlemail.comwrote: 1. if I don't pass an intent to setResult(), ie. use the one-parameter version of setResult(), then will the null Intent be passed back to my onActivityResult callback function? 2. Can I pass activity B's intent back to activity A by a call to setResult and a call to finish() or do I have to create a new Intent in activity B to pass back to activity A in my setResult? This is the kind of stuff you learn by just trying it and seeing what happens =) - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Save $500 on AnDevCon - register today!
Hi fellow Android Developers. Today is the last day to save $300 on AnDevCon. http://www.andevcon.com/AnDevCon_II/registration.html Since I'll be speaking there, you can use the code Mellor to get an additional $200 off! I look forward to Andevcon, where you can choose to hear from me or several much more qualified speakers! Have a great day! Nathan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 get child or any component from the parent view
On Fri, Sep 23, 2011 at 1:46 PM, Addy joyy.bl...@gmail.com wrote: And one more thing, do you know how does ROBOTTIUM jar work for testing android application? Nope. Check their site? - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: USB Host mode on galaxy tab 10.1 / android 3.1 - Device repeatedly re connecting in dmesg output
Hi Anil, Yes, I did get it working with the Acer. I had replied off list to Will because my original reply to the list was taking too long to get approved (it was my first post to this list). Here is my first off-list message, where I gave some details: On Thu, Sep 22, 2011 at 1:43 AM, Taylor tlalexan...@gmail.com wrote: Hey, I replied to the group, but I'm not seeing the message, so I don't know if it failed to post, or if its in limbo since I'm a new user. Anyway, I wanted to reply directly to you. I was having the EXACT same problem as you. I had a USB device that I had compiled a kernel module for. I loaded the module onto the tablet, and lsmod showed it running. However, I couldn't get the device to work, and dmesg showed the same problem - device not supported, over and over, even though the VID and PID matched the source code for the driver. I was going crazy, but I thought it was my kernel modules, so I tried a different approach at someone's suggestion. I tried some of google's example code for USB, and when it runs getDeviceList() I had it print how many USB devices were connected. It always reads zero, even when a functioning USB mouse is connected! This was frustrating, so I googled for how to enumerate devices on a galaxy tab, and found your post. After seeing your post, I realized this may be an issue with Samsung. I bought an Acer Iconia Tab A500 today, as some users had reported success with it - it works! The same code run on the galaxy tab still fails. Both are running 3.1. So I'm inclined to believe this is an issue with Samsung. Did you ever get this working? I have had continued success with the Acer, and none with the Samsung. Will - replying to your off-list message. I just checked again. The Acer enumerates a webcam and thumbdrive I've tried, but not a mouse or keyboard. This is with the following code, which logs values to logcat: UsbManager usbman = (UsbManager) getSystemService(USB_SERVICE); HashMapString, UsbDevice devlist = usbman.getDeviceList(); IteratorUsbDevice deviter = devlist.values().iterator(); PendingIntent pi = PendingIntent.getBroadcast(this, 0, new Intent( ACTION_USB_PERMISSION), 0); while (deviter.hasNext()) { UsbDevice d = deviter.next(); l(Found device: + String.format(%04X:%04X, d.getVendorId(), d.getProductId())); } where l is a function that logs stuff to the debug window. That is a snippet from the source code found here: http://android.serverbox.ch/?p=370 There is that USB missile launcher that the google demo supports. I have been considering getting one of those to do some more testing with the Samsung. -Taylor On Fri, Sep 23, 2011 at 7:34 AM, Anil Sasidharan anil...@gmail.com wrote: Hi, I'm curious to know if you were able to get this fixed using Acer Iconia A500. Are you able to use the android application to enumerate devices using USB Host API? Warm Regards, Anil On Thu, Sep 22, 2011 at 1:05 AM, Taylor tlalexan...@gmail.com wrote: Hey! I've actually had the EXACT same problems and it was driving me nuts! I'm running a 16GB Wifi Galaxy tab with the 3.1 touchwiz update. I can connect a USB mouse and keyboard and hub all just fine, they work great. However, when I try to enumerate the devices, I get nothing. To compound the confusion, I was trying to build custom kernel drivers for an unsupported device (FTDI chips) and it was driving me crazy because I could install the module and verify it was running, but I had the same problem - the device is not supported message. I thought it was me! Specifically, I was trying to do this: http://android.serverbox.ch/?p=285 Then I tried this: http://android.serverbox.ch/?p=370 and couldn't get it to indicate that ANY devices were enumerated, even when it was just a USB mouse that was working! So then I tried BOTH of google's example apps, modifying the code to print all enumerated devices. Nothing. It printed the count value for the number of devices enumerated. Zero. Again, this was with a functioning device plugged in (In this case a keyboard). Annoyingly, I couldn't even TRY the ADB example the way its intended, because my phone is apparently a high power device and the tablet straight up tells you it refuses to mount it. Grrr. But aside from the high power device issue, which is annoying but seems to be by design, I am starting to feel like there is some problem with the USB implementation on the Galaxy Tab 10.1, and I am going to go out and buy an Acer Iconia A500 since people have reported success with that, and I am doing this for work. I will let you know how that goes. -Taylor On Aug 5, 6:58 am, wl williamoscarl...@gmail.com wrote: Hi, I'm trying to interface to a USB device from my googleIO galaxy tab 10.1. I've been through the documentation on developer.android.com and stack overflow and I can't find anything on this. Here's the problem: I connect the USB device: I've set up
[android-developers] Re: bitmap reuse via BitmapFactory.Options.inBitmap?
If anyone needs an example, here you go- public class BitmapReuseActivity extends Activity { private Paint mPaint = new Paint(); private Rect mRect = new Rect(0,0, 123, 109); private Canvas mCanvas = new Canvas(); private Bitmap mBitmap = Bitmap.createBitmap(124, 110, Bitmap.Config.ARGB_); private Resources mResources; private static BitmapFactory.Options sBitmapOptions = new BitmapFactory.Options(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bitmap_reuse_listview); mResources = getResources(); // setup bitmap reuse options. sBitmapOptions.inBitmap = mBitmap; sBitmapOptions.inMutable = true; sBitmapOptions.inSampleSize = 1; // listview of 100 images. ListView listview = (ListView) findViewById(R.id.listView); listview.setAdapter(new BaseAdapter() { public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView; if (convertView == null) { imageView = new ImageView(BitmapReuseActivity.this); } else { imageView = (ImageView) convertView; } // decode into existing bitmap. Bitmap bitmap = BitmapFactory.decodeResource(mResources, R.drawable.my_image, sBitmapOptions); if (bitmap != null) { imageView.setImageBitmap(bitmap); } return imageView; } public long getItemId(int position) { return 0; } public Object getItem(int position) { return null; } public int getCount() { return 100; } }); } } Elliot -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Activity Help
My SQL queries are fine, I copy and paste the queries into SQLite Database Browser with the current database that is on the VM. Runs fine and returns the results expected. If it was a SQL error wouldn't the program error out before finishing the load? No breakpoints get hit on my debug mode and the layout loads with the data filled in on the VM. It's after everything runs I then get the error. Any thoughts about that? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: how to get child or any component from the parent view
Ok, Thank you very much. On Sep 23, 11:58 pm, TreKing treking...@gmail.com wrote: On Fri, Sep 23, 2011 at 1:46 PM, Addy joyy.bl...@gmail.com wrote: And one more thing, do you know how does ROBOTTIUM jar work for testing android application? Nope. Check their site? ----- TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Will android.permission.VIBRATE permission make my app invisible to tablets(in Android Market)?
I've read about Android Market filtering which involve uses-feature tag. But what about permission? Will Android Market filter my app out if the device has no vibrator? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Activity Help
I changed the name of my variable in the fetchLiteratureTypes function on the LiteratureEditor.java file so it wasn't the same as the one in the LiteratureManager.java. That seemed to work and fix my problem. I no longer error when running my app. I assume it had something to do with the variable name being used in the previous activity since I never called finish() on the activity when calling the next Intent. Thanks for the help everyone! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] parcelable again: passing object BACK through activity stack
1) The onActivityResult will have a result-code of RESULT_CANCELED and its 'Intent data' parameter will be null. 2) Yes, you can pass back any Intent, even the one that started the child-activity. You don't need to create a brand new one. When an Intent is passed back or forth between Activities (starting an activity / setResult+finishing), the other end (getIntent() / Intent in the onActivityResult) doesn't get the exact same *instance *of the Intent. Instead, it'll get a copy of it as an Intent with the exact same contents. As a comparison: Intents are passed by copy, not by value or reference :-) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Set Wallpaper pop up
On Fri, Sep 23, 2011 at 12:37 PM, OneaDayJ onead...@gmail.com wrote: When on the internet on my g2 and I hold down on an image I get a pop up that says save image, view image, set as wallpaper, but on my app I do not get that and I want that. Is there a tutorial on this anywhere? On that specifically, probably not, but: 1 - Saving the Image is standard Java I/O. Google java save image. 2 - Viewing the Image is a matter of launching an Intent with the image as the data and the VIEW action. 3 - Setting as wallpaper - search the documentation for wallpaper - see where that leads you. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: MonkeyRunner sample scripts
Two questions: 1. are you giving the full path to the apk? 2. can you perform any other device function? such as 'device.getProperty(build.model)' On Sep 21, 8:48 pm, mandeepa...@gmail.com mandeepa...@gmail.com wrote: First time, I am trying to run Monkeyrunner script on a device. I have been getting the JavaNullPointer error when device.installpackage(..) method is called. I could not figure if I have received an invalid device object OR the parameter (test.apk) passed in the device.installpackage(..) method has any problem. Apparently, I get 0x1 deviceID when I print it on the interative shell I appreciate any pointers in effectively resolving the issue Thanks, Mandeep -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multicast Receive
It seems that receiving multi-cast may be a problem forsome devices: http://stackoverflow.com/questions/3623143/multicast-on-android-2-2 And being that you have it working on other platforms...It would be great if you could get shark for root on your phone to actually see if the packets are making it to you. On Sep 21, 5:00 am, Jasleen Kaur kjasl...@rediffmail.com wrote: We have been trying to write a rtsp streaming client for Android platform in Eclispe. we are able to do the handshaking, i.e Describe, Setup, Play requests have been sucessfully communicated. Now i have chosen to receive the Multicast UDP data packets after PLAY command. The problem is that I am unable to receive the UDP multicast data...in the emulator as well as Android device, but am able to receive the UDP packets in a java based app and a .Net based app. wifi = (WifiManager) getSystemService(getApplicationContext().WIFI_SERVICE); mLock = wifi.createMulticastLock(mylock); mLock.setReferenceCounted(true); mLock.acquire(); MulticastSocket sock; InetAddress sessAddr = InetAddress.getByName(234.2.128.12); sock = new MulticastSocket(1100); // 48180); byte b = 64; sock.setTTL(b); sock.joinGroup(sessAddr); byte[] byData = new byte[500]; DatagramPacket pack = new DatagramPacket(byData, 500); sock.receive(pack); Plus i have added the following tags to the manifest uses-permission android:name=android.permission.INTERNET / uses-permission android:name=android.permission.CHANGE_WIFI_MULTICAST_STATE / uses-permission android:name=android.permission.ACCESS_WIFI_STATE / The program gets stuck on the receive statement. Pls suggest. Best Regards Jasleen -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Will android.permission.VIBRATE permission make my app invisible to tablets(in Android Market)?
Yes..it will be..and people will know to you want to use vibrate service..İf people dont want to vibrate via app they wont download it..So simple 2011/9/23, Kakyoin lgmc...@gmail.com: I've read about Android Market filtering which involve uses-feature tag. But what about permission? Will Android Market filter my app out if the device has no vibrator? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: bitmap reuse via BitmapFactory.Options.inBitmap?
Thanks 2011/9/23, elliot elliot.nathan...@gmail.com: If anyone needs an example, here you go- public class BitmapReuseActivity extends Activity { private Paint mPaint = new Paint(); private Rect mRect = new Rect(0,0, 123, 109); private Canvas mCanvas = new Canvas(); private Bitmap mBitmap = Bitmap.createBitmap(124, 110, Bitmap.Config.ARGB_); private Resources mResources; private static BitmapFactory.Options sBitmapOptions = new BitmapFactory.Options(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bitmap_reuse_listview); mResources = getResources(); // setup bitmap reuse options. sBitmapOptions.inBitmap = mBitmap; sBitmapOptions.inMutable = true; sBitmapOptions.inSampleSize = 1; // listview of 100 images. ListView listview = (ListView) findViewById(R.id.listView); listview.setAdapter(new BaseAdapter() { public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView; if (convertView == null) { imageView = new ImageView(BitmapReuseActivity.this); } else { imageView = (ImageView) convertView; } // decode into existing bitmap. Bitmap bitmap = BitmapFactory.decodeResource(mResources, R.drawable.my_image, sBitmapOptions); if (bitmap != null) { imageView.setImageBitmap(bitmap); } return imageView; } public long getItemId(int position) { return 0; } public Object getItem(int position) { return null; } public int getCount() { return 100; } }); } } Elliot -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] .html filed loading problem.how to i will solve it
yYes...you should enable javacsript.. 2011/9/23, Chirag Raval chirag.android.develo...@gmail.com: Hi Shital Please try below code. WebView mWebView=(WebView)findViewById(R.id.mWebView); mWebView.loadUrl(file:///android_asset/html/raj.html); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.getSettings().setSaveFormData(true); mWebView.getSettings().setBuiltInZoomControls(true); mWebView.setWebViewClient(new MyWebViewClient()); private class MyWebViewClient extends WebViewClient { @Override //show the web page in webview but not in web browser public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl (url); return true; } } On Fri, Sep 23, 2011 at 5:07 PM, shital suryawanshi shital.andr...@gmail.com wrote: WebView mWebView =(WebView) findViewById(R.id.webView1); mWebView.loadUrl(file:///android_asset/html/raj.html); this my code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] openmax framework android
i dont know what is openmax :D 2011/9/23, ProblemZone navi44...@gmail.com: i want to integrate openmax framework android for media player , give me guide line for implement that one. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en