[android-developers] Re: Bluetooth Low Energy (4.0) on android 4.4 device.

2016-10-15 Thread 'RLScott' via Android Developers
Use an older example that does not rely on Android 6: http://toastdroid.com/2014/09/22/android-bluetooth-low-energy-tutorial/ On Friday, October 14, 2016 at 2:21:10 PM UTC-6, Александр Сергеевич Джус wrote: > > Hello, I want to use Bluetooth 4.0 to connect the Vert device. The problem >

[android-developers] Re: Android Virtual Device

2016-10-04 Thread 'RLScott' via Android Developers
I find it much less trouble to forget about the emulator and the AVD, and just test on a connected actual Android device with an appropriate USB driver for that device. On Sunday, October 2, 2016 at 9:24:40 PM UTC-6, warren nazareno wrote: > > Hi guys. > > I'm new to android. > > I'm trying to

[android-developers] Re: Step Counter in Android KitKat

2016-10-04 Thread 'RLScott' via Android Developers
It depends on the app. Some step counters use only the accelerometers. But some might use the gyroscopes as well. But I would think that a properly designed app should report any missing hardware capabilities, or at least fail with an error message. On Tuesday, October 4, 2016 at 5:58:09

[android-developers] Android Studio - can't see bottom of window

2016-10-02 Thread 'RLScott' via Android Developers
If the Windows display is set to the option of 125% (medium), vs. smaller (100%), the bottom part of the New Project wizard cannot be seen. It is essential to see it because that's where the "Next" button is to create a new project. None of the other windows in Android Studio have this

[android-developers] Please ban those job postings!

2016-07-27 Thread 'RLScott' via Android Developers
The group rules say that job postings are considered spam and posters can be banned without warning. Moderators, please *do your job*. This group is being ruined by being flooded with job postings. It makes it very hard to even find the technical postings amidst all the spam, even if I never

[android-developers] Problem with package installer's "Open" option

2016-07-25 Thread 'RLScott' via Android Developers
Immediately after installing my app (side-loaded APK file), the package installer gives the option of "Done" or "Open". If I select "Open", it will immediately launch my app's main activity. From that main activity in my app, I start a second activity with startActivityForResult. The second

[android-developers] Re: Why won't my app work on devices running 6.0?

2016-05-26 Thread 'RLScott' via Android Developers
I had a problem with 6.0 because I was using the Mac-ID of the wi-fi device to construct a unique ID for each specific device (It is the way my side-loaded app does licensing). Starting with 6.0, the MAC-ID is no longer available. The OS returns a constant with lots of zeroes. I had to

[android-developers] How to force any device to use the google USB driver

2016-03-28 Thread 'RLScott' via Android Developers
As I explained in another thread, I was having trouble debugging on a particular device - a Lenovo Tab 2 A8 tablet. After much searching, I found a way that worked in my case to make the Lenovo tablet use the google USB driver. Here is how I did it. If you find the google ADB USB driver in

[android-developers] Re: How to debug on device with no USB driver

2016-03-28 Thread 'RLScott' via Android Developers
Well, I didn't find a way to debug without a USB driver, but I did find a way to get the Lenovo tablet to use the Google USB driver. See the other thread I will post shortly on how that can be done. -Robert Scott Hopkins, MN On Monday, March 28, 2016 at 11:35:30 AM UTC-6, RLScott wrote

[android-developers] How to debug on device with no USB driver

2016-03-28 Thread 'RLScott' via Android Developers
On one particular device - a Lenovo tablet running Android 5.0 - my app crashes on launch. On every other device I own, the app runs fine. Unfortunately there is no OEM USB driver for debugging, so the only way I have of running my app is making an APK file and copying it over and installing

[android-developers] Re: Updating the UI from a callback

2016-03-25 Thread 'RLScott' via Android Developers
have that right? -Robert Scott Hopkins, MN On Thursday, March 24, 2016 at 8:38:03 PM UTC-6, RLScott wrote: > > What is the correct way to update a TextView after a callback in the > following scenario: > > I have an activity that extends ListActivity. At some point that >

