Difference between revisions of "KiwixKolibri"

Jump to navigation Jump to search
some changes from yesterday
(some changes from yesterday)
 
(6 intermediate revisions by 2 users not shown)
Line 12: Line 12:
* IIAB software
* IIAB software
* Kiwix server and mobile apps
* Kiwix server and mobile apps
 
* sharable linkable URLs (content level links) [http://mitblossoms-demo.learningequality.org/learn/#/913efe9f14c65cb1b23402f21f056e99/recommended/566472796f975e44958d15c84456e738 example link]
 
* [https://kolibridemo.learningequality.org/api/content/197934f144305350b5820c7c4dd8e194/contentnode/?page=1&page_size=20&search=physics Kolibri Search API]
THINGS CURRENTLY MISSING on KOLIBI:
* sharable linkable URLs (content level links)
* Search / listing API


Questions:
Questions:
* Does Kiwix have ability to do deep links?
* Does Kiwix have ability to do deep links?
 
** Mobile app deep links
** What is the kiwix-server content link format
* Can a zim file contain other zim files?
* What are good sample code examples that use python bindings to libzim for metadata/read/write




Line 41: Line 41:
* use chef script to package contents as channel
* use chef script to package contents as channel
* upload to content curation server
* upload to content curation server
UPDATE: Not a clear use case? Why import from ZimFile and not original source?
Maybe useful if you want to mix content from ZimFiles and other content sources (e.g. KA videos + wikipedia pages)




Line 48: Line 51:
* use libzim to package content as OpenZIM file
* use libzim to package content as OpenZIM file
* upload to Kiwix content repository
* upload to Kiwix content repository
UPDATE: could be useful to create subject-specific channels to distribute as ZimFiles (for their small size).




Line 91: Line 97:


Detect that Kiwix is installed, get an index of OpenZIM bundles and their metadata, and show links to the corresponding Kiwix URLs alongside the Kolibri channel list. This seems like a good first step. Detecting that the other is running isn't as simple as it might seem, as people run on various ports. An interesting challenge with a clear but simple outcome.
Detect that Kiwix is installed, get an index of OpenZIM bundles and their metadata, and show links to the corresponding Kiwix URLs alongside the Kolibri channel list. This seems like a good first step. Detecting that the other is running isn't as simple as it might seem, as people run on various ports. An interesting challenge with a clear but simple outcome.




Line 159: Line 164:
* Discuss future deep linking between apps
* Discuss future deep linking between apps
** See APPENDIX A with custom scheme for ACTION_VIEW
** See APPENDIX A with custom scheme for ACTION_VIEW
** `kiwix:/` and `kolibri:/` link format seems possible
** TODO; look at how server links work see if we can use same structure
* Note: better pursue content backend integration and server integration instead of Android since the dominant use case is "small server through the web"  
* Note: better pursue content backend integration and server integration instead of Android since the dominant use case is "small server through the web"  


Line 223: Line 230:
** Kiwix renders a custom ZIMfile that conains fractions + 3 links deep
** Kiwix renders a custom ZIMfile that conains fractions + 3 links deep


* Stickers & Swag
* Include content from ZIM files in Koibri
** Kolibri <3 Kiwix (Lovebirds :) )
** Example use case: in order to avoid duplication of supporting code,
 
(please add ideas here)
 




Line 246: Line 250:
* ACTION_VIEW intents that start with `kolibri://<path>` will be handled by the Kolibiri app (see below)
* ACTION_VIEW intents that start with `kolibri://<path>` will be handled by the Kolibiri app (see below)
* ACTION_VIEW intents starting with `kiwix://<path>` will be handled by the Kiwix app,
* ACTION_VIEW intents starting with `kiwix://<path>` will be handled by the Kiwix app,
* Suppose you're in the Kiwix app and you're browsing some videos from KA zim file. The exercises don't work within the Kiwix appthough, but you can click on an perseus exercise and the Kiwix app will send you to the Kolibri app as follows
* Suppose you're in the Kiwix app and you're browsing some videos from KA zim file.
Uri exercise = Uri.parse("kolibri:/learn/#/1ceff53605.../topics/c/845ce535...");<br>Intent callIntent = new Intent(Intent.ACTION_VIEW, exercise);
The exercises don't work within the Kiwix appthough, but you can click on an perseus exercise and the Kiwix app will send you to the Kolibri app as follows
// do check here
 
callIntent.startActivity()
    Uri exercise = Uri.parse("kolibri:/learn/#/1ceff53605.../topics/c/845ce535...");
    Intent callIntent = new Intent(Intent.ACTION_VIEW, exercise);
    // do check here
    callIntent.startActivity()
 
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 257: 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"/>
             <category android:name="android.intent.category.DEFAULT"/>
             <category android:name="android.intent.category.DEFAULT"/>
             <category android:name="android.intent.category.BROWSABLE"/>
             <category android:name="android.intent.category.BROWSABLE"/>
             <data android:scheme="'''kolibri'''" />
             <data android:scheme="kolibri"/>
             '''<nowiki><data android:host="view_channel"/></nowiki>'''
             <data android:host="view_channel"/>
             <nowiki><data android:host="view_node"/></nowiki>
             <data android:host="view_node"/>
             <nowiki><data android:pathPattern=".*"/></nowiki>
             <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 275: 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"/>
             <category android:name="android.intent.category.DEFAULT"/>
             <category android:name="android.intent.category.DEFAULT"/>
             <category android:name="android.intent.category.BROWSABLE"/>
             <category android:name="android.intent.category.BROWSABLE"/>
             <data android:scheme="'''kiwix'''" />
             <data android:scheme="kiwix"/>
             '''<nowiki><data android:host="view_zimfile"/></nowiki>'''
             <data android:host="view_zimfile"/>
             <nowiki><data android:host="view_page"/></nowiki>
             <data android:host="view_page"/>
             <nowiki><data android:pathPattern=".*"/></nowiki>
             <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:
16

edits

Navigation menu