Giter Club home page Giter Club logo

Comments (29)

mjdenham avatar mjdenham commented on May 23, 2024 1

Sorry not much, it is complex, it started off around the time of Android 1.6 as a proof of concept to see if I could use JSword on Android, and just grew.

I suppose that once you have added the uri intent handling it is just a matter of returning the bible text.

There are some standard Sword uris. You will find reference to these in UriAnalyzer and use in LinkControl. They are specified in https://www.crosswire.org/wiki/Frontends:URI_Standard

Once the link has got somewhere into the app I suppose you need to analyse it like in UriAnalyzer and LinkControl and then return the Bible text like in PageControl.copyToClipboard.

Regards
Martin

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024 1

Here's how links work https://github.com/AndBible/and-bible/wiki/Bible-links

from and-bible.

mjdenham avatar mjdenham commented on May 23, 2024

Yes, code in a merge request with a suitable unit test would be great.

from and-bible.

jerryOkafor avatar jerryOkafor commented on May 23, 2024

After a long time,thanks. I have spent time trying to understand the architecture of the app, it a little complex, any thing to help me get on-board?

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024
  • Which URL scheme to use for And Bible links? Is there generic scheme available? Or do we just use the internal scheme (e.g. sword://Bible/Gen.1.1)
  • Consider offering to open bible.com links in And Bible if possible. Perhaps other popular online services too.

from and-bible.

ildar avatar ildar commented on May 23, 2024

from and-bible.

ildar avatar ildar commented on May 23, 2024

from and-bible.

mcepl avatar mcepl commented on May 23, 2024

There is https://github.com/Verses/Common_Bible_Share_Sheet which is for iOS, but otherwise it looks like the same thing.

from and-bible.

agrogers avatar agrogers commented on May 23, 2024

I suggest we delay this one to after v3.4 release

from and-bible.

mcepl avatar mcepl commented on May 23, 2024

So, 4.0 is out, is there any hope this will get solved? I would love to have bible:// links in https://hesla.ceplovi.cz/ (Czech and German reader for daily Watchwords / Losungen of the Moravian Brethern). Linking to some website is both unpleasant (AndBible provides much better Bible reading experience) and limiting to one particular website/translation.

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

So, 4.0 is out, is there any hope this will get solved? I would love to have bible:// links in https://hesla.ceplovi.cz/ (Czech and German reader for daily Watchwords / Losungen of the Moravian Brethern). Linking to some website is both unpleasant (AndBible provides much better Bible reading experience) and limiting to one particular website/translation.

How about creating a PR? :)

from and-bible.

mcepl avatar mcepl commented on May 23, 2024

How about creating a PR? :)

Yes, that’s the reason I am trying to just (hopefully) very gently ask, not order or request anything. I am a Pythonista, if need happens I may write some Lua or JavaScript, but Java is completely out of my experience and even less programming on the Android platform. I believe my skills are better used by generating biblical texts (e.g., https://gitlab.com/crosswire-bible-society/CzeCSP/-/blob/master/CEPtoOSIS.py) than by pretending I know anything about Java and Android.

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

I used to have same thinking like you: I was fan of Python, and tried to avoid doing anything else than Python. But now I think programming is pretty generic skill and with reasonable effort you can write Kotlin (main language in our codebase on android side), read/google & understand Android docs etc. Probably within max 1 day you could achieve this feature and as a bonus you would know already quite a few things about Android development and And Bible code. So I highly encourage you to take the step and install Android Studio and try to build & run AB on emulator :-)

from and-bible.

mcepl avatar mcepl commented on May 23, 2024

But now I think programming is pretty generic skill

I have been around since roughly 2000, so although I agree with you that programming languages are easy (and yes, I COULD write Java if my life depended on it, but I am a maintainer of Python for SUSE, so that's my skill-set), environments and libraries are not. In order to write for Android, it is not enough to write Java in the platonic world of pure ideas, you have to understand all libraries of Android, you have to understand all protocols you need to use (e.g., how to do intents), and THAT is not simple by any means. Besides, I don't like doing front-end stuff (but that's probably not an issue here).

So, you could achieve this feature in a day, I cannot. Which is the reason why I leave this to you (or whoever else feels comfortable with Java/Kotlin/Android) and I will spend my time doing something I am better equipped to do.

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

In order to write for Android, it is not enough to write Java in the platonic world of pure ideas, you have to understand all libraries of Android, you have to understand all protocols you need to use (e.g., how to do intents), and THAT is not simple by any means. Besides, I don't like doing front-end stuff (but that's probably not an issue here).

This really sounds like me before I started contributing to AB :-D I did not like front-end, I hated Java etc. Okay, still hating Java (at least a little), but Kotlin is nice. Frontend, fortunately, I have learned to like, due to nice new techs that make it smoother developer experience.

But being open source project, I think it is important to encourage skilled people to take steps to familiarize with the tech, otherwise I need to do everything myself. And I have really limited resources to do everything myself. But I can indeed quickly review and merge this.

I was making my 1 day estimate based on the fact that you don't know the tech yet. Someone who knows the tech will probably do this in an hour or less unless there are some unexpected difficulties on the way.

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

I'm feeling that you have the best motivation potential for this feature, so that's why I feel the urge to encourage you to take some steps to help. Perhaps you are done in 2 hours, if you are lucky. :-)

