小编use*_*448的帖子

找不到用于处理意图的活动{act = android.intent.action.VIEW dat = google.navigation:q = 17.399986,78.483137 pkg = com.google.android.apps.maps}

我正在尝试使用以下代码启动地图。

public static void navigate(Context context, double lat, double lon) {
        String locationQuery = lat + "," + lon;
        Uri gmmIntentUri = Uri.parse("google.navigation:q=" + locationQuery);
        Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
        mapIntent.setPackage("com.google.android.apps.maps");
        context.startActivity(mapIntent);
    }
Run Code Online (Sandbox Code Playgroud)

但是在某些情况下,我没有发现任何处理意图崩溃的活动。我在这里做错了。

android google-maps activitynotfoundexception

3
推荐指数
1
解决办法
1577
查看次数

如何在sqlite-android中存储图像并检索相同的图像

我正在开发一个应用程序,它在sqlite中存储一些静态图像,我想在imageview中检索它.我该怎么做呢谢谢.

sqlite android image

1
推荐指数
1
解决办法
2577
查看次数

从库项目中调用android应用程序项目中的辅助函数

我有一个Android应用程序项目.我创建了一个库项目并在应用程序项目中添加了引用.现在我需要调用/访问库项目中应用程序项目中的某些函数/类/方法.我怎样才能做到这一点 ?

android function library-project

1
推荐指数
1
解决办法
1746
查看次数

Android arraylist值是重复的

    if(cursor.getCount() !=0)
    {

        if(cursor.moveToFirst())
        {
            do
            {
                pObj.gritSize=cursor.getString(cursor
                        .getColumnIndex("grit"));
                pObj.test = cursor.getString(cursor
                        .getColumnIndex("sieve"));
                pObj.number = cursor.getString(cursor
                        .getColumnIndex("number"));
                pObj.micro = cursor.getString(cursor
                        .getColumnIndex("micro"));
                pObj.ret = cursor.getString(cursor
                        .getColumnIndex("retention"));
                pList.add(pObj);

            }while(cursor.moveToNext());
        }
    }
    return pList;
Run Code Online (Sandbox Code Playgroud)

我有上面的代码从表中获取数据.我在pObj的每次迭代中得到正确的值.但是当我添加pList.add(pObj); 每次,它都会覆盖前一个条目并添加值.因此,在迭代结束时,我将最后一行作为arraylist中的每个项目.请帮忙.

java sqlite android arraylist

-4
推荐指数
1
解决办法
133
查看次数