我很难找到在Android设备上加密我的sqlite数据库的可能性,但我找不到令人满意的解决方案.
我需要像libary这样的东西来引用,以便在使用正常的sqlite函数时对我的数据库进行"动态"加密/解密.
我不希望在存储之前加密数据.
我不想加密整个数据库文件,以便在使用之前解密它.
我知道以下项目:
但我找不到任何有关此事的实例.
顺便说一句,我绝对愿意购买商业版本,但我必须在花费几百美元之前测试它.
有没有人为他自己解决这个问题?
编辑:问题由commonsWare解决,如果您按照他的链接:
SQLCypher端口到Android
您将能够下载必要的文件,并且必须将它们添加到您的项目.这可能如下所示:

我在我的应用程序和somtimes中发出POST请求(如果我有大量的Post数据),发生以下错误:
avax.net.ssl.SSLException:写入错误:ssl = 0x2f0610:系统调用期间的I/O错误,管道损坏
在下面的代码中执行http.execute(httpost).有人知道如何避免这种情况吗?
我尝试使用AndroidHttpClient,但找不到基本身份验证的有效方法而且我尝试了HttpsUrlConnection,但得到了同样的错误.
public static String makePOSTRequest(String s, List<NameValuePair> nvps,
String encoding) {
String ret = "";
UsernamePasswordCredentials c = new UsernamePasswordCredentials("XXX", "YYY");
BasicCredentialsProvider cP = new BasicCredentialsProvider();
cP.setCredentials(AuthScope.ANY, c);
HttpParams httpParams = new BasicHttpParams();
int connection_Timeout = 5000;
HttpConnectionParams.setConnectionTimeout(httpParams,
connection_Timeout);
HttpConnectionParams.setSoTimeout(httpParams, connection_Timeout);
DefaultHttpClient http = new DefaultHttpClient(httpParams);
http.setCredentialsProvider(cP);
HttpResponse res;
try {
HttpPost httpost = new HttpPost(s);
httpost.setEntity(new UrlEncodedFormEntity(nvps,
HTTP.DEFAULT_CONTENT_CHARSET));
res = http.execute(httpost);
InputStream is = res.getEntity().getContent();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new …Run Code Online (Sandbox Code Playgroud) 我的应用程序中有一个小的FileExplorer,我希望他从目前defautl相机使用的文件夹开始.有办法走这条路吗?我试过:
Environment.getExternalStoragePublicDirectory (Environment.DIRECTORY_PICTURES).getAbsolutePath());
Run Code Online (Sandbox Code Playgroud)
但这不会返回"/ mnt/sdcard/Pictures",我的相机存储在"mnt/sdcard/ext_sd/DCIM/100MEDIA /"中
PS:我知道如何使用特定文件夹启动相机来存储图片,这不是我要搜索的内容,
我的android上有一个sqlite数据库,有一个datetime列,其中包含一个格式为dd.MM.yyyy的日期.这不是我的数据库,我不能改变Dateformat.我想比较数据库中的日期和String,它表示一个secon日期,但我尝试的所有内容都失败了.如何将此列转换为有效的可比较日期?date(),dattime()sdfttime()一切都返回NULL.
我正在寻找在默认的httpclient中忽略所有ssl错误(例如,不信任)的可能性.我在这里看到了很多解决方案,但我必须导入一个特定的证书,并将其添加到trustmanager,或者它是用于DefaultHttpClient的HttpsUrlConnection instad.我用过的webrequests是:
public static String makeGETRequest(String s,String encoding)
{
DefaultHttpClient http = new DefaultHttpClient();
final String username = "USERNAME";
final String password = "PASSWORD";
UsernamePasswordCredentials c = new UsernamePasswordCredentials(username,password);
BasicCredentialsProvider cP = new BasicCredentialsProvider();
cP.setCredentials(AuthScope.ANY, c);
http.setCredentialsProvider(cP);
HttpResponse res;
try {
res = http.execute(new HttpGet(s));
InputStream is = res.getEntity().getContent();
BufferedInputStream bis = new BufferedInputStream(is);
ByteArrayBuffer baf = new ByteArrayBuffer(50);
int current = 0;
while((current = bis.read()) != -1){
baf.append((byte)current);
}
return new String(baf.toByteArray(),encoding);
}
catch (ClientProtocolException e) {
// TODO …Run Code Online (Sandbox Code Playgroud)