简体   繁体   English

在其他应用程序中隐藏Android中的SQLite数据库

[英]Hide SQLite Database in Android from Other Applications

I am Working on an Android Application which will be launched with a huge Pre loaded SQLite database. 我正在开发一个Android应用程序,它将与一个巨大的预加载SQLite数据库一起启动。 Problem is that database is visible to Applications like HACKDataApp etc. And Can also be viewed and copied in Android Device Monitor. 问题是数据库对于HACKDataApp等应用程序是可见的,并且还可以在Android Device Monitor中查看和复制。 Question is, Is there any way to protect\\hide my database from other applications?? 问题是,有什么方法可以保护\\隐藏我的数据库免受其他应用程序的侵害?

you got to make your contentProvider not exported. 您必须使contentProvider不被导出。 SImply as that : 简而言之:

from official documentation : android:exported: Flag allowing other applications to use this provider. 来自官方文档:android:exported:标记允许其他应用程序使用此提供程序。

put this in your manifest declaration for each contentProvider. 将其放在每个contentProvider的清单声明中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM