大家好,我真的很难让我的syncAdapter与我已经有效的内容提供商合作。
ContentResolver.isSyncPending(mConnectedAccount,MyContentProvider.AUTHORITY)
总是返回true 的考虑
setIsSyncable
setSyncAutomatically
和contenResolver
RequestSync
什么也没做。 onPerformSync
上的代码永远不会执行有关检查内容的任何提示?
答案 0 :(得分:0)
您必须输入以下参数才能使Bundle settingsBundle = new Bundle();
settingsBundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
settingsBundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
ContentResolver.requestSync(mAccount, AUTHORITY, settingsBundle);
正常工作。
val connectionString` = "jdbc:oracle:thin:username/password@111.11.1.11:1521:ORDERS"
val ordersDF = sqlContext.load("jdbc",
Map( "url" -> connectionString,
"dbtable" -> "(select * from CUSTOMER_ORDERS)",
"partitionColumn" -> "ORDER_ID",
"lowerBound"-> "1000",
"upperBound" -> "40000",
"numPartitions"-> "10"))