This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
TABLE_SCHEMA, TABLE_NAME, TABLE_TYPE, CREATE_TIME, UPDATE_TIME | |
FROM INFORMATION_SCHEMA.TABLES | |
WHERE TABLE_SCHEMA = 'base_de_datos' | |
AND TABLE_TYPE = 'BASE TABLE' | |
ORDER BY UPDATE_TIME DESC; | |
SELECT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Build.MANUFACTURER // Fabricante | |
Build.BRAND // = Manufacturer | |
Build.MODEL; // Nombre del Equipo | |
Build.VERSION.RELEASE // Version de Android | |
Build.VERSION.SDK_INT // Version del SDK | |
IMEI | |
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.KITKAT) { | |
telephonyManager.getImei(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AlertDialog.Builder builder = new AlertDialog.Builder(Main_Activity.this); | |
if(ContextCompat.checkSelfPermission(Main_Activity.this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){ | |
builder.setTitle("Permisos"); | |
builder.setMessage("Es Necesario Aceptar Los Siguientes Permisos"); | |
builder.setIcon(R.drawable.ic_launcher_foreground); | |
builder.setCancelable(false); | |
builder.setPositiveButton("Continuar", new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int which) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Verificar que exista el paquete a Desinstalar | |
Boolean existe_package = packageExists("mx.smartteam", context); | |
public static Boolean packageExists(String package_Name, Context context){ | |
PackageManager pm = context.getPackageManager(); | |
try { | |
pm.getPackageInfo(package_Name, PackageManager.GET_ACTIVITIES); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
permissions | |
ActivityCompat.requestPermissions(Loader_Activity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1); | |
Implementation | |
private File mFile; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Permissions | |
ActivityCompat.requestPermissions(Loader_Activity.this, new String[]{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1); | |
Create File | |
File save_path = new File(Environment.getExternalStorageDirectory() + "/Apks"); | |
save_path.mkdirs(); | |
File privado = new File(String.valueOf(save_path)); |