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
>
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
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
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
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
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
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
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
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
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
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
>
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
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 :
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
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
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
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
'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
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
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
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
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
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
&
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,
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
--
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
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
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
--
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
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()
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
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
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.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
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
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)
{
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
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
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:
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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.
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
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
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
.
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
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
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
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 - 100 of 178 matches
Mail list logo