[android-developers] Re: Animations in the list view
I have tried one way of doing this kind of animation.I have taken 2 listviews and made first list view's visibility gone.Then i have taken one separate layout( the same custom layout i am using for the listview )and trying to translate that layout from middle to top and once it reaches to top and making it's visibility to gone.and the same time when the view is translating, i am sliding down the list also and once the view's animation ends i am setting list animation to fillAfter = true and fillEnabled=true and list1.setVisibility = gone and list2.setVisibility = visible sothat list2 should be visible but what happening is list1 is not getting gone it still be there because of the bug when we use fillAfter = true and fillEnabled=true.How can i make my list1 visibility to gone ? On Sunday, 13 January 2013 00:10:47 UTC+5:30, Ansh wrote: Hi guys I am new to animation in android.I am trying to translate childitem/ of a listview.First child view should translate from middle to top of the list and the list should also slide down during the translate animation and make the space of the view being translated.Please help me guys as it has eaten up my mind for past 3days. i am trying to achieve exactly the same in this video. http://youtu.be/xPLhfEJuz4k -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Correct way to implement Activity onDestroy()?
Basically, as long as you aren't hanging static Activity references you should be fine. The main activity will be thrown away upon its destruction, at which point the Activity will be thrown away: along with its contents. Of course, if you're holding onto Views elsewhere that's bad (i.e., don't hold static refs). kris On Mon, Jan 14, 2013 at 1:42 AM, Greenhand cooperateonl...@gmail.com wrote: I read http://android-developers.blogspot.tw/2009/01/avoiding-memory-leaks.html about avoiding memory leaks. I would like to know whether I should null out all member variables, such as TextView and Button in onDestroy()? Or, unregistering listener, unbinding service and etc.in onDestroy() are enough to prevent memory leak? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Correct way to implement Activity onDestroy()?
Thank you. Another related question, in section 5. Implement a more intelligent AsyncTask dealing with screen orientation of http://blog.doityourselfandroid.com/2010/11/14/handling-progress-dialogs-and-screen-orientation-changes/, it has private AsyncTaskComplex activity in ListFresher as a member variable. Shouldn't it be null out because it is not a static Activity references? Kristopher Micinski於 2013年1月14日星期一UTC+8下午4時24分53秒寫道: Basically, as long as you aren't hanging static Activity references you should be fine. The main activity will be thrown away upon its destruction, at which point the Activity will be thrown away: along with its contents. Of course, if you're holding onto Views elsewhere that's bad (i.e., don't hold static refs). kris On Mon, Jan 14, 2013 at 1:42 AM, Greenhand coopera...@gmail.comjavascript: wrote: I read http://android-developers.blogspot.tw/2009/01/avoiding-memory-leaks.html about avoiding memory leaks. I would like to know whether I should null out all member variables, such as TextView and Button in onDestroy()? Or, unregistering listener, unbinding service and etc.in onDestroy() are enough to prevent memory leak? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Management image size
Hello, In my app I'm managing images downloaded from the server, and the first problem I encounter is that of size. As you this paste you manage them? You have different sizes depending on the server and the device descargais which? You only have one on the server and the app re-scale? Any idea or approach will be analyzed and studied: D: D thanks bY kLvin Hola, En mi app estoy gestionando imágenes que descargo del servidor, y el primer problema que me encuentro es el del tamaño. Como gestionáis vosotros esta pega?? Tenéis varios tamaños en el servidor y dependiendo del dispositivo descargais una u otra? Solo teneis una en el servidor y la reescalais desde la app? Cualquier idea o planteamiento sera analizado y estudiado :D :D Gracias bY kLvin -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 switch between 2 renderers?
I have 2 renderers in my live wallpaper, quadRenderer and renderer. I try to switch between them with setRenderer(quadRenderer); This results in this error: setRenderer has already been called for this instance. What can I do to avoid this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to switch between 2 renderers?
Hi, AFAIK, only way around the problem is to introduce a proxy renderer. Meaning you install this proxy as renderer and its only purpose is to delegate rendering calls to actual implementation classes. -- H On Mon, Jan 14, 2013 at 12:11 PM, MobileVisuals eyv...@astralvisuals.com wrote: I have 2 renderers in my live wallpaper, quadRenderer and renderer. I try to switch between them with setRenderer(quadRenderer); This results in this error: setRenderer has already been called for this instance. What can I do to avoid this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to switch between 2 renderers?
I see, do you mean using the proxy renderer as the only renderer? On Monday, January 14, 2013 12:30:50 PM UTC+1, Harri Smått wrote: Hi, AFAIK, only way around the problem is to introduce a proxy renderer. Meaning you install this proxy as renderer and its only purpose is to delegate rendering calls to actual implementation classes. -- H On Mon, Jan 14, 2013 at 12:11 PM, MobileVisuals eyv...@astralvisuals.com javascript: wrote: I have 2 renderers in my live wallpaper, quadRenderer and renderer. I try to switch between them with setRenderer(quadRenderer); This results in this error: setRenderer has already been called for this instance. What can I do to avoid this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to switch between 2 renderers?
Hi, Yes, using one renderer only which delegates commands further. -- H On Mon, Jan 14, 2013 at 1:47 PM, MobileVisuals eyv...@astralvisuals.com wrote: I see, do you mean using the proxy renderer as the only renderer? On Monday, January 14, 2013 12:30:50 PM UTC+1, Harri Smått wrote: Hi, AFAIK, only way around the problem is to introduce a proxy renderer. Meaning you install this proxy as renderer and its only purpose is to delegate rendering calls to actual implementation classes. -- H On Mon, Jan 14, 2013 at 12:11 PM, MobileVisuals eyv...@astralvisuals.com wrote: I have 2 renderers in my live wallpaper, quadRenderer and renderer. I try to switch between them with setRenderer(quadRenderer); This results in this error: setRenderer has already been called for this instance. What can I do to avoid 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 i pass downloaddata to my main activity?
Hello.I have an downloadservice.class for download data and i call it from main activity inside onCreate.How i pass download data to main activity for display as text? public class DownloadService extends IntentService { public String response; public DownloadService() { super(DownloadService); } // Will be called asynchronously be Android @Override protected void onHandleIntent(Intent intent) { //String urldown = intent.getStringExtra(url); String urldown=http://mplampla.net/LEDstate.txt;; DefaultHttpClient client = new DefaultHttpClient(); HttpGet httpGet = new HttpGet(urldown); try { HttpResponse execute = client.execute(httpGet); InputStream content = execute.getEntity().getContent(); BufferedReader buffer = new BufferedReader(new InputStreamReader(content)); String s = ; while ((s = buffer.readLine()) != null) { response += s; } //Arduwebled instance = new Arduwebled(); //instance.test(response); // while (mOutputStream != null) { //mOutputStream.write(buffer); // } } catch (IOException e) { e.printStackTrace(); } // Arduwebled instance = new Arduwebled(); // instance.test(response); } // Sucessful finished } public class Arduwebled extends Activity { TextView text; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.setup); sendBroadcast(new Intent(this,MyScheduleReceiver.class)); } public void test(String response){ TextView text = (TextView) findViewById(R.id.downdata); text.setText(response); } public void StopRepeat(View view) { sendBroadcast(new Intent(this,MyStopReceiver.class)); } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
I have a toast displayed in the following way: Toast.makeText(context, The message, Toast.LENGTH_LONG).show(); I am 100% I am displaying the toast from the UI thread and I can add that it worked fine for many devices including older updates of Galaxy S3 but after latest update no one of my toasts are being displayed. Have anyone else experienced this and have a solution? Thanks, Tobias -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Animations in the list view
I think this is not very different to a question we had a couple of weeks ago. This is what I would do: - I would not use 2 ListViews. I would leave the original ListView underneath and dynamically create a new View that was a single RowView and put that on top and slide it around. - I would not insert an extra row into the original ListView. Instead find the child view at the top of the list and double the height of it. Make sure the gravity of the content is such that is sticks to the bottom of the view. - Slide the dummy row view up until it lies directly over the top (blank) part of the child view. - After the animations have finished insert a new Row into the List at the insertion point, change the child view height back to a single row height and destroy the dummy row view. I think that should give you the appearance you want. Judging from the neutral background and lack of row dividers I'm guessing whoever wrote the sample behind your youtube example did something similar. Best, Nick On Monday, January 14, 2013 3:16:59 AM UTC-5, Ansh wrote: I have tried one way of doing this kind of animation.I have taken 2 listviews and made first list view's visibility gone.Then i have taken one separate layout( the same custom layout i am using for the listview )and trying to translate that layout from middle to top and once it reaches to top and making it's visibility to gone.and the same time when the view is translating, i am sliding down the list also and once the view's animation ends i am setting list animation to fillAfter = true and fillEnabled=true and list1.setVisibility = gone and list2.setVisibility = visible sothat list2 should be visible but what happening is list1 is not getting gone it still be there because of the bug when we use fillAfter = true and fillEnabled=true.How can i make my list1 visibility to gone ? On Sunday, 13 January 2013 00:10:47 UTC+5:30, Ansh wrote: Hi guys I am new to animation in android.I am trying to translate childitem/ of a listview.First child view should translate from middle to top of the list and the list should also slide down during the translate animation and make the space of the view being translated.Please help me guys as it has eaten up my mind for past 3days. i am trying to achieve exactly the same in this video. http://youtu.be/xPLhfEJuz4k -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
What Context are you using? Is it the Activity, or something else? If it is not the Activity, try switching to that and see if the behavior changes. I wouldn't expect that to have an impact, but, then again, I wouldn't expect your problem, either. On Mon, Jan 14, 2013 at 8:06 AM, Tobias tobias.e.lindb...@gmail.com wrote: I have a toast displayed in the following way: Toast.makeText(context, The message, Toast.LENGTH_LONG).show(); I am 100% I am displaying the toast from the UI thread and I can add that it worked fine for many devices including older updates of Galaxy S3 but after latest update no one of my toasts are being displayed. Have anyone else experienced this and have a solution? Thanks, Tobias -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BouncyCastle signature value does not match with dotNET signature value.
Hi Nikolay and Jason... Your summary is correct Nikolay: I sign with privatekey to verify the sender. * did you normalize properly? - Yes... I use a very simple plain text, without especial characters, CR, TAB or LF. * does the raw (byte array) signature match? - I'm not sure about this, but the digestvalues in dotNet and BoucyCastle are identical. - A question: How to cipher digestvalue directly with the privatekey? * are you using the same options for Base64? There are subtle variations here (padding character, line breaks, etc.). - The signatures values are very different. I replace the tag in BC file by dotNet signature value and the webservice returns OK. It's a mystery!!! Below, the two exemples of the signature. Thanks in advance. SIGNED IN dotNet: testtxt Id=txtcontentabc/content/txtSignature xmlns=http://www.w3.org/2000/09/xmldsig#;SignedInfoCanonicalizationMethod Algorithm=http://www.w3.org/TR/2001/REC-xml-c14n-20010315; /SignatureMethod Algorithm=http://www.w3.org/2000/09/xmldsig#rsa-sha1; /Reference URI=#txtTransformsTransform Algorithm=http://www.w3.org/2000/09/xmldsig#enveloped-signature; /Transform Algorithm=http://www.w3.org/TR/2001/REC-xml-c14n-20010315; //TransformsDigestMethod Algorithm=http://www.w3.org/2000/09/xmldsig#sha1; /DigestValuefjyUo6F4wLkBrMK558cee+TAmZA=/DigestValue/Reference/SignedInfoSignatureValueDgzsYBd3CMN+imXKTBmErbw9aHE53ZATtCz5j/116x6lUPRABgSQ0rqcdnjmB7VJLI/eY6HgXGhYZf+pr/9ncBS+dTPcMt8c99enG+Ndhn+sWqUA7DI9X+Qzwv+LMG/USCKX/1dXl1vts7DQQChSLz+yydIvjHWfm/p51WLAvsDqCnmuNzCE70myli3DTsgv04Gll3nYOtfN6EZNUlliAJ5qrGrv0tTpjfiohKyqD5ddwO3ruSh2lLt7XEOa2SIvNvK7hPbhQ5HmKMuWx4Yyn1Arp6+Yd0gcUjhcIZUk1bmU4UkF1a+bOszPFNqPPvWaY0Mr8cznmTdDQEbRj7UjRQ==/SignatureValueKeyInfoX509DataX509CertificateMIIHszCCBZugAwIBAgIQMjAxMjA5MTgxMjQwMDY0NDANBgkqhkiG9w0BAQsFADCBijELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxNjA0BgNVBAsTLVNlY3JldGFyaWEgZGEgUmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCAtIFJGQjEuMCwGA1UEAxMlQXV0b3JpZGFkZSBDZXJ0aWZpY2Fkb3JhIFNFUlBST1JGQiB2MzAeFw0xMjA5MTgxNDQ5MzdaFw0xMzA5MTgxNDQ2NDhaMIIBCDELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxNjA0BgNVBAsTLVNlY3JldGFyaWEgZGEgUmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCAtIFJGQjERMA8GA1UECxMIQ09SUkVJT1MxEzARBgNVBAsTCkFSQ09SUkVJT1MxFjAUBgNVBAsTDVJGQiBlLUNOUEogQTExFDASBgNVBAcTC1BBU1NPIEZVTkRPMQswCQYDVQQIEwJSUzFJMEcGA1UEAxNAQUxGQVNJRyBTRVJWSUNPUyBFTSBURUNOT0xPR0lBIERBIElORk9STUFDQU8gTFREQTowNzg1ODQzMzAwMDEyMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJxKyImLfI+bCbnCt+2y+5fDMc3VemFQwd9gEFH0l9IBqqfQGrxjahm4H7owwJP1ODCQmZQKhu1StkPztST3DKMZMV1BHkUX67019DcBKwnHctuyDSOMRuM7M8YIslK80rWbPD6Em3WbGy9knFeNT6Zk+5gdYw1fPBR/WGG4/pcoXtCIwe2vW3GxJbuAspjBXGBwAoQv703VX4YWlfv5N3r5IWdx9cX4hJnZoou1Nf+6ggRw1iaLXwWvGGBJIZ2Y2xW03iKZch6d1e7yEE/CiOyXW+bXpywRpHDpAFR61z4e0Gq70FzNOespM2VBRTWLh9izSA0d22Te1IB7i36pBB0CAwEAAaOCApIwggKOMAwGA1UdEwEB/wQCMAAwHwYDVR0jBBgwFoAUsWexHeccrndCFK1/ngkO5oWwt64wDgYDVR0PAQH/BAQDAgXgMGAGA1UdIARZMFcwVQYGYEwBAgEKMEswSQYIKwYBBQUHAgEWPWh0dHBzOi8vY2NkLnNlcnByby5nb3YuYnIvYWNzZXJwcm9yZmIvZG9jcy9kcGNhY3NlcnByb3JmYi5wZGYwgbUGA1UdEQSBrTCBqqA9BgVgTAEDBKA0BDIyNDEyMTk4MjAwMTM1MjU1MDY2MDAwMDAwMDAwMDAwMDAwMDIwODEyODUzMjhTSlNSU6AiBgVgTAEDAqAZBBdDQVNTSU8gRkVSTkFORE8gSEFFUlRFUqAZBgVgTAEDA6AQBA4wNzg1ODQzMzAwMDEyMaAXBgVgTAEDB6AOBAwwMDAwMDAwMDAwMDCBEXNwY0BjZGwtcGYuY29tLmJyMCAGA1UdJQEB/wQWMBQGCCsGAQUFBwMCBggrBgEFBQcDBDCBwAYDVR0fBIG4MIG1MDSgMqAwhi5odHRwOi8vY2NkLnNlcnByby5nb3YuYnIvbGNyL2Fjc2VycHJvcmZidjMuY3JsMDWgM6Axhi9odHRwOi8vY2NkMi5zZXJwcm8uZ292LmJyL2xjci9hY3NlcnByb3JmYnYzLmNybDBGoESgQoZAaHR0cDovL3JlcG9zaXRvcmlvLmljcGJyYXNpbC5nb3YuYnIvbGNyL3NlcnByby9hY3NlcnByb3JmYnYzLmNybDBOBggrBgEFBQcBAQRCMEAwPgYIKwYBBQUHMAKGMmh0dHA6Ly9jY2Quc2VycHJvLmdvdi5ici9jYWRlaWFzL2Fjc2VycHJvcmZidjMucDdiMA0GCSqGSIb3DQEBCwUAA4ICAQARRZtKyK3I47YbRJJD2PsVFJOmOfgZmK2mt4+3zYwXlHJuAcnQ1PMq+j7UCxT/Tc/KnxEsM2yTA335YLsCpI5L30I3p/Pn2tRLyt8FXmgElcJx6GQpDfsBSm/G+tYoo5DpmQEWmXBoGT2WLNfSQXCfXESNRspuyQ8Ce9d6hzpUdBcfssBK2GVisAIefKqpwEdJUEzhnxajFfnOBWPlNpmT1eE9fJ2y5rd5ycYYY9NxBv2axWLg26eBzBQ0+3XF7etUUZ+v0BU1DeV8DNqtBslUdTorI5cPbtu4LqNMg2xwRT8CY225pvO9TQtJLKZ5lCjWLs6KNjTNIPAuyKVaPeybn7uJ9l8iGFATNAM5BqmFyhXK2Ydyf6AafxIPfr+T1ioSNFDFqruQjDRiGUthzAEA/XN3Hmb0a3ZuboRUyblpsj84MxWfh4G/r4JR8pO+pwJ8er0B+ocHrX14rW74NaYwCq458BvUXp3cNjjQTf82Aq7ooeenrCZx6e7WVpuDEKNVvIbLlTuZxsI4Yd561UHcaUzwL0xiVZs+qMK8LN50Q1BXrsLD266CsBSeE1A1WHKLHCijyaNTjjje7h3ctEyE1jwIKsQPkgEUuDdyjFefgEyXWuznq0XtvSzHiA3mfHP7nC6hmfQsAGr3uzzByOZIQU9BurRIEBjbs3MG5sdiTQ==/X509Certificate/X509Data/KeyInfo/Signature/test SIGNED by BC: testtxt Id=txtcontentabc/content/txtSignature xmlns=http://www.w3.org/2000/09/xmldsig#;SignedInfoCanonicalizationMethod Algorithm=http://www.w3.org/TR/2001/REC-xml-c14n-20010315/SignatureMethod Algorithm=http://www.w3.org/2000/09/xmldsig#rsa-sha1/Reference URI=#txtTransformsTransform Algorithm=http://www.w3.org/2000/09/xmldsig#enveloped-signature/Transform Algorithm=http://www.w3.org/TR/2001/REC-xml-c14n-20010315//TransformsDigestMethod
Re: [android-developers] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
I am using an Activity context. As mentioned it works on every phone I have in the office but the Samsung Galaxy S3 and it used to work on Galaxy S3. To me it seems like Samsung have broken Toasts in their latest update. On Monday, January 14, 2013 2:27:46 PM UTC+1, Mark Murphy (a Commons Guy) wrote: What Context are you using? Is it the Activity, or something else? If it is not the Activity, try switching to that and see if the behavior changes. I wouldn't expect that to have an impact, but, then again, I wouldn't expect your problem, either. On Mon, Jan 14, 2013 at 8:06 AM, Tobias tobias.e...@gmail.comjavascript: wrote: I have a toast displayed in the following way: Toast.makeText(context, The message, Toast.LENGTH_LONG).show(); I am 100% I am displaying the toast from the UI thread and I can add that it worked fine for many devices including older updates of Galaxy S3 but after latest update no one of my toasts are being displayed. Have anyone else experienced this and have a solution? Thanks, Tobias -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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 Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
On Mon, Jan 14, 2013 at 8:48 AM, Tobias tobias.e.lindb...@gmail.com wrote: I am using an Activity context. As mentioned it works on every phone I have in the office but the Samsung Galaxy S3 and it used to work on Galaxy S3. To me it seems like Samsung have broken Toasts in their latest update. Do any other apps, already on the device, display toasts as they used to? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to specify an IntentFilter that only activates when the Intent comes from within my own app?
OK, now that we've established that I have zero choice but to construct my own chooser Intent, what have I missed in the code below? NB this seems so fragile. I feel like I'm having to make too many assumptions how how the Android framework works. /** * Creates a Chooser Intent containing all available options including the additional one. * * @param context * @param intentIntent describing what to share. * @param chooserTitle Title to display on chooser dialog. * @param extraIntentTarget Class of the Activity to add as an additional share target. * @return Chooser Intent outlining all share options. */ public static Intent createChooser(Context context, Intent intent, CharSequence chooserTitle, Class extraIntentTarget) { // Using a SortedMap to sort the output by name. final Comparator displayComparator = new PackageItemInfo.DisplayNameComparator(context.getPackageManager()); final SortedMapPackageItemInfo, Intent targetedIntents = new TreeMapPackageItemInfo, Intent(displayComparator); // final ListResolveInfo resInfo = context.getPackageManager().queryIntentActivities(intent, 0); for (ResolveInfo resolveInfo : resInfo) { final String packageName = resolveInfo.activityInfo.packageName; if (!resolveInfo.activityInfo.enabled) { continue; // Don't include disabled Activities. } if (!resolveInfo.activityInfo.exported !context.getPackageName().equals(packageName)) { // Don't include non-exported Activities from another package // This is a work around to http://code.google.com/p/android/issues/detail?id=29535 continue; } // final Intent targetedIntent = new Intent(intent); targetedIntent.setPackage(packageName); targetedIntents.put(resolveInfo.activityInfo, targetedIntent); // if (AppConstants.DEV_LOGGING) Log.v(TAG, #getChooserIntent intent= + targetedIntent); } // // Now add in the extra target for the intent final ActivityInfo activityInfo = getActivityInfo(context, extraIntentTarget); final Intent extraTargetedIntent = new Intent(intent); extraTargetedIntent.setClass(context, extraIntentTarget); targetedIntents.put(activityInfo, extraTargetedIntent); if (AppConstants.DEV_LOGGING) Log.v(TAG, #getChooserIntent extraIntent= + extraTargetedIntent); // // Get the Intents so we can split off the first (initialising) Intent from the others. final ListIntent orderedIntents = new ArrayListIntent(); orderedIntents.addAll(targetedIntents.values()); // final Intent inialisingIntent = orderedIntents.remove(targetedIntents.size() - 1); final Intent chooserIntent = Intent.createChooser(inialisingIntent, chooserTitle); chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, orderedIntents.toArray(new Parcelable[]{})); return chooserIntent; } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
I tried for e.g. the Alarm app and ofc the Toast worked there but I still find it strange, I haven't made any changes and it worked bofore and when I am trying on e.g. my HTC wildfire S that I got here as well it works fine. On Monday, January 14, 2013 2:55:09 PM UTC+1, Mark Murphy (a Commons Guy) wrote: On Mon, Jan 14, 2013 at 8:48 AM, Tobias tobias.e...@gmail.comjavascript: wrote: I am using an Activity context. As mentioned it works on every phone I have in the office but the Samsung Galaxy S3 and it used to work on Galaxy S3. To me it seems like Samsung have broken Toasts in their latest update. Do any other apps, already on the device, display toasts as they used to? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
Have you used a debugger, or Log statements, to confirm that the code paths in which you raise the Toast is still being executed? On Mon, Jan 14, 2013 at 9:05 AM, Tobias tobias.e.lindb...@gmail.com wrote: I tried for e.g. the Alarm app and ofc the Toast worked there but I still find it strange, I haven't made any changes and it worked bofore and when I am trying on e.g. my HTC wildfire S that I got here as well it works fine. On Monday, January 14, 2013 2:55:09 PM UTC+1, Mark Murphy (a Commons Guy) wrote: On Mon, Jan 14, 2013 at 8:48 AM, Tobias tobias.e...@gmail.com wrote: I am using an Activity context. As mentioned it works on every phone I have in the office but the Samsung Galaxy S3 and it used to work on Galaxy S3. To me it seems like Samsung have broken Toasts in their latest update. Do any other apps, already on the device, display toasts as they used to? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
Hi, A few suggestions: - I would verify that your code is actually executed (I,E, the code statements in your original post). - Verify no exceptions are thrown. Make sure your code segment is housed in try/catch block. - Add statements to the Toast object and ask it to report the x/y coordinates, gravity, etc. Most unexpected behavior is either in the application code, or the application code's interaction with dependent libraries. For example, a prior version of a dependent library always constructed a value. In the newer library version, the value is set to null and not guaranteed to have a value till certain conditions are met. If your application is not checking that values are null before use, you will get unexpected behavior. Hope that helps :) Good Luck Jason -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
Yes, I have a print out both before and after the Toast that I can see so the code is definitely executed. Have you tried it on S3 with latest update? On Monday, January 14, 2013 3:09:46 PM UTC+1, Mark Murphy (a Commons Guy) wrote: Have you used a debugger, or Log statements, to confirm that the code paths in which you raise the Toast is still being executed? On Mon, Jan 14, 2013 at 9:05 AM, Tobias tobias.e...@gmail.comjavascript: wrote: I tried for e.g. the Alarm app and ofc the Toast worked there but I still find it strange, I haven't made any changes and it worked bofore and when I am trying on e.g. my HTC wildfire S that I got here as well it works fine. On Monday, January 14, 2013 2:55:09 PM UTC+1, Mark Murphy (a Commons Guy) wrote: On Mon, Jan 14, 2013 at 8:48 AM, Tobias tobias.e...@gmail.com wrote: I am using an Activity context. As mentioned it works on every phone I have in the office but the Samsung Galaxy S3 and it used to work on Galaxy S3. To me it seems like Samsung have broken Toasts in their latest update. Do any other apps, already on the device, display toasts as they used to? -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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 Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
On Mon, Jan 14, 2013 at 9:24 AM, Tobias tobias.e.lindb...@gmail.com wrote: I have a print out both before and after the Toast that I can see so the code is definitely executed. Have you tried it on S3 with latest update? I don't own one -- a problem which I may need to rectify. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] GLUtils.texImage2D
Has anyone else noticed that GLUtils.texImage2D seems to want the image to be upside down? GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); One way to see this is to look at Cosmin Banu's NeHe code here: http://code.google.com/p/nehe-android/source/browse/trunk/NeHe06/src/ro/brite/android/nehe06/Utils.java He has this in there: private static Matrix yFlipMatrix; static { yFlipMatrix = new Matrix(); yFlipMatrix.postScale(1, -1); // flip Y axis } And this: return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), yFlipMatrix, false); I have independently noticed this, and it caused a lot of frustration. Any ideas how to best solve this? Obviously, if we just fix it, it will break a lot of old code that relies on its currently incorrect behavior. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: GLUtils.texImage2D
It's the way OpenGL maps texture co-ordinates, ie it's working correctly. On Monday, January 14, 2013 2:59:45 PM UTC, bob wrote: Has anyone else noticed that GLUtils.texImage2D seems to want the image to be upside down? GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); One way to see this is to look at Cosmin Banu's NeHe code here: http://code.google.com/p/nehe-android/source/browse/trunk/NeHe06/src/ro/brite/android/nehe06/Utils.java He has this in there: private static Matrix yFlipMatrix; static { yFlipMatrix = new Matrix(); yFlipMatrix.postScale(1, -1); // flip Y axis } And this: return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), yFlipMatrix, false); I have independently noticed this, and it caused a lot of frustration. Any ideas how to best solve this? Obviously, if we just fix it, it will break a lot of old code that relies on its currently incorrect behavior. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: GLUtils.texImage2D
Okay. Well, I guess it is the opposite of how my 3d modeling program, Cheetah3d, does them. I thought it was standardized. On Monday, January 14, 2013 9:04:41 AM UTC-6, RichardC wrote: It's the way OpenGL maps texture co-ordinates, ie it's working correctly. On Monday, January 14, 2013 2:59:45 PM UTC, bob wrote: Has anyone else noticed that GLUtils.texImage2D seems to want the image to be upside down? GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); One way to see this is to look at Cosmin Banu's NeHe code here: http://code.google.com/p/nehe-android/source/browse/trunk/NeHe06/src/ro/brite/android/nehe06/Utils.java He has this in there: private static Matrix yFlipMatrix; static { yFlipMatrix = new Matrix(); yFlipMatrix.postScale(1, -1); // flip Y axis } And this: return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), yFlipMatrix, false); I have independently noticed this, and it caused a lot of frustration. Any ideas how to best solve this? Obviously, if we just fix it, it will break a lot of old code that relies on its currently incorrect behavior. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
To bad, got any more clues on what could be wrong, this is making me crazy. Galaxy S3 is a too popular phone to ignore =/ On Monday, January 14, 2013 3:59:03 PM UTC+1, Mark Murphy (a Commons Guy) wrote: On Mon, Jan 14, 2013 at 9:24 AM, Tobias tobias.e...@gmail.comjavascript: wrote: I have a print out both before and after the Toast that I can see so the code is definitely executed. Have you tried it on S3 with latest update? I don't own one -- a problem which I may need to rectify. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Correct way to implement Activity onDestroy()?
After spending considerable time looking at this issue, I strongly suggest that you look into an Intent Service, for any long running task. Using AsyncTasks is just fraught. First of all, onDestroy is only called best effort. If you care about getting it done, you can't do it in onDestroy. Further, as kris points out, onDestroy is, often, called just as your *process* is about to be destroyed. Worrying about allocation of memory in your process, just as it is destroyed, is pretty pointless. There are two issues you need to consider: making your program correct according to Java (If mutable state is referenced from more than one thread, all references must take place holding a single lock - B. Goetz, paraphrased). You also have to be sure that the lifecycles of unmanaged objects (e.g. AsyncTasks) don't interfere with the lifecycles of managed objects (Activities). Nulling out pointers and AsyncTasks that survive screen reorientation (despite the fact that I proposed it myself, at one point) are just Voodoo. G. Blake Meike Marakana Programming Android 2ed is now in stores: http://bit.ly/programmingandroid On Monday, January 14, 2013 1:10:52 AM UTC-8, Greenhand wrote: Thank you. Another related question, in section 5. Implement a more intelligent AsyncTask dealing with screen orientation of http://blog.doityourselfandroid.com/2010/11/14/handling-progress-dialogs-and-screen-orientation-changes/, it has private AsyncTaskComplex activity in ListFresher as a member variable. Shouldn't it be null out because it is not a static Activity references? Kristopher Micinski於 2013年1月14日星期一UTC+8下午4時24分53秒寫道: Basically, as long as you aren't hanging static Activity references you should be fine. The main activity will be thrown away upon its destruction, at which point the Activity will be thrown away: along with its contents. Of course, if you're holding onto Views elsewhere that's bad (i.e., don't hold static refs). kris On Mon, Jan 14, 2013 at 1:42 AM, Greenhand coopera...@gmail.com wrote: I read http://android-developers.blogspot.tw/2009/01/avoiding-memory-leaks.html about avoiding memory leaks. I would like to know whether I should null out all member variables, such as TextView and Button in onDestroy()? Or, unregistering listener, unbinding service and etc.in onDestroy() are enough to prevent memory leak? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Negative Clicks in Admob !!! -$435k a day??
Clearly your financials are not good in the European market. I would definitely focus on the American and Asian markets. On Saturday, January 12, 2013 1:35:13 PM UTC-6, Amel Jose wrote: https://lh6.googleusercontent.com/-4b1tZqTTnU8/UPG5kivK8fI/AAg/bKKSBgIFEdk/s1600/untitled1.JPG if you look at fields across Europe you can see pretty messed up values(-$435,289)..this is my apps stats for the day..But there is no unnecessary change in my overall revenue.. So should I take this seriously/just ignore?or is this just a glitch.. and i cant find any way to contact admob help centre...is there a mail address for the to which i can contact? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Distributing google-play-services.jar
Hi all, My Google-fu is failing me at the moment. I'm wondering what the license is surrounding the google-play-services.jar. I can't seem to find a link to the license anywhere. What I'm wondering is: Can a 3rd party distribute this JAR file to users? Would a 3rd party have to acquire a license from Google to distribute this JAR? -- http://www.opgenorth.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Distributing google-play-services.jar
You will need to delete the Google Play Services entry in your SDK Manager and reinstall it to see the license agreement. On a quick scan, it appears to be the same as what you now have to agree to in order to download the SDK in the first place. On Mon, Jan 14, 2013 at 10:49 AM, Tom Opgenorth t...@opgenorth.net wrote: Hi all, My Google-fu is failing me at the moment. I'm wondering what the license is surrounding the google-play-services.jar. I can't seem to find a link to the license anywhere. What I'm wondering is: Can a 3rd party distribute this JAR file to users? Would a 3rd party have to acquire a license from Google to distribute this JAR? -- http://www.opgenorth.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Toast not showing on Samsung Galaxy S3 (latest update 4.1.2)
Who is your carrier? On Monday, January 14, 2013 7:06:36 AM UTC-6, Tobias wrote: I have a toast displayed in the following way: Toast.makeText(context, The message, Toast.LENGTH_LONG).show(); I am 100% I am displaying the toast from the UI thread and I can add that it worked fine for many devices including older updates of Galaxy S3 but after latest update no one of my toasts are being displayed. Have anyone else experienced this and have a solution? Thanks, Tobias -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] GLUtils.texImage2D
Don't flip the bitmap, flip your texture coordinates. It's easier and less work for the device. On Jan 14, 2013 7:03 AM, bob b...@coolfone.comze.com wrote: Has anyone else noticed that GLUtils.texImage2D seems to want the image to be upside down? GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); One way to see this is to look at Cosmin Banu's NeHe code here: http://code.google.com/p/nehe-android/source/browse/trunk/NeHe06/src/ro/brite/android/nehe06/Utils.java He has this in there: private static Matrix yFlipMatrix; static { yFlipMatrix = new Matrix(); yFlipMatrix.postScale(1, -1); // flip Y axis } And this: return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), yFlipMatrix, false); I have independently noticed this, and it caused a lot of frustration. Any ideas how to best solve this? Obviously, if we just fix it, it will break a lot of old code that relies on its currently incorrect behavior. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Do we need a license from MPEG-LA for AVC H.264 MediaCodecs?
Hi there, I am currently working on an app that would utilize the capabalities of the devices H.264 codec exposed via the new MediaCodec API. I assume the vendor's have to pay the respective royalties to the MPEG-LA for shipping a device with an H.264 capable encoder. But is this true? Can I legally (and without paying any extra royalties) use the system encoders? [1] mentions that the rules of MPEG-LA require that if Company A uses Company B's encoder in their product, Company A must pay the fees, not Company B. I know this mailinglist might not be the right address for licensing questions but I just hope any one of you already had to examine this situation. Greetings, Sebastian [1] http://mailman.videolan.org/pipermail/x264-devel/2010-July/007508.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
Re: [android-developers] Correct way to implement Activity onDestroy()?
While you say that Activities only die when the process is about to be destroyed (or usually die), I have heard that this is not the case. This is mostly hearsay from developers and people I work with saying that memory leaks because of this were really a problem, but I'd have to look into it with some examples (of layouts that really use memory, I'm thinking galleries and nested views, etc..) before making any definite calls. Kris On Mon, Jan 14, 2013 at 9:37 AM, G. Blake Meike blake.me...@gmail.com wrote: After spending considerable time looking at this issue, I strongly suggest that you look into an Intent Service, for any long running task. Using AsyncTasks is just fraught. First of all, onDestroy is only called best effort. If you care about getting it done, you can't do it in onDestroy. Further, as kris points out, onDestroy is, often, called just as your *process* is about to be destroyed. Worrying about allocation of memory in your process, just as it is destroyed, is pretty pointless. There are two issues you need to consider: making your program correct according to Java (If mutable state is referenced from more than one thread, all references must take place holding a single lock - B. Goetz, paraphrased). You also have to be sure that the lifecycles of unmanaged objects (e.g. AsyncTasks) don't interfere with the lifecycles of managed objects (Activities). Nulling out pointers and AsyncTasks that survive screen reorientation (despite the fact that I proposed it myself, at one point) are just Voodoo. G. Blake Meike Marakana Programming Android 2ed is now in stores: http://bit.ly/programmingandroid On Monday, January 14, 2013 1:10:52 AM UTC-8, Greenhand wrote: Thank you. Another related question, in section 5. Implement a more intelligent AsyncTask dealing with screen orientation of http://blog.doityourselfandroid.com/2010/11/14/handling-progress-dialogs-and-screen-orientation-changes/, it has private AsyncTaskComplex activity in ListFresher as a member variable. Shouldn't it be null out because it is not a static Activity references? Kristopher Micinski於 2013年1月14日星期一UTC+8下午4時24分53秒寫道: Basically, as long as you aren't hanging static Activity references you should be fine. The main activity will be thrown away upon its destruction, at which point the Activity will be thrown away: along with its contents. Of course, if you're holding onto Views elsewhere that's bad (i.e., don't hold static refs). kris On Mon, Jan 14, 2013 at 1:42 AM, Greenhand coopera...@gmail.com wrote: I read http://android-developers.blogspot.tw/2009/01/avoiding-memory-leaks.html about avoiding memory leaks. I would like to know whether I should null out all member variables, such as TextView and Button in onDestroy()? Or, unregistering listener, unbinding service and etc.in onDestroy() are enough to prevent memory leak? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Google Maps v2 causes memory leak
Hi, I have switched to the new Google Maps v2, it works quite well, but after some time I discovered growing memory consumption of my app. After investigation it turns out that the sample application demonstrating Google Maps v2 bundled in android sdk also suffers with growing memory consumption. The worst part is, that after several orientation changes on sample application the app crashes with OOM. The log from example crash is available here http://pastebin.com/Zyje0kfD, but crashes occur on different places. The fastest way to reproduce this behavior is with the Multiple Maps sample, but I get it with Basic Map sample as well, it just takes longer. After getting heap dump and analyzing it in MAT I found that some object from map library holds the memory and is considered as GC root. The hprof file is available herehttps://dl.dropbox.com/u/17342616/android-maps-v2-sample.hprof. I found this problem on Galaxy Nexus with android 4.2 and HTC Desire with android 2.3. I have found nothing regarding this issue on the internet so I'm asking here. Have anybody else detected memory problems and was able to somehow prevent them? Thanks in advance, Tomas -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Distributing google-play-services.jar
Thanks a bunch - section 3.3 seems to answer my question (i.e. a 3rd party can't distribute the JAR file). On Mon, Jan 14, 2013 at 8:56 AM, Mark Murphy mmur...@commonsware.com wrote: You will need to delete the Google Play Services entry in your SDK Manager and reinstall it to see the license agreement. On a quick scan, it appears to be the same as what you now have to agree to in order to download the SDK in the first place. On Mon, Jan 14, 2013 at 10:49 AM, Tom Opgenorth t...@opgenorth.net wrote: Hi all, My Google-fu is failing me at the moment. I'm wondering what the license is surrounding the google-play-services.jar. I can't seem to find a link to the license anywhere. What I'm wondering is: Can a 3rd party distribute this JAR file to users? Would a 3rd party have to acquire a license from Google to distribute this JAR? -- http://www.opgenorth.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- http://www.opgenorth.net -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Using APK Signature to detect .apk tampering (Attn: Dianne??)
We've recently implemented anti-piracy code in the latest version of our app. It checks the digital signature of the APK against our own (known) signature to see if the app has been tampered with. This is based on a suggestion made in this post: https://groups.google.com/forum/?fromgroups=#!topic/android-developers/fPtdt6zDzns . Here is the call we're using to obtain the APK's digital signature. As Dianne Hackborn explained in the thread, the signature is really the signing certificate's (i.e. our) public key, and this will not change from build to build: PackageManager pm = context.getPackageManager(); try { PackageInfo info = pm.getPackageInfo( xxx.xxx.xxx.xxx, PackageManager.GET_SIGNATURES ); Signature[] sig = info.signatures; String sigstring = new String( sig[0].toChars() ); // Compare this signature with what we signed it with } On startup, our app now compares the public key returned by this function to an internal copy of our correct, known public key. If the comparison fails, the app posts a notification to our server, then quits. The notification contains a copy of the incorrect public key. Our anti-piracy code has been tripped twice. We've gotten the notification twice. Strangely, the first time was minutes after we uploaded our new APK to Google Play, before we made the new version public. In the 10 days since we uploaded this version, our app update has been downloaded and run thousands of times, with no further notifications. Then, on friday Jan 11th, we got another notification that our anti-piracy check has been triggered. In both cases, the incorrect public key was as follows: 308204a830820390a003020102020900b3998086d056cffa300d06092a864886f70d0101040500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3038303431353232343035305a170d3335303930313232343035305a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d003082010802820101009c780592ac0d5d381cdeaa65ecc8a6006e36480c6d7207b12011be50863aabe2b55d009adf7146d6f2202280c7cd4d7bdb26243b8a806c26b34b137523a49268224904dc01493e7c0acf1a05c874f69b037b60309d9074d24280e16bad2a8734361951eaf72a482d09b204b1875e12ac98c1aa773d6800b9eafde56d58bed8e8da16f9a360099c37a834a6dfedb7b6b44a049e07a269fccf2c5496f2cf36d64df90a3b8d8f34a3baab4cf53371ab27719b3ba58754ad0c53fc14e1db45d51e234fbbe93c9ba4edf9ce54261350ec535607bf69a2ff4aa07db5f7ea200d09a6c1b49e21402f89ed1190893aab5a9180f152e82f85a45753cf5fc19071c5eec827020103a381fc3081f9301d0603551d0e041604144fe4a0b3dd9cba29f71d7287c4e7c38f2086c2993081c90603551d230481c13081be80144fe4a0b3dd9cba29f71d7287c4e7c38f2086c299a1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900b3998086d056cffa300c0603551d13040530030101ff300d06092a864886f70d01010405000382010100572551b8d93a1f73de0f6d469f86dad6701400293c88a0cd7cd778b73d I won't post a copy of our own (correct) public key here, but it is very different from the one above. We also collect the Android ID of the device being run on. The ID for the first trip detection (immediately after uploading the .apk) matches the ID of the detection we go on Friday. Our conclusion is that some internal Google Play process must be be repackaging our APK, for whatever reason, then running the repackaged version. Google Play must clearly be distributing our original, unaltered APK to end users; otherwise we would get this notification constantly (and all of our users would be complaining that the app quits on startup!) But we're mystified as to why we got this notification so soon after uploading the APK to google play. We can only assume it must be the result of some internal Google Play process. We can find no other explanation, especially since the first notification happened immediately after we uploaded the APK to google play, before we even made it public. Can anyone confirm whether such a repackaging is part of google play's normal process for newly-uploaded APKs? If so, this would greatly help put our minds at ease. If not, can anyone suggest any other possible explanation for the notification to have been sent? Once again - the only times our public-key-comparison-failed notification has been
Re: [android-developers] Using APK Signature to detect .apk tampering (Attn: Dianne??)
On Mon, Jan 14, 2013 at 1:28 PM, btschumy b...@otherwise.com wrote: Our conclusion is that some internal Google Play process must be be repackaging our APK, for whatever reason, then running the repackaged version. That's possibly a side effect of the testing that Bouncer does. But we're mystified as to why we got this notification so soon after uploading the APK to google play. We can only assume it must be the result of some internal Google Play process. Bouncer performs automated tests on APKs, and I would presume it would do so shortly after upload, though that's just a guess (and I have no idea if that's the source of your trip). Once again - the only times our public-key-comparison-failed notification has been sent are 1) immediately after we uploaded the APK to google, and 2) again on Friday Jan 11th. It is conceivable that after Bouncer gets an updated set of rules, they run them against the entire corpus of uploaded APKs, which would explain the recurrence of the issue. Again, this is just a theory. BTW, any chance we can convince you to open source your key-checking code? :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Okay. By the way, what is the difference between BatteryTech SDK and BatteryTech Engine? Thanks. On Thursday, January 10, 2013 4:20:55 PM UTC-6, Robert Green wrote: The mobile builds and projects are only available in the purchased version. The free dev kit is just Windows and OSX. If it works in your desktop build, it'll work on the device with the exception of non power-of-two images. On mobile you're just testing performance and multitouch input before you're ready to release or integrate any 3rd party products. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 1:12 PM, bob b...@coolfone.comze.comjavascript: wrote: Thanks. Can you tell me where to find the .so file? I don't see it in your two zip files. On Thursday, January 10, 2013 1:20:31 PM UTC-6, Robert Green wrote: If you don't want to modify the engine itself you can just copy the .so files and you don't need NDK. If you want to change any of the C/C++ code in the engine, you'll need NDK to rebuild it for Android. When you're just developing your game, before device testing, you don't need anything for Android. It runs standalone on Windows and OSX. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 8:50 AM, bob b...@coolfone.comze.com wrote: Thanks. I'll try to take a look at them when I get a chance. BTW, do you pretty much need the NDK to use your engine? On Thursday, January 3, 2013 12:20:09 PM UTC-6, Robert Green wrote: Hi Bob, There are a number of games already available using BatteryTech Engine that show off some of the basic capabilities, then we do include an APK of our demo in the engine download so that you can try it out on your device. We'll be posting that to the market next week as well, but it is available now in the archive. Here are a few games using it if you want to take a peek at them: Slyon Ball - https://play.google.com/**stor**e/apps/details?id=com.** slyonstu**dios.slyonballhl=enhttps://play.google.com/store/apps/details?id=com.slyonstudios.slyonballhl=en The Digits: Fraction Blast - https://play.google.com/**stor** e/apps/details?id=com.**watchthe**digits.fractionblast**hl=enhttps://play.google.com/store/apps/details?id=com.watchthedigits.fractionblasthl=en Slyon Street Tuner - https://play.google.com/**stor** e/apps/details?id=com.**slyonstu**dios.streettunerhttps://play.google.com/store/apps/details?id=com.slyonstudios.streettuner NSCRA Tuner Challenge - https://play.google.com/**stor** e/apps/details?id=com.**powerrev**racing.nscrahttps://play.google.com/store/apps/details?id=com.powerrevracing.nscra Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 3, 2013 at 12:10 PM, bob b...@coolfone.comze.com wrote: Cool. Maybe you could put an app in the Android Market that demos your new engine? This would make it easier for us to see what it can do. On Tuesday, January 1, 2013 11:57:53 AM UTC-6, Robert Green wrote: Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.comwrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE conversion utilities that work, so there is that option. On Thursday, December 27, 2012 10:54:07 PM UTC-6, bob wrote: Looks interesting. What 3d model formats does it support? On Thursday, December 27, 2012 5:24:59 PM UTC-6, Robert Green wrote: Hi All, I'm a long time contributor of this group
Re: [android-developers] Re: New OpenGL ES 2.0 Game Engine Option
Hi Bob, The SDK is the lower-level C++ platform and the engine is a game engine written on top of the SDK that provides all the high level things a game developer would want like animation, scripting, resource management, etc Robert Green DIY at http://www.rbgrn.net/ On Mon, Jan 14, 2013 at 11:17 AM, bob b...@coolfone.comze.com wrote: Okay. By the way, what is the difference between BatteryTech SDK and BatteryTech Engine? Thanks. On Thursday, January 10, 2013 4:20:55 PM UTC-6, Robert Green wrote: The mobile builds and projects are only available in the purchased version. The free dev kit is just Windows and OSX. If it works in your desktop build, it'll work on the device with the exception of non power-of-two images. On mobile you're just testing performance and multitouch input before you're ready to release or integrate any 3rd party products. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 1:12 PM, bob b...@coolfone.comze.com wrote: Thanks. Can you tell me where to find the .so file? I don't see it in your two zip files. On Thursday, January 10, 2013 1:20:31 PM UTC-6, Robert Green wrote: If you don't want to modify the engine itself you can just copy the .so files and you don't need NDK. If you want to change any of the C/C++ code in the engine, you'll need NDK to rebuild it for Android. When you're just developing your game, before device testing, you don't need anything for Android. It runs standalone on Windows and OSX. Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 10, 2013 at 8:50 AM, bob b...@coolfone.comze.com wrote: Thanks. I'll try to take a look at them when I get a chance. BTW, do you pretty much need the NDK to use your engine? On Thursday, January 3, 2013 12:20:09 PM UTC-6, Robert Green wrote: Hi Bob, There are a number of games already available using BatteryTech Engine that show off some of the basic capabilities, then we do include an APK of our demo in the engine download so that you can try it out on your device. We'll be posting that to the market next week as well, but it is available now in the archive. Here are a few games using it if you want to take a peek at them: Slyon Ball - https://play.google.com/**store/apps/details?id=com. **slyonstudios.slyonballhl=enhttps://play.google.com/store/apps/details?id=com.slyonstudios.slyonballhl=en The Digits: Fraction Blast - https://play.google.com/**stor e/apps/details?id=com.**watchthedigits.fractionblast**hl=enhttps://play.google.com/store/apps/details?id=com.watchthedigits.fractionblasthl=en Slyon Street Tuner - https://play.google.com/**stor e/apps/details?id=com.**slyonstudios.streettunerhttps://play.google.com/store/apps/details?id=com.slyonstudios.streettuner NSCRA Tuner Challenge - https://play.google.com/**stor e/apps/details?id=com.**powerrevracing.nscrahttps://play.google.com/store/apps/details?id=com.powerrevracing.nscra Robert Green DIY at http://www.rbgrn.net/ On Thu, Jan 3, 2013 at 12:10 PM, bob b...@coolfone.comze.com wrote: Cool. Maybe you could put an app in the Android Market that demos your new engine? This would make it easier for us to see what it can do. On Tuesday, January 1, 2013 11:57:53 AM UTC-6, Robert Green wrote: Thanks bob! That game was from before BatteryTech and was the reason we built a proper game engine. Robert Green DIY at http://www.rbgrn.net/ On Mon, Dec 31, 2012 at 7:38 PM, bob b...@coolfone.comze.comwrote: Thanks. By the way, I tried your Deadly Chambers game. It is impressive. I like how the guy's name is Chambers. Very funny. On Saturday, December 29, 2012 12:46:49 PM UTC-6, Robert Green wrote: Yes, texture mapping is fairly standard and is very well supported. BAI means Binary Asset Import and is a compact memory-safe format of the internal structure of the open asset importer library. We did create it ourselves but it's simple, easy to maintain and extend and fully compatible with version 2 of that library, which is why you can easily add more formats to the engine. On Friday, December 28, 2012 2:24:49 PM UTC-6, bob wrote: Thanks. Also, Does it support texture-mapped models? And, is the BAI format your own invention? On Friday, December 28, 2012 11:28:48 AM UTC-6, Robert Green wrote: Out of the box it supports OBJ for static geometry and Collada (DAE) for static and animated models. We have a utility that will convert either of those to a binary format called BAI to go to production because it's smaller and loads faster. The engine uses a library called Open Asset Import which supports 30+ formats, so if you want more formats supported, all you have to do is add in the format support files to either the engine or the BAI conversion utility. I think the only format that isn't supported by Open Asset Importer is FBX, but autodesk has good FBX to DAE
[android-developers] Add TextViews to Widget Dynamically
Hello guys! I decided to make a widget for my application but i got stucked in something! I want to add multiple textviews on the widget based on the size of an arrayList, but after searching Google and StackOverflow i finally found out that this isn't possible. Although i tried a lot of workarounds nothing seemed to work! So i want to ask you for your help! Is it possible to do so even with predefined xml files and how to do so? Thanks in advance for your help! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Add TextViews to Widget Dynamically
Anyone? On Mon, Jan 14, 2013 at 9:34 PM, Παύλος-Πέτρος Τουρνάρης p.tourna...@gmail.com wrote: Hello guys! I decided to make a widget for my application but i got stucked in something! I want to add multiple textviews on the widget based on the size of an arrayList, but after searching Google and StackOverflow i finally found out that this isn't possible. Although i tried a lot of workarounds nothing seemed to work! So i want to ask you for your help! Is it possible to do so even with predefined xml files and how to do so? Thanks in advance for your help! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 APK Signature to detect .apk tampering (Attn: Dianne??)
I would second Mark's speculation about APK repacking by bouncer: we did that in a (home-brew) project a while back, so it's not unreasonable to think this might be happening. It does seem a tad annoying though.. Kris On Mon, Jan 14, 2013 at 1:00 PM, Mark Murphy mmur...@commonsware.com wrote: On Mon, Jan 14, 2013 at 1:28 PM, btschumy b...@otherwise.com wrote: Our conclusion is that some internal Google Play process must be be repackaging our APK, for whatever reason, then running the repackaged version. That's possibly a side effect of the testing that Bouncer does. But we're mystified as to why we got this notification so soon after uploading the APK to google play. We can only assume it must be the result of some internal Google Play process. Bouncer performs automated tests on APKs, and I would presume it would do so shortly after upload, though that's just a guess (and I have no idea if that's the source of your trip). Once again - the only times our public-key-comparison-failed notification has been sent are 1) immediately after we uploaded the APK to google, and 2) again on Friday Jan 11th. It is conceivable that after Bouncer gets an updated set of rules, they run them against the entire corpus of uploaded APKs, which would explain the recurrence of the issue. Again, this is just a theory. BTW, any chance we can convince you to open source your key-checking code? :-) -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] getting a 9-patch button working
got a button defined as Button android:id=@+id/button1 android:background=@drawable/dialpad_selector android:layout_width=wrap_content android:layout_height=wrap_content android:text=Hello There / a dialpad_selector.xml as ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/dialpad / !-- pressed -- item android:state_focused=true android:drawable=@drawable/dialpad / !-- focused -- item android:state_hovered=true android:drawable=@drawable/dialpad / !-- hovered -- item android:drawable=@drawable/dialpad / !-- default -- /selector drawable dialpad is a 9-patch image not working! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Add TextViews to Widget Dynamically
On Mon, Jan 14, 2013 at 1:34 PM, Παύλος-Πέτρος Τουρνάρης p.tourna...@gmail.com wrote: I want to add multiple textviews on the widget based on the size of an arrayList, but after searching Google and StackOverflow i finally found out that this isn't possible. Yes it is. http://developer.android.com/reference/android/widget/RemoteViews.html#addView%28int,%20android.widget.RemoteViews%29 On Mon, Jan 14, 2013 at 2:22 PM, Παύλος-Πέτρος Τουρνάρης p.tourna...@gmail.com wrote: Anyone? Can you wait more than an hour before bumping your post? Something like a week is more appropriate. - 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: Developer fee payment canceled after 2.5 years
Just received a mail informing me of a fix, and indeed I can once again access the developer console. Thanks support team ! :) On Sunday, January 13, 2013 10:02:50 PM UTC+1, Gyscos wrote: Same problem here. Sent a ticket, still waiting for an answer. The apps seem to still be reachable on the play store, so it's a little better than I thought. It's easy for them to see there's something wrong here, and that we're not just trying to steal the registration fee... On Friday, January 11, 2013 3:20:51 PM UTC+1, David Erosa García wrote: Hi! I'm struggling with this problem since yesterday, when I tried to log into my Google Play Console just to find a message like this: --- THE PAYMENT FOR THE REGISTRATION FEE HAS FAILED In order to access your account, you need a successful registration fee payment --- So my apps are still published, but I can't manage any of them. No price changes, no descripcion updates and, of course, no new .apk... Since I've been a registered Android developer circa July 2010, I wonder what the heck happened. After checking my Checkout order I found that it was canceled because it has been inactive for a long period of time 10 Ene - Google ha cancelado su pedido porque ha estado inactivo durante un largo período de tiempo. This seems like a known issues(Developer Console or Publishing Issues/Unable to complete Google Play Android Developer Account Registration ), but as the description of the issue appears to refer to new accounts, I think it doesn't apply to me: https://support.google.com/googleplay/android-developer/bin/static.py?hl=enpage=known_issues.cs I've already sent a support ticket, but you all know how long will this take... Searching on Google, forums or mail lists I couldn't find anyone with the same problem, so I decided to try and post it here in case anyone is having the same issue. I'll keep you informed in case this is useful for anyone. Regards. David Erosa -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 i pass downloaddata to my main activity?
On Mon, Jan 14, 2013 at 6:46 AM, Antonis Kanaris ant...@in.gr wrote: How i pass download data to main activity for display as text? Bind to the service, or send BroadCast messages from the service that your activity responds to. - 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: debug blues
Thanks. It would be nice if there was a cleaner failure rather than just showing you the wrong source. I wouldn't mind some kind of check that prevents you from jumping to some weird source line without necessarily knowing it. On Thursday, January 10, 2013 9:25:20 AM UTC-6, Streets Of Boston wrote: Yes. The code on the device (Nexus 7) has debug info that tells Eclipse the line-numbers of the source-code. If your source-code (android-16) is out-of-date, these line-number don't match up and Eclipse shows you something wrong (correct line-number, wrong source-version). On Thursday, January 10, 2013 10:21:46 AM UTC-5, bob wrote: It seems to work if I do Edit Source Lookup and change it to android-17. Is it 17 because the Nexus 7 is running 4.2.1? I built targeted for 16. On Wednesday, January 9, 2013 7:46:34 PM UTC-6, RichardC wrote: Emulator or Phone and what was the Android version running on it? On Wednesday, January 9, 2013 10:40:27 PM UTC, bob wrote: I'm stepping thru my source. I have a call to invalidate(). I stepped into it, and attached the android source (version 16). However, it went here: /** * Used to indicate that the parent of this view should be invalidated. This functionality * is used to force the parent to rebuild its display list (when hardware-accelerated), * which is necessary when various parent-managed properties of the view change, such as * alpha, translationX/Y, scrollX/Y, scaleX/Y, and rotation/X/Y. This method will propagate * an invalidation event to the parent. * * @hide */ protected void invalidateParentIfNeeded() { if (isHardwareAccelerated() mParent instanceof View) { ((View) mParent).invalidate(true); } } Why did it go to the function *invalidateParentIfNeeded()* instead of the function *invalidate()*? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: BluetoothAdapter.getDefaultAdapter() in a non-UI thread
Can someone help me understand what init means in the stack trace here: at android.bluetooth.BluetoothAdapter.init(BluetoothAdapter.java:1541) I guess it is a function name? But, I don't think a function can have less than and greater than signs in it. On Wednesday, September 5, 2012 12:17:07 PM UTC-5, bob wrote: Does anyone *really* know what this means? 09-05 10:22:05.518: E/AndroidRuntime(13117): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() 09-05 10:22:05.518: E/AndroidRuntime(13117): at android.os.Handler.init(Handler.java:121) 09-05 10:22:05.518: E/AndroidRuntime(13117): at android.bluetooth.BluetoothAdapter$2.init(BluetoothAdapter.java:1541) 09-05 10:22:05.518: E/AndroidRuntime(13117): at android.bluetooth.BluetoothAdapter.init(BluetoothAdapter.java:1541) 09-05 10:22:05.518: E/AndroidRuntime(13117): at android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.java:543) 09-05 10:22:05.518: E/AndroidRuntime(13117): at com.blue_reader.Reader_Thread.run(Reader_Thread.java:31) I got it from calling BluetoothAdapter.getDefaultAdapter(); in a non-UI thread. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Total User Installs decreasing
I'm not stressing, I'm just curious :) I don't understand how that number can go down. On Saturday, 12 January 2013 21:16:03 UTC, TreKing wrote: On Sat, Jan 12, 2013 at 2:59 PM, Iain King iain...@gmail.comjavascript: wrote: My total user installs on an app has gone down by 2 over the last couple of weeks. That's it? I've lost about 400. Don't stress about it too much - Google Play stats are notoriously unreliable. It's either a bug or change in the way they report stuff. We'll probably never really know. - 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] Any USB-Serial Adapter on Android Phones?
Specifically, for my Note N7000 but interested in more general application as well for a new app. I own a Keyspanhttp://www.tripplite.com/en/products/model.cfm?txtModelID=3914USB-Serial adapter. When I plug it in via an OTG cable, I can see (via terminal window and lsusb command) that the new device is recognized to some extent). But I also expect to see a device file (/dev/ttyUSB0 or something like that) get created so that communication can occur. I do not see this happening. I have looked in the source code for the ICS 4.0.4 kernel and I do see some code specifically for Keyspan USB-Serial devices. So I would think this might work. However, I am finding no success. So: (a) Is there built in support for the Keyspan device? If so, what else do I need to do to get things going? (b) If not, is there built-in support for any other USB-serial devices. If so, which ones are best to use? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: BluetoothAdapter.getDefaultAdapter() in a non-UI thread
bob wrote: Can someone help me understand what init means in the stack trace here: at android.bluetooth.BluetoothAdapter.init(BluetoothAdapter.java:1541) I guess it is a function name? Nope. But, I don't think a function can have less than and greater than signs in it. It can't. You don't need to guess - you can know for certain by reading the documentation. For example, http://docs.oracle.com/javase/tutorial/java/javaOO/methods.html the rules for field names apply to method names as well, ... http://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html#naming ... name can be any legal identifier — an unlimited-length sequence of Unicode letters and digits, beginning with a letter, the dollar sign $, or the underscore character _ You need to know Java in order to use it for Android development. As for init, GIYF. http://lmgtfy.com/?q=Java+stack+trace+%3Cinit%3E http://docs.oracle.com/javase/7/docs/api/java/lang/StackTraceElement.html#getMethodName() http://docs.oracle.com/javase/specs/jvms/se5.0/html/Overview.doc.html#12174 http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html#jvms-2.9 Try using an online search for five minutes. -- Lew -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Any USB-Serial Adapter on Android Phones?
IMHO, both of these are better questions for some list over on http://source.android.com, as neither are strictly related to app development with the SDK. On Mon, Jan 14, 2013 at 6:35 PM, David White whitedav...@gmail.com wrote: Specifically, for my Note N7000 but interested in more general application as well for a new app. I own a Keyspan USB-Serial adapter. When I plug it in via an OTG cable, I can see (via terminal window and lsusb command) that the new device is recognized to some extent). But I also expect to see a device file (/dev/ttyUSB0 or something like that) get created so that communication can occur. I do not see this happening. I have looked in the source code for the ICS 4.0.4 kernel and I do see some code specifically for Keyspan USB-Serial devices. So I would think this might work. However, I am finding no success. So: (a) Is there built in support for the Keyspan device? If so, what else do I need to do to get things going? (b) If not, is there built-in support for any other USB-serial devices. If so, which ones are best to use? 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to use actionbar to generate tabs at bottom?
Hi, I am trying to use actionbar to generate tabs at bottom of the page. It works fine to show the tabs at the top. but how to put it at bottom? I tried android:uiOptions=splitActionBarWhenNarrow at Manifest file. Also in the main Acitivity, I have getWindow().setUiOptions(ActivityInfo.UIOPTION_SPLIT_ACTION_BAR_WHEN_NARROW); as the first line in onCreate function. Here are some of the codes that works for top tabs: //ActionBar ActionBar actionbar = getActionBar(); actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionbar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM); ActionBar.Tab StationsTab4 = actionbar.newTab().setText(tab1); ActionBar.Tab StationsTab1 = actionbar.newTab().setText(tab2); ActionBar.Tab StationsTab2 = actionbar.newTab().setText(tab3); ActionBar.Tab StationsTab3 = actionbar.newTab().setText(tab4); Please help on this topic. I have been tried many different ways, but none of them is working... Thanks a head! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Developer fee payment canceled after 2.5 years
On Mon, Jan 14, 2013 at 01:16:10PM -0800, Gyscos wrote: Just received a mail informing me of a fix, and indeed I can once again access the developer console. Thanks support team ! :) Ok, so, you know other people here (not me, btw---I checked) are having the same problem, and you didn't post this fix? Nice...really nice. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) ICBM/Hurr.: 30.44406N 86.59909W || Running Mac OS X Lion Seen in alt.sysadmin.recovery: Priceless; that's better than telling him to use the Read Manual command with the Real Fast option. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Total User Installs decreasing
On Mon, Jan 14, 2013 at 03:28:02PM -0800, Iain King wrote: I'm not stressing, I'm just curious :) I don't understand how that number can go down. Well, you've heard of quantum mechanics, right? Where sub-atomic particles can actually be in more than one place at the same time until you make some attempt to determine their position? Well, this is Google mechanics, where Market numbers can vary wildly with no rational explanation. Seriously, it does this all the time, with no explanation of any kind (except for the ocassional there's a bug, we're working on it. Strange how often that bug appears Best just not to worry about it. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) ICBM/Hurr.: 30.44406N 86.59909W || Running Mac OS X Lion Seen in alt.sysadmin.recovery: Priceless; that's better than telling him to use the Read Manual command with the Real Fast option. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use actionbar to generate tabs at bottom?
On Mon, Jan 14, 2013 at 6:39 PM, Summer novelt...@gmail.com wrote: Hi, I am trying to use actionbar to generate tabs at bottom of the page. It works fine to show the tabs at the top. but how to put it at bottom? Use android:uiOptions=splitActionBarWhenNarrow on your activity or application. I tried android:uiOptions=splitActionBarWhenNarrow at Manifest file. This will only take effect in situations where the OS considers the display to be narrow. Typically, that is a phone-sized screen in portrait. In all other circumstances, the action bar is not split. There is no other means of putting an action bar at the bottom. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Any USB-Serial Adapter on Android Phones?
Did not know of that. Have posted there now as well. Thanks. It is still possible, however, that some other developers may be able to shed some light on this. On Monday, January 14, 2013 3:38:20 PM UTC-8, Mark Murphy (a Commons Guy) wrote: IMHO, both of these are better questions for some list over on http://source.android.com, as neither are strictly related to app development with the SDK. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: BluetoothAdapter.getDefaultAdapter() in a non-UI thread
On Monday, January 14, 2013 11:38:32 PM UTC, Lew wrote: bob wrote: Can someone help me understand what init means in the stack trace here: at android.bluetooth.BluetoothAdapter.init(BluetoothAdapter.java:1541) I guess it is a function name? Nope. It's the constructor for the object that takes no parameters. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Correct way to implement Activity onDestroy()?
An Activity's onDestroy is called all the time (but not every time :)). It is true that you can't *rely *on it being called, though. E.g. the onDestroy is always called when you click the 'back' key or do some other action (code-execution) that causes the Acitivity's 'finish()' method to be called. On Monday, January 14, 2013 11:55:10 AM UTC-5, Kristopher Micinski wrote: While you say that Activities only die when the process is about to be destroyed (or usually die), I have heard that this is not the case. This is mostly hearsay from developers and people I work with saying that memory leaks because of this were really a problem, but I'd have to look into it with some examples (of layouts that really use memory, I'm thinking galleries and nested views, etc..) before making any definite calls. Kris On Mon, Jan 14, 2013 at 9:37 AM, G. Blake Meike blake...@gmail.comjavascript: wrote: After spending considerable time looking at this issue, I strongly suggest that you look into an Intent Service, for any long running task. Using AsyncTasks is just fraught. First of all, onDestroy is only called best effort. If you care about getting it done, you can't do it in onDestroy. Further, as kris points out, onDestroy is, often, called just as your *process* is about to be destroyed. Worrying about allocation of memory in your process, just as it is destroyed, is pretty pointless. There are two issues you need to consider: making your program correct according to Java (If mutable state is referenced from more than one thread, all references must take place holding a single lock - B. Goetz, paraphrased). You also have to be sure that the lifecycles of unmanaged objects (e.g. AsyncTasks) don't interfere with the lifecycles of managed objects (Activities). Nulling out pointers and AsyncTasks that survive screen reorientation (despite the fact that I proposed it myself, at one point) are just Voodoo. G. Blake Meike Marakana Programming Android 2ed is now in stores: http://bit.ly/programmingandroid On Monday, January 14, 2013 1:10:52 AM UTC-8, Greenhand wrote: Thank you. Another related question, in section 5. Implement a more intelligent AsyncTask dealing with screen orientation of http://blog.doityourselfandroid.com/2010/11/14/handling-progress-dialogs-and-screen-orientation-changes/, it has private AsyncTaskComplex activity in ListFresher as a member variable. Shouldn't it be null out because it is not a static Activity references? Kristopher Micinski於 2013年1月14日星期一UTC+8下午4時24分53秒寫道: Basically, as long as you aren't hanging static Activity references you should be fine. The main activity will be thrown away upon its destruction, at which point the Activity will be thrown away: along with its contents. Of course, if you're holding onto Views elsewhere that's bad (i.e., don't hold static refs). kris On Mon, Jan 14, 2013 at 1:42 AM, Greenhand coopera...@gmail.com wrote: I read http://android-developers.blogspot.tw/2009/01/avoiding-memory-leaks.html about avoiding memory leaks. I would like to know whether I should null out all member variables, such as TextView and Button in onDestroy()? Or, unregistering listener, unbinding service and etc.in onDestroy() are enough to prevent memory leak? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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] Correct way to implement Activity onDestroy()?
That's right, I'd heard of people getting leaks on apps that kept doing configuration changes. Kris On Jan 14, 2013 6:21 PM, Streets Of Boston flyingdutc...@gmail.com wrote: An Activity's onDestroy is called all the time (but not every time :)). It is true that you can't *rely *on it being called, though. E.g. the onDestroy is always called when you click the 'back' key or do some other action (code-execution) that causes the Acitivity's 'finish()' method to be called. On Monday, January 14, 2013 11:55:10 AM UTC-5, Kristopher Micinski wrote: While you say that Activities only die when the process is about to be destroyed (or usually die), I have heard that this is not the case. This is mostly hearsay from developers and people I work with saying that memory leaks because of this were really a problem, but I'd have to look into it with some examples (of layouts that really use memory, I'm thinking galleries and nested views, etc..) before making any definite calls. Kris On Mon, Jan 14, 2013 at 9:37 AM, G. Blake Meike blake...@gmail.com wrote: After spending considerable time looking at this issue, I strongly suggest that you look into an Intent Service, for any long running task. Using AsyncTasks is just fraught. First of all, onDestroy is only called best effort. If you care about getting it done, you can't do it in onDestroy. Further, as kris points out, onDestroy is, often, called just as your *process* is about to be destroyed. Worrying about allocation of memory in your process, just as it is destroyed, is pretty pointless. There are two issues you need to consider: making your program correct according to Java (If mutable state is referenced from more than one thread, all references must take place holding a single lock - B. Goetz, paraphrased). You also have to be sure that the lifecycles of unmanaged objects (e.g. AsyncTasks) don't interfere with the lifecycles of managed objects (Activities). Nulling out pointers and AsyncTasks that survive screen reorientation (despite the fact that I proposed it myself, at one point) are just Voodoo. G. Blake Meike Marakana Programming Android 2ed is now in stores: http://bit.ly/**programmingandroid http://bit.ly/programmingandroid On Monday, January 14, 2013 1:10:52 AM UTC-8, Greenhand wrote: Thank you. Another related question, in section 5. Implement a more intelligent AsyncTask dealing with screen orientation of http://blog.**doityourselfandroid.com/2010/**11/14/handling-progress-* *dialogs-and-screen-**orientation-changes/http://blog.doityourselfandroid.com/2010/11/14/handling-progress-dialogs-and-screen-orientation-changes/, it has private AsyncTaskComplex activity in ListFresher as a member variable. Shouldn't it be null out because it is not a static Activity references? Kristopher Micinski於 2013年1月14日星期一UTC+**8下午4時24分53秒寫道: Basically, as long as you aren't hanging static Activity references you should be fine. The main activity will be thrown away upon its destruction, at which point the Activity will be thrown away: along with its contents. Of course, if you're holding onto Views elsewhere that's bad (i.e., don't hold static refs). kris On Mon, Jan 14, 2013 at 1:42 AM, Greenhand coopera...@gmail.com wrote: I read http://android-developers.**blogspot.tw/2009/01/avoiding-** memory-leaks.htmlhttp://android-developers.blogspot.tw/2009/01/avoiding-memory-leaks.html about avoiding memory leaks. I would like to know whether I should null out all member variables, such as TextView and Button in onDestroy()? Or, unregistering listener, unbinding service and etc.in onDestroy() are enough to prevent memory leak? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://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 to use actionbar to generate tabs at bottom?
Hi, I tried to add uiOptions, as my manifest file is as follows: uses-sdk android:minSdkVersion=11 android:targetSdkVersion=15 / application android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@android:style/Theme.Holo android:uiOptions=splitActionBarWhenNarrow activity android:name=.MainActivity android:label=@string/title_activity_main android:layout_gravity=bottom intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.MerchantTab / activity android:name=.ConsumerTab / activity android:name=.MyWallet / activity android:name=.MerchantDetailsTab / /application ~~~ in mainAcitivity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Anything else I might miss here? Thanks Summer On Mon, Jan 14, 2013 at 6:39 PM, Summer nove...@gmail.com javascript: wrote: Hi, I am trying to use actionbar to generate tabs at bottom of the page. It works fine to show the tabs at the top. but how to put it at bottom? Use android:uiOptions=splitActionBarWhenNarrow on your activity or application. I tried android:uiOptions=splitActionBarWhenNarrow at Manifest file. This will only take effect in situations where the OS considers the display to be narrow. Typically, that is a phone-sized screen in portrait. In all other circumstances, the action bar is not split. There is no other means of putting an action bar at the bottom. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to use actionbar to generate tabs at bottom?
Or is this related to the actionbar i am using? here is a complete Mainactivity.java package com.yoplus.customer; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.app.ActionBar; import android.app.Activity; import android.app.Fragment; import android.app.FragmentTransaction; import android.support.v4.app.FragmentActivity; import android.view.Menu; import android.view.Window; import android.app.ActionBar.Tab; import android.content.Context; import android.content.pm.ActivityInfo; import android.widget.TabHost; import android.widget.Toast; import android.widget.TabHost.OnTabChangeListener; class MyTabsListener implements ActionBar.TabListener { public Fragment fragment; public MyTabsListener(Fragment fragment) { this.fragment = fragment; } public void onTabReselected(Tab tab, FragmentTransaction ft) { Toast.makeText(MainActivity.appContext, Reselected!, Toast.LENGTH_LONG).show(); } public void onTabSelected(Tab tab, FragmentTransaction ft) { ft.replace(R.id.fragment_container, fragment); } public void onTabUnselected(Tab tab, FragmentTransaction ft) { ft.remove(fragment); } } public class MainActivity extends Activity{ public static Context appContext; double currentLat, currentLong; Boolean getCurrentLocation = false; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ActionBar actionbar = getActionBar(); actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionbar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM); ActionBar.Tab SearchTab1 = actionbar.newTab().setText(Search); ActionBar.Tab StationsTab1 = actionbar.newTab().setText(wallet); ActionBar.Tab StationsTab2 = actionbar.newTab().setText(Rewards); ActionBar.Tab StationsTab3 = actionbar.newTab().setText(setting); Fragment searchFragment = new AFragment(); Fragment StationsFragment = new AFragment(); SearchTab1.setTabListener(new MyTabsListener(searchFragment)); StationsTab1.setTabListener(new MyTabsListener(StationsFragment)); StationsTab2.setTabListener(new MyTabsListener(StationsFragment)); StationsTab3.setTabListener(new MyTabsListener(StationsFragment)); actionbar.addTab(SearchTab1); actionbar.addTab(StationsTab1); actionbar.addTab(StationsTab2); actionbar.addTab(StationsTab3); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } } Hi, I tried to add uiOptions, as my manifest file is as follows: uses-sdk android:minSdkVersion=11 android:targetSdkVersion=15 / application android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@android:style/Theme.Holo android:uiOptions=splitActionBarWhenNarrow activity android:name=.MainActivity android:label=@string/title_activity_main android:layout_gravity=bottom intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.MerchantTab / activity android:name=.ConsumerTab / activity android:name=.MyWallet / activity android:name=.MerchantDetailsTab / /application ~~~ in mainAcitivity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Anything else I might miss here? Thanks Summer On Mon, Jan 14, 2013 at 6:39 PM, Summer nove...@gmail.com wrote: Hi, I am trying to use actionbar to generate tabs at bottom of the page. It works fine to show the tabs at the top. but how to put it at bottom? Use android:uiOptions=splitActionBarWhenNarrow on your activity or application. I tried android:uiOptions=splitActionBarWhenNarrow at Manifest file. This will only take effect in situations where the OS considers the display to be narrow. Typically, that is a phone-sized screen in portrait. In all other circumstances, the action bar is not split. There is no other means of putting an action bar at the bottom. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to
Re: [android-developers] How to use actionbar to generate tabs at bottom?
Here is a sample project showing splitActionBarWhenNarrow, using ActionBarSherlock: https://github.com/commonsguy/cw-omnibus/tree/master/ActionBar/ActionBarDemo On Mon, Jan 14, 2013 at 8:24 PM, Summer novelt...@gmail.com wrote: Hi, I tried to add uiOptions, as my manifest file is as follows: uses-sdk android:minSdkVersion=11 android:targetSdkVersion=15 / application android:icon=@drawable/ic_launcher android:label=@string/app_name android:theme=@android:style/Theme.Holo android:uiOptions=splitActionBarWhenNarrow activity android:name=.MainActivity android:label=@string/title_activity_main android:layout_gravity=bottom intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity activity android:name=.MerchantTab / activity android:name=.ConsumerTab / activity android:name=.MyWallet / activity android:name=.MerchantDetailsTab / /application ~~~ in mainAcitivity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Anything else I might miss here? Thanks Summer On Mon, Jan 14, 2013 at 6:39 PM, Summer nove...@gmail.com wrote: Hi, I am trying to use actionbar to generate tabs at bottom of the page. It works fine to show the tabs at the top. but how to put it at bottom? Use android:uiOptions=splitActionBarWhenNarrow on your activity or application. I tried android:uiOptions=splitActionBarWhenNarrow at Manifest file. This will only take effect in situations where the OS considers the display to be narrow. Typically, that is a phone-sized screen in portrait. In all other circumstances, the action bar is not split. There is no other means of putting an action bar at the bottom. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Localized Android Question-and-Answer Sites: http://www.andglobe.com -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.5 Available! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: BouncyCastle signature value does not match with dotNET signature value.
On Mon, Jan 14, 2013 at 10:39 PM, mbarbiero marco.barbi...@gmail.com wrote: * does the raw (byte array) signature match? - I'm not sure about this, but the digestvalues in dotNet and BoucyCastle are identical. For Java you would get the return value of signer.sign() and convert to hex to compare. Don't remember the details about .NET. - A question: How to cipher digestvalue directly with the privatekey? You'll have to pad it first as per the PKCS#1.5 spec and then encrypt with the private key using Cipher.getInstance(RSA/ECP/NoPadding). Cipher.getInstance(RSA/ECB/PKCS1Padding) should pad it for you. Those might not be available on all Android versions though. However, you are probably having a different problem... * are you using the same options for Base64? There are subtle variations here (padding character, line breaks, etc.). - The signatures values are very different. I replace the tag in BC file by dotNet signature value and the webservice returns OK. It's a mystery!!! Below, the two exemples of the signature. The XML suggests you are using the same key and signing the same hash (digest value). However, the most plausible explanation for getting a different signature value is using different keys. Or maybe you keys are interpreted differently on both platforms? How do you read/pass the key on .NET and Java? Are you absolutely sure that it is indeed the same private key? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] getting a 9-patch button working
On Mon, Jan 14, 2013 at 2:52 PM, dashman erjdri...@gmail.com wrote: not working! Should we guess what not working! means? - 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: getting a 9-patch button working
why do you use an XML template if it's the same picture for all states? how did you create the nine patch? Did you try it in an image view? On Monday, January 14, 2013 3:52:05 PM UTC-5, dashman wrote: got a button defined as Button android:id=@+id/button1 android:background=@drawable/dialpad_selector android:layout_width=wrap_content android:layout_height=wrap_content android:text=Hello There / a dialpad_selector.xml as ?xml version=1.0 encoding=utf-8? selector xmlns:android=http://schemas.android.com/apk/res/android; item android:state_pressed=true android:drawable=@drawable/dialpad / !-- pressed -- item android:state_focused=true android:drawable=@drawable/dialpad / !-- focused -- item android:state_hovered=true android:drawable=@drawable/dialpad / !-- hovered -- item android:drawable=@drawable/dialpad / !-- default -- /selector drawable dialpad is a 9-patch image not working! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 APK Signature to detect .apk tampering (Attn: Dianne??)
On Tue, Jan 15, 2013 at 3:28 AM, btschumy b...@otherwise.com wrote: On startup, our app now compares the public key returned by this function to an internal copy of our correct, known public key. If the comparison fails, the app posts a notification to our server, then quits. The notification contains a copy of the incorrect public key. This is not particularly reliable: if I repackage your app, I can change whatever 'internal' values you have. Additionally, some tools will patch stuff in dalivk-cache without ever touching your apk. And, of course, it can be pirated without being repackaged. Then, on friday Jan 11th, we got another notification that our anti-piracy check has been triggered. In both cases, the incorrect public key was as follows: 308204a830820390a003020102020900b3998086d056cffa300d06092a864 ... I won't post a copy of our own (correct) public key here, but it is very different from the one above. This doesn't appear to be the full string, so it doesn't form a valid certificate, but if you convert to binary and run strings on it, you get this: California1 Mountain View1 Android1 Android1 Android10 android@android.com0 080415224050Z 350901224050Z0 Not that this proves anything (anyone can generate a certificate with those names), but FIY. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Correct way to implement Activity onDestroy()?
I considered IntentService before; however, I did not found a way to abort IntentService like the AsyncTask#cancel() mechanism. It is why I adapt to Asynctask and wonder about the memory leak issue. If I try to null out the member variables and the activity reference in AsyncTask in onPause(), is it safe? Or, I do not have to null out them unless they are static. I know that onPause() is guaranteed to be called before the Activity becomes killable. G. Blake Meike於 2013年1月14日星期一UTC+8下午11時37分16秒寫道: After spending considerable time looking at this issue, I strongly suggest that you look into an Intent Service, for any long running task. Using AsyncTasks is just fraught. First of all, onDestroy is only called best effort. If you care about getting it done, you can't do it in onDestroy. Further, as kris points out, onDestroy is, often, called just as your *process* is about to be destroyed. Worrying about allocation of memory in your process, just as it is destroyed, is pretty pointless. There are two issues you need to consider: making your program correct according to Java (If mutable state is referenced from more than one thread, all references must take place holding a single lock - B. Goetz, paraphrased). You also have to be sure that the lifecycles of unmanaged objects (e.g. AsyncTasks) don't interfere with the lifecycles of managed objects (Activities). Nulling out pointers and AsyncTasks that survive screen reorientation (despite the fact that I proposed it myself, at one point) are just Voodoo. G. Blake Meike Marakana Programming Android 2ed is now in stores: http://bit.ly/programmingandroid On Monday, January 14, 2013 1:10:52 AM UTC-8, Greenhand wrote: Thank you. Another related question, in section 5. Implement a more intelligent AsyncTask dealing with screen orientation of http://blog.doityourselfandroid.com/2010/11/14/handling-progress-dialogs-and-screen-orientation-changes/, it has private AsyncTaskComplex activity in ListFresher as a member variable. Shouldn't it be null out because it is not a static Activity references? Kristopher Micinski於 2013年1月14日星期一UTC+8下午4時24分53秒寫道: Basically, as long as you aren't hanging static Activity references you should be fine. The main activity will be thrown away upon its destruction, at which point the Activity will be thrown away: along with its contents. Of course, if you're holding onto Views elsewhere that's bad (i.e., don't hold static refs). kris On Mon, Jan 14, 2013 at 1:42 AM, Greenhand coopera...@gmail.com wrote: I read http://android-developers.blogspot.tw/2009/01/avoiding-memory-leaks.html about avoiding memory leaks. I would like to know whether I should null out all member variables, such as TextView and Button in onDestroy()? Or, unregistering listener, unbinding service and etc.in onDestroy() are enough to prevent memory leak? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Native SIP support
Hello Everyone, We have to develop a SIP based application. major features include: 1. Audio/Video call 2. Audio/Video conference Locally hosted 3. Supplementary services : hold/resume/ call forward/ call waiting/call transfer etc. Documentation of SIP on android developer site is not sufficient. Could you please let me know if its supported in Android native SIP stack and how to use that? Thanks in advance. Regards, Irfan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: JUnit, TouchUtils, DragDrop and INJECT_EVENTS permission
did you figure out how to avoid this exception? On Sunday, 15 July 2012 17:18:10 UTC+5:30, Alex Stockinger wrote: Hi all, I am having serious trouble JUnit testing an Activity that uses the API Level 11+ DragDrop Framework. I am using TouchUtils.dragViewTo() to emulate a drag that in turn causes the Activity under test to start a drag using the API Level 11+ call View.startDrag() The test aborts with a security exception that states that INJECT_EVENTS permission is required. The log entry before the exception also gives a hint as to why this happend: 07-15 13:38:38.121: W/InputDispatcher(204): Permission denied: injecting event from pid 4064 uid 10061 to window drag owned by uid 1000 I also tried sending the events directly (using Instrumentation) instead of using TouchUtils. It turns out the exception is thrown on the first MOVE type motion event - the DOWN before the move works successfully. This brings me to an assumption: Does the new DragDrop framework somehow use a window above the current activity to perform the drag action? Is this window owned by another process than the currently running one? This would at least explain why my tests are failing... Is there a way to fix this and have my tests work properly under these circumstances? Or am I missing something obvious here? Thanks in advance for your help, Alex -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Developer fee payment canceled after 2.5 years
They didn't *tell me* how to fix it, they said it was fixed. I briefly hoped this wasn't an isolated problem, and the fix would solve everyone's problem, but it seems I'm wrong. I guess everything you can do is make sure you posted your ticket right, and wait. (I didn't reply to the mail right away, but once I did, it was solved in a couple hours). On Tuesday, January 15, 2013 12:42:33 AM UTC+1, Spooky wrote: On Mon, Jan 14, 2013 at 01:16:10PM -0800, Gyscos wrote: Just received a mail informing me of a fix, and indeed I can once again access the developer console. Thanks support team ! :) Ok, so, you know other people here (not me, btw---I checked) are having the same problem, and you didn't post this fix? Nice...really nice. Later, --jim -- THE SCORE: ME: 2 CANCER: 0 73 DE N5IAL (/4) ICBM/Hurr.: 30.44406N 86.59909W || Running Mac OS X Lion Seen in alt.sysadmin.recovery: Priceless; that's better than telling him to use the Read Manual command with the Real Fast option. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en