Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
/*
|
2020-04-13 22:56:35 +00:00
|
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License").
|
|
|
|
* You may not use this file except in compliance with the License.
|
|
|
|
* A copy of the License is located at
|
|
|
|
*
|
|
|
|
* http://aws.amazon.com/apache2.0/
|
|
|
|
*
|
|
|
|
* or in the "license" file accompanying this file. This file is distributed
|
|
|
|
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
|
|
|
* express or implied. See the License for the specific language governing
|
|
|
|
* permissions and limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <fstream>
|
2020-02-19 18:35:26 +00:00
|
|
|
#include <functional>
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
#include <list>
|
|
|
|
#include <memory>
|
|
|
|
#include <sstream>
|
|
|
|
#include <unordered_map>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include <gmock/gmock.h>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
|
|
|
|
#include <AVSCommon/Utils/Configuration/ConfigurationNode.h>
|
2020-06-22 23:48:22 +00:00
|
|
|
#include "acsdkBluetooth/SQLiteBluetoothStorage.h"
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
|
|
|
|
namespace alexaClientSDK {
|
2020-06-22 23:48:22 +00:00
|
|
|
namespace acsdkBluetooth {
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
namespace test {
|
|
|
|
|
|
|
|
using namespace ::testing;
|
|
|
|
using namespace avsCommon::utils;
|
|
|
|
using namespace avsCommon::utils::configuration;
|
|
|
|
|
|
|
|
/// Test Database file name. Can be changed if there are conflicts.
|
|
|
|
static const std::string TEST_DATABASE = "SQLiteBluetoothStorageTestDatabase.db";
|
|
|
|
|
|
|
|
// clang-format off
|
|
|
|
static const std::string BLUETOOTH_JSON = R"(
|
|
|
|
{
|
|
|
|
"bluetooth" : {
|
|
|
|
"databaseFilePath":")" + TEST_DATABASE + R"("
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)";
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
/// Error message for when the file already exists.
|
|
|
|
static const std::string FILE_EXISTS_ERROR = "Database File " + TEST_DATABASE + " already exists.";
|
|
|
|
|
|
|
|
/// Test MAC Address.
|
|
|
|
static const std::string TEST_MAC = "01:23:45:67:89:ab";
|
|
|
|
|
|
|
|
/// Second Test MAC Address.
|
|
|
|
static const std::string TEST_MAC_2 = "11:23:45:67:89:ab";
|
|
|
|
|
|
|
|
/// Test UUID.
|
|
|
|
static const std::string TEST_UUID = "650f973b-c2ab-4c6e-bff4-3788cd521340";
|
|
|
|
|
|
|
|
/// Second Test UUID.
|
|
|
|
static const std::string TEST_UUID_2 = "750f973b-c2ab-4c6e-bff4-3788cd521340";
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
/// Test Unknown MAC/Category.
|
|
|
|
static const std::string TEST_UNKNOWN = "UNKNOWN";
|
|
|
|
|
|
|
|
/// Test Other Category.
|
|
|
|
static const std::string TEST_OTHER = "OTHER";
|
|
|
|
|
|
|
|
/// Test Phone Category.
|
|
|
|
static const std::string TEST_PHONE = "PHONE";
|
|
|
|
|
|
|
|
/// Table name.
|
|
|
|
static const std::string UUID_TABLE_NAME = "uuidMapping";
|
|
|
|
|
|
|
|
/// The UUID column.
|
|
|
|
static const std::string COLUMN_UUID = "uuid";
|
|
|
|
|
|
|
|
/// The MAC address column.
|
|
|
|
static const std::string COLUMN_MAC = "mac";
|
|
|
|
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
/**
|
|
|
|
* Checks whether a file exists in the file system.
|
|
|
|
*
|
|
|
|
* @param file The file name.
|
|
|
|
* @return Whether the file exists.
|
|
|
|
*/
|
|
|
|
static bool fileExists(const std::string& file) {
|
|
|
|
std::ifstream dbFile(file);
|
|
|
|
return dbFile.good();
|
|
|
|
}
|
|
|
|
|
|
|
|
class SQLiteBluetoothStorageTest : public ::testing::Test {
|
|
|
|
public:
|
|
|
|
/// SetUp before each test case.
|
|
|
|
void SetUp();
|
|
|
|
|
|
|
|
/// TearDown after each test case.
|
|
|
|
void TearDown();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
/// Cleanup function to close and delete the database.
|
|
|
|
void closeAndDeleteDB();
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
/// Function to create legacy database.
|
|
|
|
bool createLegacyDatabase();
|
|
|
|
|
|
|
|
/// Insert Entry for legacy database.
|
|
|
|
bool insertEntryLegacy(const std::string& uuid, const std::string& mac);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper function to setup database.
|
|
|
|
*
|
|
|
|
* @param migrated Whether using migrated database.
|
|
|
|
* @return bool Whether database setup successful.
|
|
|
|
*/
|
|
|
|
bool setupDatabase(bool migratedDatabase);
|
|
|
|
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
/**
|
|
|
|
* Helper function that abstracts the test logic for getOrderedMac teste cases.
|
|
|
|
*
|
|
|
|
* @param ascending Whether we're testing the ascending or descending case.
|
|
|
|
*/
|
|
|
|
void getOrderedMacHelper(bool ascending);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Helper function that abstracts the logic for getMacToUuid and getUuidToMac test cases.
|
|
|
|
*
|
|
|
|
* @param retrieveRows Either the getMacToUuid or getUuidToMac function.
|
|
|
|
* @param macToUuids A map of macToUuids to initialize the database with.
|
|
|
|
* @param expected The expected results.
|
|
|
|
*/
|
|
|
|
void getRowsHelper(
|
|
|
|
std::function<bool(SQLiteBluetoothStorage&, std::unordered_map<std::string, std::string>*)> retrieveRows,
|
|
|
|
const std::unordered_map<std::string, std::string>& macToUuids,
|
|
|
|
const std::unordered_map<std::string, std::string>& expected);
|
|
|
|
|
|
|
|
/**
|
2020-02-19 18:35:26 +00:00
|
|
|
* Helper function that abstracts the logic for insertByMac given a macToUuids map and
|
|
|
|
* verifies the expected value with the one returned by the retrieveValue function.
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
*
|
2020-02-19 18:35:26 +00:00
|
|
|
* @param retrieveValue function to retrieve value from database (getMac/getUuid/getCategory).
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
* @param key The key (either the mac or uuid).
|
2020-02-19 18:35:26 +00:00
|
|
|
* @param expectedValue The expected value from the given retrieveValue function call.
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
* @param macToUuids A map of macToUuids to initialize the database with.
|
|
|
|
*/
|
2020-02-19 18:35:26 +00:00
|
|
|
void getRetrieveValueHelper(
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
std::function<bool(SQLiteBluetoothStorage&, const std::string&, std::string*)> retrieveValue,
|
|
|
|
const std::string& key,
|
|
|
|
const std::string& expectedValue,
|
|
|
|
const std::unordered_map<std::string, std::string>& macToUuids);
|
|
|
|
|
|
|
|
/// The database instance. Protected because it needs to be accessed in test cases.
|
|
|
|
std::unique_ptr<SQLiteBluetoothStorage> m_db;
|
2020-02-19 18:35:26 +00:00
|
|
|
|
|
|
|
/// SQLiteDatabase instance.
|
|
|
|
std::unique_ptr<alexaClientSDK::storage::sqliteStorage::SQLiteDatabase> m_sqLiteDb;
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
void SQLiteBluetoothStorageTest::closeAndDeleteDB() {
|
|
|
|
if (m_db) {
|
|
|
|
m_db->close();
|
|
|
|
}
|
2020-02-19 18:35:26 +00:00
|
|
|
if (m_sqLiteDb) {
|
|
|
|
m_sqLiteDb->close();
|
|
|
|
}
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
|
|
|
|
m_db.reset();
|
2020-02-19 18:35:26 +00:00
|
|
|
m_sqLiteDb.reset();
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
if (fileExists(TEST_DATABASE)) {
|
|
|
|
remove(TEST_DATABASE.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
bool SQLiteBluetoothStorageTest::createLegacyDatabase() {
|
|
|
|
m_sqLiteDb = std::unique_ptr<alexaClientSDK::storage::sqliteStorage::SQLiteDatabase>(
|
|
|
|
new alexaClientSDK::storage::sqliteStorage::SQLiteDatabase(TEST_DATABASE));
|
|
|
|
|
|
|
|
if (!m_sqLiteDb || !m_sqLiteDb->initialize()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!m_sqLiteDb->performQuery(
|
|
|
|
"CREATE TABLE " + UUID_TABLE_NAME + "(" + COLUMN_UUID + " text not null unique, " + COLUMN_MAC +
|
|
|
|
" text not null unique);")) {
|
|
|
|
m_sqLiteDb->close();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool SQLiteBluetoothStorageTest::insertEntryLegacy(const std::string& uuid, const std::string& mac) {
|
|
|
|
// clang-format off
|
|
|
|
const std::string sqlString = "INSERT INTO " + UUID_TABLE_NAME +
|
|
|
|
" (" + COLUMN_UUID + "," + COLUMN_MAC + ") VALUES (?,?);";
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
auto statement = m_sqLiteDb->createStatement(sqlString);
|
|
|
|
if (!statement) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
const int UUID_INDEX = 1;
|
|
|
|
const int MAC_INDEX = 2;
|
|
|
|
|
|
|
|
if (!statement->bindStringParameter(UUID_INDEX, uuid) || !statement->bindStringParameter(MAC_INDEX, mac)) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// This could be due to a mac or uuid already existing in the db.
|
|
|
|
if (!statement->step()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool SQLiteBluetoothStorageTest::setupDatabase(bool migratedDatabase) {
|
|
|
|
if (migratedDatabase) {
|
|
|
|
// Create legacy database and migrate.
|
|
|
|
createLegacyDatabase();
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
if (!m_db || !(m_db->open())) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// Create a new database.
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
if (!m_db || !(m_db->createDatabase())) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
void SQLiteBluetoothStorageTest::SetUp() {
|
|
|
|
// Ensure the db file does not exist already. We don't want to overwrite anything.
|
|
|
|
if (fileExists(TEST_DATABASE)) {
|
|
|
|
ADD_FAILURE() << FILE_EXISTS_ERROR;
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Initialize Global ConfigurationNode with valid value.
|
|
|
|
auto json = std::shared_ptr<std::stringstream>(new std::stringstream());
|
|
|
|
*json << BLUETOOTH_JSON;
|
|
|
|
std::vector<std::shared_ptr<std::istream>> jsonStream;
|
|
|
|
jsonStream.push_back(json);
|
|
|
|
ASSERT_TRUE(ConfigurationNode::initialize(jsonStream));
|
|
|
|
}
|
|
|
|
|
|
|
|
void SQLiteBluetoothStorageTest::TearDown() {
|
|
|
|
configuration::ConfigurationNode::uninitialize();
|
|
|
|
closeAndDeleteDB();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SQLiteBluetoothStorageTest::getOrderedMacHelper(bool ascending) {
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC_2, TEST_UUID_2));
|
|
|
|
|
|
|
|
std::list<std::string> expected;
|
|
|
|
if (ascending) {
|
|
|
|
expected.push_back(TEST_MAC);
|
|
|
|
expected.push_back(TEST_MAC_2);
|
|
|
|
} else {
|
|
|
|
expected.push_back(TEST_MAC_2);
|
|
|
|
expected.push_back(TEST_MAC);
|
|
|
|
}
|
|
|
|
|
|
|
|
std::list<std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getOrderedMac(ascending, &rows));
|
|
|
|
ASSERT_THAT(rows, Eq(expected));
|
|
|
|
}
|
|
|
|
|
|
|
|
void SQLiteBluetoothStorageTest::getRowsHelper(
|
|
|
|
std::function<bool(SQLiteBluetoothStorage&, std::unordered_map<std::string, std::string>*)> retrieveRows,
|
|
|
|
const std::unordered_map<std::string, std::string>& macToUuids,
|
|
|
|
const std::unordered_map<std::string, std::string>& expected) {
|
|
|
|
for (const auto& macAndUuid : macToUuids) {
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(macAndUuid.first, macAndUuid.second));
|
|
|
|
}
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(retrieveRows(*m_db, &rows));
|
|
|
|
ASSERT_THAT(rows, Eq(expected));
|
|
|
|
}
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
void SQLiteBluetoothStorageTest::getRetrieveValueHelper(
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
std::function<bool(SQLiteBluetoothStorage&, const std::string&, std::string*)> retrieveValue,
|
|
|
|
const std::string& key,
|
|
|
|
const std::string& expectedValue,
|
|
|
|
const std::unordered_map<std::string, std::string>& macToUuids) {
|
|
|
|
for (const auto& macAndUuid : macToUuids) {
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(macAndUuid.first, macAndUuid.second));
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string value;
|
|
|
|
ASSERT_TRUE(retrieveValue(*m_db, key, &value));
|
|
|
|
ASSERT_THAT(value, Eq(expectedValue));
|
|
|
|
}
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
/// Test database not created yet, open should fail.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, uninitializedDatabase) {
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_FALSE(m_db->open());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test if 2.0 database already created, open should succeed.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, openDatabase) {
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->createDatabase());
|
|
|
|
m_db->close();
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test if 1.0 database already created, open should succeed.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, openLegacyDatabase) {
|
|
|
|
createLegacyDatabase();
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test retrieving category for a UUID that does not exist after database migration.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, retrieveCategoryforUnknownUUID) {
|
|
|
|
createLegacyDatabase();
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
|
|
|
|
std::string category;
|
|
|
|
ASSERT_FALSE(m_db->getCategory(TEST_UUID, &category));
|
|
|
|
ASSERT_THAT(category, Eq(""));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test insertByMac after database migration.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, insertByMacPostDatabaseUpgrade) {
|
|
|
|
createLegacyDatabase();
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
|
|
|
|
std::string category;
|
|
|
|
ASSERT_TRUE(m_db->getCategory(TEST_UUID, &category));
|
|
|
|
ASSERT_THAT(category, Eq(TEST_UNKNOWN));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test retrieving mac for a UUID saved before migration after database migration.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, retrieveMacforKnownUUID) {
|
|
|
|
createLegacyDatabase();
|
|
|
|
|
|
|
|
insertEntryLegacy(TEST_UUID, TEST_MAC);
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
|
|
|
|
std::string mac;
|
|
|
|
ASSERT_TRUE(m_db->getMac(TEST_UUID, &mac));
|
|
|
|
ASSERT_THAT(mac, Eq(TEST_MAC));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test retrieving category for a UUID saved before migration after database migration.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, retrieveCategoryforKnownUUID) {
|
|
|
|
createLegacyDatabase();
|
|
|
|
|
|
|
|
insertEntryLegacy(TEST_UUID, TEST_MAC);
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
|
|
|
|
std::string category;
|
|
|
|
ASSERT_TRUE(m_db->getCategory(TEST_UUID, &category));
|
|
|
|
ASSERT_THAT(category, Eq(TEST_OTHER));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test retrieving category for multiple UUIDs saved before migration after database migration.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, retrieveCategoryforKnownMultipleUUID) {
|
|
|
|
createLegacyDatabase();
|
|
|
|
|
|
|
|
insertEntryLegacy(TEST_UUID, TEST_MAC);
|
|
|
|
insertEntryLegacy(TEST_UUID_2, TEST_MAC_2);
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
|
|
|
|
std::string category;
|
|
|
|
ASSERT_TRUE(m_db->getCategory(TEST_UUID, &category));
|
|
|
|
ASSERT_THAT(category, Eq(TEST_OTHER));
|
|
|
|
|
|
|
|
ASSERT_TRUE(m_db->getCategory(TEST_UUID_2, &category));
|
|
|
|
ASSERT_THAT(category, Eq(TEST_OTHER));
|
2020-12-08 23:09:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Test when a database is empty.
|
|
|
|
TEST_F(SQLiteBluetoothStorageTest, testEmptyDatabase) {
|
|
|
|
m_sqLiteDb = std::unique_ptr<alexaClientSDK::storage::sqliteStorage::SQLiteDatabase>(
|
|
|
|
new alexaClientSDK::storage::sqliteStorage::SQLiteDatabase(TEST_DATABASE));
|
|
|
|
|
|
|
|
// Setup raw database.
|
|
|
|
ASSERT_THAT(m_sqLiteDb, NotNull());
|
|
|
|
ASSERT_TRUE(m_sqLiteDb->initialize());
|
|
|
|
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
|
|
|
|
ASSERT_FALSE(m_sqLiteDb->tableExists(UUID_TABLE_NAME));
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
|
|
|
|
ASSERT_TRUE(m_sqLiteDb->tableExists(UUID_TABLE_NAME));
|
2020-02-19 18:35:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Parameterized tests to test both migrated and newly created databases.
|
|
|
|
class SQLiteBluetoothStorageParameterizedTests
|
|
|
|
: public SQLiteBluetoothStorageTest
|
|
|
|
, public ::testing::WithParamInterface<bool> {};
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(Parameterized, SQLiteBluetoothStorageParameterizedTests, ::testing::Values(true, false));
|
|
|
|
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
/// Tests the create function with an invalid root.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_createInvalidConfigurationRoot) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ConfigurationNode::uninitialize();
|
|
|
|
std::vector<std::shared_ptr<std::istream>> empty;
|
|
|
|
ConfigurationNode::initialize(empty);
|
|
|
|
|
|
|
|
ASSERT_THAT(SQLiteBluetoothStorage::create(ConfigurationNode::getRoot()), IsNull());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Tests creating a database object.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_createValidConfigurationRoot) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
// SQLite allows simultaneous access to the database.
|
|
|
|
ASSERT_THAT(SQLiteBluetoothStorage::create(ConfigurationNode::getRoot()), NotNull());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test creating a valid DB. This is implicitly tested in the SetUp() function, but we formally test it here.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_createDatabaseSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
closeAndDeleteDB();
|
|
|
|
m_db = SQLiteBluetoothStorage::create(ConfigurationNode::getRoot());
|
|
|
|
|
|
|
|
ASSERT_THAT(m_db, NotNull());
|
|
|
|
ASSERT_TRUE(m_db->createDatabase());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test that creating an existing DB fails.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_createExistingDatabaseFails) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ASSERT_FALSE(m_db->createDatabase());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test opening an existing database.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_openExistingDatabaseSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
m_db->close();
|
|
|
|
ASSERT_TRUE(m_db->open());
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test clearing the table with one row.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_clearOnOneRowSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
ASSERT_TRUE(m_db->clear());
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getUuidToMac(&rows));
|
|
|
|
ASSERT_THAT(rows.size(), Eq(0U));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test clearing the table with multiple rows.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_clearOnMultipleRowsSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC_2, TEST_UUID_2));
|
|
|
|
ASSERT_TRUE(m_db->clear());
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getUuidToMac(&rows));
|
|
|
|
ASSERT_THAT(rows.size(), Eq(0U));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test clearing the table when it's already empty.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_clearOnEmptySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ASSERT_TRUE(m_db->clear());
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getUuidToMac(&rows));
|
|
|
|
ASSERT_THAT(rows.size(), Eq(0U));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuid with one row containing UUID.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getUuidWithOneSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getUuid, TEST_MAC, TEST_UUID, data);
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuid with multiple rows, one of which contains the UUID.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getUuidWithMultipleSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.9.0 alexa-client-sdk
Changes in this update:
Enhancements
Added Android SDK support, which includes new implementations of the MediaPlayer, audio recorder, and logger.
Added the InteractionModel interface, which enables Alexa Routines.
Optional configuration changes have been introduced. Now a network interface can be specified to connect to the SDK via curl.
Build options can be configured to support Android.
Added GUI 1.1 support. The PlaybackController has been extended to support new control functionality, and the System interface has been updated to support SoftwareInfo.
Bug Fixes
Installation script execution time has been reduced. Now a single branch clone is used, such as the master branch.
Issue 846 - Fixed a bug where audio stuttered on slow network connections.
Removed the SpeakerManager constructor check for non-zero speakers.
Issue 891 - Resolved incorrect offset in the PlaybackFinished event.
Issue 727 - Fixed an issue where the sample app behaved erratically upon network disconnection/reconnection.
Issue 910 - Fixed a GCC 8+ compilation issue. Note: issues related to -Wclass-memaccess will still trigger warnings, but won't fail compilation.
Issue 871 Issue 880 - Fixed compiler warnings.
Fixed a bug where Ted Talks would not stream via TuneIn.
Fixed an issue where the PryonLiteKeywordDetector would not restart.
Fixed an issue where PlaybackStutterStarted and PlaybackStutterFinished events were not being sent due to a missing Gstreamer queue element.
Fixed a bug where the CapabilitiesDelegate database was not being cleared upon logout.
Fixed in issue that caused the following compiler warning “class has virtual functions but non-virtual destructor”.
Fixed a bug where BlueZDeviceManager was not properly destroyed.
Fixed a bug that occurred when the initializer list was converted to std::unordered_set.
Fixed a build error that occurred when building with BUILD_TESTING=Off.
Known Issues
* The ACL may encounter issues if audio attachments are received but not consumed.
* SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
* The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
* Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
* When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
* The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
* On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
* On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
* These CapabilitiesDelegateTest tests have been temporarily disabled to prevent build errors for the Android build: CapabilitiesDelegateTest.withCapabilitiesHappyCase, CapabilitiesDelegateTest.republish, CapabilitiesDelegateTest.testClearData.
* make integration is currently not available for Android. In order to run integration tests on Android, you'll need to manually upload the test binary file along with the any input file. At that point, the adb can be used to run the integration tests.
* On Raspberry Pi running Android Things with HDMI output audio, beginning of speech is truncated when Alexa responds to user TTS.
* Spotify does not completely shut down when the sample app quits.
2018-08-28 21:10:18 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getUuid, TEST_MAC, TEST_UUID, data);
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuid with no matching UUID.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getUuidNoMatchingFails) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
std::string uuid;
|
|
|
|
ASSERT_FALSE(m_db->getUuid(TEST_MAC, &uuid));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMac with one row containing MAC.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getMacWithOneSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getMac, TEST_UUID, TEST_MAC, data);
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMac with multiple rows, one of which contains the MAC.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getMacWithMultipleSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getMac, TEST_UUID, TEST_MAC, data);
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMac with no matching MAC.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getMacNoMatchingFails) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
std::string mac;
|
|
|
|
ASSERT_FALSE(m_db->getMac(TEST_UUID, &mac));
|
|
|
|
}
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
/// Test getCategory with one row containing Unknown Category.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getCategoryWithOneSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getCategory, TEST_UUID, TEST_UNKNOWN, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getCategory with multiple rows, two of which contains UNKNOWN, one is updated to PHONE.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getCategoryWithMultipleSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
|
|
|
|
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getCategory, TEST_UUID, TEST_UNKNOWN, data);
|
|
|
|
ASSERT_TRUE(m_db->updateByCategory(TEST_UUID, TEST_PHONE));
|
|
|
|
|
|
|
|
std::string category;
|
|
|
|
ASSERT_TRUE(m_db->getCategory(TEST_UUID, &category));
|
|
|
|
ASSERT_THAT(category, Eq(TEST_PHONE));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getCategory with multiple rows, two of which contains UNKNOWN, one is updated to PHONE,
|
|
|
|
/// verify insertByMac preserves the category.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getCategoryWithMultipleInsertByMacSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
|
|
|
|
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getCategory, TEST_UUID, TEST_UNKNOWN, data);
|
|
|
|
ASSERT_TRUE(m_db->updateByCategory(TEST_UUID, TEST_PHONE));
|
|
|
|
getRetrieveValueHelper(&SQLiteBluetoothStorage::getCategory, TEST_UUID, TEST_PHONE, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getCategory with no matching category for given uuid.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getCategoryNoMatchingFails) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
std::string category;
|
|
|
|
ASSERT_FALSE(m_db->getCategory(TEST_UUID, &category));
|
|
|
|
}
|
|
|
|
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
/// Test getMacToUuid with one row.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getMacToUuidWithOneRowSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToUuid, data, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMacToUuid with multiple expected.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getMacToUuidWithMultipleRowsSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToUuid, data, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMacToUuid when empty.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getMacToUuidWithEmptySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
std::unordered_map<std::string, std::string> data;
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToUuid, data, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuidToMac with one row.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getUuidToMacWithOneRowSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_UUID, TEST_MAC}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToMac, data, expected);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuidToMac with multiple expected.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getUuidToMacWithMultipleRowsSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_UUID, TEST_MAC}, {TEST_UUID_2, TEST_MAC_2}};
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToMac, data, expected);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuidToMac when empty.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getUuidToMacWithEmptySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
std::unordered_map<std::string, std::string> data;
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToMac, data, data);
|
|
|
|
}
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
/// Test getUuidToCategory with one row.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithOneRowSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_UUID, TEST_UNKNOWN}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToCategory, data, expected);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuidToCategory with one row, updated category to PHONE.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithOneRowUpdateCategorySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_UUID, TEST_UNKNOWN}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expectedUpdate{{TEST_UUID, TEST_PHONE}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToCategory, data, expected);
|
|
|
|
|
|
|
|
ASSERT_TRUE(m_db->updateByCategory(TEST_UUID, TEST_PHONE));
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToCategory, data, expectedUpdate);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuidToCategory with multiple expected.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithMultipleRowsSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_UUID, TEST_UNKNOWN}, {TEST_UUID_2, TEST_UNKNOWN}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToCategory, data, expected);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getUuidToCategory when empty.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getUuidToCategoryWithEmptySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
std::unordered_map<std::string, std::string> data;
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getUuidToCategory, data, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMacToCategory with one row.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithOneRowSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_MAC, TEST_UNKNOWN}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToCategory, data, expected);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMacToCategory with one row, updated category to PHONE.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithOneRowUpdateCategorySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_MAC, TEST_UNKNOWN}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expectedUpdate{{TEST_MAC, TEST_PHONE}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToCategory, data, expected);
|
|
|
|
|
|
|
|
ASSERT_TRUE(m_db->updateByCategory(TEST_UUID, TEST_PHONE));
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToCategory, data, expectedUpdate);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMacToCategory with multiple expected.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithMultipleRowsSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
const std::unordered_map<std::string, std::string> data{{TEST_MAC, TEST_UUID}, {TEST_MAC_2, TEST_UUID_2}};
|
|
|
|
|
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_MAC, TEST_UNKNOWN}, {TEST_MAC_2, TEST_UNKNOWN}};
|
|
|
|
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToCategory, data, expected);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getMacToCategory when empty.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, getMacToCategoryWithEmptySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
std::unordered_map<std::string, std::string> data;
|
|
|
|
getRowsHelper(&SQLiteBluetoothStorage::getMacToCategory, data, data);
|
|
|
|
}
|
|
|
|
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
/// Test getOrderedMac and retrieve the macs in ascending insertion order (oldest first).
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getOrderedMacAscending) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
getOrderedMacHelper(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test getOrderedMac and retrieve the macs in descending insertion order (newest first).
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_getOrderedMacDescending) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
getOrderedMacHelper(false);
|
|
|
|
}
|
|
|
|
|
2020-02-19 18:35:26 +00:00
|
|
|
/// Test updateByCategory succeeds.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, updateByCategorySucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
ASSERT_TRUE(m_db->updateByCategory(TEST_UUID, TEST_PHONE));
|
|
|
|
|
|
|
|
std::string category;
|
|
|
|
ASSERT_TRUE(m_db->getCategory(TEST_UUID, &category));
|
|
|
|
ASSERT_THAT(category, Eq(TEST_PHONE));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test updateByCategory with no matching uuid.
|
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, updateByCategoryNoMatchingFails) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
|
|
|
std::string category;
|
|
|
|
ASSERT_FALSE(m_db->updateByCategory(TEST_UUID, TEST_PHONE));
|
|
|
|
}
|
|
|
|
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
/// Test insertByMac succeeds.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_insertByMacSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getMacToUuid(&rows));
|
|
|
|
ASSERT_THAT(rows, Eq(expected));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test insertByMac existing fails.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_insertByMacDuplicateFails) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
ASSERT_FALSE(m_db->insertByMac(TEST_MAC, TEST_UUID, false));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test insertByMac with overwrite succeeds.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_insertByMacOverwriteSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
const std::unordered_map<std::string, std::string> expected{{TEST_MAC, TEST_UUID}};
|
|
|
|
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID_2));
|
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getMacToUuid(&rows));
|
|
|
|
ASSERT_THAT(rows, Eq(expected));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test remove succeeds.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_removeExistingSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ASSERT_TRUE(m_db->insertByMac(TEST_MAC, TEST_UUID));
|
|
|
|
ASSERT_TRUE(m_db->remove(TEST_MAC));
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getMacToUuid(&rows));
|
|
|
|
|
|
|
|
ASSERT_THAT(rows.size(), Eq(0U));
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Test remove on non-existing record succeeds.
|
2020-02-19 18:35:26 +00:00
|
|
|
TEST_P(SQLiteBluetoothStorageParameterizedTests, test_removeNonExistingSucceeds) {
|
|
|
|
ASSERT_TRUE(setupDatabase(GetParam()));
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
ASSERT_TRUE(m_db->remove(TEST_MAC));
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> rows;
|
|
|
|
ASSERT_TRUE(m_db->getMacToUuid(&rows));
|
|
|
|
|
|
|
|
ASSERT_THAT(rows.size(), Eq(0U));
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace test
|
2020-06-22 23:48:22 +00:00
|
|
|
} // namespace acsdkBluetooth
|
Version 1.8 alexa-client-sdk
Changes in this update:
Enhancements
Added local stop functionality. This allows a user to stop an active function, such as an alert or timer, by uttering "Alexa, stop" when an Alexa-enabled product is offline.
Alerts in the background now stream in 10 sec intervals, rather than continuously.
Added support for France to the sample app.
friendlyName can now be updated for BlueZ implementations of BlueZBluetoothDevice and BlueZHostController.
Bug Fixes
Fixed an issue where the Bluetooth agent didn't clear user data upon reset, including paired devices and the uuidMapping table.
Fixed MediaPlayer threading issues. Now each instance has it's own glib main loop thread, rather than utilizing the default main context worker thread.
Fixed segmentation fault issues that occurred when certain static initializers needed to be initialized in a certain order, but the order wasn't defined.
Known Issues
The ACL may encounter issues if audio attachments are received but not consumed.
SpeechSynthesizerState currently uses GAINING_FOCUS and LOSING_FOCUS as a workaround for handling intermediate state. These states may be removed in a future release.
The Alexa app doesn't always indicate when a device is successfully connected via Bluetooth.
Connecting a product to streaming media via Bluetooth will sometimes stop media playback within the source application. Resuming playback through the source application or toggling next/previous will correct playback.
When a source device is streaming silence via Bluetooth, the Alexa companion app indicates that audio content is streaming.
The Bluetooth agent assumes that the Bluetooth adapter is always connected to a power source. Disconnecting from a power source during operation is not yet supported.
On some products, interrupted Bluetooth playback may not resume if other content is locally streamed.
On Raspberry Pi, when streaming audio via Bluetooth, sometimes the audio stream stutters.
On Raspberry Pi, BlueALSA must be terminated each time the device boots. See Raspberry Pi Quick Start Guide for more information.
2018-06-27 21:41:15 +00:00
|
|
|
} // namespace alexaClientSDK
|