Difference between revisions of "KiwixKolibri"

Jump to navigation Jump to search
no edit summary
(More details for android integration between apps)
Line 80: Line 80:
* 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  Uri exercise = Uri.parse("kolibri:/learn/#/1ceff53605.../topics/c/845ce535...");<br> Intent callIntent = new Intent(Intent.ACTION_VIEW, exercise); // do check here callIntent.startActivity()
* 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
  Uri exercise = Uri.parse("kolibri:/learn/#/1ceff53605.../topics/c/845ce535...");<br>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"
         android:noHistory="true"
         android:noHistory="true" // needed ???
         android:launchMode="singleInstance"
         android:launchMode="singleInstance"
         android:theme="@android:style/Theme.NoDisplay" >
         android:theme="@android:style/Theme.NoDisplay" >
Line 92: Line 95:
             <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>
             '''<nowiki><data android:host="view_channel"/></nowiki>'''
             <nowiki><data android:host="view_node"/></nowiki>'''
             <nowiki><data android:host="view_node"/></nowiki>
             <nowiki><data android:pathPattern=".*"/></nowiki>
             <nowiki><data android:pathPattern=".*"/></nowiki>
         </intent-filter>
         </intent-filter>
Line 103: Line 106:
     <activity
     <activity
         android:name=".activities.LinkDispatcherActivity"
         android:name=".activities.LinkDispatcherActivity"
         android:noHistory="true"
         android:noHistory="true" // needed ???
         android:launchMode="singleInstance"
         android:launchMode="singleInstance"
         android:theme="@android:style/Theme.NoDisplay" >
         android:theme="@android:style/Theme.NoDisplay" >
Line 110: Line 113:
             <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>
             '''<nowiki><data android:host="view_zimfile"/></nowiki>'''
             <nowiki><data android:host="view_page"/></nowiki>'''
             <nowiki><data android:host="view_page"/></nowiki>
             <nowiki><data android:pathPattern=".*"/></nowiki>
             <nowiki><data android:pathPattern=".*"/></nowiki>
         </intent-filter>
         </intent-filter>
16

edits

Navigation menu