Believe me I have a big (and growing) pile of tasks to do already. This one is nice feature, but not priority for me.

from and-bible.

mcepl avatar mcepl commented on May 23, 2024

Believe me I have a big (and growing) pile of tasks to do already. This one is nice feature, but not priority for me.

Oh well, so I will just have to wait a bit more. Does this https://github.com/mcepl like a profile of somebody who has free time to study Android (and GitHub is the least I do, most of my work is on https://build.opensuse.org/ ; and that doesn't have a nice status page)?

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

People often have time for what is their priority. I have no doubts that you are a busy man. Most people are.

from and-bible.

mcepl avatar mcepl commented on May 23, 2024

People often have time for what is their priority.

Yup, and my priority is to use my current skills for the best of the humanity, the Gospel, and the Church, not spreading even wider.

from and-bible.

timbze avatar timbze commented on May 23, 2024

MyBible has support for other Android apps calling it directly, their docs for that are here. BTW I don't know that is the right approach for us. I like the idea of some kind of link AB would listen for.

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

https://support.andbible.org/scp/tickets.php?id=1729

I have the following question or comment:

I would like to pass search terms to AndBible Search from other Android applications such as my web browser or a document editor using activity intents.

I have other Android applications such as Tasker or Termux that will allow me to build custom shortcuts that can perform actions such as passing highlighted text to another applications such as AndBible Search.

Would you please provide the specific activity, intent and extras in AndBible Search I can use to achieve this?

It would look similar to the below
am start -a android.intent.action.MAIN -n com.orgzly/com.orgzly.android.ui.main.MainActivity --es "com.orgzly.intent.extra.QUERY_STRING" "search term" --activity-clear-task

Thank you for the useful app.

I think custom intent with search parameters, target document and search options would be "perfect" solution.
Now (in alpha version) we have PROCESS_TEXT which can be used as follows:

adb shell am start -a android.intent.action.PROCESS_TEXT -e android.intent.extra.PROCESS_TEXT "Jesus" -n net.bible.android.activity.next/net.bible.android.view.activity.search.SearchResults

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

Also this works:

adb shell am start -a android.intent.action.PROCESS_TEXT -e android.intent.extra.PROCESS_TEXT "Matthew\ 1:1" -n net.bible.android.activity.next/net.bible.android.view.activity.search.SearchResults
-> jumps to Matt 1:1

from and-bible.

ildar avatar ildar commented on May 23, 2024

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

This is a nice first little step for this FR :-) 1. What book will be used anyway?

It's active window's bible document.

  1. I guess searching a "text" like "Matt.10:33" would bring a user directly to the passage?

Yes.

from and-bible.

mcepl avatar mcepl commented on May 23, 2024

Could we make it somehow into URL? If I have SPA as for example https://hesla.ceplovi.cz/ (Watchwords of Unitas Fratrum), could I make somehow those references lead to something which activates this intent?

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

Here's some info that I found: https://developer.android.com/training/app-links

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

Closing this now as I feel we have satisfactory implementation in place. If something more specific is needed, please open a new issue.

from and-bible.

timbze avatar timbze commented on May 23, 2024

Will this work for study pad export links? The links are currently in this format: "osis://?osis=Eph.5.25-Eph.5.26&v11n=KJV" (I can also test this myself once the apk is out)

from and-bible.

tuomas2 avatar tuomas2 commented on May 23, 2024

Will this work for study pad export links? The links are currently in this format: "osis://?osis=Eph.5.25-Eph.5.26&v11n=KJV" (I can also test this myself once the apk is out)

No it doesn't. Need to create a ticket about it... #2561

from and-bible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.