niektuytel / apkcenterandroid Goto Github PK
View Code? Open in Web Editor NEWandroid application that can install applications or display websites
android application that can install applications or display websites
update apks on a specific time (schedule service)
loading more data base on scroll, need more data before i can fix this bug
when download a app, sometime he will failed on installing apk on the device.
This can be something like this app is already installed in the system apps or somewhere on the device and than the installation failed.
code of issue coming from:
if(responseCode == 200) {
// download apk on device
File path = Environment.getExternalStorageDirectory();
File file = new File(path, filename);
Uri apkProvider = FileProvider.getUriForFile(this, BuildConfig.APPLICATION_ID + ".fileprovider", file);
if (!file.exists()) {
return;
}
mDbInstalled.installSucceeded(mTitle);
Intent installIntent = new Intent();
installIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
installIntent.setAction(Intent.ACTION_INSTALL_PACKAGE);
installIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
installIntent.setDataAndType( apkProvider, "application/vnd.android.package-archive");
this.startActivity(installIntent);
if(mCallback != null) {
mCallback.onServiceFinished(mTitle);
}
}
private void GetPermission() {
// Here, thisActivity is the current activity
if (Build.VERSION.SDK_INT >= 27 && ContextCompat.checkSelfPermission(this, android.Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
// Should we show an explanation?
if (ActivityCompat.shouldShowRequestPermissionRationale(this, android.Manifest.permission.READ_EXTERNAL_STORAGE)) {
ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.READ_EXTERNAL_STORAGE
}, MY_PERMISSIONS_READ_STORAGE);
// Show an explanation to the user *asynchronously* -- don't block
// this thread waiting for the user's response! After the user
// sees the explanation, try again to request the permission.
} else {
// No explanation needed, we can request the permission.
ActivityCompat.requestPermissions(this,
new String[]{
android.Manifest.permission.READ_EXTERNAL_STORAGE
},
MY_PERMISSIONS_READ_STORAGE);
// MY_PERMISSIONS_REQUEST_READ_CONTACTS is an
// app-defined int constant. The callback method gets the
// result of the request.
}
} else doWorkAfterPermissionGranted();
}
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.