visit at https://joelwass.io/
joelwass / android-ble-scan-example Goto Github PK
View Code? Open in Web Editor NEWThis is a simple example app that turns on ble and scans for devices, listing them out. It's for Android API 23
This is a simple example app that turns on ble and scans for devices, listing them out. It's for Android API 23
visit at https://joelwass.io/
This is the error reported by Android Studio
FAILURE: Build failed with an exception.
Failed to notify project evaluation listener.
org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 10s
ERROR: Unable to find method 'org.gradle.api.tasks.compile.CompileOptions.setBootClasspath(Ljava/lang/String;)V'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
The code zip asks for Gradle 2.8. However my version of Android studio requires at least Gradle 4.9. Is there an easy way to change the required Gradle version within the code?
My devices are advertising the device name but I don't what the f problem with BLE it is not reading whole advertising data can you please tell me how to do it?
details: https://stackoverflow.com/questions/58428763/android-10-not-working-with-ble-bluetooth-scanning
add to manifest:
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
You may want to change in MainActivity:
protected void onCreate(Bundle savedInstanceState) {
...
CheckPermissions(new String[] { Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION,
Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.BLUETOOTH_ADMIN});
}
private void CheckPermissions(String[] aPermission)
{
ArrayList<String> aRequest = new ArrayList<String>();
for (int i=0; i<aPermission.length; i++)
if (ContextCompat.checkSelfPermission(this,aPermission[i])
!= PackageManager.PERMISSION_GRANTED)
aRequest.add(aPermission[i]);
if (aRequest.size() > 0)
ActivityCompat.requestPermissions(this, aRequest.toArray(new String[0]), 1);
}
As i am a beginner i did not care to update
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults) {
looks hard to set up with last android studio
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.