egeniq / android-tv-program-guide

Android TV Program Guide
Apache License 2.0
164 stars 66 forks source link

Hi @dzolnai #34

Closed awesome1128 closed 3 years ago

awesome1128 commented 3 years ago

You did a great job. I can see , this code is built using Kotlin, but I am really not good at Kotlin. Do you have the same code in Java? Please let me know. Thanks. Shang.

dzolnai commented 3 years ago

Hi @awesome1128, no this library is only available in Java. Feel free to ask questions if you understand a part of the code.

awesome1128 commented 3 years ago

What do you mean by "no this library is only available in Java"? I asked, "Do you have the same code with Java?" So you mean, you built this library with only Kotlin? No Java?

dzolnai commented 3 years ago

Yes sorry I meant this library is only in Kotlin, I got mixed up.

awesome1128 commented 3 years ago

Yeah, okay no problem. Thank you for letting me know.

I have some questions.

  1. Can I use your Kotlin library in my Java project?
  2. If so, can I integrate your demo code(I mean, EpgFragment file) easily into my Java project? Do I need to replace only the channel lists? Or what should I do / configure to integrate?

Thank you again.

dzolnai commented 3 years ago
  1. Yes you can, but note that your Android app will include the Kotlin runtime in the apk, so its size will jump with a few 100 kilobytes. Usually this is not so significant.
  2. Kotlin has the advantage that it can be included next to existing Java code. So there's not much extra configuration needed, although Android Studio might ask if you want to enable Kotlin support. You should replace the channels and the programs inside the channels, yes. Usually these are loaded from an API.
awesome1128 commented 3 years ago

You're really kind. You did a great job. Actually, I love your library. Thank you so much!

awesome1128 commented 3 years ago

How can I get EPG content? Do I need to get EPG content with live channels from providers? I am a bit confused. Please let me know. Thank you.

dzolnai commented 3 years ago

Thanks for the kind words :)

How can I get EPG content? Do I need to get EPG content with live channels from providers? I am a bit confused.

You can read it with a permission, but then your tv needs access to those channels of course. So they would be visible in the default EPG of the TV as well.

I recommend that you check the original Android EPG code, the original code this library is based on. That one is written in Java, but uses the EPG of the TV as the source of its channels. You can find parts of the code here: https://android.googlesource.com/platform/packages/apps/TV/+/android-live-tv/src/com/android/tv/guide/

The program manager is the class which reads the TV channels: https://android.googlesource.com/platform/packages/apps/TV/+/android-live-tv/src/com/android/tv/guide/ProgramManager.java

dzolnai commented 3 years ago

Closing because of inactivity