android-contentprovider

Android Content Providers - Is it possible to restrict the provider to a set of applications not written by me?

帅比萌擦擦* 提交于 2019-12-06 04:29:55
When it comes to securing a content provider, I was wondering if there was a step between normal permission level security and signature level security. I have an application using a provider that I would like to expose to a particular set of other applications. However, those select other apps will not be written by me, so using a signature level permission won't suffice since the signatures would be different. Also, if I use a normal permission for the provider, and if the consuming application does not have that permission and throws a SecurityException, the logged exception says the name

Is there a Bookmark Contentprovider for Chrome to get browser history

有些话、适合烂在心里 提交于 2019-12-06 04:26:21
I have an app that use ContentResolver to get the Browser history data with Browser.BOOKMARKS_URI. It works well with the stock Android browser. Now Google is moving to Chrome as the default browser. Does Chrome provide similar Contentprovider? I searched all over the web but could not find any information on this. Is there a doc for Chrome on Android released by Google yet? Thanks in advance! https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-bugs/ThAoOAYOPCk indicates that this should now be possible. If Chrome is the system default browser (which it should be in

Android : Sync Adapter not running in some devices

二次信任 提交于 2019-12-06 03:46:48
In my android project i have a sync adapter that will sync data from android device to the server and its working fine, but recently i noticed that the onPerfomSync is not calling in my moto g3 android phone, I don't know whether there is the same problem in any other phones,I have tested it in some other Samsung phones with different android api level,but didn't find any problem there.I have configured the sync when a successful user login found.What will be the reason for this behaviour.Correct me if i am doing anything wrong. Below is my codes. private void finishLogin(Intent intent) {

Dataflow between Android BroadcastReceiver, ContentProvider, and Activity?

被刻印的时光 ゝ 提交于 2019-12-06 02:52:19
问题 I've developed an application that receives a Broadcast and then launches an Activity , where that Activity queries a ContentProvider which pulls information out of the DNS in real-time. I'd like to be able to shuffle this so that instead of going: BroadcastReceiver.onReceive() { Intent intent = new Intent(...); intent.setData(...); // set a single String data context.startActivity(intent); } Activity.onCreate() { String value = intent.getData(); // get the String data Cursor =

Declaring Content Provider

泪湿孤枕 提交于 2019-12-06 02:05:34
问题 This is my first time using a content provider but I followed the developer docs but when I run the program it tells me failed to find provider info here is my manifest <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.tyczj.bowling" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name="Tabs"> <intent-filter> <action

How to handle REST calls, data persistence, syncing and observing ContentProvider

眉间皱痕 提交于 2019-12-06 01:59:38
问题 I know that this question has been asked too many times, but I think the issues I'm trying to target are a little bit different, maybe more complicated. I am going to develop an application that uses a RESTful Web Service and needs to have the following requirements: the app should show some books, their authors and their editors in lists and in detail the app should also allow searching for a book books, authors and editors are fetched from a RESTful web service every entity has to be cached

Where can I find DownloadManager's ContentProvider implementation

百般思念 提交于 2019-12-06 01:59:28
问题 I've searched through android's open source code as much as I could and I haven't been able to find the implementation to the actual downloading via the DownloadManager in the 2.3 SDK. I have found the source for the DownloadManager and the source for a download class that has constants to interact with the ContentProvider but I haven't been able to find the source for the ContentProvider . I'm wanting to find this so that I can know a good way to implement a download of my own, since I'll be

content://mms-sms/conversations/ return NullPointerException at Android ICS Samsung

佐手、 提交于 2019-12-06 01:38:54
问题 I'm developing SMS application and need to listing SMS conversation. I found problem when trying to access content provider using uri content://mms-sms/conversations/ . It's runs well on Android 2.3 but when run at Android 4.0.3 Samsung galaxy tab 2 it return error : 10-17 09:04:51.035: E/AndroidRuntime(22600): FATAL EXCEPTION: main 10-17 09:04:51.035: E/AndroidRuntime(22600): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yooi/com.yooi.ui.MainActivity}: android.view

SearchManager - adding custom suggestions

被刻印的时光 ゝ 提交于 2019-12-06 01:12:53
问题 I've read all of the documentation online about building search interfaces and adding custom suggestions... but I'm still unclear on how this works. The documentation says that I must "Build a table (such as in an SQLiteDatabase) for your suggestions and format the table with required columns". I'm assuming the system will eventually fill this table with the appropriate suggestions on its own... but which process/class is responsible for this, and when will the actual insertions occur (before

how to select unique contacts from android

a 夏天 提交于 2019-12-06 00:54:21
问题 i want to select unique contacts from android only that contacts which have phone numbers. i am using this code ContentResolver cr = getContentResolver(); Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, ContactsContract.Contacts.DISPLAY_NAME); // Find the ListView resource. mainListView = (ListView) findViewById(R.id.mainListView); // When item is tapped, toggle checked properties of CheckBox and // Planet. mainListView .setOnItemClickListener(new AdapterView