android-4.3-jelly-bean

BLE Device disconnect with Android device automatically. Android BLE

99封情书 提交于 2019-12-10 01:59:02
问题 I'm using Android Nexus 7 to connect a device via Bluetooth Low Energy link. I'm able to connect the device, and stay connected if I don't do any communication with the device. However, if I enable the notification of one specific characteristic by clicking a button, then the device would disconnect with the tablet after a few seconds' data transmission. Does anyone know what might be the problem? Thank you very much! Here's my code: public boolean setCharacteristicNotification(boolean

What is the proper method for reading a GATT characteristic in Android?

天涯浪子 提交于 2019-12-10 01:58:44
问题 In attempting to read the value of a Bluetooth Low-Energy GATT characteristic in the Android API 18, I came across the following dilemma: What is the proper way to retrieve the value stored in a characteristic? And at which level of the stack should this action take place? In conducting my own research, I stumbled upon what I understand are two possible methods: BluetoothGatt .readCharacteristic(BluetoothGattCharacteristic characteristic) BluetoothGattCharacteristic .getValue() public void

Cannot read characteristic. Android BLE

帅比萌擦擦* 提交于 2019-12-08 20:45:43
问题 I'd like to read the data from a specific characteristic of my remote BLE device to my Android tablet Nexus 7. The problem is that, I can receive the data by enabling the notification of that characteristic even without calling readCharacteristic . But I cannot successfully read characteristic by calling readCharacteristic without enabling the notification. mBluetoothGatt.readCharacteristic(characteristic) returns false. Thus the function onCharacteristicRead has never been triggered. I also

Android jellybean with Phonegap click not working

喜你入骨 提交于 2019-12-08 04:05:48
问题 We are developing a Android Hybrid application using phonegap 3.2.2. In one of the html page, we are rendering an 'svg' element with 'path' elements inside the svg. Each path element is bind to a click event using the jquery. The issue we are facing is the "onclick event will not be triggered only for some of the path elements and for rest it is working fine " and also this we are getting only in the devices with Android OS 4.2 and 4.3 (All "Jelly Bean"). If anyone has faced the similar issue

How to send the text data to CC2541 keyfob via Android 4.3?

百般思念 提交于 2019-12-06 12:57:49
I am developing an application where I have to connect to Bluetooth device on Android 4.3. And I want to change the name of CC2541 Keyfob via the Android application. My ideas is: 1.There has a Plain Text that I can type the name what I want in my Android application. 2.After I type the name, I push the button to send this text. 3.If the CC2541 receive this text from Android application , it will change the text in the deviceName[] of the following code in keyfobdemo.c: static uint8 deviceName[] = { // complete name 0x0b, // length of first data structure (11 bytes excluding length byte) 0x09,

Android 4.3 KeyStore - chain == null while trying to retrieve keys

风流意气都作罢 提交于 2019-12-06 00:07:38
问题 Following this blog, I'm using this code to create and store a KeyPair in Android KeyStore: Context ctx = getApplicationContext(); Calendar notBefore = Calendar.getInstance(); Calendar notAfter = Calendar.getInstance(); notAfter.add(1, Calendar.YEAR); KeyPairGeneratorSpec spec = new KeyPairGeneratorSpec.Builder(ctx). setAlias(RSA_KEYS_ALIAS).setSubject( new X500Principal(String.format("CN=%s, OU=%s", getApplicationName(), ctx.getPackageName()))). setSerialNumber(BigInteger.ONE). setStartDate

Bug with Android 4.3 ImageView method getImageMatrix()

时光总嘲笑我的痴心妄想 提交于 2019-12-05 06:48:20
I recently upgraded to Android 4.4 and someone of the features of my app have surprisingly stopped working. I have this code for initializing and then drawing my custom view. The basic idea is it adjusts the zoom level so the entire view fits on the screen. private void initAtZoomLevel(float zoomLevel){ .... Matrix transformMatrix = new Matrix(); transformMatrix.setScale(initialZoomLevel, initialZoomLevel); float yTransCenter = (screenHeight - mapHeight)/2.0f; setImageMatrix(transformMatrix); } protected void onDraw(Canvas canvas){ super.onDraw(canvas); float[] values = new float[9];

What is the proper method for reading a GATT characteristic in Android?

只谈情不闲聊 提交于 2019-12-05 01:27:01
In attempting to read the value of a Bluetooth Low-Energy GATT characteristic in the Android API 18, I came across the following dilemma: What is the proper way to retrieve the value stored in a characteristic? And at which level of the stack should this action take place? In conducting my own research, I stumbled upon what I understand are two possible methods: BluetoothGatt .readCharacteristic(BluetoothGattCharacteristic characteristic) BluetoothGattCharacteristic .getValue() public void onClick(View v){ byteValue = mBTValueCharacteristic.getValue(); if ((byteValue[0] & 0x01) == 1) byteValue

Android Target API [closed]

本小妞迷上赌 提交于 2019-12-05 00:12:50
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I try to edit some code. According to the developer note, it's a part of app in android jelly bean version. But i found a piece of code that confusing me. What does this code mean? What's happened if we don't use this or deleting this piece of code: @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) It's an annotation that tells the Android Lint tool that the following class or method is targeting a particular API

run-as says 'package is unknown' after upgrading Android to 4.3

扶醉桌前 提交于 2019-12-04 22:38:10
I have a simple script that downloads database from phone to my PC it uses 'run-as', it worked well, but now, run-as says 'package is unknown' my application is installed on device, nothing changed, just Android was updated to 4.3 Do you have the same problems? how to bypass this or resolve ? Paul Beusterien We ran into the missing run-as problem when the Galaxy S4 released without it. We were using run-as to start a gdbserver for app debugging. We worked around the issue by starting gdbserver as an Android service. More details at run-as Package 'a.b.c' is unknown - Galaxy S4 Jellybean or