Hello i have created an android app that uses a custom content provider named CustomCP,
it implements all methods and everything works fine while managing data inside the app,
but when i try to access it from another app i keep getting an error of " Failed to find
provider info for com.example.customcp.
I have declared my content provider in the manifest file of the first app as
<provider android:name="com.example.CustomCP" android:authorities="com.example.customcp"/>
I try to call the provider in the second's application start up activity
public class app2 extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Uri kUri = Uri.parse("content://com.example.customcp/key");
Cursor c = managedQuery(kUri, null, null, null, null);
}
}
So the question is simple , is it possible to access a custom content provider from multiple applications?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…