Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > KOReader

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2023, 11:35 PM   #1
uroybd
Member
uroybd doesn't litteruroybd doesn't litter
 
Posts: 10
Karma: 194
Join Date: Apr 2022
Location: Dhaka, Bangladesh
Device: Likebook P78, Boox Poke Pro
Can anyone develop a companion widget for KOReader for Android?

I would like to have a widget for KOReader which will show the books I've recently interacted with on the Android homepage.

This is very hard to implement in KOReader itself since it is not a native Android app.

However, making a widget like this as a companion app is possible. I tried to extract the history from two files (one history file in lua, another is the sqlite) to get the necessary data to render (cover, name, author, and in the order they are in the history.

The problem is, that I'm not an Android developer. A seasoned developer in this field will be able to create such an app probably in a day.

Is anyone interested in developing this?
uroybd is offline   Reply With Quote
Old 12-19-2023, 11:30 AM   #2
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
Not me, sorry. But feel free to ask any questions; you never know what we might know.
Frenzie is offline   Reply With Quote
Old 12-19-2023, 02:33 PM   #3
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
It is unlikely.

A third party app won't be able to open books in place. You would click on the widget, on a book that you already opened, and there're chances you won't get that book open in KOReader.

This will be worse when we address https://github.com/koreader/koreader/issues/9787. At that point clicking on that widget will duplicate the book on a cache dir that doesn't inherit previous metadata unless you always started the book from the widget, which won't be possible unless the widget does media management on its own.

OTOH, while KO isn't a regular android app, we have access to the entire sdk and android facilities outside MainActivity. So the effort to write a standalone widget or a widget as part of the program is mostly the same.

Anyways, not interested. But I wouldn't mind to integrate one on the program if somebody steps in and does the bulk of the job.
pazos is offline   Reply With Quote
Old 12-19-2023, 09:41 PM   #4
uroybd
Member
uroybd doesn't litteruroybd doesn't litter
 
Posts: 10
Karma: 194
Join Date: Apr 2022
Location: Dhaka, Bangladesh
Device: Likebook P78, Boox Poke Pro
Smile

Quote:
Originally Posted by pazos View Post
Anyways, not interested. But I wouldn't mind to integrate one on the program if somebody steps in and does the bulk of the job.
I will contribute happily. Some guidance is needed though. Unlike the highlight plugin, this is very much android-specific, so I need some direction and time to get the hang of it.
uroybd is offline   Reply With Quote
Old 12-20-2023, 10:15 AM   #5
Frenzie
Wizard
Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.Frenzie ought to be getting tired of karma fortunes by now.
 
Posts: 1,619
Karma: 724945
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
I've never written an Android widget, but most of it is just https://developer.android.com/develo...ews/appwidgets
Frenzie is offline   Reply With Quote
Old 12-20-2023, 08:10 PM   #6
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by uroybd View Post
I will contribute happily. Some guidance is needed though. Unlike the highlight plugin, this is very much android-specific, so I need some direction and time to get the hang of it.
The hardest part is the widget.

Have a look at the link above.

Try to start with a simple app that
1. launchs a file picker that lets you choose a single epub.
2. adds the last n files picked to the widget.

extra points if your program is able to do thumbnails on its own.

At that point what's left is tweaking the widget itself and port it over https://github.com/koreader/android-luajit-launcher. We can help with the last part
pazos is offline   Reply With Quote
Old 12-20-2023, 10:10 PM   #7
uroybd
Member
uroybd doesn't litteruroybd doesn't litter
 
Posts: 10
Karma: 194
Join Date: Apr 2022
Location: Dhaka, Bangladesh
Device: Likebook P78, Boox Poke Pro
Quote:
Originally Posted by pazos View Post
The hardest part is the widget.

Have a look at the link above.

Try to start with a simple app that
1. launchs a file picker that lets you choose a single epub.
2. adds the last n files picked to the widget.

extra points if your program is able to do thumbnails on its own.

At that point what's left is tweaking the widget itself and port it over https://github.com/koreader/android-luajit-launcher. We can help with the last part
I've studied the whole matter a little bit.

We need particularly this (Preferably with a grid widget): https://developer.android.com/develo...ts/collections

I tried something similar before in Flutter + Kotlin. So I'm confident I can do that part okay.

We have to implement the RemoteViewsFactory (In Kotlin in luajit-luncher?).

We can expose some sort of updater to Lua through JNI so that in history changes, KOReader can update the widget.

Am I on the right track?
uroybd is offline   Reply With Quote
Old 12-21-2023, 04:31 PM   #8
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,271
Karma: 2200049
Join Date: Apr 2014
Device: BQ Cervantes 4
Quote:
Originally Posted by uroybd View Post
I've studied the whole matter a little bit.

We need particularly this (Preferably with a grid widget): https://developer.android.com/develo...ts/collections

I tried something similar before in Flutter + Kotlin. So I'm confident I can do that part okay.

We have to implement the RemoteViewsFactory (In Kotlin in luajit-luncher?).

We can expose some sort of updater to Lua through JNI so that in history changes, KOReader can update the widget.

Am I on the right track?
I think you're.

But please make a standalone app first, do not submit a PR against luajit-launcher or care about the integration yet.

Integrating the final thing takes less than an hour but reviewing/discussing the wip could take months.

Better to give us a pointer to the git repo where you're working on it.
pazos is offline   Reply With Quote
Reply

Tags
android, feature-request


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Develop epub 3.0 reader on Android and iOS eBooknew ePub 13 07-18-2021 06:49 PM
what tools to develop koreader? pluma KOReader 1 12-05-2016 09:10 PM
kols - a koreader companion ctag Kindle Developer's Corner 4 09-30-2014 07:16 PM
[Android App] Best Android reader software for use with Calibre / Calibre Companion ellett Devices 11 12-16-2012 04:27 PM
Kindle Daily Deal Widget for Android PeteMatthews Amazon Kindle 3 02-11-2012 12:41 PM


All times are GMT -4. The time now is 07:49 AM.


MobileRead.com is a privately owned, operated and funded community.