我需要从我的服务器获取一些 json 数据,其中包含有关公司员工协助的数据。我正在使用一个例子CalendarView
我需要更改数据来源:
Cursor cursor = context.getContentResolver()
.query(Uri.parse("content://com.android.calendar/events"),
new String[] { "calendar_id", "title", "description",
"dtstart", "dtend", "eventLocation" }, null,
null, null);
至
Cursor cursor = context.getContentResolver()
.query(Uri.parse("http://www.gettford.net/comunidad/api/calendario.php"),
new String[] { "calendar_id", "title", "description",
"dtstart", "dtend", "eventLocation" }, null,
null, null);
显然代码是错误的,但我不知道如何将 json 放入游标中,我知道如何获取 json 并将其插入数组但在这种情况下我不知道该怎么做。
感谢任何帮助
提前致谢。