我在我的 Android 应用程序中使用SQLite数据库。我想在我的 Chrome 或 Firefox 浏览器中查看数据库。
要查看数据库,通常我Logcat在 android Studio 中打开并选择详细并写入http框中serach,然后它为我提供了在浏览器中打开数据库的链接
像:D/DebugDB:在浏览器中打开http://192.168.2.116:8083
但在我的新项目中,它没有显示链接。我应该怎么办?
对于我的应用程序,图像存储在我手机的内部存储器中,图像在图库中可见,但我的客户希望图像在图库中不可见。
我在存储图像的文件夹中手动添加了 .nomedia 文件,它消失了,但我再次拍摄了新图像,它在图库中可见。
那么我该如何以编程方式做到这一点,以便图像不会出现在我的画廊中呢?
这是我的代码。
public void onActivityResult(int requestCode, int resultCode, Intent data){
super.onActivityResult(requestCode, resultCode,data);
if(resultCode== Activity.RESULT_OK){
if(requestCode==REQUEST_CAMERA){
Uri selectedImageUri = data.getData();
if (null != selectedImageUri) {
// Get the path from the Uri
String path = getPathFromURI(selectedImageUri);
File file = new File(path);
Bitmap bmp = CommonMethod.compressImage(file, getContext());
Log.e(TAG, "onActivityResult --: "+ String.format("Size : %s", getReadableFileSize(file.length())));
mCustomerImage = CommonMethod.bitmapToByteArray(bmp);
imageTemplateStr = Base64.encodeToString(mCustomerImage, Base64.DEFAULT);
Log.e(TAG, "image: "+ imageTemplateStr );
imageCustomer.setImageBitmap(bmp);
}
}else if(requestCode==SELECT_FILE){
Uri selectedImageUri = data.getData();
if (null != …Run Code Online (Sandbox Code Playgroud)