16
edits
Ivan.Savov (talk | contribs) |
Ivan.Savov (talk | contribs) (some changes from yesterday) |
||
(One intermediate revision by the same user not shown) | |||
Line 230: | Line 230: | ||
** Kiwix renders a custom ZIMfile that conains fractions + 3 links deep | ** Kiwix renders a custom ZIMfile that conains fractions + 3 links deep | ||
* | * Include content from ZIM files in Koibri | ||
** | ** Example use case: in order to avoid duplication of supporting code, | ||
Line 262: | Line 259: | ||
We could something like this in the Kolibri android app manifest: | We could something like this in the Kolibri android app manifest: | ||
<activity | <activity | ||
android:name=".activities.LinkDispatcherActivity" | android:name=".activities.LinkDispatcherActivity" | ||
Line 268: | Line 265: | ||
android:launchMode="singleInstance" | android:launchMode="singleInstance" | ||
android:theme="@android:style/Theme.NoDisplay" > | android:theme="@android:style/Theme.NoDisplay" > | ||
<nowiki> | |||
<intent-filter> | <intent-filter> | ||
<action android:name="android.intent.action.VIEW"/> | <action android:name="android.intent.action.VIEW"/> | ||
Line 277: | Line 275: | ||
<data android:pathPattern=".*"/> | <data android:pathPattern=".*"/> | ||
</intent-filter> | </intent-filter> | ||
</nowiki> | |||
</activity> | </activity> | ||
in the Kiwix android app | in the Kiwix android app | ||
<activity | <activity | ||
android:name=".activities.LinkDispatcherActivity" | android:name=".activities.LinkDispatcherActivity" | ||
Line 286: | Line 286: | ||
android:launchMode="singleInstance" | android:launchMode="singleInstance" | ||
android:theme="@android:style/Theme.NoDisplay" > | android:theme="@android:style/Theme.NoDisplay" > | ||
<nowiki> | |||
<intent-filter> | <intent-filter> | ||
<action android:name="android.intent.action.VIEW"/> | <action android:name="android.intent.action.VIEW"/> | ||
Line 295: | Line 296: | ||
<data android:pathPattern=".*"/> | <data android:pathPattern=".*"/> | ||
</intent-filter> | </intent-filter> | ||
</nowiki> | |||
</activity> | </activity> | ||
To verify there is an activity available that can respond to the intent, call <code>queryIntentActivities()</code> to get a list of activities capable of handling your <code>Intent</code>. If the returned <code>List</code> is not empty, you can safely use the intent. For example: | To verify there is an activity available that can respond to the intent, call <code>queryIntentActivities()</code> to get a list of activities capable of handling your <code>Intent</code>. If the returned <code>List</code> is not empty, you can safely use the intent. For example: |
edits