[android-developers] Updating the UI from a callback

2016-03-24 Thread 'RLScott' via Android Developers
What is the correct way to update a TextView after a callback in the following scenario: I have an activity that extends ListActivity. At some point that activity creates an AlertDialog to allow the user the option of filtering the list for items that contain a certain String (because the

[android-developers] Re: bluetooth: paired bluetooth devices list

2016-02-16 Thread 'RLScott' via Android Developers
Get the list of paired bluetooth devices like this: private final BluetoothAdapter mAdapter = BluetoothAdapter.getDefaultAdapter(); Set pairedDevices = mAdapter.getBondedDevices(); int numberOfDevices = pairedDevices.size(); if (numberOfDevices > 0) { for (BluetoothDevice device :

[android-developers] Re: Proguard complains about duplicate definitions of class was removed

2016-02-15 Thread 'RLScott' via Android Developers
6 at 11:20:29 AM UTC-6, RLScott wrote: > > I briefly added a HTTP library from org.apache.http... to try some things > out, and now I want to remove it as I no longer reference it in my code. I > removed the reference in the Project app module Dependencies and deleted > the apac

[android-developers] Proguard complains about duplicate definitions of class was removed

2016-02-15 Thread 'RLScott' via Android Developers
I briefly added a HTTP library from org.apache.http... to try some things out, and now I want to remove it as I no longer reference it in my code. I removed the reference in the Project app module Dependencies and deleted the apache module itself. Now the project builds without errors, as

[android-developers] Installing Android Studio without hurting Eclipse

2016-02-11 Thread 'RLScott' via Android Developers
I have Eclipse on my Windows 7 system and it is working fine (well, as fine as Eclipse is capable of running..) I want to try changing over to Android Studio, but I don't want to burn my bridges behind me. Can the Android Studio installation be done in such as way that there is no possible

Re: [android-developers] Re: Audio recording problem - fake sample rate

2016-02-09 Thread 'RLScott' via Android Developers
ct 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 hardwa

Re: [android-developers] Re: Audio recording problem - fake sample rate

2016-02-09 Thread 'RLScott' via Android Developers
'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 t

Re: [android-developers] Re: Audio recording problem - fake sample rate

2016-02-09 Thread 'RLScott' via Android Developers
quot; 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

Re: [android-developers] Re: Audio recording problem - fake sample rate

2016-02-09 Thread 'RLScott' via Android Developers
t; 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

[android-developers] Re: Audio recording problem - fake sample rate

2016-02-02 Thread 'RLScott' via Android Developers
t;. That is usually about 4263 Hz. If the device is failing as I predict, there should also be an indication of a tone at 3737 Hz. > > > > > 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 fo

[android-developers] Re: Audio recording problem - fake sample rate

2016-02-02 Thread 'RLScott' via Android Developers
ut 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

[android-developers] Re: Audio recording problem - fake sample rate

2016-01-30 Thread 'RLScott' via Android Developers
gt; 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 &

[android-developers] Re: Audio recording problem - fake sample rate

2016-01-26 Thread 'RLScott' via Android Developers
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,

[android-developers] Microphone sampled at 8000 Hz on LG G3 phone

2015-11-03 Thread 'RLScott' via Android Developers
I got a report from a customer of my audio analysis app saying that the frequency spectrum graph we show has a mirror image of peaks about 4000 Hz (the Nyquist frequency for 8000 samples per second). Our app requests 22050 samples per second, and is getting 22050 samples per second. But

[android-developers] Must reboot Lollipop after write to external memory

2015-08-12 Thread 'RLScott' via Android Developers
This is a new problem with Lollipop only. My app writes to external memory by building a file path name from: Environment.getExternalStorageDirectory().getAbsolutePath() But when I plug the USB into a desktop computer, the new file does not show up in Explorer. If I reboot the Lollipop

[android-developers] Re: Is runOnUiThread() ever 'safe' to call? If not why is it not deprecated?

2015-06-21 Thread 'RLScott' via Android Developers
Google is still promoting runOnUiThread in their sample Bluetooth Low Energy device scan callback code: private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, int rssi,

[android-developers] Why different icon sizes?

2015-06-16 Thread 'RLScott' via Android Developers
I tried using a clearly incorrect icon size for a launcher icon (386 x 386), and the icon was automatically down-sized on my Galaxy Tab 4 to look the same as all the other app icons. So I wonder why we need to provide 5 different launch icon sizes? Is this resizing behavior one that I can

[android-developers] Re: Interfacing an android device (host mode) directly with a microcontroller via usb

2014-12-05 Thread 'RLScott' via Android Developers
The simplest way to do that is to use a USB-to-serial converter and program your Android app to talk to the converter module using the USB SPP protocol. Then your micro controller program is simply talking over its UART. If you want to stay with USB all the way, then you will have to use a

[android-developers] Ideal Bluetooth Service

2014-10-27 Thread 'RLScott' via Android Developers
I have implemented Bluetooth in several of my projects where the Android device is the user interface to a custom device with a Bluetooth module using the SPP profile (serial port replacement). But I want to clean up my code and make it more robust. Since I expect to be doing more of these

[android-developers] Re: Ideal Bluetooth Service

2014-10-27 Thread 'RLScott' via Android Developers
After I posted this question I found a reference to using Messenger that seemed to indicate it was about as lightweight as Binder, being just a wrapper for it. And I have a nice example of using Messenger for 2-way communication here on Stack Overflow

[android-developers] Re: AudioRecord.read returns duplicate data

2014-10-12 Thread 'RLScott' via Android Developers
know why data duplication happens for very large settings of myBufSize in the constructor, but it does. Tomorrow I will investigate intermediate values of myBufSize to see at what point the problem begins. On Friday, October 10, 2014 9:45:32 PM UTC-6, RLScott wrote: In my musical instrument tuner

[android-developers] AudioRecord.read returns duplicate data

2014-10-10 Thread 'RLScott' via Android Developers
In my musical instrument tuner app I stream audio data to my analysis code with an AudioRecord.read() method which runs in a separate thread to decouple it from the UI. The AudioRecord was set up with a sample rate of 22050 and a 16384 samples. I read the data in chunks of 1024 samples at a

[android-developers] Re: Pressing Menu button with ActionBar shows an dark overlay

2014-08-11 Thread 'RLScott' via Android Developers
New information: I just realized that I am unable to demonstrate this behavior on anything other than the Eclipse simulator. That's because I don't have any real Android devices that are both Android 3.0 or above and have a separate hardware menu button. The more modern ways of getting at

[android-developers] Determining ActionBar overflow or not

2014-08-11 Thread 'RLScott' via Android Developers
I have several ActionBar items that each display a popup menu. When these items are visible in the ActionBar there is no problem. The user taps on the item in the ActionBar and immediately the appropriate popup menu appears. But sometimes, on some devices, one or more of my ActionBar items

[android-developers] Pressing Menu button with ActionBar shows an dark overlay

2014-08-10 Thread 'RLScott' via Android Developers
I am migrating from an old-style Menu button menu to the ActionBar in an app that targets Android 3.0 and above. My ActionBar buttons are working fine. But on devices that still have a hardware Menu button, the Menu button causes the whole screen to be overlaid with a semi-transparent dark

Re: [android-developers] Positioning Buttons side by side in Linear Layout (one button multi-lined)

2014-06-26 Thread 'RLScott' via Android Developers
By different vertical positions I mean that the two buttons are side by side, but one is positioned slightly higher on the screen, as shown in the attached two-buttons.png. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this

Re: [android-developers] Positioning Buttons side by side in Linear Layout (one button multi-lined)

2014-06-26 Thread 'RLScott' via Android Developers
On Thursday, June 26, 2014 9:08:45 AM UTC-6, TreKing wrote: I see. Try changing the button heights to match parent and the containing layout to whatever height you want it. No, that didn't help either. The attached two-buttons.png is what happens with this XML: LinearLayout

Re: [android-developers] Positioning Buttons side by side in Linear Layout (one button multi-lined)

2014-06-26 Thread 'RLScott' via Android Developers
On Thursday, June 26, 2014 9:08:45 AM UTC-6, TreKing wrote: I see. Try changing the button heights to match parent and the containing layout to whatever height you want it. That fixed it! Although I don't know why it didn't work before. Thanks. -- You received this message because you

[android-developers] Positioning Buttons side by side in Linear Layout (one button multi-lined)

2014-06-25 Thread 'RLScott' via Android Developers
Two buttons are to be placed side by side in a horizonally-oriented LinearLayout whose width is match_parent. To make the buttons share the width equally I have assigned each Button the layout_weight of 0.5. Everything looks good if both buttons have a single line of text, or if both buttons

Re: [android-developers] Positioning Buttons side by side in Linear Layout (one button multi-lined)

2014-06-25 Thread 'RLScott' via Android Developers
dp instead of sp made no difference. The two buttons still appear at different vertical positions when only one of them has text that takes up two lines. On Wednesday, June 25, 2014 9:54:03 AM UTC-6, Tushar Lal wrote: Instead of sp try dp... On Jun 25, 2014 7:06 PM, 'RLScott' via Android

[android-developers] Recursive Activities - not possible?

2014-06-18 Thread 'RLScott' via Android Developers
I need to implement a File Explorer as an activity within my app. One of the functions of such an activity is the ability to recursively navigate up and down the directory tree. I was planning on doing that by having the current instance of the File Explorer start another instance of the File

Re: [android-developers] Recursive Activities - not possible?

2014-06-18 Thread 'RLScott' via Android Developers
I should have mentioned that the file structure in question Dropbox, and the access methods are the Dropbox Sync API, but I think your suggestion is a good one, once I figure out the Dropbox equivalents for the native Android file access methods. I will do that instead of spawn new instances

[android-developers] Re: Questions about copied code.

2014-02-20 Thread RLScott
I can only comment on question #3. It appears that scanner_buffer is 1024 bytes long, but only the bytes up to scanner_buffer_position have been set. Therefore the copy operation copies the relevant portion of scanner_buffer to a new array, encodedBytes, that is just the right length. If

[android-developers] Forcing app to use wi-fi, not 3G, for latency reasons

2013-10-21 Thread RLScott
My app uses a UDP network protocol involving very little data. But the round-trip latency is important. I have heard that 3G latency is more variable than wi-fi, especially after a long period of inactivity. My app will use the network data after several hours of inactivity, and I want that

[android-developers] Re: Is this OK ? (Triggering an event in an Activity from a Service)

2013-09-04 Thread RLScott
I suppose from the absence of critiques of this method that no one sees anything wrong with it. If that is the case then why have I not seen any examples using this very simple method of a service triggering an event in an activity that has bound to the service? Robert Scott Hopkins, MN --

[android-developers] Is this OK ? (Triggering an event in an Activity from a Service)

2013-08-27 Thread RLScott
Is there anything wrong with this way of trigger an action in an Activity from a local Service? It seems too easy. But all the examples I have seen of accomplishing the same end use a more complicated Messenger method. Anyway, here is what I do: In my activity, I start and bind to a local

[android-developers] Confused about stopping a Local Service

2013-08-23 Thread RLScott
The documentation for Services says: Binding to a Started Service As discussed in the Serviceshttp://developer.android.com/guide/components/services.htmldocument, you can create a service that is both started and bound. That is, the service can be started by calling

[android-developers] Lightweight communication from Local Service to Activity

2013-08-23 Thread RLScott
I haven't seen this done anywhere, so I suspect there is something wrong with it. It is too simple, compared to the more complicated Messenger methods. The idea is to get a very lightweight communication between a Local Service (part of my app) and an activity. Calling methods or reading

[android-developers] Bluetooth connection that persists through activity life-cycle

2013-08-22 Thread RLScott
I have a Bluetooth implementation in my app that goes through its entire set-up and tear-down in onResume and onPause in my main activity. The application communicates with a Bluetooth serial adapter. The trouble is that sometimes the user needs to leave our main activity for some other

[android-developers] Re: Bluetooth connection that persists through activity life-cycle

2013-08-22 Thread RLScott
Well, I have been working on this all day and I can't get it right. I have managed to make the BlueTooth connection persists through the temporary invocation of another activity, so that when I return to the first activity the BlueTooth thread is still running, the streams are still streaming,

Re: [android-developers] Re: Bluetooth connection that persists through activity life-cycle

2013-08-22 Thread RLScott
into a local service that binds to an activity. On Thursday, August 22, 2013 8:01:00 PM UTC-6, mike digioia wrote: Which device, soc, stack, HCL are you using. Also are you using rfcomm with serial ? On Aug 22, 2013 6:46 PM, RLScott fixtha...@yahoo.com javascript: wrote: Well, I have been

[android-developers] Re: How to execute some code on app launch and destroy

2013-04-05 Thread RLScott
onCreate for the app's main activity can be called multiple times throughout the lifetime of the app, and onDestroy might not be called at all under some conditions. On Apr 5, 6:20 am, skink psk...@gmail.com wrote: Dilip Kumar Chaudhary wrote: I have to execute some code when app gets executed

[android-developers] Can't interrupt/abort InetAddress.getByName()

2013-04-04 Thread RLScott
I have a thread that is doing Datagram(UDP) Socket communication. But I want to be able to interrupt/abort this thread at any time from my main UI. For blocking socket calls like read() and send() I can do this very well by calling interrupt() on the thread object. After those blocking calls my

[android-developers] AudioRecord sample rate + Touch Sounds + HDMI

2013-02-19 Thread RLScott
Here is a strange interaction that I discovered on one particular brand of Android Tablet. This interaction can cause the audio sample rate to change by 9% under certain condition. Those conditions are: 1. The HDMI video output to a TV monitor is connected. 2. The Touch Sounds are enabled in

[android-developers] Re: What to do when people are complaining about a virus in my app

2012-12-29 Thread RLScott
Does the souce code contain only code that you wrote, or did you include a third party library that you did not write? I am assuming that if the code is all yours you would know well enough whether you put a virus in it. -- You received this message because you are subscribed to the Google

[android-developers] Re: Can I offer a trial period for an otherwise Google Play subscription-based service?

2012-10-07 Thread RLScott
While I do not know the answer to the original question, it certainly seems like a reasonable question to ask in this forum. I would not be so bold as to claim that no one here can or would answer it. Speak only for yourself. On Oct 6, 3:57 pm, TreKing treking...@gmail.com wrote: On Sat, Oct

[android-developers] Re: Multiple SurfaceView and threads

2012-07-27 Thread RLScott
The rule is only the main UI thread is allowed to draw anything on the screen. Do not use other threads to try to do this because it will only get you into trouble. There are various methods of linking background thread calculations and communications with the main thread, but only the main

[android-developers] Re: AsyncTask - wait until the task has finished

2012-07-25 Thread RLScott
The solution offered by Romain Guy in 2009 is the correct one. If you aren't getting it to work for you then perhaps you are not using it correctly. But onPostExecute() should be able to modify a view after the AsyncTask has completed. On Jul 25, 5:33 am, mutkan mutk...@gmail.com wrote: So

[android-developers] Logcat without ADB or even USB drivers

2012-07-20 Thread RLScott
I have a bug that so far only shows up on this obscure Chinese tablet. There are no OEM USB drivers for this device, so I can't use Logcat the usual way. Is there any other kind of logging that is similar to Logcat that I could use to log some events in the code? I could write my own logging

[android-developers] Re: Android board for Industrial Automation

2012-07-18 Thread RLScott
Here is what we did when faced with a similar need. We used an off the shelf Android tablet computer from Best Buy and then connected it to a custom circuit board with Bluetooth. The custom board had a PIC micro controller and did all the industrial I/O. The Android tablet did the user

[android-developers] Re: HDMI out

2012-07-18 Thread RLScott
On Jul 10, 6:50 am, Mark Murphy mmur...@commonsware.com wrote: HDMI out, if it supported by the device, is transparent to the app developer... Not entirely transparent. The HDMI, when connected, usually override the sensor-determined screen orientation to force landscape - unless the

[android-developers] How to force onCreate lifecycle

2012-07-18 Thread RLScott
I found that I have some bugs in my code that only show up when a stopped activity goes through its destroy/recreate lifecycle. And that only happens when I run it on a certain Android tablet with HDMI video connected. I would like to verify that I have fixed my bugs but I don't want to bother

[android-developers] Re: How to force onCreate lifecycle

2012-07-18 Thread RLScott
Well, it was much easier than I thought. All I had to do was to rotate the device while in the second activity. That way the screen orientation of the stopped activity would be wrong for the current screen, and so the first activity would have to be recreated when I returned to it. No

[android-developers] Screen goes black and rotates only with HDMI connected

2012-07-16 Thread RLScott
I have an app that has been locked down to Reverse Portrait by having every activity specified as reverse portrait in the manifest. That is because I intended to demonstrate this app at a trade show using a connected HDMI TV screen that was mounted vertically. Everything works fine that way but

[android-developers] Re: Lock orientation once the app started?

2012-07-09 Thread RLScott
This method has a problem in Android 2.2 which cannot detect the difference between portrait and reverse portrait, for example. Later versions of Android maybe OK with it though. On Jul 9, 8:10 am, limtc thyech...@gmail.com wrote: My original reply was deleted by someone, not sure why. But

[android-developers] Re: how to get the name of external card

2012-06-01 Thread RLScott
As Mark Murphy said, there is no API for that. So what I did in my app was very messy. I invited the user to find out on his own, perhaps using a file explorer app on the Android device, what path he would like to use for the external memory. Then I had him enter that path in an EditText. --

[android-developers] Re: Tips or links for efficient low CPU threads?

2012-05-25 Thread RLScott
As long as your thread has something to do then it will do it, unless some other thread has something to do. The only way to save on battery power is to have all the threads waiting for external events, which is normally the case for user interface threads. Even background worker threads are

[android-developers] Re: Tips or links for efficient low CPU threads?

2012-05-25 Thread RLScott
Matt, are you sure the perceived slowdown in UI responsiveness is due to this low-priority thread? The slowdown might be due to action taken by higher priority threads (like the main UI thread) in response to your worker thread. One other thing you could try is to put lots of Thread.yield()

[android-developers] Menu button deprecated in 3.0

2012-05-25 Thread RLScott
I just found out that the menu button is deprecated starting with Android 3.0, and that some Android devices do not even have a menu button. My app targets Android 2.2 and uses the menu function quite a bit. Is it really possible that someone with a 3.0 or later device might not be able to

[android-developers] Re: Debugging Proguard build

2012-05-16 Thread RLScott
I got it working, but not with any help from debugging aids. I used trial and error on the release build and found that the problem was excessive obfuscation of method names (onClick...) that are referenced in XML layouts. Apparently those names must remain the same. I solved it by adding to my

[android-developers] Debugging Proguard build

2012-05-15 Thread RLScott
How do you debug a release build that was built with Proguard? My app runs fine in the debug configuration and it runs fine in the release configuration too, as long as I don't enable Proguard. I need it for obfuscation only, so I have set: -dontoptimize -dontshrink But when I install my

[android-developers] Re: Thread lifetime

2012-05-13 Thread RLScott
...@android.com wrote: As a general rule, if you are using sleep(), you are doing something wrong.  If you want your thread to stop and wait for more work to be available, just use Object.wait() and when you want it to wake up call Object.notify(). On Fri, May 11, 2012 at 2:46 PM, RLScott

[android-developers] Re: Thread lifetime

2012-05-11 Thread RLScott
OK, maybe that question was too big. All I really need to know is can I create a static thread that runs throughout the lifetime of the app and not worry about thread termination, trusting that if the OS needs to stop my app's process then it will close down that thread neatly without system

[android-developers] Re: Thread lifetime

2012-05-11 Thread RLScott
OK, I got it working, and here is how I did it. I defined an extension of Thread: public class AudioInputThread extends Thread{ private boolean requestWorking = false; private boolean isWorking = false; public void run() { while(true) { try { if(isWorking) {

[android-developers] Thread lifetime

2012-05-10 Thread RLScott
I have a working audio input app that uses the AudioRecord class for low-level PCM continuous audio processing. The audio stream is read and analyzed by a separate thread which repeatedly calls audioRecord.read to process the microphone audio one block at a time. Currently I create and start up

[android-developers] File.setReadable not available before API level 9

2012-05-05 Thread RLScott
Is there a level 8 equivalent for this function? I need to write files to external memory that the user can browse from the desktop via USB. My app specifies API level 8 and I really don't want to leave behind users who are on Android 2.2. Currently what happens is I write the file and it is

[android-developers] Re: File.setReadable not available before API level 9

2012-05-05 Thread RLScott
On May 5, 4:15 pm, Mark Murphy mmur...@commonsware.com wrote: setReadable() is not your problem -- all files on external storage are readable. If you are running into this problem on Android 3.0+ devices, you need to index your file:

[android-developers] Re: reading file from SDcard

2012-04-30 Thread RLScott
On Apr 30, 5:38 am, Mark Murphy mmur...@commonsware.com wrote: First, you use Environment.getExternalStorageDirectory() to get at the root of external storage, rather than hard-wiring in /sdcard (which is the wrong value, anyway). It is not quite as simple as that. Many Android devices have

[android-developers] Re: SlickUSB2Serial usage

2012-04-18 Thread RLScott
On Apr 10, 11:10 am, Neurobe bruce.ke...@gmail.com wrote: Anyone out there manage to get this library ro work half-way decent?? [I want my money back.] Actually I did get it working quite well. There were a few things I had to figure out on my own. In particular: The SlickUSB2Serial example

[android-developers] Watch out for fake audio sample rates in AudioRecord

2012-04-16 Thread RLScott
If your application records audio at a specified sample rate, be aware that some OEMs are faking it! We have a piano tuning app that needs to detect frequencies up to about 4200 Hz. This requires sampling audio at least twice that frequency, or 8400. So we used one of the standard audio sample

[android-developers] Re: Watch out for fake audio sample rates in AudioRecord

2012-04-16 Thread RLScott
On Apr 16, 9:24 am, Daniel Drozdzewski daniel.drozdzew...@gmail.com wrote: That's quite shocking, especially that even the cheapest of ADC/DAC chips support the whole of (human)audio spectrum. Bad engineering. All you have to do is to have calibrating stage in your app and embed some audio

[android-developers] Re: How to copy files from Android to PC?

2012-03-18 Thread RLScott
Doesn't this work only with files in the external memory (SD card)? What if you want to copy files from your app's private documents folder? On Mar 18, 3:03 am, Save My Life! alertsavemyl...@gmail.com wrote: You can use ftp. Steps 1. Install wireless file transfer from market to your phone.

[android-developers] Re: How to download without showing Unknown Sources message.

2012-03-13 Thread RLScott
The purpose of having the distinction of unknown sources is so that unscrupulous developers will have a harder time writing code with viruses or other maleware. If it were easy to disable that distinction then the distinction would be worthless. I can't think of any legitimate reason why you

[android-developers] Re: Does a device have Wi-Fi or not?

2012-03-07 Thread RLScott
I just got confirmation that my software is failing to detect the presence of wi-fi capability in a Motorola Droid Bionic, which obviously does have wi-fi capability. So why is PackageManager.hasSystemFeatures(PackageManager.FEATURE_WIFI) failing to report this? -- You received this message

Re: [android-developers] Re: Does a device have Wi-Fi or not?

2012-03-04 Thread RLScott
I know that the MAC may not be available if wifi is not turned no. That is not what I was asking. I want to know if the device even has the capability for wifi. Can I find that out reliably even if wifi happens to be turned off? -- You received this message because you are subscribed to the

[android-developers] SlickUSB2Serial usage

2012-03-04 Thread RLScott
Anybody use the SlickUSB2Serial library to interface to a USB-serial module? I have and I would like to compare notes with others who have used it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Does a device have Wi-Fi or not?

2012-02-24 Thread RLScott
Can anyone tell me how to determine if a device has WiFi even if that WiFi is turned off? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this

[android-developers] Re: Does a device have Wi-Fi or not?

2012-02-24 Thread RLScott
it at all? There are several fairly reliable data pieces even without the mac, and you could combine them into one, mix in the current timestamp just in case, and save the result into persistent storage for later reuse. -- Kostya 24.02.2012 15:16, RLScott пишет: Can anyone tell me how

[android-developers] Re: microSD card

2012-02-22 Thread RLScott
Not typically. But in the case of the original Motorola Droid, the SD slot is under the battery, so for that device, yes, you have to power down the device. On Feb 22, 2:28 pm, bob b...@coolfone.comze.com wrote: Does an Android device typically need to be powered off to insert/ remove a

[android-developers] Does a device have Wi-Fi or not?

2012-02-21 Thread RLScott
I may have found a problem in using the Wi-Fi Mac Address as a unique device id. If the Wi-Fi is turned off, I can detect that OK and ask the user to turn it on, provided I know that the device has Wi-Fi. I have been using PackageManager.hasSystemFeatures(PackageManager.FEATURE_WIFI) to

[android-developers] Pseudo-unique device ID

2012-02-19 Thread RLScott
This article (www.pocketmagic.net/?p=1662) presents some challenges and possible solutions to the problem of generating a pseudo-unique ID for a given Android device. I am particularly interested in the use of the following Build fields: Build.BOARD Build.BRAND Build.CPU_ABI Build.DEVICE

[android-developers] hasSystemFeatures sometimes hides Wi-Fi

2012-02-18 Thread RLScott
What is PackageManager.hasSystemFeatures(PackageManager.FEATURE_WIFI) supposed to return if Wi-Fi exists on the device but is currently turned off? On the devices I have tested it correctly reports that the device does indeed have Wi-Fi. But many of my customers' devices are reporting no Wi-Fi.

[android-developers] Re: ProgressDialog with Thread

2012-02-17 Thread RLScott
I don't think progressBar.dismiss is appropriate when executed by a thread other than the main UI thread. Use a handler to signal from the worker thread to the main UI thread and let the main UI thread do the actual messing with the UI. The same goes for any other action that touches the UI

[android-developers] Re: Why banned?

2012-02-07 Thread RLScott
In any case, it seems to have been fixed. I am no longer banned. In fact my first message was not meant to be posted. I thought I was sending to the owner of the group. I was surprised to see it in the public postings. On Feb 7, 3:38 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Maybe

[android-developers] Audio Latency big problem on some devices

2012-02-04 Thread RLScott
You wouldn't think 1024 samples at 22050 samples per second was especially low latency. And on most devices, using the AudioRecord class I have no trouble in getting individual buffers of 1024 samples (about 20 buffers per second) evenly spaced in time. But on at least one device, the timing

[android-developers] Re: Audio Latency big problem on some devices

2012-02-04 Thread RLScott
. On Sat, Feb 4, 2012 at 11:16 AM, RLScott fixthatpi...@yahoo.com wrote: You wouldn't think 1024 samples at 22050 samples per second was especially low latency.  And on most devices, using the AudioRecord class I have no trouble in getting individual buffers of 1024 samples (about 20

[android-developers] Localization of String.format causing problems

2012-01-26 Thread RLScott
My app writes files with strings generated by code like: s = String.format(%6.2f\r\n, zValue); where zValue is a float. Then it reads those files back in later and parses them, expecting to see a number with a decimal point (.). This works fine for my phone and for all the Android devices in

[android-developers] Re: Localization of String.format causing problems

2012-01-26 Thread RLScott
Problem solved, I think. I just have to change all my String.format(... statements to String.format(Locale,US,... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To

[android-developers] Best way to distribute app outside of Market

2012-01-26 Thread RLScott
I have an app that I am planning on distributing outside the Market. So far I have found two ways to do it: 1. Send an e-mail with the APK file attached. User taps on the attachment and app installs. 2. User browses my website where he can download the APK file. Then in the browser, use Menu

  1   2   >