allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
implementation "com.github.LongAgoLong.RemoteSPHelp:provider:$Tag"
<meta-data
android:name="authority"
android:value="com.android.sp.provider" />
<provider
android:name="com.leo.sp.provider.SPContentProvider"
android:authorities="com.android.sp.provider"
android:exported="true"
android:grantUriPermissions="true" />
- authority中value值等同于provider标签中的android:authorities属性;
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
implementation "com.github.LongAgoLong.RemoteSPHelp:resolver:$Tag"
<queries>
<package android:name="com.leo.remotesphelp" />
</queries>
<meta-data
android:name="authority"
android:value="com.android.sp.provider" />
- value必须与server客户端中定义的authorities相同
@Override
public void onCreate() {
super.onCreate();
SpContants.initAuthority(this);
SpResolver.getInstance().init(this);
}