Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: README.md

Issue 29678590: Issue 6307 - Introduce external engine created callback (Closed)
Patch Set: introduced custom listener interfaces Created Jan. 26, 2018, 12:46 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 Adblock Plus Library for Android 1 Adblock Plus Library for Android
2 ================================ 2 ================================
3 3
4 An Android library project, tests and demo application for AdblockWebView widget . 4 An Android library project, tests and demo application for AdblockWebView widget .
5 5
6 ## Updating the dependencies 6 ## Updating the dependencies
7 7
8 Adblock Plus for Android has dependencies that aren't in this repository. 8 Adblock Plus for Android has dependencies that aren't in this repository.
9 To update those, call: 9 To update those, call:
10 10
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 You can use `SharedPrefsStorage` implementation to store settings in `SharedPref erences`. 223 You can use `SharedPrefsStorage` implementation to store settings in `SharedPref erences`.
224 Or you can use AdblockHelper: 224 Or you can use AdblockHelper:
225 225
226 AdblockHelper 226 AdblockHelper
227 .get() 227 .get()
228 .init(this, getFilesDir().getAbsolutePath(), true, AdblockHelper.PREFERENC E_NAME); 228 .init(this, getFilesDir().getAbsolutePath(), true, AdblockHelper.PREFERENC E_NAME);
229 229
230 // optional - provide preloaded subscription files in app resoruces 230 // optional - provide preloaded subscription files in app resoruces
231 .preloadSubscriptions(AdblockHelper.PRELOAD_PREFERENCE_NAME, map); 231 .preloadSubscriptions(AdblockHelper.PRELOAD_PREFERENCE_NAME, map);
232 232
233 Sometimes it's desired to initialize or deinitialize FilterEngine instance
234 when created:
235
236 AdblockHelper
237 .get()
238 .init(...)
239 .addEngineCreatedListener(engineCreatedListener)
240
241 or disposed:
242
243 AdblockHelper
244 .get()
245 .init(...)
246 .addEngineDisposedListener(engineDisposedListener)
247
233 Implement the following interfaces in your settings activity: 248 Implement the following interfaces in your settings activity:
234 249
235 * `BaseSettingsFragment.Provider` 250 * `BaseSettingsFragment.Provider`
236 * `GeneralSettingsFragment.Listener` 251 * `GeneralSettingsFragment.Listener`
237 * `WhitelistedDomainsSettingsFragment.Listener` 252 * `WhitelistedDomainsSettingsFragment.Listener`
238 253
239 and return created instance or AdblockHelper instances: 254 and return created instance or AdblockHelper instances:
240 255
241 AdblockHelper.get().getProvider().getEngine(); // engine 256 AdblockHelper.get().getProvider().getEngine(); // engine
242 AdblockHelper.get().getStorage(); // storage 257 AdblockHelper.get().getStorage(); // storage
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 378
364 This will generate *.apk in the 'libadblockplus-android-webviewapp/bin/' directo ry. 379 This will generate *.apk in the 'libadblockplus-android-webviewapp/bin/' directo ry.
365 380
366 #### Building with Gradle 381 #### Building with Gradle
367 382
368 In the project root directory run: 383 In the project root directory run:
369 384
370 ./gradlew assemble 385 ./gradlew assemble
371 386
372 This will generate *.apk in the 'libadblockplus-android-webviewapp/build/outputs /apk/' directory. 387 This will generate *.apk in the 'libadblockplus-android-webviewapp/build/outputs /apk/' directory.
OLDNEW

Powered by Google App Engine
This is Rietveld