├── .gitignore
├── README.md
├── TV-Browser
├── .gitignore
├── AndroidManifest.xml
├── build.gradle
├── deployment
│ └── images
│ │ ├── ic_stat_notify.svg
│ │ └── ic_stat_reminder.svg
├── free
│ ├── AndroidManifest.xml
│ ├── res
│ │ ├── layout
│ │ │ ├── dialog_donations.xml
│ │ │ └── rating_and_donation.xml
│ │ ├── values-de
│ │ │ └── strings.xml
│ │ ├── values
│ │ │ └── strings.xml
│ │ └── xml
│ │ │ └── provider_paths.xml
│ └── src
│ │ └── org
│ │ └── tvbrowser
│ │ └── tvbrowser
│ │ ├── DonationRatingHelperImpl.java
│ │ ├── NetHelper.java
│ │ ├── PluginUpdateHelperImpl.java
│ │ └── SSLTool.java
├── google
│ ├── AndroidManifest.xml
│ ├── res
│ │ ├── drawable-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_widget.png
│ │ ├── drawable-mdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_widget.png
│ │ ├── drawable-xhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_widget.png
│ │ ├── drawable-xxhdpi
│ │ │ ├── ic_launcher.png
│ │ │ └── ic_widget.png
│ │ ├── layout
│ │ │ ├── dialog_donations.xml
│ │ │ ├── in_app_donations.xml
│ │ │ └── rating_and_donation.xml
│ │ ├── values-de
│ │ │ └── strings.xml
│ │ └── values
│ │ │ ├── colors.xml
│ │ │ └── strings.xml
│ └── src
│ │ ├── com
│ │ └── android
│ │ │ └── vending
│ │ │ └── billing
│ │ │ ├── IInAppBillingService.aidl
│ │ │ ├── license-info.txt
│ │ │ └── util
│ │ │ ├── Base64.java
│ │ │ ├── Base64DecoderException.java
│ │ │ ├── IabException.java
│ │ │ ├── IabHelper.java
│ │ │ ├── IabResult.java
│ │ │ ├── Inventory.java
│ │ │ ├── Purchase.java
│ │ │ ├── Security.java
│ │ │ └── SkuDetails.java
│ │ └── org
│ │ └── tvbrowser
│ │ └── tvbrowser
│ │ ├── DonationRatingHelperImpl.java
│ │ ├── NetHelper.java
│ │ └── PluginUpdateHelperImpl.java
├── ic_launcher-web.png
├── proguard-project.txt
├── res
│ ├── animator-v21
│ │ └── appbar_always_elevated.xml
│ ├── color
│ │ └── text_appcompat_light.xml
│ ├── drawable-hdpi
│ │ ├── ic_action_add_alarm.png
│ │ ├── ic_action_alarms.png
│ │ ├── ic_action_back.png
│ │ ├── ic_action_back_light.png
│ │ ├── ic_action_cloud.png
│ │ ├── ic_action_file_download.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_action_forward_light.png
│ │ ├── ic_action_remove_alarm.png
│ │ ├── ic_action_schedule.png
│ │ ├── ic_action_search.png
│ │ ├── ic_action_settings.png
│ │ ├── ic_favorite_add.png
│ │ ├── ic_favorite_mark.png
│ │ ├── ic_favorite_mark_more.png
│ │ ├── ic_filter_add.png
│ │ ├── ic_filter_default.png
│ │ ├── ic_filter_on.png
│ │ ├── ic_launcher.png
│ │ ├── ic_stat_notify.png
│ │ ├── ic_stat_reminder.png
│ │ ├── ic_stat_reminder_halted.png
│ │ ├── ic_widget.png
│ │ └── ic_widget_simple.png
│ ├── drawable-mdpi
│ │ ├── ic_action_add_alarm.png
│ │ ├── ic_action_alarms.png
│ │ ├── ic_action_back.png
│ │ ├── ic_action_back_light.png
│ │ ├── ic_action_cloud.png
│ │ ├── ic_action_file_download.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_action_forward_light.png
│ │ ├── ic_action_remove_alarm.png
│ │ ├── ic_action_schedule.png
│ │ ├── ic_action_search.png
│ │ ├── ic_action_settings.png
│ │ ├── ic_favorite_add.png
│ │ ├── ic_favorite_mark.png
│ │ ├── ic_favorite_mark_more.png
│ │ ├── ic_filter_add.png
│ │ ├── ic_filter_default.png
│ │ ├── ic_filter_on.png
│ │ ├── ic_launcher.png
│ │ ├── ic_stat_notify.png
│ │ ├── ic_stat_reminder.png
│ │ ├── ic_stat_reminder_halted.png
│ │ ├── ic_widget.png
│ │ └── ic_widget_simple.png
│ ├── drawable-xhdpi
│ │ ├── ic_action_add_alarm.png
│ │ ├── ic_action_alarms.png
│ │ ├── ic_action_back.png
│ │ ├── ic_action_back_light.png
│ │ ├── ic_action_cloud.png
│ │ ├── ic_action_file_download.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_action_forward_light.png
│ │ ├── ic_action_remove_alarm.png
│ │ ├── ic_action_schedule.png
│ │ ├── ic_action_search.png
│ │ ├── ic_action_settings.png
│ │ ├── ic_favorite_add.png
│ │ ├── ic_favorite_mark.png
│ │ ├── ic_favorite_mark_more.png
│ │ ├── ic_filter_add.png
│ │ ├── ic_filter_default.png
│ │ ├── ic_filter_on.png
│ │ ├── ic_launcher.png
│ │ ├── ic_stat_notify.png
│ │ ├── ic_stat_reminder.png
│ │ ├── ic_stat_reminder_halted.png
│ │ ├── ic_widget.png
│ │ └── ic_widget_simple.png
│ ├── drawable-xxhdpi
│ │ ├── ic_action_add_alarm.png
│ │ ├── ic_action_alarms.png
│ │ ├── ic_action_back.png
│ │ ├── ic_action_back_light.png
│ │ ├── ic_action_cloud.png
│ │ ├── ic_action_file_download.png
│ │ ├── ic_action_forward.png
│ │ ├── ic_action_forward_light.png
│ │ ├── ic_action_remove_alarm.png
│ │ ├── ic_action_schedule.png
│ │ ├── ic_action_search.png
│ │ ├── ic_action_settings.png
│ │ ├── ic_favorite_add.png
│ │ ├── ic_favorite_mark.png
│ │ ├── ic_favorite_mark_more.png
│ │ ├── ic_filter_add.png
│ │ ├── ic_filter_default.png
│ │ ├── ic_filter_on.png
│ │ ├── ic_launcher.png
│ │ ├── ic_stat_notify.png
│ │ ├── ic_stat_reminder.png
│ │ ├── ic_stat_reminder_halted.png
│ │ ├── ic_widget.png
│ │ └── ic_widget_simple.png
│ ├── drawable-xxxhdpi
│ │ ├── ic_action_add_alarm.png
│ │ ├── ic_action_file_download.png
│ │ ├── ic_action_remove_alarm.png
│ │ ├── ic_action_schedule.png
│ │ ├── ic_action_search.png
│ │ ├── ic_action_settings.png
│ │ ├── ic_favorite_add.png
│ │ ├── ic_favorite_mark.png
│ │ ├── ic_favorite_mark_more.png
│ │ ├── ic_filter_add.png
│ │ ├── ic_filter_default.png
│ │ ├── ic_filter_on.png
│ │ ├── ic_stat_notify.png
│ │ ├── ic_stat_reminder.png
│ │ └── ic_stat_reminder_halted.png
│ ├── drawable
│ │ ├── button_add_enabled.xml
│ │ ├── button_add_pressed.xml
│ │ ├── button_remove_enabled.xml
│ │ ├── button_remove_pressed.xml
│ │ ├── button_selector_add.xml
│ │ ├── button_selector_remove.xml
│ │ ├── dropshadow.xml
│ │ ├── img_important_widget.png
│ │ ├── img_running_widget.png
│ │ ├── img_widget_toggle_reminder_state.png
│ │ ├── line_divider.xml
│ │ ├── list_widgets_divider.9.png
│ │ ├── multipane_dropshadow.xml
│ │ ├── shape_button_background_corners_rounded_transparency_full.xml
│ │ ├── shape_button_background_corners_rounded_transparency_high.xml
│ │ ├── shape_button_background_corners_rounded_transparency_low.xml
│ │ ├── shape_button_background_corners_rounded_transparency_medium.xml
│ │ ├── shape_button_background_corners_rounded_transparency_none.xml
│ │ ├── shape_button_background_corners_straight_transparency_full.xml
│ │ ├── shape_button_background_corners_straight_transparency_high.xml
│ │ ├── shape_button_background_corners_straight_transparency_low.xml
│ │ ├── shape_button_background_corners_straight_transparency_medium.xml
│ │ ├── shape_button_background_corners_straight_transparency_none.xml
│ │ ├── shape_widget_background_corners_rounded_transparency_full.xml
│ │ ├── shape_widget_background_corners_rounded_transparency_high.xml
│ │ ├── shape_widget_background_corners_rounded_transparency_low.xml
│ │ ├── shape_widget_background_corners_rounded_transparency_medium.xml
│ │ ├── shape_widget_background_corners_rounded_transparency_none.xml
│ │ ├── shape_widget_background_corners_straight_transparency_full.xml
│ │ ├── shape_widget_background_corners_straight_transparency_high.xml
│ │ ├── shape_widget_background_corners_straight_transparency_low.xml
│ │ ├── shape_widget_background_corners_straight_transparency_medium.xml
│ │ └── shape_widget_background_corners_straight_transparency_none.xml
│ ├── layout-land
│ │ ├── compact_program_panel.xml
│ │ └── program_lists_entries.xml
│ ├── layout-large
│ │ ├── compact_program_panel.xml
│ │ └── program_lists_entries.xml
│ ├── layout-small
│ │ └── program_table_layout.xml
│ ├── layout-sw600dp-land
│ │ └── compact_program_panel.xml
│ ├── layout-sw600dp
│ │ └── compact_program_panel.xml
│ ├── layout-v21
│ │ ├── compat_spinner.xml
│ │ └── compat_spinner_nd.xml
│ ├── layout
│ │ ├── activity_configuration_widget_running.xml
│ │ ├── activity_favorite_edit.xml
│ │ ├── activity_filter_list_edit.xml
│ │ ├── activity_tv_browser.xml
│ │ ├── channel_label.xml
│ │ ├── channel_row.xml
│ │ ├── channel_sort_list.xml
│ │ ├── channel_sort_row.xml
│ │ ├── color_preference_dialog.xml
│ │ ├── compact_program_panel.xml
│ │ ├── compat_spinner.xml
│ │ ├── compat_spinner_nd.xml
│ │ ├── dialog_about.xml
│ │ ├── dialog_channel_selection_list.xml
│ │ ├── dialog_data_update_selection.xml
│ │ ├── dialog_data_update_selection_auto_update_time.xml
│ │ ├── dialog_detail.xml
│ │ ├── dialog_detail_content.xml
│ │ ├── dialog_detail_swipe.xml
│ │ ├── dialog_epg_donate_info.xml
│ │ ├── dialog_favorite_selection_duration.xml
│ │ ├── dialog_filter_categories.xml
│ │ ├── dialog_filter_keyword.xml
│ │ ├── dialog_terms.xml
│ │ ├── dialog_terms_accept.xml
│ │ ├── dont_want_to_see_edit.xml
│ │ ├── dont_want_to_see_exclusion_edit_list.xml
│ │ ├── favorite_time_selection.xml
│ │ ├── fragment_favorite_layout.xml
│ │ ├── fragment_favorite_selection_list_layout.xml
│ │ ├── fragment_program_list.xml
│ │ ├── fragment_running_programs.xml
│ │ ├── important_programs_widget_configuration.xml
│ │ ├── important_programs_widget_divider_big.xml
│ │ ├── important_programs_widget_divider_medium.xml
│ │ ├── important_programs_widget_divider_small.xml
│ │ ├── important_programs_widget_divider_tiny.xml
│ │ ├── important_programs_widget_row.xml
│ │ ├── list_row_selection.xml
│ │ ├── list_view.xml
│ │ ├── open_donation.xml
│ │ ├── program_block.xml
│ │ ├── program_lists_entries.xml
│ │ ├── program_panel.xml
│ │ ├── program_table.xml
│ │ ├── program_table_layout.xml
│ │ ├── progressbar.xml
│ │ ├── row_suggestion.xml
│ │ ├── running_list_entries.xml
│ │ ├── running_programs_widget_divider_big.xml
│ │ ├── running_programs_widget_divider_medium.xml
│ │ ├── running_programs_widget_divider_small.xml
│ │ ├── running_programs_widget_divider_tiny.xml
│ │ ├── running_programs_widget_row.xml
│ │ ├── search_repetition_layout.xml
│ │ ├── separator_line.xml
│ │ ├── sort_number_selection.xml
│ │ ├── time_button.xml
│ │ ├── username_password_setup.xml
│ │ ├── widget_color_activated.xml
│ │ └── widget_toggle_reminder_state.xml
│ ├── menu-v15
│ │ └── tv_browser.xml
│ ├── menu
│ │ ├── activity_edit_filter_list_context.xml
│ │ ├── activity_filter_list_edit_menu.xml
│ │ ├── don_want_to_see_context.xml
│ │ ├── favorite_context.xml
│ │ ├── program_context.xml
│ │ └── tv_browser.xml
│ ├── values-de
│ │ ├── arrays.xml
│ │ ├── pref_keys.xml
│ │ └── strings.xml
│ ├── values-large
│ │ └── dimens.xml
│ ├── values-sw600dp
│ │ ├── dimens.xml
│ │ └── styles.xml
│ ├── values-sw720dp-land
│ │ └── dimens.xml
│ ├── values-v29
│ │ └── styles.xml
│ ├── values
│ │ ├── arrays.xml
│ │ ├── attrs.xml
│ │ ├── channel_mappings.xml
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── ids.xml
│ │ ├── pref_categories.xml
│ │ ├── pref_keys.xml
│ │ ├── strings.xml
│ │ ├── styles.xml
│ │ └── widget_config_keys.xml
│ ├── xml-v16
│ │ └── preferences_widgets.xml
│ ├── xml-v26
│ │ └── preferences_reminder.xml
│ └── xml
│ │ ├── important_programs_widget_info.xml
│ │ ├── preferences_additonal_infos.xml
│ │ ├── preferences_debug.xml
│ │ ├── preferences_degender.xml
│ │ ├── preferences_details.xml
│ │ ├── preferences_download.xml
│ │ ├── preferences_epgpaid.xml
│ │ ├── preferences_i_dont_want_to_see.xml
│ │ ├── preferences_layout.xml
│ │ ├── preferences_news.xml
│ │ ├── preferences_program_lists.xml
│ │ ├── preferences_program_table.xml
│ │ ├── preferences_programs_list.xml
│ │ ├── preferences_reminder.xml
│ │ ├── preferences_running.xml
│ │ ├── preferences_start.xml
│ │ ├── preferences_sync.xml
│ │ ├── preferences_time_buttons.xml
│ │ ├── preferences_widgets.xml
│ │ ├── provider_paths.xml
│ │ ├── running_programs_widget_info.xml
│ │ ├── searchable.xml
│ │ ├── tvbrowser_preferences_header.xml
│ │ └── widget_toggle_reminder_state.xml
└── src
│ ├── License.txt
│ ├── com
│ └── example
│ │ └── android
│ │ └── listviewdragginganimation
│ │ ├── DynamicListView.java
│ │ ├── StableArrayAdapter.java
│ │ └── license-info.txt
│ ├── de
│ └── epgpaid
│ │ ├── EPGpaidData.java
│ │ └── EPGpaidDataConnection.java
│ └── org
│ └── tvbrowser
│ ├── App.java
│ ├── content
│ └── TvBrowserContentProvider.java
│ ├── devplugin
│ ├── Channel.aidl
│ ├── Channel.java
│ ├── ChannelOrdered.java
│ ├── Plugin.aidl
│ ├── PluginDefinition.java
│ ├── PluginHandler.java
│ ├── PluginManager.aidl
│ ├── PluginMenu.aidl
│ ├── PluginMenu.java
│ ├── PluginServiceConnection.java
│ ├── Program.aidl
│ ├── Program.java
│ ├── ProgramOrdered.java
│ ├── ReceiveTarget.aidl
│ ├── ReceiveTarget.java
│ ├── TvBrowserSettings.aidl
│ ├── TvBrowserSettings.java
│ └── license-info.txt
│ ├── filter
│ ├── ActivityFilterListEdit.java
│ ├── CategoryFilter.java
│ ├── ChannelFilter.java
│ ├── CursorFilter.java
│ ├── FilterCursorWrapper.java
│ ├── FilterValues.java
│ ├── FilterValuesCategories.java
│ ├── FilterValuesChannels.java
│ ├── FilterValuesKeyword.java
│ └── KeywordFilter.java
│ ├── job
│ └── JobDataUpdateAuto.java
│ ├── settings
│ ├── ActivityPluginFragment.java
│ ├── ColumnWidthPreference.java
│ ├── DateUntilPreference.java
│ ├── DirectoryPreference.java
│ ├── NumberPreference.java
│ ├── PluginPreferencesActivity.java
│ ├── PluginPreferencesFragment.java
│ ├── PreferenceColorActivated.java
│ ├── SettingConstants.java
│ ├── TimePreference.java
│ ├── ToolbarPreferencesActivity.java
│ ├── TvbPreferenceFragment.java
│ └── TvbPreferencesActivity.java
│ ├── tvbrowser
│ ├── ActivityFavoriteEdit.java
│ ├── ActivityTvBrowserSearchResults.java
│ ├── AutoDataUpdateReceiver.java
│ ├── BroadcastReceiverReminder.java
│ ├── BroadcastReceiverReminderToggle.java
│ ├── BroadcastReceiverUpdateAlarmValue.java
│ ├── DateSelection.java
│ ├── DegenderPlugin.java
│ ├── DonationRatingHelper.java
│ ├── DontWantToSeeExclusion.java
│ ├── Favorite.java
│ ├── FragmentFavorites.java
│ ├── FragmentProgramTable.java
│ ├── FragmentProgramsList.java
│ ├── FragmentProgramsListRunning.java
│ ├── InfoActivity.java
│ ├── LoaderUpdater.java
│ ├── Logging.java
│ ├── MarkingsUpdateListener.java
│ ├── MemorySizeConstrictedDatabaseOperation.java
│ ├── Mirror.java
│ ├── NamedFields.java
│ ├── NewsReader.java
│ ├── OrientationHandlingCursorAdapter.java
│ ├── PluginUpdateHelper.java
│ ├── ProgramListViewBinderAndClickHandler.java
│ ├── SDCardStateChangeListener.java
│ ├── ServiceChannelCleaner.java
│ ├── ServiceUpdateDataTable.java
│ ├── ServiceUpdateRemindersAndAutoUpdate.java
│ ├── ShowChannelInterface.java
│ ├── ShowDateInterface.java
│ ├── SimpleGroupInfo.java
│ ├── SortDropListener.java
│ ├── SortInterface.java
│ ├── TvBrowser.java
│ ├── TvBrowserPagerAdapter.java
│ ├── TvDataUpdateService.java
│ └── WhereClause.java
│ ├── utils
│ ├── CompatUtils.java
│ ├── IOUtils.java
│ ├── LogUtils.java
│ ├── PrefUtils.java
│ ├── ProgramUtils.java
│ ├── UiUtils.java
│ └── VersionUtils.java
│ ├── view
│ ├── ChannelLabel.java
│ ├── ColorView.java
│ ├── CompactProgramTableLayout.java
│ ├── GrowingRelativeLayout.java
│ ├── InfoPreference.java
│ ├── InfoPreferenceCompat.java
│ ├── NDSpinner.java
│ ├── NDSpinnerCompat.java
│ ├── PreferenceNotificationChannel.java
│ ├── ProgramPanel.java
│ ├── ProgramTableLayout.java
│ ├── ProgramTableLayoutConstants.java
│ ├── SeparatorDrawable.java
│ ├── SpinnerUncompat.java
│ ├── SwipeScrollView.java
│ ├── TimeBlockProgramTableLayout.java
│ └── ZoomableFrameLayout.java
│ └── widgets
│ ├── ActivityConfigurationWidgetRunning.java
│ ├── ImportantProgramsListWidget.java
│ ├── ImportantProgramsRemoteViewsService.java
│ ├── ImportantProgramsWidgetConfigurationActivity.java
│ ├── RunningProgramsListWidget.java
│ ├── RunningProgramsRemoteViewsService.java
│ ├── WidgetOnClickReceiver.java
│ ├── WidgetToggleReminderState.java
│ └── WidgetUtils.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | **/bin
2 | **/gen
3 | **/build
4 | **/.gradle
5 | **/.idea
6 | **/local.properties
7 | **/[Th]umbs.db
8 | **/*.iml
9 | #**/.classpath
10 | **/*.settings
11 |
12 | *~
13 | .fuse_hidden*
14 | .directory
15 | .Trash-*
16 | .nfs*
17 | .DS_Store
18 | .AppleDouble
19 | .LSOverride
20 | Icon
21 | ._*
22 | .DocumentRevisions-V100
23 | .fseventsd
24 | .Spotlight-V100
25 | .TemporaryItems
26 | .Trashes
27 | .VolumeIcon.icns
28 | .com.apple.timemachine.donotpresent
29 | .AppleDB
30 | .AppleDesktop
31 | Network Trash Folder
32 | Temporary Items
33 | .apdisk
34 |
35 | ### Android template
36 | # Built application files
37 | *.apk
38 |
39 | # Files for the ART/Dalvik VM
40 | *.dex
41 |
42 | # Generated files
43 | bin/
44 | gen/
45 | out/
46 |
47 | # Proguard folder generated by Eclipse
48 | proguard/
49 |
50 | # Log Files
51 | *.log
52 |
53 | # Android Studio
54 | .navigation/
55 | captures/
56 | .externalNativeBuild
57 |
58 | # Keystore files
59 | *.jks
60 |
61 | # Windows
62 | Thumbs.db
63 | ehthumbs.db
64 | ehthumbs_vista.db
65 | *.stackdump
66 | [Dd]esktop.ini
67 | $RECYCLE.BIN/
68 | *.lnk
69 | *.tmp
70 | *.bak
71 |
72 | hs_err_pid*
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TV-Browser for Android
2 |
3 | An open source TV Guide for Android, based on the TV-Browser classic project for desktop (https://www.tvbrowser.org/index.php?setlang=en).
4 |
5 | * **Homepage:** https://www.tvbrowser-app.de/index.php?setlang=en
6 | * Plugins: https://www.tvbrowser-app.de/index.php?id=plugins-1&setlang=en
7 | * Synchronization: https://www.tvbrowser-app.de/index.php?id=synchronization&setlang=en
8 | * Creating an account for data synchronization between TV-Browser for Android and TV-Browser for Desktop (German only): https://www.tvbrowser-app.de/index.php?id=createaccount
9 | * **Forum** (German / TV-Browser for Android): https://hilfe.tvbrowser.org/viewforum.php?f=45 (i. e. bug reports)
10 | * Forum (English / TV-Browser for Desktop): https://hilfe.tvbrowser.org/viewforum.php?f=14
11 |
12 | # Downloads
13 | **TV-Browser vP (Google Play version)**
14 | * **Get it on Google Play:** https://play.google.com/store/apps/details?id=org.tvbrowser.tvbrowser.play
15 | * Has restrictions required by Google for publishing on Google Play (i. e. no sideload of plugins).
16 | * Available plugins must be installed via Google Play.
17 |
18 | **TV-Browser Free**
19 | * Via Update Plugin: https://www.tvbrowser-app.de/download/plugins/UpdatePlugin-release.apk (sideload)
20 | * Via **GitHub Releases:** https://github.com/ds10git/tvbrowserandroid/releases (sideload)
21 |
22 | Note: It is not possible to install both variants side by side.
23 |
24 | # License
25 | Copyright (c) 2013 René Mach (rene@tvbrowser.org)
26 |
27 | Permission is hereby granted, free of charge, to any person obtaining a copy of this Software
28 | and associated documentation files (the "Software"), to use, copy, modify or merge the Software,
29 | furthermore to ***publish and distribute the Software free of charge without modifications*** and to
30 | permit persons to whom the Software is furnished to do so, subject to the following conditions:
31 |
32 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
33 |
34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
36 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
37 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38 |
--------------------------------------------------------------------------------
/TV-Browser/.gitignore:
--------------------------------------------------------------------------------
1 | /bin
2 |
--------------------------------------------------------------------------------
/TV-Browser/deployment/images/ic_stat_notify.svg:
--------------------------------------------------------------------------------
1 |
2 |
55 |
--------------------------------------------------------------------------------
/TV-Browser/deployment/images/ic_stat_reminder.svg:
--------------------------------------------------------------------------------
1 |
2 |
25 |
--------------------------------------------------------------------------------
/TV-Browser/free/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
Ways to donate will be available on the website of EPGdonate data: http://epgdonate.natsu-no-yuki.de
]]>").append(tvBrowser.getString(R.string.plugin_open_google_play)).append("
"); 20 | } 21 | } 22 | 23 | @Override 24 | void loadPlugin(final String url) { 25 | if (url.startsWith("http://play.google.com/store/apps/details?id=")) { 26 | try { 27 | tvBrowser.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url.replace("http://play.google.com/store/apps", "market:/")))); 28 | } catch (android.content.ActivityNotFoundException anfe) { 29 | tvBrowser.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url))); 30 | } 31 | } 32 | mLoadingPlugin = false; 33 | } 34 | 35 | @Override 36 | void cleanup() { 37 | } 38 | 39 | @Override 40 | boolean pluginSupported(PluginDefinition news) { 41 | return news.isOnGooglePlay(); 42 | } 43 | 44 | @Override 45 | boolean onActivityResult(int requestCode, int resultCode, Intent data) { 46 | return false; 47 | } 48 | } -------------------------------------------------------------------------------- /TV-Browser/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ds10git/tvbrowserandroid/1697f24f4cb40527d6558098f48dc6242be82126/TV-Browser/ic_launcher-web.png -------------------------------------------------------------------------------- /TV-Browser/proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | 22 | -dontwarn androidx.work.** 23 | -keep class !android.support.v7.internal.view.menu.**,** {*;} 24 | -keepattributes *,LineNumberTable 25 | 26 | #-keep public class android.support.v7.widget.** { *; } 27 | #-keep public class android.support.v7.internal.widget.** { *; } 28 | #-keep public class android.support.v7.internal.view.menu.** { *; } 29 | 30 | #-keep public class * extends android.support.v4.view.ActionProvider { 31 | # public29 | * @param channel The channel for the order number; 30 | * @param orderNumber The order number of the channel or -1 for no order. 31 | */ 32 | public ChannelOrdered(final Channel channel, final int orderNumber) { 33 | mChannel = channel; 34 | mOrderNumber = orderNumber; 35 | } 36 | 37 | /** 38 | * Gets the channel of this class. 39 | *
40 | * @return The channel of this class. 41 | */ 42 | public Channel getChannel() { 43 | return mChannel; 44 | } 45 | 46 | /** 47 | * Gets the order number of this classes channel. 48 | *
49 | * @return The order number of this classes channel or -1 if channel has no order number. 50 | */ 51 | public int getOrderNumber() { 52 | return mOrderNumber; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/devplugin/PluginMenu.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin Interface for TV-Browser for Android 3 | * Copyright (c) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 7 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, 8 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all copies or substantial 12 | * portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 15 | * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 16 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 18 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | package org.tvbrowser.devplugin; 21 | 22 | parcelable PluginMenu; -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/devplugin/Program.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin Interface for TV-Browser for Android 3 | * Copyright (c) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 7 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, 8 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all copies or substantial 12 | * portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 15 | * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 16 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 18 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | package org.tvbrowser.devplugin; 21 | 22 | parcelable Program; -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/devplugin/ProgramOrdered.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin Interface for TV-Browser for Android 3 | * Copyright (c) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 7 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, 8 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all copies or substantial 12 | * portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 15 | * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 16 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 18 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | package org.tvbrowser.devplugin; 21 | 22 | public final class ProgramOrdered { 23 | private final Program mProgram; 24 | private final ChannelOrdered mChannel; 25 | 26 | public ProgramOrdered(final Program program, final ChannelOrdered channel) { 27 | mProgram = program; 28 | mChannel = channel; 29 | } 30 | 31 | public ChannelOrdered getChannel() { 32 | return mChannel; 33 | } 34 | 35 | public Program getProgram() { 36 | return mProgram; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/devplugin/ReceiveTarget.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin Interface for TV-Browser for Android 3 | * Copyright (c) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 7 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, 8 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all copies or substantial 12 | * portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 15 | * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 16 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 18 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | package org.tvbrowser.devplugin; 21 | 22 | parcelable ReceiveTarget; -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/devplugin/TvBrowserSettings.aidl: -------------------------------------------------------------------------------- 1 | /* 2 | * Plugin Interface for TV-Browser for Android 3 | * Copyright (c) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to deal in the Software without restriction, 7 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, 8 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 9 | * furnished to do so, subject to the following conditions: 10 | * 11 | * The above copyright notice and this permission notice shall be included in all copies or substantial 12 | * portions of the Software. 13 | * 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT 15 | * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 16 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 17 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 18 | * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | */ 20 | package org.tvbrowser.devplugin; 21 | 22 | parcelable TvBrowserSettings; -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/devplugin/license-info.txt: -------------------------------------------------------------------------------- 1 | The license of TV-Browser for Android doesn't apply for all files in this folder. 2 | Only the license stated in the head comment of the files applies to these files. -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/filter/CategoryFilter.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.filter; 2 | 3 | public interface CategoryFilter { 4 | int[] getCategoryIndices(); 5 | String getName(); 6 | String getOperation(); 7 | void setFilterValues(String name, String operation, int[] categoryIndices); 8 | } -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/filter/ChannelFilter.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.filter; 2 | 3 | public interface ChannelFilter { 4 | int[] getFilteredChannelIds(); 5 | String getName(); 6 | void setFilterValues(String name, int[] filteredChannelIds); 7 | } 8 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/filter/CursorFilter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2013 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.filter; 18 | 19 | import android.database.Cursor; 20 | 21 | interface CursorFilter { 22 | boolean accept(Cursor cursor); 23 | } 24 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/filter/FilterValuesKeyword.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.filter; 2 | 3 | import org.tvbrowser.tvbrowser.WhereClause; 4 | import org.tvbrowser.utils.UiUtils; 5 | 6 | import android.content.Context; 7 | import android.view.ViewGroup; 8 | 9 | public class FilterValuesKeyword extends FilterValues implements KeywordFilter { 10 | private String mKeyword; 11 | private String mColumn; 12 | 13 | FilterValuesKeyword() { 14 | this("",""); 15 | } 16 | 17 | FilterValuesKeyword(String name, String values) { 18 | super(name); 19 | 20 | final String[] parts = values.split(";"); 21 | 22 | if(parts.length == 2) { 23 | mKeyword = parts[0]; 24 | mColumn = parts[1]; 25 | } 26 | else { 27 | mKeyword = ""; 28 | mColumn = ""; 29 | } 30 | } 31 | 32 | public FilterValuesKeyword(String name, String keyword, String column) { 33 | super(name); 34 | mKeyword = keyword; 35 | mColumn = column; 36 | } 37 | 38 | @Override 39 | public String getColumn() { 40 | return mColumn; 41 | } 42 | 43 | @Override 44 | public String getKeyword() { 45 | return mKeyword; 46 | } 47 | 48 | @Override 49 | public void setFilterValues(String name, String keyword, String column) { 50 | if(name != null && keyword != null && mColumn != null) { 51 | mName = name; 52 | mKeyword = keyword; 53 | mColumn = column; 54 | 55 | if(mCallback != null) { 56 | mCallback.run(); 57 | } 58 | 59 | mCallback = null; 60 | } 61 | } 62 | 63 | @Override 64 | public WhereClause getWhereClause(Context context) { 65 | 66 | return new WhereClause(" " + " AND ( " + mColumn + " LIKE \"%" + mKeyword.replaceAll("\\s+OR\\s+", "%\" OR " + mColumn + " LIKE \"%").replaceAll("\\s+AND\\s+", "%\" AND " + mColumn + " LIKE \"%") + "%\" ) ", null); 67 | } 68 | 69 | @Override 70 | protected String getSaveString() { 71 | return mKeyword+";"+mColumn; 72 | } 73 | 74 | private Runnable mCallback; 75 | 76 | @Override 77 | public void edit(Context context, Runnable callback, ViewGroup parent) { 78 | mCallback = callback; 79 | 80 | UiUtils.showKeywordSelection(context, this, parent, null); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/filter/KeywordFilter.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.filter; 2 | 3 | public interface KeywordFilter { 4 | String getColumn(); 5 | String getKeyword(); 6 | String getName(); 7 | void setFilterValues(String name, String keyword, String column); 8 | } 9 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/BroadcastReceiverReminderToggle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2018 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | import org.tvbrowser.settings.SettingConstants; 20 | import org.tvbrowser.utils.UiUtils; 21 | 22 | import android.content.BroadcastReceiver; 23 | import android.content.Context; 24 | import android.content.Intent; 25 | import android.util.Log; 26 | 27 | public class BroadcastReceiverReminderToggle extends BroadcastReceiver { 28 | public BroadcastReceiverReminderToggle() { 29 | } 30 | 31 | @Override 32 | public void onReceive(Context context, Intent intent) { 33 | Log.d("info8", "onReceive"); 34 | 35 | SettingConstants.setReminderPaused(context, !SettingConstants.isReminderPaused(context)); 36 | UiUtils.updateToggleReminderStateWidget(context); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/DateSelection.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | import org.tvbrowser.utils.UiUtils; 20 | 21 | import android.content.Context; 22 | 23 | import androidx.annotation.NonNull; 24 | 25 | class DateSelection { 26 | public static final int VALUE_DATE_ALL = -1; 27 | public static final int VALUE_DATE_TODAY_TOMORROW = -2; 28 | 29 | private final long mTime; 30 | private final Context mContext; 31 | 32 | public DateSelection(long time, Context context) { 33 | mTime = time; 34 | mContext = context; 35 | } 36 | 37 | @NonNull 38 | @Override 39 | public String toString() { 40 | if(mTime >= 0) { 41 | return UiUtils.formatDate(mTime, mContext, false, true); 42 | } 43 | else if(mTime == VALUE_DATE_TODAY_TOMORROW) { 44 | return mContext.getResources().getString(R.string.selection_date_today_tomorrow); 45 | } 46 | 47 | return mContext.getResources().getString(R.string.all_data); 48 | } 49 | 50 | public long getTime() { 51 | return mTime; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/DonationRatingHelper.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.tvbrowser; 2 | 3 | import android.content.Intent; 4 | import android.net.Uri; 5 | import android.preference.PreferenceManager; 6 | import androidx.appcompat.app.AlertDialog; 7 | import android.view.View; 8 | import android.widget.Button; 9 | import android.widget.TextView; 10 | 11 | import org.tvbrowser.settings.SettingConstants; 12 | 13 | import java.util.Calendar; 14 | 15 | abstract class DonationRatingHelper { 16 | 17 | final TvBrowser tvBrowser; 18 | 19 | DonationRatingHelper(final TvBrowser tvBrowser) { 20 | this.tvBrowser = tvBrowser; 21 | } 22 | 23 | abstract void handleExpiredVersion(final Calendar calendar); 24 | abstract boolean onActivityResult(int requestCode, int resultCode, Intent data); 25 | abstract void onDestroy(); 26 | abstract void prepareInAppPayment(); 27 | abstract boolean showDonationMenuItem(); 28 | abstract void showRatingAndDonationInfo(); 29 | abstract boolean isToShowWebDonation(); 30 | 31 | void showDonationInfo() { 32 | AlertDialog.Builder alert = new AlertDialog.Builder(tvBrowser); 33 | alert.setTitle(R.string.donation); 34 | 35 | View view = tvBrowser.getLayoutInflater().inflate(R.layout.dialog_donations, tvBrowser.getParentViewGroup(), false); 36 | alert.setView(view); 37 | 38 | TextView webInfo = view.findViewById(R.id.donation_show_ways); 39 | Button openWeb = view.findViewById(R.id.donation_website_button); 40 | 41 | if(!isToShowWebDonation()) { 42 | webInfo.setVisibility(View.GONE); 43 | openWeb.setVisibility(View.GONE); 44 | } 45 | 46 | alert.setNegativeButton(tvBrowser.getString(R.string.not_now).replace("{0}", ""), (dialog, which) -> { 47 | }); 48 | 49 | final AlertDialog d = alert.create(); 50 | 51 | Button inAppDonation = view.findViewById(R.id.donation_in_app_button); 52 | if (inAppDonation!=null) { 53 | inAppDonation.setOnClickListener(v -> { 54 | d.dismiss(); 55 | prepareInAppPayment(); 56 | }); 57 | } 58 | 59 | openWeb.setOnClickListener(v -> { 60 | d.dismiss(); 61 | 62 | tvBrowser.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(SettingConstants.URL_SYNC_BASE + "index.php?id=donations"))); 63 | }); 64 | 65 | tvBrowser.showAlertDialog(d); 66 | } 67 | 68 | protected void setRatingAndDonationInfoShown() { 69 | PreferenceManager.getDefaultSharedPreferences(tvBrowser.getApplicationContext()).edit().putBoolean(tvBrowser.getString(R.string.PREF_RATING_DONATION_INFO_SHOWN), true).apply(); 70 | } 71 | } -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/MarkingsUpdateListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2018 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | public interface MarkingsUpdateListener { 20 | void refreshMarkings(); 21 | } 22 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/SDCardStateChangeListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2015 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | import org.tvbrowser.settings.SettingConstants; 20 | import org.tvbrowser.utils.UiUtils; 21 | 22 | import android.content.BroadcastReceiver; 23 | import android.content.Context; 24 | import android.content.Intent; 25 | import androidx.localbroadcastmanager.content.LocalBroadcastManager; 26 | import android.util.Log; 27 | 28 | public class SDCardStateChangeListener extends BroadcastReceiver { 29 | @Override 30 | public void onReceive(Context context, Intent intent) { 31 | Log.d("info2", "SDCardStateChangeListener " + intent); 32 | LocalBroadcastManager.getInstance(context).sendBroadcast(new Intent(SettingConstants.REFRESH_VIEWS)); 33 | 34 | if(intent != null && intent.getAction().equals(Intent.ACTION_MEDIA_MOUNTED)) { 35 | SettingConstants.initializeLogoMap(context.getApplicationContext(), true); 36 | } 37 | 38 | UiUtils.reloadWidgets(context.getApplicationContext()); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/ShowChannelInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | interface ShowChannelInterface { 20 | boolean showChannel(); 21 | } 22 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/ShowDateInterface.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | interface ShowDateInterface { 20 | boolean showDate(); 21 | } 22 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/SimpleGroupInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2013-2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | final class SimpleGroupInfo { 20 | public final String mDataServiceID; 21 | public final String mGroupID; 22 | 23 | public SimpleGroupInfo(String dataServiceID, String groupID) { 24 | mDataServiceID = dataServiceID; 25 | mGroupID = groupID; 26 | } 27 | } -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/SortDropListener.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.tvbrowser; 2 | 3 | public interface SortDropListener { 4 | void dropped(int originalPosition, int position); 5 | } 6 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/SortInterface.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.tvbrowser; 2 | 3 | public interface SortInterface { 4 | void setSortNumber(int value); 5 | int getSortNumber(); 6 | String getName(); 7 | } 8 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/tvbrowser/WhereClause.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2015 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.tvbrowser; 18 | 19 | /** 20 | * A class that stores the selection and selection arguments for a SQL query. 21 | * 22 | * @author René Mach 23 | */ 24 | public class WhereClause { 25 | private final String mWhere; 26 | private final String[] mSelectionArgs; 27 | 28 | public WhereClause() { 29 | this(null,null); 30 | } 31 | 32 | public WhereClause(String where, String[] selectionArgs) { 33 | mWhere = where; 34 | mSelectionArgs = selectionArgs; 35 | } 36 | 37 | public String getWhere() { 38 | return mWhere; 39 | } 40 | 41 | public String[] getSelectionArgs() { 42 | return mSelectionArgs; 43 | } 44 | } -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/utils/LogUtils.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.utils; 2 | 3 | import java.util.Date; 4 | 5 | import org.tvbrowser.content.TvBrowserContentProvider; 6 | 7 | import android.content.Context; 8 | import android.database.Cursor; 9 | import android.util.Log; 10 | 11 | class LogUtils { 12 | public static void logProgramData(Context context, String selection, String column) { 13 | final Cursor c = context.getContentResolver().query(TvBrowserContentProvider.CONTENT_URI_DATA, null, selection, null, TvBrowserContentProvider.DATA_KEY_STARTTIME); 14 | 15 | try { 16 | if(IOUtils.prepareAccess(c)) { 17 | final int titleIndex = c.getColumnIndex(TvBrowserContentProvider.DATA_KEY_TITLE); 18 | final int startIndex = c.getColumnIndex(TvBrowserContentProvider.DATA_KEY_STARTTIME); 19 | final int selectionIndex = c.getColumnIndex(column); 20 | 21 | while(c.moveToNext()) { 22 | Log.d("info12", ""+new Date(c.getLong(startIndex))+" " + c.getString(titleIndex) + " " + c.getInt(selectionIndex)); 23 | } 24 | } 25 | }finally { 26 | IOUtils.close(c); 27 | } 28 | } 29 | 30 | public static void printStackTrace() { 31 | StackTraceElement[] els = Thread.currentThread().getStackTrace(); 32 | 33 | for(StackTraceElement el : els) { 34 | Log.d("info12", " "+el.toString()); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/view/InfoPreference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.view; 18 | 19 | import android.content.Context; 20 | import android.preference.Preference; 21 | import android.util.AttributeSet; 22 | import android.view.View; 23 | import android.widget.TextView; 24 | 25 | public class InfoPreference extends Preference { 26 | public InfoPreference(Context context) { 27 | super(context); 28 | } 29 | 30 | public InfoPreference(Context context, AttributeSet attrs) { 31 | super(context, attrs); 32 | } 33 | 34 | public InfoPreference(Context context, AttributeSet attrs, int defStyleAttr) { 35 | super(context, attrs, defStyleAttr); 36 | } 37 | 38 | @Override 39 | protected void onBindView(View view) { 40 | super.onBindView(view); 41 | 42 | TextView summaryView = view.findViewById(android.R.id.summary); 43 | summaryView.setMaxLines(Integer.MAX_VALUE); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/view/InfoPreferenceCompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2014 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.view; 18 | 19 | import android.content.Context; 20 | import android.util.AttributeSet; 21 | import android.widget.TextView; 22 | 23 | import androidx.preference.Preference; 24 | import androidx.preference.PreferenceViewHolder; 25 | 26 | public class InfoPreferenceCompat extends Preference { 27 | public InfoPreferenceCompat(Context context) { 28 | super(context); 29 | } 30 | 31 | public InfoPreferenceCompat(Context context, AttributeSet attrs) { 32 | super(context, attrs); 33 | } 34 | 35 | public InfoPreferenceCompat(Context context, AttributeSet attrs, int defStyleAttr) { 36 | super(context, attrs, defStyleAttr); 37 | } 38 | 39 | @Override 40 | public void onBindViewHolder(PreferenceViewHolder holder) { 41 | super.onBindViewHolder(holder); 42 | 43 | TextView summaryView = (TextView)holder.findViewById(android.R.id.summary); 44 | summaryView.setMaxLines(Integer.MAX_VALUE); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/view/PreferenceNotificationChannel.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.view; 2 | 3 | import android.annotation.TargetApi; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Build; 7 | import android.preference.Preference; 8 | import android.provider.Settings; 9 | import android.util.AttributeSet; 10 | import android.view.View; 11 | import android.widget.TextView; 12 | 13 | import org.tvbrowser.App; 14 | 15 | public class PreferenceNotificationChannel extends Preference implements Preference.OnPreferenceClickListener { 16 | private int mTypeId; 17 | 18 | @SuppressWarnings("unused") 19 | public PreferenceNotificationChannel(Context context) { 20 | super(context); 21 | } 22 | 23 | @SuppressWarnings("unused") 24 | public PreferenceNotificationChannel(Context context, AttributeSet attrs) { 25 | super(context, attrs); 26 | } 27 | 28 | @SuppressWarnings("unused") 29 | public PreferenceNotificationChannel(Context context, AttributeSet attrs, int defStyleAttr) { 30 | super(context, attrs, defStyleAttr); 31 | } 32 | 33 | @Override 34 | protected void onBindView(View view) { 35 | super.onBindView(view); 36 | 37 | mTypeId = Integer.parseInt(getSummary().toString()); 38 | 39 | TextView summaryView = view.findViewById(android.R.id.summary); 40 | summaryView.setVisibility(View.GONE); 41 | } 42 | 43 | @TargetApi(Build.VERSION_CODES.O) 44 | @Override 45 | public boolean onPreferenceClick(Preference preference) { 46 | Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS) 47 | .putExtra(Settings.EXTRA_APP_PACKAGE, getContext().getPackageName()) 48 | .putExtra(Settings.EXTRA_CHANNEL_ID, App.get().getNotificationChannelId(mTypeId)); 49 | intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 50 | getContext().startActivity(intent); 51 | 52 | return false; 53 | } 54 | } -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/view/SpinnerUncompat.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TV-Browser for Android 3 | * Copyright (C) 2018 René Mach (rene@tvbrowser.org) 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software 6 | * and associated documentation files (the "Software"), to use, copy, modify or merge the Software, 7 | * furthermore to publish and distribute the Software free of charge without modifications and to 8 | * permit persons to whom the Software is furnished to do so, subject to the following conditions: 9 | * 10 | * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 11 | * 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 13 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 14 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 15 | * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 16 | */ 17 | package org.tvbrowser.view; 18 | 19 | import android.annotation.SuppressLint; 20 | import android.annotation.TargetApi; 21 | import android.content.Context; 22 | import android.os.Build; 23 | import android.util.AttributeSet; 24 | import android.widget.Spinner; 25 | 26 | /** 27 | * Stupid workaround class for AppCompatSpinner issues on APIs since 21 28 | * 29 | * Prevents Spinner being replaced with AppCompatSpinner 30 | * in xml layout file, to use Spinner provided by API. 31 | */ 32 | @SuppressLint("AppCompatCustomView") 33 | public class SpinnerUncompat extends Spinner { 34 | public SpinnerUncompat(Context context) { 35 | super(context); 36 | } 37 | 38 | public SpinnerUncompat(Context context, AttributeSet attrs) { 39 | super(context, attrs); 40 | } 41 | 42 | public SpinnerUncompat(Context context, AttributeSet attrs, int defStyleAttr) { 43 | super(context, attrs, defStyleAttr); 44 | } 45 | 46 | public SpinnerUncompat(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { 47 | super(context, attrs, defStyleAttr, defStyleRes); 48 | } 49 | 50 | @TargetApi(Build.VERSION_CODES.LOLLIPOP) 51 | public SpinnerUncompat(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes, int mode) { 52 | super(context, attrs, defStyleAttr, defStyleRes, mode); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/view/SwipeScrollView.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.view; 2 | 3 | import android.content.Context; 4 | import android.util.AttributeSet; 5 | import android.view.MotionEvent; 6 | import android.widget.ScrollView; 7 | 8 | public class SwipeScrollView extends ScrollView { 9 | private static final int SWIPE_NONE = -1; 10 | private static final int SWIPE_LEFT = 0; 11 | private static final int SWIPE_RIGHT = 1; 12 | 13 | private static final int MIN_DISTANCE = 200; 14 | private float mXStart = 0; 15 | private float mYStart = 0; 16 | 17 | private int mSwipe = SWIPE_NONE; 18 | 19 | public SwipeScrollView(Context context) { 20 | super(context); 21 | } 22 | 23 | public SwipeScrollView(Context context, AttributeSet attrs) { 24 | super(context, attrs); 25 | } 26 | 27 | public SwipeScrollView(Context context, AttributeSet attrs, int defStyleAttr) { 28 | super(context, attrs, defStyleAttr); 29 | } 30 | 31 | @Override 32 | public boolean onInterceptTouchEvent(MotionEvent ev) { 33 | boolean intercept = false; 34 | boolean inRange = false; 35 | 36 | if(ev.getAction() == MotionEvent.ACTION_DOWN) { 37 | mSwipe = SWIPE_NONE; 38 | mXStart = ev.getX(); 39 | mYStart = ev.getY(); 40 | } 41 | else if(ev.getAction() == MotionEvent.ACTION_UP || ev.getAction() == MotionEvent.ACTION_MOVE) { 42 | if(Math.abs(ev.getY()-mYStart) < MIN_DISTANCE/4) { 43 | inRange = true; 44 | } 45 | if(Math.abs(ev.getX()-mXStart) > MIN_DISTANCE) { 46 | intercept = true; 47 | 48 | if(ev.getX()-mXStart < 0) { 49 | mSwipe = SWIPE_LEFT; 50 | } 51 | else { 52 | mSwipe = SWIPE_RIGHT; 53 | } 54 | } 55 | } 56 | 57 | if(!intercept && !inRange) { 58 | intercept = super.onInterceptTouchEvent(ev); 59 | } 60 | 61 | return intercept; 62 | } 63 | 64 | public boolean isSwipeLeft() { 65 | return mSwipe == SWIPE_LEFT; 66 | } 67 | 68 | public boolean isSwipeRight() { 69 | return mSwipe == SWIPE_RIGHT; 70 | } 71 | 72 | public void resetSwipe() { 73 | mSwipe = SWIPE_NONE; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /TV-Browser/src/org/tvbrowser/widgets/WidgetToggleReminderState.java: -------------------------------------------------------------------------------- 1 | package org.tvbrowser.widgets; 2 | 3 | import org.tvbrowser.settings.SettingConstants; 4 | import org.tvbrowser.tvbrowser.BroadcastReceiverReminderToggle; 5 | import org.tvbrowser.tvbrowser.R; 6 | 7 | import android.app.PendingIntent; 8 | import android.appwidget.AppWidgetManager; 9 | import android.appwidget.AppWidgetProvider; 10 | import android.content.Context; 11 | import android.content.Intent; 12 | import android.graphics.Color; 13 | import android.widget.RemoteViews; 14 | 15 | public class WidgetToggleReminderState extends AppWidgetProvider { 16 | @Override 17 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, 18 | int[] appWidgetIds) { 19 | // There may be multiple widgets active, so update all of them 20 | for (int appWidgetId : appWidgetIds) { 21 | updateAppWidget(context, appWidgetManager, appWidgetId); 22 | } 23 | } 24 | 25 | public static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId) { 26 | 27 | // Construct the RemoteViews object 28 | RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_toggle_reminder_state); 29 | 30 | if(SettingConstants.isReminderPaused(context)) { 31 | views.setInt(R.id.widget_toggle_reminder_state_button, "setBackgroundColor", Color.argb(128, 200, 0, 0)); 32 | views.setImageViewResource(R.id.widget_toggle_reminder_state_button, R.drawable.ic_stat_reminder_halted); 33 | } 34 | else { 35 | views.setInt(R.id.widget_toggle_reminder_state_button, "setBackgroundColor", Color.argb(128, 0, 200, 0)); 36 | views.setImageViewResource(R.id.widget_toggle_reminder_state_button, R.drawable.ic_stat_reminder); 37 | } 38 | 39 | Intent intentClick = new Intent(context,BroadcastReceiverReminderToggle.class); 40 | 41 | PendingIntent startService = PendingIntent.getBroadcast(context, appWidgetId, intentClick, PendingIntent.FLAG_UPDATE_CURRENT); 42 | views.setOnClickPendingIntent(R.id.widget_toggle_reminder_state_button, startService); 43 | 44 | // Instruct the widget manager to update the widget 45 | appWidgetManager.updateAppWidget(appWidgetId, views); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | mavenLocal() 6 | jcenter() 7 | google() 8 | } 9 | dependencies { 10 | classpath 'com.android.tools.build:gradle:3.4.2' 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | mavenLocal() 17 | jcenter() 18 | google() 19 | } 20 | gradle.projectsEvaluated { 21 | tasks.withType(JavaCompile) { 22 | options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # https://docs.gradle.org/current/userguide/build_environment.html 2 | org.gradle.jvmargs=-Xmx1024m 3 | 4 | android.enableD8=true 5 | android.enableR8=true 6 | android.enableJetifier=true 7 | android.useAndroidX=true 8 | 9 | # https://docs.gradle.org/5.1.1/userguide/build_environment.html#sec:gradle_configuration_properties 10 | #org.gradle.caching=true 11 | #org.gradle.configureondemand=true 12 | #org.gradle.parallel=true 13 | #org.gradle.warning.mode=all 14 | 15 | AndroidProject.signing=../../AndroidSecurity/tvbrowserandroidproject.properties -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ds10git/tvbrowserandroid/1697f24f4cb40527d6558098f48dc6242be82126/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Aug 19 15:13:40 CEST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS="-Xmx64m" 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':TV-Browser' --------------------------------------------------------------------------------