[android-developers] Having trouble making a simple UDP app.
Im trying to make a single UDP app in android studio. Whenever I run the app and press the button the app crashes. Im using Datagram object to make it. My code seems to be alright but I don´t know where the mistake is. ITS DRIVING ME CRAZY please, help me. This is the main activity page : package lumma.e_motionvrplayer; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import com.google.android.gms.appindexing.AppIndex; import com.google.android.gms.common.api.GoogleApiClient; import java.io.IOException; import java.net.DatagramPacket; import java.net.DatagramSocket; import java.net.InetAddress; public class MainActivity extends AppCompatActivity { /** * ATTENTION: This was auto-generated to implement the App Indexing API. * See https://g.co/AppIndexing/AndroidStudio for more information. */ private GoogleApiClient client; //Cierre de la clase @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build(); } public void clickplay(View v) throws IOException { try { DatagramSocket socket = new DatagramSocket(); byte[] buf = new byte[256]; String messg = "play"; buf = messg.getBytes (); InetAddress address = InetAddress.getByName ("255.255.255.255"); DatagramPacket packet = new DatagramPacket(buf, buf.length, address, 5000); socket.send(packet); } catch (IOException e) { } } public void clickrestart(View v) throws IOException { } public void clickpause(View v) throws IOException { } public void clicknext(View v) throws IOException { } public void clickprev(View v) throws IOException { } } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/82d271ec-a758-4067-ac38-6b241d9a6366%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [android-developers] Re: Audio recording problem - fake sample rate
That is very curious! Are you using the "VOICE_RECOGNITION" mic stream? I'm wondering if there is some sort of odd DSP filtering being applied in the firmware. On Tue, Feb 9, 2016 at 8:59 AM, 'RLScott' via Android Developers < android-developers@googlegroups.com> wrote: > OK, I finally got myself a cheap LG G3 from eBay and did some testing. > The situation is not exactly as I described before. Here is what is really > happening. I tested my app with a sine-wave tone generator. > > When the tone generator is below about 3700 Hz, the spectrum displayed in > my app shows just one peak at the desired frequency. As the frequency of > the tone generator increases toward 4000 Hz, a very tiny mirror image peak > begins to appear on the other side of 4000 Hz. It gradually gains in > amplitude until by 3958 Hz, the amplitude of the image peak is actually a > bit higher than the peak at the correct frequency. As the tone goes above > 4000 Hz, the image peak appears below 4000 Hz, and gradually decreases in > amplitude as the tone frequency increases. I ran the tone frequency up to > 4698 Hz and saw a single peak at 4698 Hz in the spectrum and no image > peak. This entirely destroys my supposition that this phone is initially > sampling at 8000 Hz and then up-sampling to 44100, because if it were, > there would be no way to show a single peak at 4698 Hz with no image peak, > right? I mean, the information that discriminates between 4698 and 3302 is > totally destroyed if the audio is initially sampled at 8000 Hz. > > But something is going on in the phone's audio system that introduces this > image around 4000 Hz. Could it be some sort of hetrodyning? I know in > single sideband radio there are ways to invert the audio spectrum if the > detection carrier is set on the wrong side of the signal. But why would > things return to normal for tones well away from 4000 Hz? > > -Robert Scott > Hopkins, MN > > > On Tuesday, February 2, 2016 at 12:41:32 PM UTC-6, Julian Bunn wrote: >> >> Perhaps you can post your code, and we can take a look to see if we see >> anything that might be causing this problem? Otherwise, if it really is a >> firmware "feature" in those two devices, I don't see any good alternatives >> other than a) marking your APK as incompatible with those devices in Google >> Play, or b) doing some DSP in your software to detect the condition and >> work around it somehow. If it were me, I would obtain a G3 and start >> testing ... >> >> >> >> On Tue, Feb 2, 2016 at 6:08 AM, 'RLScott' via Android Developers < >> android-d...@googlegroups.com> wrote: >> >>> The theory says if the initial hardware sampling is done at 8000 samples >>> per second, the aliasing is already "frozen" into the sampled data. You can >>> see that by observing that 4100 Hz and 3900 Hz look exactly the same - >>> produce exactly the same samples - after they are sampled at 8000 samples >>> per second. No amount of digital signal processing after that point can >>> distinguish the two cases, so the aliasing in the up-sampled FFT is >>> inevitable, with or without windowing. >>> >>> I may yet get a G3 on Ebay as you say, but I was hoping for some >>> independent confirmation of this problem with a codebase that had nothing >>> in common with my code, in case there is something I am doing in the code >>> that is making the difference. So if you have an app that processes sound >>> and can detect frequency content above 4000 Hz, just have someone with one >>> of these failing devices go to piano and play the highest "B". That is >>> usually about 4019 Hz. If the device is failing as I predict, there should >>> also be an indication of a tone at 3981 Hz. >>> >>> Robert Scott >>> Hopkins, MN >>> >>> On Sunday, January 31, 2016 at 1:39:58 PM UTC-6, Julian Bunn wrote: >>> >>>> If you are only getting 8000 sps then even with interpolation to 44100 >>>> you would never see any signal above 4000Hz in an FFT, right? Are you >>>> windowing the FFT? >>>> >>>> If there are truly problems like this with the audio firmware on the LG >>>> G3 and Nexus 7, I haven't heard any reports from my users about them. >>>> That's not to say there can't be an issue, of course :-) If I were you, I >>>> would obtain a cheap used G3 on Ebay to test with. >>>> >>>> >>>> >>>> On Saturday, January 30, 2016 at 6:13:08 PM UTC-8, RLScott wrote: >>>>> >>>>> But are you sure
Re: [android-developers] Re: Audio recording problem - fake sample rate
I think that you should perhaps use the VOICE_RECOGNITION stream which is *supposed* to be devoid of filtering and AGC etc.. http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html#VOICE_RECOGNITION It's possible to select which Mic is being used, too. (My app offers a choice between "FRONT" and "Main" mics - the Front one is typically next to the front facing camera lens, and makes sense for video ...) On Tue, Feb 9, 2016 at 1:19 PM, 'RLScott' via Android Developers < android-developers@googlegroups.com> wrote: > No, I don't know anything about the "VOICE_RECOGNITION" mic stream. I am > just using the standard audio input stream set up with the code I posted > earlier. However someone in a DSP forum told me that the LG G3 has two > mics, one in front and one in back, and they do some DSP with those two > data streams to realize noise cancellation. This might be some artifact of > that operation. > > -Robert Scott > Hopkins, MN > > On Tuesday, February 9, 2016 at 1:20:12 PM UTC-6, Julian Bunn wrote: >> >> That is very curious! Are you using the "VOICE_RECOGNITION" mic stream? >> I'm wondering if there is some sort of odd DSP filtering being applied in >> the firmware. >> >> On Tue, Feb 9, 2016 at 8:59 AM, 'RLScott' via Android Developers < >> android-d...@googlegroups.com> wrote: >> >>> OK, I finally got myself a cheap LG G3 from eBay and did some testing. >>> The situation is not exactly as I described before. Here is what is really >>> happening. I tested my app with a sine-wave tone generator. >>> >>> When the tone generator is below about 3700 Hz, the spectrum displayed >>> in my app shows just one peak at the desired frequency. As the frequency >>> of the tone generator increases toward 4000 Hz, a very tiny mirror image >>> peak begins to appear on the other side of 4000 Hz. It gradually gains in >>> amplitude until by 3958 Hz, the amplitude of the image peak is actually a >>> bit higher than the peak at the correct frequency. As the tone goes above >>> 4000 Hz, the image peak appears below 4000 Hz, and gradually decreases in >>> amplitude as the tone frequency increases. I ran the tone frequency up to >>> 4698 Hz and saw a single peak at 4698 Hz in the spectrum and no image >>> peak. This entirely destroys my supposition that this phone is initially >>> sampling at 8000 Hz and then up-sampling to 44100, because if it were, >>> there would be no way to show a single peak at 4698 Hz with no image peak, >>> right? I mean, the information that discriminates between 4698 and 3302 is >>> totally destroyed if the audio is initially sampled at 8000 Hz. >>> >>> But something is going on in the phone's audio system that introduces >>> this image around 4000 Hz. Could it be some sort of hetrodyning? I know >>> in single sideband radio there are ways to invert the audio spectrum if the >>> detection carrier is set on the wrong side of the signal. But why would >>> things return to normal for tones well away from 4000 Hz? >>> >>> -Robert Scott >>> Hopkins, MN >>> >>> >>> On Tuesday, February 2, 2016 at 12:41:32 PM UTC-6, Julian Bunn wrote: >>>> >>>> Perhaps you can post your code, and we can take a look to see if we see >>>> anything that might be causing this problem? Otherwise, if it really is a >>>> firmware "feature" in those two devices, I don't see any good alternatives >>>> other than a) marking your APK as incompatible with those devices in Google >>>> Play, or b) doing some DSP in your software to detect the condition and >>>> work around it somehow. If it were me, I would obtain a G3 and start >>>> testing ... >>>> >>>> >>>> >>>> On Tue, Feb 2, 2016 at 6:08 AM, 'RLScott' via Android Developers < >>>> android-d...@googlegroups.com> wrote: >>>> >>>>> The theory says if the initial hardware sampling is done at 8000 >>>>> samples per second, the aliasing is already "frozen" into the sampled >>>>> data. >>>>> You can see that by observing that 4100 Hz and 3900 Hz look exactly the >>>>> same - produce exactly the same samples - after they are sampled at 8000 >>>>> samples per second. No amount of digital signal processing after that >>>>> point can distinguish the two cases, so the aliasing in the up-sampled FFT >>>>> is inevitable, with or without window
Re: [android-developers] Re: Audio recording problem - fake sample rate
Excellent news! On Tue, Feb 9, 2016 at 6:24 PM, 'RLScott' via Android Developers < android-developers@googlegroups.com> wrote: > Well if that don't beat all! It worked! I just replaced > MediaRecorder.AudioSource.MIC with > MediaRecorder.AudioSource.VOICE_RECOGNITION in my "new AudioRecord(...)" > and now the artifacts around 4000 Hz are gone. I can sweep a tone above > and below 4kHz and all I get is one nice peak in the FFT. Thanks a lot for > the suggestion. Now I just need to test and see if my app will suffer due > to the loss AGC. > > -Robert Scott > Hopkins, MN > > On Tuesday, February 9, 2016 at 5:29:00 PM UTC-6, Julian Bunn wrote: >> >> I think that you should perhaps use the VOICE_RECOGNITION stream which is >> *supposed* to be devoid of filtering and AGC etc.. >> >> >> http://developer.android.com/reference/android/media/MediaRecorder.AudioSource.html#VOICE_RECOGNITION >> >> It's possible to select which Mic is being used, too. (My app offers a >> choice between "FRONT" and "Main" mics - the Front one is typically next to >> the front facing camera lens, and makes sense for video ...) >> >> >> >> On Tue, Feb 9, 2016 at 1:19 PM, 'RLScott' via Android Developers < >> android-d...@googlegroups.com> wrote: >> >>> No, I don't know anything about the "VOICE_RECOGNITION" mic stream. I >>> am just using the standard audio input stream set up with the code I posted >>> earlier. However someone in a DSP forum told me that the LG G3 has two >>> mics, one in front and one in back, and they do some DSP with those two >>> data streams to realize noise cancellation. This might be some artifact of >>> that operation. >>> >>> -Robert Scott >>> Hopkins, MN >>> >>> On Tuesday, February 9, 2016 at 1:20:12 PM UTC-6, Julian Bunn wrote: >>>> >>>> That is very curious! Are you using the "VOICE_RECOGNITION" mic stream? >>>> I'm wondering if there is some sort of odd DSP filtering being applied in >>>> the firmware. >>>> >>>> On Tue, Feb 9, 2016 at 8:59 AM, 'RLScott' via Android Developers < >>>> android-d...@googlegroups.com> wrote: >>>> >>>>> OK, I finally got myself a cheap LG G3 from eBay and did some >>>>> testing. The situation is not exactly as I described before. Here is >>>>> what >>>>> is really happening. I tested my app with a sine-wave tone generator. >>>>> >>>>> When the tone generator is below about 3700 Hz, the spectrum displayed >>>>> in my app shows just one peak at the desired frequency. As the frequency >>>>> of the tone generator increases toward 4000 Hz, a very tiny mirror image >>>>> peak begins to appear on the other side of 4000 Hz. It gradually gains in >>>>> amplitude until by 3958 Hz, the amplitude of the image peak is actually a >>>>> bit higher than the peak at the correct frequency. As the tone goes above >>>>> 4000 Hz, the image peak appears below 4000 Hz, and gradually decreases in >>>>> amplitude as the tone frequency increases. I ran the tone frequency up to >>>>> 4698 Hz and saw a single peak at 4698 Hz in the spectrum and no image >>>>> peak. This entirely destroys my supposition that this phone is initially >>>>> sampling at 8000 Hz and then up-sampling to 44100, because if it were, >>>>> there would be no way to show a single peak at 4698 Hz with no image peak, >>>>> right? I mean, the information that discriminates between 4698 and 3302 >>>>> is >>>>> totally destroyed if the audio is initially sampled at 8000 Hz. >>>>> >>>>> But something is going on in the phone's audio system that introduces >>>>> this image around 4000 Hz. Could it be some sort of hetrodyning? I know >>>>> in single sideband radio there are ways to invert the audio spectrum if >>>>> the >>>>> detection carrier is set on the wrong side of the signal. But why would >>>>> things return to normal for tones well away from 4000 Hz? >>>>> >>>>> -Robert Scott >>>>> Hopkins, MN >>>>> >>>>> >>>>> On Tuesday, February 2, 2016 at 12:41:32 PM UTC-6, Julian Bunn wrote: >>>>>> >>>>>> Perhaps you can post your code, and we can take a look to see if we >>>>>> see anything
Re: [android-developers] Re: Audio recording problem - fake sample rate
Perhaps you can post your code, and we can take a look to see if we see anything that might be causing this problem? Otherwise, if it really is a firmware "feature" in those two devices, I don't see any good alternatives other than a) marking your APK as incompatible with those devices in Google Play, or b) doing some DSP in your software to detect the condition and work around it somehow. If it were me, I would obtain a G3 and start testing ... On Tue, Feb 2, 2016 at 6:08 AM, 'RLScott' via Android Developers < android-developers@googlegroups.com> wrote: > The theory says if the initial hardware sampling is done at 8000 samples > per second, the aliasing is already "frozen" into the sampled data. You can > see that by observing that 4100 Hz and 3900 Hz look exactly the same - > produce exactly the same samples - after they are sampled at 8000 samples > per second. No amount of digital signal processing after that point can > distinguish the two cases, so the aliasing in the up-sampled FFT is > inevitable, with or without windowing. > > I may yet get a G3 on Ebay as you say, but I was hoping for some > independent confirmation of this problem with a codebase that had nothing > in common with my code, in case there is something I am doing in the code > that is making the difference. So if you have an app that processes sound > and can detect frequency content above 4000 Hz, just have someone with one > of these failing devices go to piano and play the highest "B". That is > usually about 4019 Hz. If the device is failing as I predict, there should > also be an indication of a tone at 3981 Hz. > > Robert Scott > Hopkins, MN > > On Sunday, January 31, 2016 at 1:39:58 PM UTC-6, Julian Bunn wrote: > >> If you are only getting 8000 sps then even with interpolation to 44100 >> you would never see any signal above 4000Hz in an FFT, right? Are you >> windowing the FFT? >> >> If there are truly problems like this with the audio firmware on the LG >> G3 and Nexus 7, I haven't heard any reports from my users about them. >> That's not to say there can't be an issue, of course :-) If I were you, I >> would obtain a cheap used G3 on Ebay to test with. >> >> >> >> On Saturday, January 30, 2016 at 6:13:08 PM UTC-8, RLScott wrote: >>> >>> But are you sure you are getting the sample rate you asked for? How >>> would you know? As you can see from my very first posting, all the checks >>> you are doing here work fine for me too, and I actually do get the number >>> of samples per second I ask for. But they are not true samples. They have >>> been faked by up-sampling. The system takes 8000 samples per second and >>> then duplicates each sample enough times to make up 44100 or 22050 or >>> whatever. But I know those samples are not true samples because I see >>> aliasing around 4000 Hz in the frequency spectrum. Unless you specifically >>> look for this problem by testing with a pure tone above 4000 Hz and analyze >>> with an FFT and look for aliasing below 4000 Hz, everything will appear >>> fine. Again this only happens on a very few models - specifically the LG >>> G3 and the Asus Nexus 7. >>> >>> On Wednesday, January 27, 2016 at 10:57:45 AM UTC-6, Julian Bunn wrote: >>>> >>>> Yes, that looks fine to me ... In case it helps, here is a snippet of >>>> what I do to check a samplerate is going to work: >>>> >>>> minBuffer = AudioRecord >>>> .getMinBufferSize(rate, config, encoding); >>>> if (minBuffer != AudioRecord.ERROR_BAD_VALUE >>>> && minBuffer != AudioRecord.ERROR) { >>>>boolean bGood = true; >>>>try { >>>> audio = new AudioRecord(audioSource, rate, config, >>>> encoding, minBuffer); >>>> int istate = audio.getState(); >>>> if (istate != AudioRecord.STATE_INITIALIZED) >>>> bGood = false; >>>>} catch (Exception e) { >>>> bGood = false; >>>>} >>>>audio.release(); >>>>audio = null; >>>>if (bGood) >>>> return rate; >>>> >>>> >>>> On Tuesday, January 26, 2016 at 12:49:46 PM UTC-8, RLScott wrote: >>>>> >>>>> I am calling >>>>> AudioRecord.getMinBufferSize(44100,AudioFormat.CHANNEL_IN_MONO,AudioFormat.ENCODING_PCM_16BIT) >>>>> and using the returned minAudioRecordBufSize in >>>>> >>>>> new AudioRecord(MediaRecorder.AudioSource.
[android-developers] Re: Audio recording problem - fake sample rate
If you are only getting 8000 sps then even with interpolation to 44100 you would never see any signal above 4000Hz in an FFT, right? Are you windowing the FFT? If there are truly problems like this with the audio firmware on the LG G3 and Nexus 7, I haven't heard any reports from my users about them. That's not to say there can't be an issue, of course :-) If I were you, I would obtain a cheap used G3 on Ebay to test with. On Saturday, January 30, 2016 at 6:13:08 PM UTC-8, RLScott wrote: > > But are you sure you are getting the sample rate you asked for? How would > you know? As you can see from my very first posting, all the checks you > are doing here work fine for me too, and I actually do get the number of > samples per second I ask for. But they are not true samples. They have > been faked by up-sampling. The system takes 8000 samples per second and > then duplicates each sample enough times to make up 44100 or 22050 or > whatever. But I know those samples are not true samples because I see > aliasing around 4000 Hz in the frequency spectrum. Unless you specifically > look for this problem by testing with a pure tone above 4000 Hz and analyze > with an FFT and look for aliasing below 4000 Hz, everything will appear > fine. Again this only happens on a very few models - specifically the LG > G3 and the Asus Nexus 7. > > On Wednesday, January 27, 2016 at 10:57:45 AM UTC-6, Julian Bunn wrote: >> >> Yes, that looks fine to me ... In case it helps, here is a snippet of >> what I do to check a samplerate is going to work: >> >> minBuffer = AudioRecord >> .getMinBufferSize(rate, config, encoding); >> if (minBuffer != AudioRecord.ERROR_BAD_VALUE >> && minBuffer != AudioRecord.ERROR) { >>boolean bGood = true; >>try { >> audio = new AudioRecord(audioSource, rate, config, >> encoding, minBuffer); >> int istate = audio.getState(); >> if (istate != AudioRecord.STATE_INITIALIZED) >> bGood = false; >>} catch (Exception e) { >> bGood = false; >>} >>audio.release(); >>audio = null; >>if (bGood) >> return rate; >> >> >> On Tuesday, January 26, 2016 at 12:49:46 PM UTC-8, RLScott wrote: >>> >>> I am calling >>> AudioRecord.getMinBufferSize(44100,AudioFormat.CHANNEL_IN_MONO,AudioFormat.ENCODING_PCM_16BIT) >>> >>> and using the returned minAudioRecordBufSize in >>> >>> new AudioRecord(MediaRecorder.AudioSource.MIC, >>> 44100,AudioFormat.CHANNEL_IN_MONO, >>>AudioFormat.ENCODING_PCM_16BIT, >>> minAudioRecordBufSize); >>> >>> Is that sizing the buffers correctly? >>> >>> Thanks for the offer for the enumeration app, but I do not have a >>> failing device at my disposal. Only a few devices are failing, and they >>> are all owned by my customers. I can't ask too much of them in the way of >>> debugging help. >>> >>> >>> On Friday, January 15, 2016 at 1:34:15 AM UTC-6, Julian Bunn wrote: >>>> >>>> Make sure you are sizing the buffers correctly i.e. respecting the >>>> minimum recording buffer size (in bytes) required. If you don't then I >>>> believe the system will drop you down to 8kHz sample rate, which is what >>>> you are seeing (I think?). >>>> >>>> >>>> On Wednesday, December 23, 2015 at 9:52:37 AM UTC-8, Robert Scott wrote: >>>>> >>>>> I first call *AudioRecord.getMinBufferSize(22050...* If this returns >>>>> an error (<1) then I call *AudioRecord.getMinBufferSize(44100...* >>>>> Whichever one of these calls succeeds, I use that rate in my call to >>>>> "*new >>>>> AudioRecord(..,sampleRate..)*" >>>>> >>>>> I don't actually have one of these misbehaving devices, so my >>>>> experiments so far have been with the help of my customers. >>>>> >>>>> -Robert Scott >>>>> Hopkins, MN >>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/006d2392-ebc3-449d-b632-278699e5c55f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Audio recording problem - fake sample rate
Yes, that looks fine to me ... In case it helps, here is a snippet of what I do to check a samplerate is going to work: minBuffer = AudioRecord .getMinBufferSize(rate, config, encoding); if (minBuffer != AudioRecord.ERROR_BAD_VALUE && minBuffer != AudioRecord.ERROR) { boolean bGood = true; try { audio = new AudioRecord(audioSource, rate, config, encoding, minBuffer); int istate = audio.getState(); if (istate != AudioRecord.STATE_INITIALIZED) bGood = false; } catch (Exception e) { bGood = false; } audio.release(); audio = null; if (bGood) return rate; On Tuesday, January 26, 2016 at 12:49:46 PM UTC-8, RLScott wrote: > > I am calling > AudioRecord.getMinBufferSize(44100,AudioFormat.CHANNEL_IN_MONO,AudioFormat.ENCODING_PCM_16BIT) > > and using the returned minAudioRecordBufSize in > > new AudioRecord(MediaRecorder.AudioSource.MIC, > 44100,AudioFormat.CHANNEL_IN_MONO, >AudioFormat.ENCODING_PCM_16BIT, minAudioRecordBufSize); > > Is that sizing the buffers correctly? > > Thanks for the offer for the enumeration app, but I do not have a failing > device at my disposal. Only a few devices are failing, and they are all > owned by my customers. I can't ask too much of them in the way of > debugging help. > > > On Friday, January 15, 2016 at 1:34:15 AM UTC-6, Julian Bunn wrote: >> >> Make sure you are sizing the buffers correctly i.e. respecting the >> minimum recording buffer size (in bytes) required. If you don't then I >> believe the system will drop you down to 8kHz sample rate, which is what >> you are seeing (I think?). >> >> >> On Wednesday, December 23, 2015 at 9:52:37 AM UTC-8, Robert Scott wrote: >>> >>> I first call *AudioRecord.getMinBufferSize(22050...* If this returns >>> an error (<1) then I call *AudioRecord.getMinBufferSize(44100...* >>> Whichever one of these calls succeeds, I use that rate in my call to "*new >>> AudioRecord(..,sampleRate..)*" >>> >>> I don't actually have one of these misbehaving devices, so my >>> experiments so far have been with the help of my customers. >>> >>> -Robert Scott >>> Hopkins, MN >>> >>> -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/d0543519-0ea3-4eb4-9200-1ac60d465cc1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Audio recording problem - fake sample rate
I have a free app called "AudioCaps" on Play, which will iterate through all standard play/record modes/rates and create a list of them with the min buffer sizes, that your user can then email to you. I found this helpful when I initially released AudioTool - maybe it will provide more "remote insight" for you? Julian On Wednesday, December 23, 2015 at 9:52:37 AM UTC-8, Robert Scott wrote: > > I first call *AudioRecord.getMinBufferSize(22050...* If this returns an > error (<1) then I call *AudioRecord.getMinBufferSize(44100...* Whichever > one of these calls succeeds, I use that rate in my call to "*new > AudioRecord(..,sampleRate..)*" > > I don't actually have one of these misbehaving devices, so my experiments > so far have been with the help of my customers. > > -Robert Scott > Hopkins, MN > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/e02e3415-1020-4344-8e57-0d405ba99df0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Audio recording problem - fake sample rate
Make sure you are sizing the buffers correctly i.e. respecting the minimum recording buffer size (in bytes) required. If you don't then I believe the system will drop you down to 8kHz sample rate, which is what you are seeing (I think?). On Wednesday, December 23, 2015 at 9:52:37 AM UTC-8, Robert Scott wrote: > > I first call *AudioRecord.getMinBufferSize(22050...* If this returns an > error (<1) then I call *AudioRecord.getMinBufferSize(44100...* Whichever > one of these calls succeeds, I use that rate in my call to "*new > AudioRecord(..,sampleRate..)*" > > I don't actually have one of these misbehaving devices, so my experiments > so far have been with the help of my customers. > > -Robert Scott > Hopkins, MN > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/b1513818-8928-4d64-b106-99d75a76ea69%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Problem running mksdcard
Hi everybody! I am quite new on this, so probably I am making some beginner mistake... I am trying to use the "mksdcard.exe" tool to create a sd image for the emulator, but I am getting this error: "Invalid argument size". Below you can find the log. My system is: - Windows 7, 64bits. - Using Android SDK Tools 24.4.1 Any help would be really appreciated! Thanks so much! Julian. D:\opt\android\sdk\tools>mksdcard 100M image.img Invalid argument size '100M' mksdcard: create a blank FAT32 image to be used with the Android emulator usage: mksdcard [-l label] if is a simple integer, it specifies a size in bytes if is an integer followed by 'K', it specifies a size in KiB if is an integer followed by 'M', it specifies a size in MiB if is an integer followed by 'G', it specifies a size in GiB Minimum size is 9M. The Android emulator cannot use smaller images. Maximum size is 1099511627264 bytes, 1073741823K, 1048575M or 1023G -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/ff0c92ee-a694-4577-8df8-02ae07f74278%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: alpha testing in-app billing, error "This version of the application is not configured for billing..."
Hei, I've worked out a theory that seems to hold up. 1/ Starting with the assumption "Perhaps the error is actually meaningful" I got some logs to prove Google Play Services generates the fault. Which it appears to do. 2/ Then I worked on the assumption I do not see the opt-in promised Testing version because Google Play thinks I've already got it. That is to say, I assumed if the alpha APK Release certificate and the Manifest version number matches that which was "adb shell pm install'ed" onto my phone - as the docs/stackoverload posts imply you should - then Google Play doesn't offer the release Testing version. In fact, it might be just the Manifest version number alone that is compared. So either you shouldn't adb shell the release onto your device - or if you do, then you should delete it. Or install an older version. 3/ The undocumented theory - the act of installing a release APK includes its traversal of Google Play Services, which record it's permissions. If you don't traverse it on installation, Google Play Services has no record of the release permissions and will refuse runtime "manifest level" access requests, like in-app billing. So "adb shell'ing" the latest release version onto your device will result in the Error. Hope this theory helps On Saturday, December 19, 2015 at 9:19:10 AM UTC, julian wrote: > > Hei, > > Problem: I get the Error "This version of the application is not > configured for billing through Google Play". I don't want to get this. > Please see attached images. > > My app is published to alpha and I only wish to test in-app billing. > My app uses IABv3. > Mine is the only account on the test device. It is not the same as the > developer identity. The test device is recognised in the list of supported > devices. > I have successfully used SKU "android. test.purchased" for a couple of > months. > With the alpha debug build loaded from studio, this sku works perfectly > with my app license key, resulting in the "30 minutes..." invite. So I > deduce google play recognises my public license key. > Using the release alpha build loaded using "adb shell pm install..." > android.test.purchased also works perfectly. > Using a non-existent SKU results in the different "authentication is > required" error. So I deduce google play recognises my correct sku. > Perhaps the error is actually meaningful. The alpha testers opt-in page > suggests I should expect to get a Testing version - I don't see this > happening. Maybe I am not getting the testing version, but just running the > adb-loaded version, and this is why I see the error? > > The ONLY changes I have made in the alpha build from my totally otherwise > working and publishable development build are to replace the SKU and the > LICENSE KEY with correct (yes i checked) values. > > This app is my first attempt at a release, and is a new experience for me. > I have read numerous google guides, as in > http://developer.android.com/index.html#q=in-app%20billing. > I have searched stackoverflow likewise. I have multplie times checked the > list given on > http://stackoverflow.com/questions/11068686/this-version-of-the-application-is-not-configured-for-billing-through-google-pla, > > although I have not tried debugging with the release certificate. > > It is very likely I am not doing something that needs doing. > Any hints greatly appreciated. > Many thanks. > julian > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/ad211247-603e-4ac5-86e8-d1e063d22b0e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: InAppPurchase: Consumption Request to Google Play
Hei, I assume you will use IABv3. Early in your code, in a billing activity, you will create a android.vending.billing.helper.IabHelper: public abstract class PurchaseActivity extends AppCompatActivity implements OnIabSetupFinishedListener, OnIabPurchaseFinishedListener, IabHelper.QueryInventoryFinishedListener { private IabHelper billingHelper; protected String mSku; @Override protected void onCreate( Bundle savedInstanceState ) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_purchase); setResult(RESULT_CANCELED); // set initial value mSku = ""; // A simple but bad way to retrieve your app public license key // TODO - make a good improvement String temp = App.BASE_64_LICENSE_KEY; // construct the developer payload /* check we can communicate with the on-device google play app */ billingHelper = new IabHelper( this, temp ); billingHelper.startSetup( this ); } Much later in your app lifecycle, on completion of a purchase request, billingHelper will invoke a callback in your code, like: /** * Called to notify that an in-app purchase finished. If the purchase was * successful, then the sku parameter specifies which item was purchased. * If the purchase failed, the sku and extraData parameters may or may not * be null, depending on how far the purchase process went. * * Security Recommendation: When you receive the purchase response from * Google Play, make sure to check the returned data signature, the orderId, * and the DeveloperPayload string in the Purchase object to make sure that * you are getting the expected values. */ @Override public void onIabPurchaseFinished( IabResult result, Purchase response ) { if( result.isFailure( )) { //Logger.d("Error purchasing: " + result); dealWithPurchaseFailed( result ); } else if( App.SKU.equals( response.getSku( ))) { dealWithPurchaseSuccess( result, response ); } else { //Logger.d("Unknown sku purchased: " + result); /* deal locally with successful purchase response for different SKU */ IabResult lResult = new IabResult( IabHelper.IABHELPER_UNKNOWN_PURCHASE_RESPONSE, "Signature verification failed for sku" ); dealWithPurchaseFailed( lResult ); } } And to consume the purchase, later in your app life cycle, you can reuse the Purchase response parameter as in: protected void consumePurchase( Purchase response ) { //Logger.d("revoke license"); /* Consuming a Purchase Item means it has to be bought again. * For one-off lifetime purchases you don't do this. * You would do this for many-off consumable purchases, or on detecting * an illegal use of the Application. */ billingHelper.consumeAsync( response, null ); } You can further google for Mark Blundell tutorial as a starter. Also wade through google's android.vending.billing.util .IabHelper class. Hope this helps. On Friday, December 18, 2015 at 10:02:08 AM UTC, Andre wrote: > > Hello, > > i want to add some consumable in app items for my game. But the only > choice is: > > - Managed Item > - Abo > > The documentation says: > > Before provisioning the consumable in-app product in your application, you >> must send a consumption request to Google Play and receive a successful >> response indicating that the consumption was recorded. > > > But where i can do that? > > Thank you and best regards > > Andre > > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/7a54c474-f62d-4e03-98ac-66861eebc3ff%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Tax 1099-K's are NOT correct
The 1099-K amount is the gross amount: what is received by you the developer is 70% of that. If I multiply my 1099-K amount by 0.7 it matches what Google paid me in 2013 pretty closely. AFAIK the taxable income is the amount you received, not the 1099-K amount. On Tuesday, February 11, 2014 3:40:25 PM UTC-8, niko20 wrote: Back in January of this year I went through all my 2013 payouts (actual transactions where money was sent to my bank) and added up all the amounts. Now Google has sent me a 1099-K, and it's about $10,000 more than what I added up. It is just flat wrong. Who the hell can I even call about this. Thanks to them the IRS is going to think I made way more. I added what was actually sent to my bank. To me, the numbers Google has never add up. I have never seen them add up correctly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Not Licensed for this country when paid app used in another country?
Sure: it's an app called AudioTool for making sound measurement. On Wednesday, October 23, 2013, Mukesh Srivastav wrote: can we have detail about the app, like type of app at-least to know ? On Thu, Oct 24, 2013 at 5:22 AM, Julian Bunn jjb...@gmail.comjavascript:_e({}, 'cvml', 'jjb...@gmail.com'); wrote: One of my paid app users, who bought the app in Australia, travelled to the USA and tried to use the app there. When the app was started he received the message Not Licensed for this country, and was unable to use it! Is this a known limitation? Any guesses as to what is going on here? Needless to say, this is not something I have programmed in to the app (nor would I have any idea how to do so even if I wanted to!). 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.comjavascript:_e({}, 'cvml', 'android-developers@googlegroups.com'); To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'android-developers%2bunsubscr...@googlegroups.com'); For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.comjavascript:_e({}, 'cvml', 'android-developers%2bunsubscr...@googlegroups.com');. For more options, visit https://groups.google.com/groups/opt_out. -- Warm Regards, *Mukesh Kumar*, Android Consultant/Freelancer, India,Hyderabad. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.comjavascript:_e({}, 'cvml', 'android-developers@googlegroups.com'); To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'android-developers%2bunsubscr...@googlegroups.com'); For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/AzJE3m64lvg/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'android-developers%2bunsubscr...@googlegroups.com');. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Not Licensed for this country when paid app used in another country?
The customer installed and used the app in Australia, traveled to the USA (where he received the error), then traveled back to Australia where it started to work again, no error. The app is marked for all countries, and indeed most of my customers are in the USA. Julian On Thu, Oct 24, 2013 at 7:51 AM, Piren gpi...@gmail.com wrote: Sounds like a Google Play restriction, did you limit your app not to be distributed in the USA? On Thursday, October 24, 2013 2:52:02 AM UTC+3, Julian Bunn wrote: One of my paid app users, who bought the app in Australia, travelled to the USA and tried to use the app there. When the app was started he received the message Not Licensed for this country, and was unable to use it! Is this a known limitation? Any guesses as to what is going on here? Needless to say, this is not something I have programmed in to the app (nor would I have any idea how to do so even if I wanted to!). Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/AzJE3m64lvg/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Not Licensed for this country when paid app used in another country?
One of my paid app users, who bought the app in Australia, travelled to the USA and tried to use the app there. When the app was started he received the message Not Licensed for this country, and was unable to use it! Is this a known limitation? Any guesses as to what is going on here? Needless to say, this is not something I have programmed in to the app (nor would I have any idea how to do so even if I wanted to!). Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Application mistakenly published
i can belive it... I say well that's what I did, but I worry that version that is available, the version is incomplete and not very functional and I worry that some user installs and qualify an incomplete product 2013/7/8 John Coryat cor...@gmail.com There's no going back. The best you can do is publish another update and start that at the alpha level again. -John Coryat On Monday, July 8, 2013 10:02:48 AM UTC-5, Rmax wrote: Currently I am making a small application, this is not at all complete and so far the publications were by alpha tab. the problem is that accidentally went up one tab apk production and now do not know how to remove it, for now I have the unpublished application. but then how I can fix this problem and keep using. need to continue to publish only versions for the community where the testers are not to appear publicly in the play store. can anyone help me? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/OhnHipEchPc/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Julian Reyes Escrigas Desarrollador PHP Semi Senior teléfono celular: (301) 4867522 -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Re: Application mistakenly published
yeah but the tester too cant download the app 2013/7/8 John Coryat cor...@gmail.com Unpublish the apk. That will prevent anyone new from downloading. -John Coryat On Monday, July 8, 2013 10:40:58 AM UTC-5, Rmax wrote: i can belive it... I say well that's what I did, but I worry that version that is available, the version is incomplete and not very functional and I worry that some user installs and qualify an incomplete product 2013/7/8 John Coryat cor...@gmail.com There's no going back. The best you can do is publish another update and start that at the alpha level again. -John Coryat On Monday, July 8, 2013 10:02:48 AM UTC-5, Rmax wrote: Currently I am making a small application, this is not at all complete and so far the publications were by alpha tab. the problem is that accidentally went up one tab apk production and now do not know how to remove it, for now I have the unpublished application. but then how I can fix this problem and keep using. need to continue to publish only versions for the community where the testers are not to appear publicly in the play store. can anyone help me? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-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 a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/** topic/android-developers/**OhnHipEchPc/unsubscribehttps://groups.google.com/d/topic/android-developers/OhnHipEchPc/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+**unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/**groups/opt_outhttps://groups.google.com/groups/opt_out . -- Julian Reyes Escrigas Desarrollador PHP Semi Senior teléfono celular: (301) 4867522 -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to a topic in the Google Groups Android Developers group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/android-developers/OhnHipEchPc/unsubscribe . To unsubscribe from this group and all its topics, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- Julian Reyes Escrigas Desarrollador PHP Semi Senior teléfono celular: (301) 4867522 -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Some tablets marked as Incompatible in Play Store, but not in Developer Console
Thanks, Rudolf. The tablets in question a) are marked as compatible with the APK in Dev Console, b) had downloaded and were running the app before the APK update, so were compatible then. The update changed nothing in the manifest, so there should be no change in which devices are compatible. I don't think that the supports-screen element is necessary - tablets are supported without explicitly using that element. My conclusion is that there is a change or problem in the Play Store. Julian On Tuesday, May 21, 2013 1:23:34 AM UTC-7, Rudolf Hornig wrote: Oh and probably you need to provide the supports-screen element in your manifest and declare explicitly the tablet support: supports-screens android:resizeable=true android:normalScreens=true android:anyDensity=true android:largeScreens=true android:smallScreens=true android:xlargeScreens=true/supports-screens Maybe PlayStore started to enforce this to go ahead and push the developers to update their apps to correctly support tablets. On Tuesday, 21 May 2013 10:18:17 UTC+2, Rudolf Hornig wrote: Probably those users set a custom DPI on their tablet? ask them. This is a common reason for such a case. On Monday, 20 May 2013 21:15:43 UTC+2, jjbunn wrote: I don't think it has anything to do with the 2.2 build (what makes you think it does?) as I already tried a version targeting 4.0 and the result was the same. My users report that there are several other apps in the Play Store that are now marked as incompatible for their tablets, which were compatible a few days ago. So, my impression is that the problem is in the Play Store, but I'd love to be wrong, because then I could fix it myself! Julian On Monday, May 20, 2013 10:41:46 AM UTC-7, Jonathan S wrote: Problem is Android 2.2 SDK build. You can built it on 4.0 and keep minimum API level. Just be very careful. On Monday, May 20, 2013 12:50:39 PM UTC-4, jjbunn wrote: I uploaded a new APK for one of my apps on Friday. There was no change to the manifest or build settings for the app, but some of my customers using tablets like the Note 10 and Nexus 10 tell me that the new APK is marked as incompatible in the Google Play store, whereas they were happily using the previous version on those devices. In my Android Developer Console, the APK is marked as being compatible with those tablets (in fact it is marked as compatible with over 2000 devices, and incompatible with 0 (zero)). So I am very puzzled what has happened, and would really appreciate some help :-) Here is the Manifest. I build with the Android 2.2 SDK. ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.xxx.xxx.xxx android:installLocation=auto android:versionCode=76 android:versionName=5.9.2 uses-permission android:name=android.permission.RECORD_AUDIO/ uses-permission android:name=android.permission.MODIFY_AUDIO_SETTINGS/ uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ uses-sdk android:minSdkVersion=4/ application android:icon=@drawable/icon android:label=@string/app_name android:theme=@android:style/Theme.NoTitleBar activity android:name=.MyApp android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application /manifest -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Some tablets marked as Incompatible in Play Store, but not in Developer Console
Hi Bob ... thanks for the input. I really don't want to set such a high minSdk as then I would lose many of my 10,000 customers, who are running older versions of the OS. It's been a few days since this tablet problem appeared so I'm going to check back with those customers to see if the app availability in the Play Store has changed in the meantime. On Tuesday, May 21, 2013 7:39:58 AM UTC-7, bob wrote: I agree that *it probably does not have to do with the 2.2 build*. I was having the same problem and was using the 2.2 build. However, I switched from 2.2 to 4.2 SDK, and this did not remedy the problem. However, I was able to sort of remedy the problem by setting minSdkVersion=15 targetSdkVersion=15 You might want to try that as an experiment. Thanks. On Monday, May 20, 2013 2:15:43 PM UTC-5, jjbunn wrote: I don't think it has anything to do with the 2.2 build (what makes you think it does?) as I already tried a version targeting 4.0 and the result was the same. My users report that there are several other apps in the Play Store that are now marked as incompatible for their tablets, which were compatible a few days ago. So, my impression is that the problem is in the Play Store, but I'd love to be wrong, because then I could fix it myself! Julian On Monday, May 20, 2013 10:41:46 AM UTC-7, Jonathan S wrote: Problem is Android 2.2 SDK build. You can built it on 4.0 and keep minimum API level. Just be very careful. On Monday, May 20, 2013 12:50:39 PM UTC-4, jjbunn wrote: I uploaded a new APK for one of my apps on Friday. There was no change to the manifest or build settings for the app, but some of my customers using tablets like the Note 10 and Nexus 10 tell me that the new APK is marked as incompatible in the Google Play store, whereas they were happily using the previous version on those devices. In my Android Developer Console, the APK is marked as being compatible with those tablets (in fact it is marked as compatible with over 2000 devices, and incompatible with 0 (zero)). So I am very puzzled what has happened, and would really appreciate some help :-) Here is the Manifest. I build with the Android 2.2 SDK. ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.xxx.xxx.xxx android:installLocation=auto android:versionCode=76 android:versionName=5.9.2 uses-permission android:name=android.permission.RECORD_AUDIO/ uses-permission android:name=android.permission.MODIFY_AUDIO_SETTINGS/ uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ uses-sdk android:minSdkVersion=4/ application android:icon=@drawable/icon android:label=@string/app_name android:theme=@android:style/Theme.NoTitleBar activity android:name=.MyApp android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application /manifest -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] Retrieval of phone# inhibited by an app
Always sim cards have a phone number so if yo want to retrieve your phone number you have to make a call to the telephone phone provider and thus obtain the number ... for example in my country i may obtain my phone number with *#595# and when i call that number i obtain my phone number. However this is not a universal number so if u want your app to run in other countries then u will be in trouble. But there must be another way to obtain that number. Then how you explain your phone is able to receive a call. But other way i dont know. El 19/04/2013 05:16, dashman erjdri...@gmail.com escribió: I'm using ((TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE)).getLine1Number() to retrieve the tel# of the device and then create a serial# out of it. Some users have installed a telephony app (magic jack) that inhibits the reporting of the tel# - getLine1Number() reports null. Any other way to retrieve the number? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Access denied error while trying to install new API
yes Am Mittwoch, 14. Dezember 2011 22:26:17 UTC+1 schrieb Uday (Dave): Hi, I have installed the android sdk 16 on my Windows7 machine I have installed the Android2.1 API initially without any glitch. But then again when I try to install the other APIs using the SDK manager, it gives me: Downloading SDK Platform Android 2.3.3, API 10, revision 2 File not found: C:\Program Files (x86)\Android\android-sdk\temp \android-2.3.3_r02-linux.zip (Access is denied) Downloading Samples for SDK API 10, revision 1 File not found: C:\Program Files (x86)\Android\android-sdk\temp \samples-2.3.3_r01-linux.zip (Access is denied) Skipping 'Google APIs by Google Inc., Android API 10, revision 2'; it depends on 'SDK Platform Android 2.3.3, API 10, revision 2' which was not installed. Done. Nothing was installed Thanks, Dave thanks, uday (dave) you answer ist correct ! thanks alot -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] RenderScript carousel example
hi, i found the carousel example that works on google music at thi link : http://code.google.com/p/android-ui-utils/downloads/detail?name=CarouselExample.zipcan=2q= but the problem is that this code only works on honeycomb and above but the one that is on google music works on 2.2 and 2.3, so i was wondering if there is any improvement of this code that i can use to make it work on this versions or if it is another piece of code -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Unable to resume activity:{...} Java.lang.Nullpointer exception
hi my friend! I have exactly the same problem, but my case is to try to run the MediaStore.ACTION_IMAGE_CAPTURE intent, the system can not resume onActivityResult and generates the following error: Unable to resume activity {}: java.lang.RuntimeException: Failure Delivering ResultInforesult {who = null, request = 256, result = -1, data = Intent {act = inline-data (has extras)}} to activity any suggestions ... Thank you for your help. El domingo, 23 de marzo de 2008 19:39:56 UTC-5, Dan U. escribió: Ok, problem solved, and it had nothing to do with startManagingCursor. Actually I think that was sort of a byproduct of the problem. Remove myDBHelper.close() after your fillData() call. That's what caused it. Now for the second problem is your SimpleCursorAdapter. You are providing it your layout for TeaTime and the id of your TextView that is inside that. Instead, you should be specifying a layout used for one row in the list. That means whatever components you have in the layout you provide to SimpleCursorAdapter will show up as an item in the list. I went ahead and changed it to use some android defaults: int[] to = new int[] { android.R.id.text1 }; ListAdapter test = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, myTeaCursor, from, to); On Mar 23, 5:21 pm, Dan U. dan.ul...@gmail.com wrote: I have to admit, I don't know cursors that well, so I'm learning a bit here. I really think it has something to do with the call to startManagingCursor(myTeaCursor) that you make. I have gotten to where I get a SQLLiteException due I guess to some query not working. I've tried experimenting with some things in the TeaTime activity, so maybe you can try these as well: - Override onActivityResult and make a call to fillData() - Make a call to stopManagingCursor(myTeaCursor) in an overridden onFreeze() On Mar 23, 4:25 pm, MobileBen benjaminspeckm...@gmail.com wrote: Here it is. Thank you again for your help. I appreciate that. I still didn't find the solution :( public class TeaDB { public static final String KEY_NAME=name; public static final String KEY_BREWTIME=brewTime; public static final String KEY_ROWID=_id; /** * Database creation sql statement */ private static final String DATABASE_CREATE = CREATE TABLE IF NOT EXISTS + TeaTable + (_id integer primary key autoincrement, name text not null, brewTime integer not null);; private static final String DATABASE_NAME = TeaTimeDatabase; private static final String DATABASE_TABLE = TeaTable; private static final int DATABASE_VERSION = 2; private SQLiteDatabase myDb = null; private final Context mCtx; /** * Constructor - takes the context to allow the database to be opened/created * @param ctx the Context within which to work */ public TeaDB(Context ctx) { this.mCtx = ctx; } /** * Open the teaTable database. If it cannot be opened, try to create a new instance of * the database. If it cannot be created, throw an exception to signal the failure * @return this (self reference, allowing this to be chained in an initialization call) * @throws SQLException if the database could be neither opened or created */ public TeaDB open() throws SQLException { try { myDb = mCtx.openDatabase(DATABASE_NAME, null); } catch (FileNotFoundException e) { try { myDb = mCtx.createDatabase(DATABASE_NAME, DATABASE_VERSION, 0, null); myDb.execSQL(DATABASE_CREATE); /*myDb.execSQL(CREATE TABLE + DATABASE_TABLE + (Name TEXT, brewTime INT(3)););*/ } catch (FileNotFoundException ex1) { throw new SQLException(Could not create database); } } return this; } public void close() { myDb.close(); } /** * Create a new Tea using the name and brewTime provided. If the Tea is successfully created * return the new rowId for that Tea, otherwise return a -1 to indicate failure. * @param name the name of the Tea * @param brewTime the brewTime of the Tea * @return rowId or -1 if failed */ public long createTea(String name, int brewTime) { ContentValues initialValues = new ContentValues(); initialValues.put(KEY_NAME, name); initialValues.put(KEY_BREWTIME,
[android-developers] As close my android application
I need to know how I can close my android application and all its activities . Any ideas that might help me do this? thank you very much -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem loading HTML file from android_asset in Browser
Thanks, everyone. I went with WebView in the end, and it works nicely. On Feb 4, 1:02 pm, Mark Murphy mmur...@commonsware.com wrote: On Sat, Feb 4, 2012 at 3:57 PM, Julian Bunn jjb...@gmail.com wrote: Thanks, Mark - now I understand what is going wrong. I suppose if the help file were on the sdcard it would work. Or if you served it up by a ContentProvider. Is there a recommended way of showing a help file in assets from within an app - I've searched around and can't find anything appropriate. Using WebView seems like overkill. 1. WebView 2. TextView (with light HTML content) in a ScrollView 3. Launch the default browser on your Web site 4. Launch the default browser on a help file (and images, JS, CSS, etc.) you serve from a ContentProvider 5. Launch the default browser on a help file (and images, JS, CSS, etc.) you stick on external storage -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in NYC:http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem loading HTML file from android_asset in Browser
Thanks, Mark - now I understand what is going wrong. I suppose if the help file were on the sdcard it would work. Is there a recommended way of showing a help file in assets from within an app - I've searched around and can't find anything appropriate. Using WebView seems like overkill. Julian On Feb 4, 3:54 am, Mark Murphy mmur...@commonsware.com wrote: You have two problems. First, you are using setClassName() with packages and classes that are not your own. Second, you are telling the opened activity to find a help.html file in its own application assets. file:///android_asset/help.html will be interpreted in the context of the app trying to use it. I am not aware of a Uri syntax that will work to have files in one app's assets be addressable by another app. On Fri, Feb 3, 2012 at 9:45 PM, Julian Bunn jjb...@gmail.com wrote: I am trying to launch the browser to show an HTML help file that is in the assets directory of my .apk. My code is: Uri uri = Uri.parse(file:///android_asset/help.html); Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.setClassName(com.android.browser,com.android.browser.BrowserActivity); startActivity(intent); The browser starts up and displays the error message that it can't find the help.html file. I've run out of ideas as to what may be wrong - can anyone please point out where I'm doing this incorrectly? Thanks! Julian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Android Training in NYC:http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problem loading HTML file from android_asset in Browser
I am trying to launch the browser to show an HTML help file that is in the assets directory of my .apk. My code is: Uri uri = Uri.parse(file:///android_asset/help.html); Intent intent = new Intent(Intent.ACTION_VIEW, uri); intent.setClassName(com.android.browser,com.android.browser.BrowserActivity); startActivity(intent); The browser starts up and displays the error message that it can't find the help.html file. I've run out of ideas as to what may be wrong - can anyone please point out where I'm doing this incorrectly? Thanks! Julian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Valid use case for AbsoluteLayout?
I'm building an app that includes photo tagging. In order to display the tags on a tagged photo, I was looking for a layout that could absolute position the tags over the image and allow them to be clickable, etc. Naturally, my first instinct was to look at AbsoluteLayout (I'm trying to absolute position something, this just seems logical). I discovered that it was deprecated and came across all of these StackOverflow answers and Android mailing list threads describing why AbsoluteLayout is evil and how I'm a naughty child for wanting to use it. The argument boiled down to this: multiple screen sizes in Android would make it so your layout would be difficult to maintain and look like crap on different phones. I would agree with that assessment for most cases, and I can see how people may misuse an AbsoluteLayout. I think using the following technique, however, there is no better layout to use than AbsoluteLayout. My tags' coordinates are defined in percentages rather than pixels. At runtime, I get the width and height of the image I'm overlaying, and calculate the pixel coordinates of the tags. The tags are then added to the AbsoluteLayout using the calculated coordinates. If the image expands or shrinks on different sized screens, it won't matter because the coordinates of the tags will scale along with it. To avoid getting the rug pulled out from under me if AbsoluteLayout is ever all of a sudden removed from the SDK, I ended up using a FrameLayout and setting top and left margins (the exact same effect) to position the tags. So my question is this: if there is a case where AbsoluteLayout is the best tool to use, why is it deprecated? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Valid use case for AbsoluteLayout?
Because too many developers would misuse it if it wasn't. Instead of using a FrameLayout just make a copy of AbsoluteLayout in your application. Does that mean it WILL be removed from the SDK at some point then? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Valid use case for AbsoluteLayout?
Also, there are many different parts of the SDK that CAN be misused: nesting too many LinearLayouts together, running blocking operations on the UI thread, loading large bitmaps into memory, etc. What makes AbsoluteLayout different in particular? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Analytics OutOfMemoryError
Hi all, I was recently getting a lot of crashes from Google Analytics on an LG Revolution that appeared very similar to the crashes detailed in these threads: http://groups.google.com/group/android-developers/browse_thread/thread/77c71953388f6ab1 http://stackoverflow.com/questions/5358014/android-httpclient-oom-on-4g-lte-htc-thunderbolt What I understand is happening is that during the dispatch, the socket that GA creates uses what ever the device's default buffer size is. This would be fine on most phones (I tested on an HTC Evo 4G and HTC Desire, they each create a 16K buffer by default), except on the LG Revolution (and apparently the HTC Thunderbolt) it creates a 2MB buffer by default instead. Clearly, with 24MB of heap, dispatches going out every 20 seconds or so, and a GC engine that tends to fragment, this will lead to OOM errors pretty quickly. I've filed a bug report with the GA team here: http://code.google.com/p/analytics-issues/issues/detail?id=153 If anyone has been seeing this issue as well, I'd encourage you to voice it there, or you could star the issue to see if we can't get the team's attention. In the meantime, I've implemented this stopgap measure to turn GA off if my app is running on a phone that defaults to a huge buffer: Socket s = new Socket(); int bufferSize = 0; try { bufferSize = s.getSendBufferSize(); } catch (SocketException e1) { e1.printStackTrace(); } Log.i(TAG, Default buffer size: + bufferSize); if(bufferSize 100) { USES_GOOGLE_ANALYTICS = false; Log.e(TAG, Default socket buffer too large, disabling GA); } This goes in the Application class's onCreate method, or you could use it in your launching Activity. USES_GOOGLE_ANALYTICS is a global variable that you would check anywhere you would log a GA event. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Different Package Name for Development Builds in Eclipse
I'm quite new to Android development but now my first app is getting closer to a somehow working state. But I want my normal phone for development which causes one problem: I can't use a stable version of my app while I'm developing. Now I'm wondering if there is an easy way in Eclipse to use a differente package name (for example append dev to the normal one) for the development builds (Run button) but still the normal one for release versions (Export Android Application). I already found out that aapt has an option --rename-manifest-package but I don't really know how to use this and how to customize the build process in Eclipse for my needs. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] System misreporting free system memory?
Hey all, We've just finished a launch and we're getting sporadic reports of our app detecting far less free memory on the working drive than the system itself reports. On our test devices we're not seeing this, but on some user devices they're getting reports of ~7mb free, while the system reports (in Settings) that they have 200mb free. I should note that our detection method is as follows: StatFs stat = new StatFs(context.getFilesDir().getAbsolutePath()); long bytesAvailable = (long)stat.getBlogSize() * (long)stat.getAvailableBlocks(); return bytesAvailable / (1024.f * 1024.f); As I said, on every test device of ours this reports the exact amount that is otherwise shown by the system, but in the field it's occasionally grossly underreporting the amount of memory available. Is there another way to detect free system memory? Am I missing something? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Which Reference System is used by the Google Maps Api
Anyone? 2009/11/25 Mathias mathias.menningh...@googlemail.com Hi, which Spatial Reference System is used by the Google Maps API and in which Reference System are the GPS coordinates to be received by a LocationProvider? I only can assume that the Location Services use WGS84, or EPSG:4326. But what if I use GeoPoint? Will it require WGS84 or the Google Maps Projection (some kind of traverse mercator projection EPSG:90913). And what reference do the Projection.fromPixels(..) and Projection.toPixels (..) methods require? I ask because I want to display some GeoData to an Overlay and I have to decide in which reference system I have to request it from my Services. Kind regards Mathias -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Programmatically determine device RAM
Hey all, I haven't been able to find any calls that can determine the amount of ram on a device. I should note that I'm not looking for something that has to do with allocated memory, available memory, or anything that is at all dynamic -- simply something that's going to give you the amount of physical memory built into the hardware. The best I've been able to come up with so far is catting is /proc/ meminfo (... which turns this into a Linux question). Does anyone happen to know of an Android API that is meant to do this? Thanks for any suggestions! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Programmatically determine device RAM
Thanks for the reply. I thought that was likely the case, so now I can stop searching around for it. For my purposes (and for anyone else reading this) I've decided to cat /proc/meminfo and parse out the MemTotal value. Obviously that's relatively inexact, but I think it's good enough for what I want. On Feb 19, 7:45 am, Dianne Hackborn hack...@android.com wrote: Sorry, there isn't an SDK API for this. Any number you would get would be fairly meaningless -- often a lot of the actual physical RAM is consumed by the radio and other things without the kernel being able to use it. On Fri, Feb 18, 2011 at 8:21 PM, Julian lepin...@gmail.com wrote: Hey all, I haven't been able to find any calls that can determine the amount of ram on a device. I should note that I'm not looking for something that has to do with allocated memory, available memory, or anything that is at all dynamic -- simply something that's going to give you the amount of physical memory built into the hardware. The best I've been able to come up with so far is catting is /proc/ meminfo (... which turns this into a Linux question). Does anyone happen to know of an Android API that is meant to do this? Thanks for any suggestions! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: AutoCompleteTextView doesn't work with android:style/Theme.Light
Still on 2.2. 2009/12/18 Marcus marcus.ter...@gmail.com The same on my Motorola Milestone (german Droid) with still 2.0 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Eclipse ADT update ruins XML layout files development
Try the preview version of adt 9, it has the up and downs arrows. http://tools.android.com/download 2011/1/3 sisko adeod...@gmail.com I am a beginner and I am having trouble getting accurate results hand- coding the XML but I will give it a shot. Thanks. On Jan 4, 1:45 am, John Lussmyer johnlussm...@gmail.com wrote: Use the xml tab and edit the xml directly. MUCH easier. Also helps if you use ctrl-F to reformat the XML to be legible. (I also change the XML formatting preferences to put each attribute on a new line.) On Mon, Jan 3, 2011 at 5:38 PM, sisko adeod...@gmail.com wrote: Thanks for responding. If you mean we are supposed to drag elements into place, I got ta say ... It simply does not work. I have an existing project with a very complex layout in one of my views. Any attempt to reorganize the layout by dragging things around ends in disaster. Please help. Important projects are on hold until I can convinitenly do comple layouts again. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: the new eclipse UI design - absolute frustration and waste of time
I think the adt is going backwards, the GUI designer is a waste of time, drag and drop just does not work properly, we just need the up and down arrows back! 2010/12/31 Bob Kerns r...@acm.org Actually, I find the huge properties menu to be an improvement over the old properties view (which is still available, BTW). The Attributes you can't seem to control thing is definitely a problem. For example, with a relative layout, depositing an item to be below another, you can't just get below, you also get one or both sides aligned. But what I really want is to align the side to the parent view. I haven't found any way to do that. You can't get below alone, and once it's attached to the one above, you can't attach it to the parent without losing the connection to the one above. I do find it saves time in the very initial setup of a screen, or if I'm just tweaking a property here or there. But at the moment, if I try to do more than a limited set of things with it, I end up wasting my time. I do think it's going in the right direction -- and I look forward to its arrival! On Dec 31, 8:23 am, John Lussmyer johnlussm...@gmail.com wrote: I've used the NetBeans and MyEclipse GUI editors extensively. They are very nice. The Android thing in Eclipse is pretty much a waste of time. Bizarre things happen when you try to drag controls or layouts in. Items end up in totally unexpected places, with attributes that you can't seem to control. The huge properties menu isn't very helpful either. After just a few minutes of attempting to use the GUI editor, I gave up and just edited the XML directly. Much easier, quicker, and with better control of what you get. I don't even bother previewing my layouts with the GUI editor, as it frequently leaves out controls entirely. On Thu, Dec 30, 2010 at 6:15 PM, Zsolt Vasvari zvasv...@gmail.com wrote: Totally agree. If you use XML, you will actually understand what's going on instead of relying on a GUI editor to do the work for you. Personally, in over a year and a half of using Eclipse, I've yet to drag and drop a single control with the editor. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Eclipse ADT 8.0.0 (and 8.0.1) problem - can't create views hierarchy with drag and drop in the Outline view
Also de up and down arrows. Another thing, Where is the fill_parent option? 2010/12/8 Prashast prash...@gmail.com At first I thought its because of a wrong view being opened but looks like they have removed the +, - and arrows. While working with a complex layout dragging the views just doesn't work me. The only solution is to go edit the files in XML. The +, - and arrows controls should be brought back IMO On Dec 8, 3:54 pm, Kumar Bibek coomar@gmail.com wrote: Yep they are gone. Perhaps, we are now supposed to do drag and drop. + - signs were helpful though. Kumar Bibekhttp://techdroid.kbeanie.comhttp://www.kbeanie.com On Wed, Dec 8, 2010 at 1:22 PM, oriharel ori.ha...@gmail.com wrote: Before the newest version I was able to create hierarchies using drag n' drop, performed on the outline view. Since the upgrade, I can't and the controls ('+', '-' and arrows) are missing. So how am I suppose to build view hierarchies now? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs cr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Eclipse ADT 8.0.0 (and 8.0.1) problem - can't create views hierarchy with drag and drop in the Outline view
Hi, It would be great if the shapes don't break the entire layout, for example, I frequently use rounded shapes for my tablerows, but I can't apply them till the end because they can't be displayed/rendered in the layout editor. Same thing for TabActivities where the content of each tab is populated by another independent activities with intents. Regards. 2010/12/8 Xavier Ducrohet x...@android.com hey all, We're actively working on the editor, so this is good feedback. The new editor in 8.x might look the same, but it's completely different underneath and we have added the +/- features back. the - button should be replaced by delete anyway. You can right click and choose delete or simply hit delete on your keyboard. The + option is indeed replaced by drag and drop. We've improved drag and drop significantly (and still improving it for the next version), and should be good enough that using + isn't needed. In some cases too, + isn't enough, you need more information to know where the item will be placed (like when dropping into a relativeLayout). (same thing with the up/down arrows) On Tue, Dec 7, 2010 at 11:52 PM, oriharel ori.ha...@gmail.com wrote: Before the newest version I was able to create hierarchies using drag n' drop, performed on the outline view. Since the upgrade, I can't and the controls ('+', '-' and arrows) are missing. So how am I suppose to build view hierarchies now? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Xavier Ducrohet Android SDK Tech Lead Google Inc. Please do not send me questions directly. Thanks! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] For Google about BaseAdapter class
Hi, I guess Robert is right since my code look like this (inside an AsyncTask), but the exception appears from time to time, not always but enought for being annoying. int i=0; do { Plan aux= new Plan((SoapObject)itemsSeccion.getProperty(i)); planes.add(aux); publishProgress(); i++; }while(i5); .. @Override protected void onProgressUpdate(Void... values) { arrayAdapter.notifyDataSetChanged(); } ... So, is there any new advice for this? Regards. 2009/11/20 Romain Guy romain...@google.com As soon as you change the count you must notifyDatasetChanged(). On Fri, Nov 20, 2009 at 10:59 PM, Robert Woodruff woodman...@gmail.com wrote: Hi Romain, Thanks for the info. I think you are saying that the small example below, all of which runs on the UI thread, will cause the exception to be thrown? Right? 1. Change the count in the base adapter 2. notifyDataSetChanged() // Which captures a count and will react some time in the future 3. Immediately change the count in the base adapter, again Even though the count is only ever changed in the UI thread? It may explain why the exception is being thrown in one of my apps by ListView even though the adapter count is only ever changed in the UI thread. Say there is a thread running, in an AsyncTask, gathering data to be placed in the adapter. It reaches a point to report that data is to be added to the Adapter. The AsyncTask.doInBackground() calls publishProgress() which queues a Handler on the UI thread to eventually call onProgressUpdate(). Eventually the onProgressUpdate() Handler runs on the UI thread and causes the adapter count to change. But notifyDataSetChanged() was called before the publishProgress () Handler runs and the Handler runs before the ListView Handler comes around to update the list. So ListView throws an exception because it sees a different count than when notifyDataSetChanged() was called. But the Adapter count was changed always on the UI thread. This brings back the question: When is it safe to change the count in a BaseAdapter()? It seems like there should be a semaphore or listener or something that says Now it is OK to change the count/Now it is NOT OK to change the count Or maybe notifyDataSetChanged() could tell the ListView it to suspend operations, update the count and continue operations. If I am not too far off base with this it would be good to know when it is safe to change the adapter count. Thank you, On Fri, Nov 20, 2009 at 4:14 PM, Romain Guy romain...@google.com wrote: 1. Change the count in the base adapter 2. notifyDataSetChanged() // Which will react some time in the future 3. immediately change the count in the base adapter, again Or another way: when does the ListView grab the BaseAdapter count? Does it grab it on the call to notifyDataSetChanged() or whenever it later starts the update operation? It grabs it in notifyDatasetChanged(). Also, the count change must happen on the UI thread. Thank you, On Thu, Nov 19, 2009 at 2:24 PM, Dianne Hackborn hack...@android.com wrote: As the exception says: throw new IllegalStateException(The content of the adapter has changed but + ListView did not receive a notification. Make sure the content of + your adapter is not modified from a background thread, but only + from the UI thread. [in ListView( + getId() + , + getClass() + ) with Adapter( + mAdapter.getClass() + )]); You can't modify an adapter from a background thread; this must be done on the main thread. This exception is not adding a restriction; it is making it more obvious when you do something that would always break in weird, subtle, and/or horrible ways. On Thu, Nov 19, 2009 at 5:56 AM, WoodManEXP woodman...@gmail.com wrote: For Google about BaseAdapter class In Android 1.6 and 2.0 the BaseAdapter class has apparently been modified to throw an exception when it sees the Adapter.getCount() method return a number different than what it picked up when BaseAdapter.notifyDataSetChanged() was called (at least I did not observe this behavior in pre 1.6). So now the question is, when should one call notifyDataSetChanged() or more importantly, when can the count in the Adapter be safely changed? Consider the case of an app with a background thread delivering data to a BaseAdapter at a rate faster than the ListView responds to notifyDataSetChanged(). Because notifyDataSetChanged() is a synchronous call and the ListView updates are taking place sometime in the indeterminate future on the UI thread, how can an app know when it is safe to change the adapter count? If the app changes
[android-developers] Re: Anybody experiencing a boost in sales since opening up to other countries?
I saw a temporary boost over a few days, then a plummet ... to below the previous levels. What's going on?! On Oct 6, 4:54 pm, JonFHancock jonfhanc...@gmail.com wrote: Since the market opened in more countries a few days ago, I've seen a nice boost of about 20-40 sales per day. At first I thought some blog had posted something about my app, but nope. My website traffic is normal too. The only thing I can attribute it to is a broader audience. It has been really nice. Just wondering if anybody else is seeing this. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Device support for audio rates, encodings and channels
I've observed that Android devices differ (sometimes radically!) in what audio rates and encodings they support, as well as the number of channels (mono/stereo). In my freeware app SoundForm (a signal generator) I have gone to some lengths to try to set the audio system up with a combination of parameter settings that the phone actually works with (my initial release of SoundForm always tried to use 44100/16/1 and worked fine on e.g. Droid, G1, and many others, but failed on several phones - it turned out that they only supported 44100/16/2 or different rates). The code I use for discovering which audio settings work is as follows int rates[] = {8000,11025,22050,44100,48000}; int configs[] = {AudioFormat.CHANNEL_CONFIGURATION_MONO,AudioFormat.CHANNEL_CONFIGURATION_STEREO}; int encodings[] = {AudioFormat.ENCODING_PCM_8BIT,AudioFormat.ENCODING_PCM_16BIT}; int minBuffer,sampleRate,encoding,config; AudioRecord audio = null; for(int i=0;irates.length;i++) { for(int j=0;jconfigs.length;j++) { for(int k=0;kencodings.length;k++) { sampleRate = rates[i]; config = configs[j]; encoding = encodings[k]; try { minBuffer = AudioRecord.getMinBufferSize(sampleRate,config,encoding); if(minBuffer != AudioRecord.ERROR_BAD_VALUE minBuffer != AudioRecord.ERROR) { boolean bGood = true; try { audio = new AudioRecord( MediaRecorder.AudioSource.MIC, sampleRate,config,encoding, minBuffer); int istate = audio.getState(); if(istate != AudioRecord.STATE_INITIALIZED) bGood = false; } catch (Exception e) { bGood = false; } if(bGood) (add settings combination to list of working settings) if(audio != null) audio.release(); audio = null; } } catch (Exception e) {System.err.println(Bad +e);} } } } It's worth noting that, based on observations, even if getMinBufferSize() returns a positive result, the audio system on some devices can still fail on initialisation, hence the code to create a new AudioRecord object and check its state. (The minBufferSize for playback is more reliable in this regard.) The above set of checks is available as a standalone app in Market called AudioCaps - it simply shows a list of the working rates supported on the 'phone, for play and record. Now to my question :-) Users of the Samsung Galaxy S report that SoundForm doesn't work for them - and causes a force close :-( Does anyone here have a Galaxy S they would be kind enough to try SoundForm on, and let me have the logcat from when it fails? Also, any tips on aspects of setting up rates/encodings/channels in Android would be most welcome. 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: Cam picture 'bigger' then preview
I don't know if there's a rule of thumb to follow here, but I know that when I get a number of possible preview sizes listed (such as 640x480, 720x480, 800x480) all sizes that don't match the aspect ratio of the picture (i.e. 4:3) seem to get cropped. In practice I've found that (with the sizes listed above), 720x480 is in fact 720x540, and 800x480 is probably 800x600. In the 720x480 case, for example, what you're seeing is a 720x540 image with 30px shaved off each side of the 540 dimension. When I snap a photo in 720x480, the frozen preview briefly shown onscreen is actually the 720x540 image, with the 540 dimension compressed to 480px. On Jul 25, 3:56 am, EnnaN nhui...@gmail.com wrote: For anyone interested: The problem is there on a 1.5 G1, but not on a 2.1 Milestone/Droid. It might be the handset or the OS version, which i don't know. The basics of the problem as far as I can see, is that the preview is returned in 2:3 (320:480), and the picture will be in 3:4 (1536x2048). Using a scaling-factor I can at least predict _how_ the picture will change. On the milestone/droid the numbers for the preview are 480:640, which is also 3/4, so the scaling issue is non-existent. I tried setting the preview to something 3:4, but as the allowed preview sizes are limited, and I can't get them with the API lvl 5 memberfunction, I didn't get very far (and haven't tried that much). On Jul 18, 3:33 pm, EnnaN nhui...@gmail.com wrote: I could really use some help on this. I have not provided any code, as I'm hoping it is something more abstract, like limitations on the preview size vs. what the camera sees. But for what it's worth: XML: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent my.Package.mySurfaceView android:id=@+id/myView android:layout_width=wrap_content android:layout_height=wrap_content / /LinearLayout the surfaceview is almost equal to the camerePreview.java code from the examples: the 1.5 version, not the 2.0 version with the getOptimalPreviewSize code. I can't seem to put my finger on why there is more information in the shot then i see in the preview :( On Jul 16, 9:01 pm, EnnaN nhui...@gmail.com wrote: I am hoping that there is something predictable i'm doing wrong, but i seem to have more info on picture then on the preview. Situation: I have an app basically based on the CameraPreview code. (1.5!) When I take a picture, the resulting image has more content then i saw on the preview. To clarify: Say i'm looking at something with lines, and while looking at the preview i see line 4 to 10. After taking the picture it suddenly is clear i've shot lines 5 to 11. I'm trying to sync something I draw ontop of the view (a line-drawing) with what i'm photographing, and I can't get it to match like this. The newest example has some extra code involving getSupportedPreviewSizes. I can't use this because of the API version: I'm coding for min. 3, and that one is from 5. How can I make sure that what i see on the preview is also what i see on the picture? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: refresh gallery after saving photo in android
Well, for starters most of the code samples include file:// before the path in Uri.parse, so you might want to add that. That said, I'm not having much luck forcing a rescan of a particular folder on the SD card... On Jun 7, 1:19 am, Andy Triboletti andy.tribole...@gmail.com wrote: Hi, I have an application where I want to have the ability for the user to save one of the photos they are viewing to their phone locally. I got saving working, and now I want to automatically refresh so they don't have to turn off their phone before it shows up in the gallery. I googled around and saw this: sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse(Environment.getExternalStorageDirectory().getAbsolutePath() ))); I tried doing that, but it didn't refresh for me. Does anyone have any ideas? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Media.insertImage locked to heavy compression
Thanks (belatedly) for your reply. For the time being I've stuck with manually writing my images to /sdcard/DCIM/AppName, which may or may not be the best solution. I haven't yet checked to see if getContentProvider().insert allows you to specify the DCIM subdirectory, but my guess is no. (Which is disappointing if my guess is right, because the directory hierarchy and the Gallery app both seem to be purpose-built for exactly that.) I'm quite happy writing my image files manually, provided that: - this is not strongly frowned upon, and - i can figure out a way to force gallery to refresh from the filesystem (this may be the sticking point) Any thoughts? On Jun 21, 7:18 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Compress (Bitmap.compress) the image yourself into a file. Then use the getContentProvider().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, ) to insert your image into the database/content-provider. When inserting, you can create a ContentValues name-value pair with MediaStore.MediaColumns.DATA for the name and the fully qualified file- path to the image for the value. On Jun 20, 11:16 pm, Julian lepin...@gmail.com wrote: So from what I can tell Media.insertImage is locked to heavy compression on all images. This includes when passing in the path to a photo in the filesystem. As a test I used a 3000x2000 pixel jpg which had been previously saved at maximum quality and was ~6MB. After passing the path to Media.insertImage, the resultant copy (still 3000x2000) is 623KB. I passed in another copy of the 3000x2000 image, this one compressed down to 393KB. After Media.insertImage, the image filesize is 492KB. I'm wondering if there's a way to specify the compression when images are saved by insertImage. I'm also wondering why this is recompressing jpgs, rather than simply copying them intoDCIM. A side-effect of opening and re-compressing these images is that it imposes a rather low VM cap on what insertImage can handle. I'm getting out-of-memory errors when trying to pass the path of a 10 megapixel image. As an aside: are there any problems with a developer creating their own file/folder structure underDCIM? Is this frowned upon? Thanks for any thoughts, Julian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Media.insertImage locked to heavy compression
So from what I can tell Media.insertImage is locked to heavy compression on all images. This includes when passing in the path to a photo in the filesystem. As a test I used a 3000x2000 pixel jpg which had been previously saved at maximum quality and was ~6MB. After passing the path to Media.insertImage, the resultant copy (still 3000x2000) is 623KB. I passed in another copy of the 3000x2000 image, this one compressed down to 393KB. After Media.insertImage, the image filesize is 492KB. I'm wondering if there's a way to specify the compression when images are saved by insertImage. I'm also wondering why this is recompressing jpgs, rather than simply copying them into DCIM. A side-effect of opening and re-compressing these images is that it imposes a rather low VM cap on what insertImage can handle. I'm getting out-of-memory errors when trying to pass the path of a 10 megapixel image. As an aside: are there any problems with a developer creating their own file/folder structure under DCIM? Is this frowned upon? Thanks for any thoughts, Julian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Media.insertImage locked to heavy compression
I've done some tests with the insertImage call and it looks like it hard coded to always use a high rate of compression. In my tests I took a 3000x2000 pixel image, which is ~6MB as a jpeg at max quality, and passed the file path in to insertImage. The image that was saved to the phone's DCIM folder ends up being ~600KB, which is tiny for a 6 megapixel image. (I also tried passing in the path to the same 3000x2000 image, this time saved at minimum quality, which made it around 300KB. After passing through insertImage the resultant image was ~400KB.) I have a few questions: - is it possible to vary the compression that insertImage uses when it saves? - why is insertImage reading in a jpeg and then writing it back out, rather than simply copying it? in addition to the undesirable effects of repeated lossy compression on the same image, this means that the device's VM becomes a limiting factor. in practice this means that insertImage fails on a 10 megapixel image on my n1 - finally, are there any guidelines or rules on writing an image myself to the device's DCIM folder? is this an accepted practice or frowned upon? in addition to avoiding repeated compression on my images, this would allow me to create my own subfolder, giving my images their own gallery (I tried submitting this a day ago and haven't seen it show up; I'm not sure if this is simply how long it takes, or if my message got lost in the shuffle somewhere, so I'm resubmitting.) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] RadioGroup over two columns or rows?
I create a set of RadioButtons in a RadioGroup on the fly (no XML), and would like to arrange them in either two columns or two rows - right now they are in a single column. I could of course create two sets of RadioButtons, and place each in a different RadioGroup view, but presumably then I would have to control the active state of each button by taking into account both views. Does anyone have an idea how to better do this? 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] AlertDialog and keyboard open configuration change
My app creates and shows an AlertDialog which accepts input from the user (the user needs to type some text into an EditInput). With the AlertDialog on screen, if the user opens up the keyboard on the device, then the app's OnCreate and OnResume methods are called and my AlertDialog promptly disappears from the screen ... not the effect I was hoping for! I thought that perhaps I needed to override the Activity's onConfigurationChanged method, but despite having the following in my Manifest: application android:icon=@drawable/icon android:configChanges=keyboardHidden|orientation android:label=@string/app_name android:launchMode=singleTask android:debuggable=true my overriden method is never called when the keyboard is opened. And, even if it was, it's not clear to me what I would need to do to avoid the AlertDialog from disappearing! I'd be grateful for some advice :-) Julian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: AlertDialog and keyboard open configuration change
Thanks ... this is very helpful. I am indeed using Dialog.show(). If I move to Activity.showDialog(int) it's not clear to me how to get hold of the id of my Dialog, since I don't specify one when creating it. Here is the code snippet: // Create a general message box AlertDialog.Builder messagebuild = new AlertDialog.Builder(this); messagebuild.setPositiveButton(OK, this); message = messagebuild.create(); // Create the message handler which will handle messages messageHandler = new Handler() { @Override public void handleMessage(Message msg) { if(msg.what == SAVEFILEERROR) { message.setTitle(Error); message.setMessage(this error); // replace message.show() //message.show(); message.getOwnerActivity().showDialog(id???); } } }; How do I assign or retrieve the id of the Dialog created by AlertDialog.Builder? Thanks! On May 6, 12:13 pm, TreKing treking...@gmail.com wrote: On Thu, May 6, 2010 at 1:28 PM, Julian Bunn jjb...@gmail.com wrote: And, even if it was, it's not clear to me what I would need to do to avoid the AlertDialog from disappearing! How are you showing the dialog? If you're using Activity.showDialog(int), it will maintain the dialog's state and keep it shown across orientation change. If you're just using Dialog.show(), it's up to you to restore the dialog's state. Prefer the former over the latter. - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: AlertDialog and keyboard open configuration change
Thanks ... yes, I had already read that. I decided to manage the Dialog myself, using dismiss() and show() and it works nicely now. One thing I had not realised is that a dismiss() is needed in OnDestroy() ... without that, a show() in OnCreate() will not work. That was the root cause of my trouble. On May 6, 2:29 pm, TreKing treking...@gmail.com wrote: On Thu, May 6, 2010 at 3:53 PM, Julian Bunn jjb...@gmail.com wrote: How do I assign or retrieve the id of the Dialog created by AlertDialog.Builder? The dialog itself does not have an ID - it's for th Activity to map to the correct dialog it manages. See this and come back with any questions:http://developer.android.com/intl/fr/guide/topics/ui/dialogs.html#Sho... http://developer.android.com/intl/fr/guide/topics/ui/dialogs.html#Sho... - TreKing - Chicago transit tracking app for Android-powered deviceshttp://sites.google.com/site/rezmobileapps/treking -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] several potential first activities - searching best practice advice
I am planning on writing an android application, which will mainly be a client-server application. It has to include the following elements: - A service, which handles the client-server communication - A main screen, which will be some kind of user menu. Under some circumstances, the main screen will not be the activity to be launched with the application (i.e. the entry point for the application, as specified with the intent-filters), but some other activity needs to be shown first. So, what would be the best practice to do so? Would it be a) to choose the service as an entry point for the application (if possible) and let the service decide which activity to load, or b) set the menu as an entry point, then load the service in onCreate, and decide in onCreate which activity to show, and load the activity, or c) something else hope i could make myself clear, thanks in advance, Julian -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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
Does each Android phone have a GPS installed inside it or does it use the location by accessing the cells where your phone is located? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] MD5 Fingerprint
I am trying to get the MD5 Fingerprint to sign my applications. In the command prompt I inserted the following: $ keytool -list -alias androiddebugkey \ -keystore path_to_debug_keystore.keystore \ -storepass android -keypass android but I got the following error: '$' is not recognized as an internal or external command, operable program or batch file -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Database
I am trying to create an application that reads information from a database on a separate server(not the android phone). Does anyone have any information on how to create a database connector 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] Android SDK for Windows 7
I have recently began developing for smartphones and I am extremely interested in developing for Android. The only problem is that I have Windows 7 on my computer. Is there any way I can install Eclipse and Android SKD? or do I have to install Windows Vista or XP on my computer? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Button Bar
Hi, A Button is a Clickable-Image. If I were you, I would draw 4 images and use ImageButton to apply those images. The four images are: the leftest, middle, rightest. the last image is for situation Only one button at the bar. -Ju1ian On Thu, Dec 10, 2009 at 1:56 AM, Wouter wouterg...@gmail.com wrote: Hey, I'm developping an Android application for a TV Guide for the Netherlands and Belgium. I do this for a company who already has an iphone application for this and I have to make the look the most as possible the same. My question is how do I make something like this? http://snapplr.com/q6cx So 2 buttons next to each other but the middle has no rounded corners! Do I have to get the source of Button from the android source and adapt it myself? or how can I do this? Thanks, Wouter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Julian Chu. a.k.a. WalkingIce -- 會走路的冰塊 http://walkingice.twbbs.org 只放拖鞋的鞋櫃 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Is status bar an activity?
Home screen is just an application with some special tag in its AndroidManifest.xml With the tag, the application will be regarded as a Launcher. StatusBar is a part of framework but not part of Home Screen. Therefore, you could create an application and it do nothing but show an image on screen. Set it as a Launcher, restart zygote. Then you get a useless Home screen. You can still see the Status Bar stands there and smiles to you. -Ju1ian On Wed, Nov 18, 2009 at 11:30 PM, pink 444 pnk...@gmail.com wrote: Does it mean that any activity other than home screen are not fully window occupied activities.Because status bar is belong to home screen ,it can be seen by user from any activity.That is nothing new activities are partially occupying the window. And one more doubt is can we update any activity's widgets status even though that activity is not running. -- Julian Chu. a.k.a. WalkingIce -- 會走路的冰塊 http://walkingice.twbbs.org 只放拖鞋的鞋櫃 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How to build a project in Android sources seperately?
Hi, Did you build the android tree first? although it spends time but pretty easy. http://source.android.com/download All you have to do is follow the webpage and cross your finger If there is no commit break your building, you will get everything you need. of course, including acp $ which acp /home/walkingice/code/zeroxdroid/out/host/linux-x86/bin/acp If you take a look of the Android.mk, you will find the file was written for Android building system. the android building system is under build directory of source code tree. That is the only one and easier way I know to build the native library : get the tree and build everything. (Maybe there is another way...but I don't know :P ) Cheers, -Ju1ian 2009/11/18 3pei 333...@gmail.com seems i need build the host tool acp , but it has a dependence of libhost, and libhost has a dependence of acp, tooo. how can i resolve this On Nov 17, 11:40 am, Julian Chu walking...@0xlab.org wrote: checkout the android source tree, build from scratch once you want to build it $cd /where/is/the/tree $source build/envsetup.sh $export TOP=`pwd` $cd external/zlib $mm -ju1ian On Tue, Nov 17, 2009 at 6:01 AM, 3pei 333...@gmail.com wrote: for example, when i use make external/zlib/android.mk it tells me 'Nothing to be done for external/zlib/android.mk' what should i do? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com android-developers%2bunsubscr...@googlegroups.comandroid-developers%252bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Julian Chu. a.k.a. WalkingIce -- 會走路的冰塊http://walkingice.twbbs.org只放拖鞋的鞋櫃 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Julian Chu. a.k.a. WalkingIce -- 會走路的冰塊 http://walkingice.twbbs.org 只放拖鞋的鞋櫃 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to build a project in Android sources seperately?
checkout the android source tree, build from scratch once you want to build it $cd /where/is/the/tree $source build/envsetup.sh $export TOP=`pwd` $cd external/zlib $mm -ju1ian On Tue, Nov 17, 2009 at 6:01 AM, 3pei 333...@gmail.com wrote: for example, when i use make external/zlib/android.mk it tells me 'Nothing to be done for external/zlib/android.mk' what should i do? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Julian Chu. a.k.a. WalkingIce -- 會走路的冰塊 http://walkingice.twbbs.org 只放拖鞋的鞋櫃 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] sqlite in webview
I saw that the browser in sdk2.0 has sqlite support however it doesn't seem to work in webview (at least for me). Did any of you guys get sqlite to work in webview if so how ? :) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Sampling data from the internal Mic, and from a headset Mic.
This turned out to be a non-problem. The audio data stream comes from the headset Mic just fine. What confused me was the relative levels between the two. On Sep 23, 10:42 am, Julian Bunn jjb...@gmail.com wrote: My app takes audio samples from the Mic, and processes them. The app works fine with the internal Mic, but as soon as I plug in a headset, I seem to lose the Mic signal: I still receive data, but it is quiet. The headset is functioning correctly, because it works fine for e.g. phone calls. This suggests to me that my app is not doing something it should :-) I'm wondering if I need to do something in my code to change from receiving samples from the internal Mic to receiving them from the headset - but it seems a bit far-fetched. This is with Cupcake 1.5 on an ADP1, radio 2.22.19.26I I'd be most grateful for any advice/suggestions. Thanks, Julian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Android 1.6 SDK is here!
Hi, I will try to speak in english :-) my question is, will the g1phone be able to run 1.6 (system requirenments)? Julian. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to listen to Back key
Hi, Just add this method to your activity. Best Regards. @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK) { your code here } return .; } 2009/8/27 cindy ypu01...@yahoo.com In current activity, when user click the back key, I don't what it back to the last activity. Can I add a listener to listen to back key in current activity? When user click back key, it actually back to the activity I want it to go. Thanks! Cindy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to handle widget's Long Click event on home screen?
The code is in Launcher.java 1526 public boolean onLongClick(View v) { 1527 if (mDesktopLocked) { 1528 return false; 1529 } 1530 1531 if (!(v instanceof CellLayout)) { 1532 v = (View) v.getParent(); 1533 } 1534 ...(skip) -Ju1ian On Wed, Aug 19, 2009 at 4:58 PM, Jimmy Huang huan...@gmail.com wrote: Anyone know this ? Thanks On Aug 10, 3:20 pm, Jimmy Huang huan...@gmail.com wrote: Thanks for your quick reply. But if I develop one myself's Home, then I can define the Long press event on myself widget on Home? Thanks, Jimmy On Aug 10, 3:01 pm, Romain Guy romain...@google.com wrote: You cannot do this. Long press on Home is reserved to drag and drop. -- Julian Chu. a.k.a. WalkingIce -- 會走路的冰塊 http://walkingice.twbbs.org 只放拖鞋的鞋櫃 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: items can't be selected (or highlighted)
Does your TextView within items have clickable links? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] c++ on android
Hi, right now, all app development are based on java and sdk, anyone tried to use c++, i.e. compiled into so, and modify jni to access it? is there a way to using c++ in current Android Market App? 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: Can't upload my app in the market ! Market requires the minSdkVersion to be set in AndroidManifest.xml.
I tried android:minSdkVersion=2 inside uses-sdk, doesn't work also tried put it as attribute of manifest, doesn't work too On 4月25日, 上午8时33分, Dan Morrill morri...@google.com wrote: Hello! You probably need to use android:minSdkVersion rather than minSdkVersion. - Dan On Fri, Apr 24, 2009 at 1:16 PM, 6real xirgon...@gmail.com wrote: Dear all, since today I have the following clear message : Market requires the minSdkVersion to be set in AndroidManifest.xml. but my manifest has the line : uses-sdk minSdkVersion=2 / and I also tried even uses-sdk minsdkversion=2 /... I try to put this line : as the first child of manifest, as the last child and also right after application.. Can you please help me ? Is there a hidden rule I don't know ... Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: c++ on android
oh, thanks!! will do a research over t2speech.. On Mon, Apr 27, 2009 at 8:06 PM, MrSnowflake mrsnowfl...@gmail.com wrote: Officially JNI is not supported, so you probably can't distribute it through Market. Though I have the impression the text2speech lib in Market does have a lib. But then again, that app is probably powered by Google too. On 26 apr, 16:42, julian qian julian.q...@gmail.com wrote: Hi, right now, all app development are based on java and sdk, anyone tried to use c++, i.e. compiled into so, and modify jni to access it? is there a way to using c++ in current Android Market App? 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] Setting up intents for dynamic buttons
Ok. I have a screen that is essentially a list with a dynamic number of items. Each of these items when clicked needs to switch to the next screen and pass a variable over saying which was clicked. I am trying to use intents to do this, but I am having some trouble. Here is the chunk of code where I am trying to do this: for (int i = 0; i count; i++){ mi = db.getItem(i); //countText.setText(mi.title); items[i] = new TextView(this); items[i].setClickable(true); items[i].setText(mi.title); inteIntent = new Intent(this, MIScreen.class); inteIntent.putExtra(com.android.MIScreen.curIndex, i); items[i].setOnClickListener(new View.OnClickListener() { public void onClick(View v) { startActivity(inteIntent); } }); linearLayout.addView(items[i]); //items[i].setVisibility(1); }; What happens is every button I click just has the last intent settings so no matter which one I click the next screen shows that I clicked the last item. I also tried to do this by using an array of intents. But that gives me an error when I click a button that I have not been able to figure out. So how should I be doing this? Am I taking the wrong approach completely or am I just missing something small? Also, Im trying to use the wsimport tool to set up the Amazon API but am very unfamiliar with the Java tools and can't get wsimport to run on the command line at all. Thanks. -Julian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Gmail and Gtalk ...does it have to be the same account???
I dont understand why google didnt give the option to change between accounts...like for example I would like to have a different account on the Gtalk instead of having the same account for everythingor be able to change between accounts. No flexibility at all...COME ON GOOGLE!!! Edit/Delete Message --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---