android-4.3-jelly-bean

Android 4.3 Bluetooth Low Energy unstable

↘锁芯ラ 提交于 2019-12-17 02:28:27
问题 I am currently developing an application that will use Bluetooth Low Energy (testing on the Nexus 4). After getting started with the official BLE APIs in Android 4.3, I have noticed that after I connect a device for the first time I am rarely able to successfully connect to / communicate with that device or any other device again. Following the guide here, I can successfully connect to a device, scan services and characteristics, and read/write/receive notifications without any issues.

Working with BLE Android 4.3 how to write characteristics?

天大地大妈咪最大 提交于 2019-12-12 07:06:32
问题 I am working on a BLE project (Android application) using Android 4.3 API, i have used sample BLE app it is only reading characteristics in DeviceControlActivity.activity, but i want to write characteristics and send it to BLE chip on clicking a button. How can I write data on chip cc2540 .. Basically i don't know the step by step procedure to write characteristics. write i can only see the name and id of device with following piece of code in DeviceControlActivity private final

Trying to center my map on user location (Says location is null)

ε祈祈猫儿з 提交于 2019-12-12 06:59:45
问题 ive been trying to center a map on the users location, but it keeps saying the latLng variable is null. I have read that that happens because i am using the getLastKnownLocation, but I cant find any other way to do it (I am new to programing). I am working with the google api on Jellybean. Here is the code that i am using. if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) { mMap.setMyLocationEnabled(true);

Strange XML layout bug when targeting Android 4.3

℡╲_俬逩灬. 提交于 2019-12-10 21:27:08
问题 I'm experiencing a really peculiar bug with an XML layout file when building my application while targeting API level 18. It doesn't happen with API level 17. I'm running the application on Android 4.3 devices, and the bug persists on all three devices. Here's what it looks like: API 17 (correct): API 18 (incorrect): I'm using the StickyGridHeaders library, and the following is my getHeaderView() method: @Override public View getHeaderView(int position, View convertView, ViewGroup parent) {

Restricted profiles settings not being remembered

馋奶兔 提交于 2019-12-10 17:57:07
问题 I have followed http://www.youtube.com/watch?v=pdUcANNm72o and set up settings for my app. I have 10 Booleans that appear. This can be set and when in the profile called. However they are not ticked/unticked then the owner goes back into the settings, they have reverted back to default. 1/ Is the system meant to know which user has which settings already selected or am I meant to tick or un tick in the GetRestrictionsReceiver. If I am, how am I meant to see each users settings as the Bundle

Android Jelly Bean MeasureSpec bug

筅森魡賤 提交于 2019-12-10 16:12:46
问题 I was having this problem: https://stackoverflow.com/questions/20121696/slidingmenu-bug-in-android-4-3 But now I've fixed and I want to share my solution 'cause probably someone will need it too. I'll answer this question myself bellow. 回答1: So the problem I was having lies on the fact that Build.VERSION_CODES.JELLY_BEAN_MR2 has a problem when we want to create a MeasureSpec : MeasureSpec.makeMeasureSpec(ViewGroup.LayoutParams..., MeasureSpec.EXACTLY); With MeasureSpec.EXACTLY when I perform

run-as Package 'a.b.c' is unknown - Galaxy S4 Jellybean or Android 4.3

…衆ロ難τιáo~ 提交于 2019-12-10 15:38:50
问题 I cannot run run-as (or ndk-gdb) for the Galaxy S4 running Jellybean 4.2.2. ~ $ adb shell shell@android:/ $ run-as a.b.c ls run-as: Package 'a.b.c' is unknown There are multiple answers for this issue for pre-ICS devices, but those seem to have been fixed in ICS. Update - Aug 2013: After initially appearing on the Galaxy S4 with Jellybean 4.2.2, the run-as issue now seems to be on all 4.3 devices. See this Android bug. See the acknowledged Android issue here. Update - Nov 2013: Google posted

Nexus 7, Android 4.3: Same directory, two canonical paths

爱⌒轻易说出口 提交于 2019-12-10 13:40:04
问题 I'm using a Nexus 7 running Android 4.3. Two directory paths on this device are confusing me: /storage/emulated/legacy /storage/emulated/0 If I call new File(<path>).getCanonicalPath() for either of these, I get the same path back. If I call the C function realpath with either, it succeeds and returns the same path. So it sounds like each of these is its own canonical path, and therefore they are different directories. However, If I create a subdirectory in either one, that subdirectory also

Media Codec and Rendering using GLSurfaceview, Optimization for OnDrawFrame

情到浓时终转凉″ 提交于 2019-12-10 11:48:44
问题 I am using media codec for encoding frame coming from camera and render it using gl surface view. my ondrawframe looks like this public void onDrawFrame(GL10 unused) { float[] mtx = new float[16]; GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT); surface.updateTexImage(); surface.getTransformMatrix(mtx); mDirectVideo.draw(surface); saveRenderState(); delegate.mInputSurface.makeCurrent(); mDirectVideo.draw(surface); delegate.swapBuffers(); restoreRenderState(); } So here

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

浪子不回头ぞ 提交于 2019-12-10 11:29:44
问题 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