[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
OK, I think I figured it out. When the AlertDialog is created, I use: numFoundDisplay = (TextView)layout.findViewById(R.id.numFound); to get a reference to that TextView in the AlertDialog. That reference (numFoundDisplay) is owned by the Activity, and as long as that Activity lives and

[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
New information: The messages I reported do not appear to be the result of my previous attempt at adding something from org.apach.http... I just imported another project from Eclipse to Android Studio, and in this project I never message around with HTTP stuff. Yet the same message

[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
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? > No, the theory says if the initial hardware sampling is

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

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

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

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

[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
(SOLVED!) Here's what I found out. My construction of the AudioRecord object was like this: new AudioRecord(MediaRecorder.AudioSource.MIC, 22050,AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, myBufSize); where myBufSize was set to a very large 16384. And

[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