[android-developers] Hi friends
Friends I Am trying to connect server on pc and client on android device.. My server is working fine... but my client is not working ... Here is my sever and client code... Server Code... public class Server_tcp { void run(){ { try { System.out.println(Hi Im In 1st Try); try { System.out.println(Hi Im In 2nd try ); Boolean end = false; ServerSocket ss = new ServerSocket(); System.out.println(socket created); while(!end){ //Server is waiting for client here, if needed Socket s = ss.accept(); System.out.println(socket accepted); BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream())); PrintWriter output = new PrintWriter(s.getOutputStream(),true); //Autoflush String st = input.readLine(); System.out.println(Tcp Example + From client: +st); output.println(I got the Message:)); output.flush(); s.close(); if (st==null){ end = true; } } ss.close(); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } } catch (IOException exp) { // TODO Auto-generated catch block exp.printStackTrace(); } } } public static void main(String args[]) { Server_tcp server = new Server_tcp(); while(true){ server.run(); } } } Client Code public class ClientTCPActivity extends Activity { /** Called when the activity is first created. */ private EditText et; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); System.out.println(Before try net); Run(); System.out.println(after try net); } public void Run() { System.out.println(inside try net); try { System.out.println(inside try); Socket s = new Socket(192.168.1.27,); //outgoing stream redirect to socket // OutputStream out = (OutputStream) et.getContentDescription(); PrintWriter output = new PrintWriter(s.getOutputStream(),true); output.println(Hello Android!); BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream())); //read line(s) String st = input.readLine(); System.out.println(st); //Close connection s.close(); System.out.println( try ); } catch (UnknownHostException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } My Client is not working properly my friends Can Any One help me ??? 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] setting priority to wifi configured network so that has to connect to specified network in the region if available
hi, Any one has succeed in setting wifi priority , please suggest me . Thanks regards, karthik kondlada -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] IabHelper (and OpenGL) losing the application context once a payment process is started
Hi After spending days debugging my Android application I realised that during the payment process, once the Google Play notification appears the surface is invalidated and recreated. This means I am recreating the OpenGL context and the IabHelper needs an updated context. So what I have done is basically unbind the billing process and rebind it again with new context which basically appears to work on testing the application. So what I am asking is will this work for real when I publish it. Is this bad practise to be constantly unbinding and recreating the helper everytime the context is lost? How do other people deal with this? Are there better solutions? Steve -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: IabHelper (and OpenGL) losing the application context once a payment process is started
By default GLSurfaceView destroy context on pause, you can modify this behavior with: http://developer.android.com/reference/android/opengl/GLSurfaceView.html#setPreserveEGLContextOnPause(boolean), if you app supports API levels 11 you can use one of many GLSurfaceView replacements with this functionality. -- Bart -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: IabHelper (and OpenGL) losing the application context once a payment process is started
Hi. thanks for the reply. I support Android 2.2 plus so don't really want to use that method. Also I don't like the look of this: 'the EGL context *may* be preserved when the GLSurfaceView is paused' On Tuesday, 25 June 2013 11:56:28 UTC+1, a1 wrote: By default GLSurfaceView destroy context on pause, you can modify this behavior with: http://developer.android.com/reference/android/opengl/GLSurfaceView.html#setPreserveEGLContextOnPause(boolean), if you app supports API levels 11 you can use one of many GLSurfaceView replacements with this functionality. -- Bart -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Displaying the long Press Power off screen/dialog
I am sure there is no way you can override the power button as it is an integral feature of smartphones just like the home button which also cannot be overridden. On Monday, 24 June 2013 16:33:46 UTC+1, ame...@googlemail.com wrote: Hey everyone, is there a way in Android to show the Phone Options screen that gets popped up when a user long presses on the Power button. On my Samsung Galaxy S3 it has the following options: 1. Power Off 2. Airplane Mode 3. Restart 4. Mute - Vibrate - Sound Is this possible to show this screen from my Application? Thanks Amey -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: IabHelper (and OpenGL) losing the application context once a payment process is started
W dniu wtorek, 25 czerwca 2013 13:06:35 UTC+2 użytkownik reaktor24 napisał: Hi. thanks for the reply. I support Android 2.2 plus so don't really want to use that method. Also I don't like the look of this: 'the EGL context *may* be preserved when the GLSurfaceView is paused' EGL can on any time destroy context due to power event and in android power event will occur after pause. Anyway if you target 2.2 you may use any replacement implementations (for example this one: https://code.google.com/p/replicaisland/source/browse/trunk/src/com/replica/replicaisland/GLSurfaceView.java ). -- Bart -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Displaying the long Press Power off screen/dialog
this is not what he asked. OP: Try sending events using http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_POWER (this thread deals with the Menu key, it might help you as well: https://groups.google.com/forum/#!topic/android-developers/ZAXh2EKewKM ) On Tuesday, June 25, 2013 2:42:46 PM UTC+3, reaktor24 wrote: I am sure there is no way you can override the power button as it is an integral feature of smartphones just like the home button which also cannot be overridden. On Monday, 24 June 2013 16:33:46 UTC+1, ame...@googlemail.com wrote: Hey everyone, is there a way in Android to show the Phone Options screen that gets popped up when a user long presses on the Power button. On my Samsung Galaxy S3 it has the following options: 1. Power Off 2. Airplane Mode 3. Restart 4. Mute - Vibrate - Sound Is this possible to show this screen from my Application? Thanks Amey -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Displaying the long Press Power off screen/dialog
Yes, if forcing it through key code events work its fine with me. On Tuesday, June 25, 2013 12:53:07 PM UTC+1, Piren wrote: this is not what he asked. OP: Try sending events using http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_POWER (this thread deals with the Menu key, it might help you as well: https://groups.google.com/forum/#!topic/android-developers/ZAXh2EKewKM ) On Tuesday, June 25, 2013 2:42:46 PM UTC+3, reaktor24 wrote: I am sure there is no way you can override the power button as it is an integral feature of smartphones just like the home button which also cannot be overridden. On Monday, 24 June 2013 16:33:46 UTC+1, ame...@googlemail.com wrote: Hey everyone, is there a way in Android to show the Phone Options screen that gets popped up when a user long presses on the Power button. On my Samsung Galaxy S3 it has the following options: 1. Power Off 2. Airplane Mode 3. Restart 4. Mute - Vibrate - Sound Is this possible to show this screen from my Application? Thanks Amey -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Displaying the long Press Power off screen/dialog
dispatchKeyEvent(); has been deprecated in 4.1. Will need to figure that out On Tuesday, June 25, 2013 12:53:07 PM UTC+1, Piren wrote: this is not what he asked. OP: Try sending events using http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_POWER (this thread deals with the Menu key, it might help you as well: https://groups.google.com/forum/#!topic/android-developers/ZAXh2EKewKM ) On Tuesday, June 25, 2013 2:42:46 PM UTC+3, reaktor24 wrote: I am sure there is no way you can override the power button as it is an integral feature of smartphones just like the home button which also cannot be overridden. On Monday, 24 June 2013 16:33:46 UTC+1, ame...@googlemail.com wrote: Hey everyone, is there a way in Android to show the Phone Options screen that gets popped up when a user long presses on the Power button. On my Samsung Galaxy S3 it has the following options: 1. Power Off 2. Airplane Mode 3. Restart 4. Mute - Vibrate - Sound Is this possible to show this screen from my Application? Thanks Amey -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Detect if an outgoing call has been answered
Use a BroadcastReceiver to register fr Phone call events. Use TelephonyManager to actually check the Call states. TelephonyManager.EXTRA_STATE_OFFHOOK means the call is active. Use android.intent.action.NEW_OUTGOING_CALL for another BroadcastReceiver to receive events when outgoing calls are made. On Thursday, June 20, 2013 8:29:25 AM UTC+1, Kunju Vava wrote: How to detect if an outgoing call has been answered. i have gone through several docs and i dint find any correct solution. Can any one please suggest me how to solve this issue This is one of the link i refered http://stackoverflow.com/questions/2250455/detect-if-an-outgoing-call-has-been-answered?rq=1 Expect a quick reply -- -- ωιтн яєgαя∂ѕ Ratheesh * *... -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: reverb effect on media player
*Hello Yamusani ,* I am looking for the same if you have got any solution for this problem then please help me On Wednesday, May 29, 2013 4:54:24 PM UTC+5:30, Yamusani Vinay wrote: I tries to apply reverb effect on media player but i'm getting MediaPlayer error(-22,0).. code: mMediaPlayer.setDataSource(fd); mReverb = new PresetReverb(0, mMediaPlayer .getAudioSessionId()); mReverb.setPreset(PresetReverb.PRESET_LARGEROOM); mReverb.setEnabled(true); mMediaPlayer.attachAuxEffect(mReverb.getId()); mMediaPlayer.setAuxEffectSendLevel(1.0f); mMediaPlayer.prepare(); mMediaPlayer.start(); added permisions in manifest file -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] setting priority to wifi configured network so that has to connect to specified network in the region if available
Can you clarify your question? Do you mean setting relative priority between known wifi networks or do you mean relative priority between wifi and cellular data? On Tue, Jun 25, 2013 at 2:17 AM, Kondlada karthik.kondl...@gmail.comwrote: hi, Any one has succeed in setting wifi priority , please suggest me . Thanks regards, karthik kondlada -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Programmatically rebooting
Hi everyone, is it possible to programmatically reboot an Android device? I'm currently working on Samsung Galaxy S3 and it doesn't seem to work. The PowerManager.reboot(null) throws an exception during Runtime. Does this work on rooted devices only? Thanks. Ameya -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: reverb effect on media player
no..i did the same thing but i did not got any solution.. On Tue, Jun 25, 2013 at 7:09 PM, Ram ram.pe...@mindbowser.com wrote: *Hello Yamusani ,* I am looking for the same if you have got any solution for this problem then please help me On Wednesday, May 29, 2013 4:54:24 PM UTC+5:30, Yamusani Vinay wrote: I tries to apply reverb effect on media player but i'm getting MediaPlayer error(-22,0).. code: mMediaPlayer.setDataSource(**fd); mReverb = new PresetReverb(0, mMediaPlayer .getAudioSessionId()); mReverb.setPreset(**PresetReverb.PRESET_LARGEROOM)**; mReverb.setEnabled(true); mMediaPlayer.attachAuxEffect(**mReverb.getId()); mMediaPlayer.**setAuxEffectSendLevel(1.0f); mMediaPlayer.prepare(); mMediaPlayer.start(); added permisions in manifest file -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/lO5pkWiaJ90/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] API to submit stack traces to Google Play
When an app crashes due to an uncaught exception, the user can submit a crash report, that shows up in the developer console, showing a stack trace and other useful information. But if the app catches the exception, it doesn't crash and I don't know of a good way of receiving diagnostic information about the exception. I suppose I could compose a report and either send it to a server somewhere or prompt the user to email it. But it would be really useful if the app could generate something like a crash report (without actually crashing) and have it reported through the developer console. Similarly, we sometimes hear from a customer about an app behaving incorrectly (e.g., blank screen). Again, it would be nice to have a tool by which the customer could report the logcat output from the app (in case any exceptions were caught and logged, or simply to see the flow of activities). (As of Jelly Bean, third-party apps like CatLog cannot read my app's logcat output.) Ideally, the tool could be invoked at the system level (maybe through app management settings?) to submit a report through the developer console. The alternative is to start removing catch clauses so that the app will, in fact, crash and the developer can at least see something. This seems like a silly approach, though. Any suggestions for what to do about these situations? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
The alternative is to start removing catch clauses so that the app will, in fact, crash and the developer can at least see something. This seems like a silly approach, though. Quite the contrary: if you are catching runtime exceptions then you are doing it wrong (most of the runtime exception indicate bugs in code, so catching them just suppressing effect of bug), on the other hand if you checked exception handling is just catch and log you are also doing it wrong - if exception occur some operation was prematurely terminated so usually it should be communicated to user (for example IOException when downloading something should at least end with some message shown). -- Bart -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
To get a log from users, it sucks, but you have to incorporate it into your own code. Perhaps a Contact HelpDesk form that has a checkbox to include log []. I may make that checked by default in my next release. https://code.google.com/p/android-log-collector/ As to other options, there are some. Crashlytics will let you log unchecked exceptions, and can send you both crashes and checked exceptions of your choice without the user's explicit action. 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
On Tuesday, June 25, 2013 10:10:44 AM UTC-7, a1 wrote: The alternative is to start removing catch clauses so that the app will, in fact, crash and the developer can at least see something. This seems like a silly approach, though. Quite the contrary: if you are catching runtime exceptions then you are doing it wrong (most of the runtime exception indicate bugs in code, so catching them just suppressing effect of bug) A Klingon warrior does not catch exceptions. Our software does not coddle the weak! I can agree from a pure software engineering philosophical perspective, but I am not at all convinced that end users prefer this approach. The idea of exceptions as unexpected falls away once you are doing anything like network access or even file access. , on the other hand if you checked exception handling is just catch and log you are also doing it wrong - But it is a start. It doesn't hurt to log it even you think you are already doing the right thing in response to it. if exception occur some operation was prematurely terminated so usually it should be communicated to user (for example IOException when downloading something should at least end with some message shown). Assuming you are doing all that and giving the best user friendly message to the user possible, you still might have a vested interest in the nitty gritty details of those exceptions to fix the problem. Original poster's query is very legitimate. 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
The idea of exceptions as unexpected falls away once you are doing anything like network access or even file access. Java distinguish between this two situation with checked and unchecked (runtime) exception. Runtime exceptions should never be cached (unless you can propose some valid recovery path from InvalidMonitorStateException or NullPointerException). , on the other hand if you checked exception handling is just catch and log you are also doing it wrong - But it is a start. It doesn't hurt to log it even you think you are already doing the right thing in response to it. Well maybe that's why I said: just catch and log not just catch, log and perform some appropriate fallback action. if exception occur some operation was prematurely terminated so usually it should be communicated to user (for example IOException when downloading something should at least end with some message shown). Assuming you are doing all that and giving the best user friendly message to the user possible, you still might have a vested interest in the nitty gritty details of those exceptions to fix the problem. Original poster's query is very legitimate. Why? How can you fix IOException? -- Bart -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] API to submit stack traces to Google Play
On Tue, Jun 25, 2013 at 11:42 AM, Ted Hopp ted.h...@gmail.com wrote: Any suggestions for what to do about these situations? What I do: Use ACRA-style bug reporting functionality to silently send myself bug reports. Currently to a Google Spreadsheet, eventually to a dedicated server. - 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Displaying the long Press Power off screen/dialog
-Original Message- From: Piren gpi...@gmail.com Sender: android-developers@googlegroups.com Date: Tue, 25 Jun 2013 04:53:07 To: android-developers@googlegroups.com Reply-To: android-developers@googlegroups.com Subject: [android-developers] Re: Displaying the long Press Power off screen/dialog this is not what he asked. OP: Try sending events using http://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_POWER (this thread deals with the Menu key, it might help you as well: https://groups.google.com/forum/#!topic/android-developers/ZAXh2EKewKM ) On Tuesday, June 25, 2013 2:42:46 PM UTC+3, reaktor24 wrote: I am sure there is no way you can override the power button as it is an integral feature of smartphones just like the home button which also cannot be overridden. On Monday, 24 June 2013 16:33:46 UTC+1, ame...@googlemail.com wrote: Hey everyone, is there a way in Android to show the Phone Options screen that gets popped up when a user long presses on the Power button. On my Samsung Galaxy S3 it has the following options: 1. Power Off 2. Airplane Mode 3. Restart 4. Mute - Vibrate - Sound Is this possible to show this screen from my Application? Thanks Amey -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Open remote image in Gallery
Hello, I have an app with thumbnails and when the user touch the thumb, I would like to open the full image in fullscreen. I try opening the image in the default Gallery app, but it doesn't work on all devices. Here's the snippet : Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url_of_the_remote_image_here)); intent.setType(image/jpg); startActivity(intent); On Nexus S running 4.1, I get : android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW typ=image/jpg } Any idea ? 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
On Tuesday, June 25, 2013 11:04:42 AM UTC-7, a1 wrote: Assuming you are doing all that and giving the best user friendly message to the user possible, you still might have a vested interest in the nitty gritty details of those exceptions to fix the problem. Original poster's query is very legitimate. Why? How can you fix IOException? If you believe that logcat logs are never helpful for tracking down issues, we can agree to disagree. You stated above that most of the runtime exception indicate bugs in code. Are you to assume that a handled checked exception means that there aren't any bugs in the code? I don't, and that's why log messages can be helpful. An IOException isn't necessarily the end of the story. You could be not using the right timeouts, the right credentials, or the right format. The user could have problems with DNS. Could you retry more or less times? Could you do something different on the server, if you control it? Are there some changes on a server you do not control? Is the user choosing an invalid path or filename and are you letting them do that when you shouldn't? 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
Assuming you are doing all that and giving the best user friendly message to the user possible, you still might have a vested interest in the nitty gritty details of those exceptions to fix the problem. Original poster's query is very legitimate. Why? How can you fix IOException? If you believe that logcat logs are never helpful for tracking down issues, we can agree to disagree. Never said that. You stated above that most of the runtime exception indicate bugs in code. Are you to assume that a handled checked exception means that there aren't any bugs in the code? I don't, and that's why log messages can be helpful. Never said that either. An IOException isn't necessarily the end of the story. You could be not using the right timeouts, the right credentials, or the right format. The user could have problems with DNS. Could you retry more or less times? Could you do something different on the server, if you control it? Are there some changes on a server you do not control? Is the user choosing an invalid path or filename and are you letting them do that when you shouldn't? And never said that. You are attacking a strawman. I've commented on a very specific quote from original post: The alternative is to start removing catch clauses so that the app will, in fact, crash and the developer can at least see something. This seems like a silly approach, though. From this and rest of the post I get an impression (maybe wrong) that OP catches aggressively everything - and this is of course invalid approach (that makes debugging harder), and I did explain why. -- Bart -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Version upgrade upload failed
I got this Google Play message: Upload failed You need to use a different package name because com.. is already used by one of your other applications. I understand that the package name is *supposed* to be the same because it is an upgrade. I went from version 2 to 3. Just in case I had mistakenly called version 2 version 3, I did my manifest as: android:versionName=3.1 android:versionCode=4 However, I still get the message. Anything else I should be checking, or am I following the wrong procedure? 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
On Tuesday, June 25, 2013 2:02:43 PM UTC-7, a1 wrote: Assuming you are doing all that and giving the best user friendly message to the user possible, you still might have a vested interest in the nitty gritty details of those exceptions to fix the problem. Original poster's query is very legitimate. Why? How can you fix IOException? If you believe that logcat logs are never helpful for tracking down issues, we can agree to disagree. Never said that. That should have been phrased as a question. Since you said Why? I wrongly assumed you were expressing doubt. If you do think logcat logs are helpful, then we don't have to disagree on anything. You stated above that most of the runtime exception indicate bugs in code. Are you to assume that a handled checked exception means that there aren't any bugs in the code? I don't, and that's why log messages can be helpful. Never said that either. It was a phrased as a thought question, not a quote. An IOException isn't necessarily the end of the story. You could be not using the right timeouts, the right credentials, or the right format. The user could have problems with DNS. Could you retry more or less times? Could you do something different on the server, if you control it? Are there some changes on a server you do not control? Is the user choosing an invalid path or filename and are you letting them do that when you shouldn't? And never said that. You didn't say that. You asked How can you fix IOException? I was posing some possible answers, but never mind, I guess that was rhetorical. 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] What's up Liz, it's Andrey. I got back home a little while ago. Are you guys still on the rWhat's up Liz, it's Andrey. I got back home a little while ago. Are you guys on the road
-Andrey -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Version upgrade upload failed
Did you use the same signing key? On Tuesday, June 25, 2013 10:07:29 PM UTC+1, StevenHu wrote: I got this Google Play message: Upload failed You need to use a different package name because com.. is already used by one of your other applications. I understand that the package name is *supposed* to be the same because it is an upgrade. I went from version 2 to 3. Just in case I had mistakenly called version 2 version 3, I did my manifest as: android:versionName=3.1 android:versionCode=4 However, I still get the message. Anything else I should be checking, or am I following the wrong procedure? 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Version upgrade upload failed
Yes. If I used a different signing key, then it would have gone through as a new app. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: API to submit stack traces to Google Play
On Tuesday, June 25, 2013 5:02:43 PM UTC-4, a1 wrote: You are attacking a strawman. I've commented on a very specific quote from original post: The alternative is to start removing catch clauses so that the app will, in fact, crash and the developer can at least see something. This seems like a silly approach, though. From this and rest of the post I get an impression (maybe wrong) that OP catches aggressively everything - and this is of course invalid approach (that makes debugging harder), and I did explain why. Well, I never said I was catching everything indiscriminately. I catch things that I can do something about. Sometimes there's a silent fall-back and the app doesn't even need to bother the user about it. Sometimes I need to involve the user in what to do next. Sometimes I simply tell the user that something didn't work. In all those cases, the app doesn't crash, but in many of those cases, as a developer I'd like to see what happened; there may be an underlying flaw in our code or an unforeseen incompatibility with the user's device. What I was asking about was whether there was a way of obtaining the benefits of a crash report without forcing the app to crash (that was what removing catch clauses was referring to). Call it a glitch report. What I've been doing in cases where I tell the user that something went wrong is to provide a button that composes an email for the user to review and then send to us. This seems bad for several reasons: - it's a pain to code - users are often reluctant to send emails (or to take any action other than dismiss an error notification dialog) - an error message is already disruptive to the user; asking the user to take some action makes the disruption worse - it's out-of-band communication - it would be useful to report problematic events without involving the user (especially events for which the user would otherwise not need to be involved) I'll look into the ACRA-style bug reporting that TreKing suggests and at the crashlytics and android-log-collector tools suggested by Nathan. At first glance these look interesting, although something integrated with the developer console would be ideal. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Version upgrade upload failed
On Tue, Jun 25, 2013 at 4:07 PM, StevenHu stevehust...@gmail.com wrote: Anything else I should be checking, or am I following the wrong procedure? You weren't explicit, so let's be sure ... you are, in fact, attempting to upload an update and using the Upload New APK option under an existing app, correct? You're not using Add new application and assuming it will detect it as an update? - 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] how to implement front camera
On Mon, Jun 24, 2013 at 12:25 AM, Sadhna Upadhyay sadhna.braah...@gmail.com wrote: how to implement front camera for capturing image and then email that image. Try reading the Android documentation and using Google. See how far that gets 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 --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Programmatically rebooting
On Tue, Jun 25, 2013 at 11:20 AM, amey...@googlemail.com wrote: Hi everyone, is it possible to programmatically reboot an Android device? I'm currently working on Samsung Galaxy S3 and it doesn't seem to work. The PowerManager.reboot(null) throws an exception during Runtime. Does this work on rooted devices only? http://lmgtfy.com/?q=PowerManager.reboot - 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 unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.