Class HeadConfig
-
- All Implemented Interfaces:
public abstract class HeadConfigModule configuration, enable and modify the behaviour of some features.
To use this class you need to create a new class and extend HeadConfig or use a kotlin object, then modify the required variables in init.
<b>Sample usage</b>
object: HeadConfig() { init { isRecentsAvailable = true isSearchAvailable = true ... } }
-
-
Field Summary
Fields Modifier and Type Field Description private BooleanisRecentsAvailableprivate BooleanisDirectoryAvailableprivate BooleanisSearchAvailableprivate BooleanisSearchSuggestionsAvailableprivate BooleanisCalendarEnabledprivate BooleanisNotifyRecentsEnabledprivate BooleanisSensitiveContentprivate BooleanisCastEnabledprivate ReviewConfigreviewConfigprivate StringsearchBarTextprivate List<VideoDecoder>customDecodersprivate BypassBehaviorbypassBehaviorprivate Analytics.SettingsanalyticsSettingsprivate DirectoryModel.OrientationdirectoryOrientationprivate SettingPagesettingsPage
-
Constructor Summary
Constructors Constructor Description HeadConfig()
-
Method Summary
Modifier and Type Method Description final BooleanisRecentsAvailable()Enable the recents feature, this will call HeadRepository. final UnitsetRecentsAvailable(Boolean isRecentsAvailable)Enable the recents feature, this will call HeadRepository. final BooleanisDirectoryAvailable()Enable the directory section, this will call HeadRepository. final UnitsetDirectoryAvailable(Boolean isDirectoryAvailable)Enable the directory section, this will call HeadRepository. final BooleanisSearchAvailable()Enable the search feature, this will call HeadRepository. final UnitsetSearchAvailable(Boolean isSearchAvailable)Enable the search feature, this will call HeadRepository. final BooleanisSearchSuggestionsAvailable()Enable custom suggestions for the search feature, this will call HeadRepository.searchSuggestions every time an user writes a new query. final UnitsetSearchSuggestionsAvailable(Boolean isSearchSuggestionsAvailable)Enable custom suggestions for the search feature, this will call HeadRepository.searchSuggestions every time an user writes a new query. final BooleanisCalendarEnabled()Enable the calendar feature, this will call HeadRepository. final UnitsetCalendarEnabled(Boolean isCalendarEnabled)Enable the calendar feature, this will call HeadRepository. final BooleanisNotifyRecentsEnabled()Enable recents notifications feature, if enabled the main app will call HeadRepository.lastRecents periodically in order to get the latest recents. final UnitsetNotifyRecentsEnabled(Boolean isNotifyRecentsEnabled)Enable recents notifications feature, if enabled the main app will call HeadRepository.lastRecents periodically in order to get the latest recents. final BooleanisSensitiveContent()Hide the history of this module final UnitsetSensitiveContent(Boolean isSensitiveContent)Hide the history of this module final BooleanisCastEnabled()Enable cast feature if your module uses direct video links. final UnitsetCastEnabled(Boolean isCastEnabled)Enable cast feature if your module uses direct video links. final ReviewConfiggetReviewConfig()Enable the review feature in the information page, you can decide to request a star based review, a written review, or both. final UnitsetReviewConfig(ReviewConfig reviewConfig)Enable the review feature in the information page, you can decide to request a star based review, a written review, or both. final StringgetSearchBarText()Set a custom message for the search bar, by default the Module name is used. final UnitsetSearchBarText(String searchBarText)Set a custom message for the search bar, by default the Module name is used. final List<VideoDecoder>getCustomDecoders()Declare custom video decoders, the Main app already supports: Fembed
GDrive
GoUnlimited
Mixdrop
Mp4Upload
MStream
SBVideo
StreamTape
Upstream
VideosSH
Vudeo
YourUpload
ZippyShare
final UnitsetCustomDecoders(List<VideoDecoder> customDecoders)Declare custom video decoders, the Main app already supports: Fembed
GDrive
GoUnlimited
Mixdrop
Mp4Upload
MStream
SBVideo
StreamTape
Upstream
VideosSH
Vudeo
YourUpload
ZippyShare
final BypassBehaviorgetBypassBehavior()Change the behavior and look of the Cloudflare bypass system, default is BypassBehavior.Default. final UnitsetBypassBehavior(BypassBehavior bypassBehavior)Change the behavior and look of the Cloudflare bypass system, default is BypassBehavior.Default. final Analytics.SettingsgetAnalyticsSettings()Enable the recommended system, you can choose between collecting the whole information page or only the Tags. final UnitsetAnalyticsSettings(Analytics.Settings analyticsSettings)Enable the recommended system, you can choose between collecting the whole information page or only the Tags. final DirectoryModel.OrientationgetDirectoryOrientation()Specify if the directory style needs to be VERTICAL for portraits, or HORIZONTAL for videos. final UnitsetDirectoryOrientation(DirectoryModel.Orientation directoryOrientation)Specify if the directory style needs to be VERTICAL for portraits, or HORIZONTAL for videos. final SettingPagegetSettingsPage()Specify a list of custom settings, an icon will be visible for the user to enter this settings, this settings will persist in the Main app even if the Module is uninstalled. final UnitsetSettingsPage(SettingPage settingsPage)Specify a list of custom settings, an icon will be visible for the user to enter this settings, this settings will persist in the Main app even if the Module is uninstalled. -
-
Method Detail
-
isRecentsAvailable
final Boolean isRecentsAvailable()
Enable the recents feature, this will call HeadRepository.recentsPager in order to get the latest recents.
If isNotifyRecentsEnabled is enabled, the main app will check the recents periodically and will notify any new element.
-
setRecentsAvailable
final Unit setRecentsAvailable(Boolean isRecentsAvailable)
Enable the recents feature, this will call HeadRepository.recentsPager in order to get the latest recents.
If isNotifyRecentsEnabled is enabled, the main app will check the recents periodically and will notify any new element.
-
isDirectoryAvailable
final Boolean isDirectoryAvailable()
Enable the directory section, this will call HeadRepository.directoryPager when the user enters the directory section, this also could be called multiple times if HeadRepository.directoryFilters is used.
-
setDirectoryAvailable
final Unit setDirectoryAvailable(Boolean isDirectoryAvailable)
Enable the directory section, this will call HeadRepository.directoryPager when the user enters the directory section, this also could be called multiple times if HeadRepository.directoryFilters is used.
-
isSearchAvailable
final Boolean isSearchAvailable()
Enable the search feature, this will call HeadRepository.searchPager every time a user uses the search feature, this can also include custom filters using HeadRepository.searchFilters.
-
setSearchAvailable
final Unit setSearchAvailable(Boolean isSearchAvailable)
Enable the search feature, this will call HeadRepository.searchPager every time a user uses the search feature, this can also include custom filters using HeadRepository.searchFilters.
-
isSearchSuggestionsAvailable
final Boolean isSearchSuggestionsAvailable()
Enable custom suggestions for the search feature, this will call HeadRepository.searchSuggestions every time an user writes a new query.
-
setSearchSuggestionsAvailable
final Unit setSearchSuggestionsAvailable(Boolean isSearchSuggestionsAvailable)
Enable custom suggestions for the search feature, this will call HeadRepository.searchSuggestions every time an user writes a new query.
-
isCalendarEnabled
final Boolean isCalendarEnabled()
Enable the calendar feature, this will call HeadRepository.calendarList when the main app loads the "Today" section in Home, this also will be called when the user enters the Calendar Activity.
Enable this only if your data source supports a daily release system.
-
setCalendarEnabled
final Unit setCalendarEnabled(Boolean isCalendarEnabled)
Enable the calendar feature, this will call HeadRepository.calendarList when the main app loads the "Today" section in Home, this also will be called when the user enters the Calendar Activity.
Enable this only if your data source supports a daily release system.
-
isNotifyRecentsEnabled
final Boolean isNotifyRecentsEnabled()
Enable recents notifications feature, if enabled the main app will call HeadRepository.lastRecents periodically in order to get the latest recents.
isRecentsAvailable needs to be enabled as well.
-
setNotifyRecentsEnabled
final Unit setNotifyRecentsEnabled(Boolean isNotifyRecentsEnabled)
Enable recents notifications feature, if enabled the main app will call HeadRepository.lastRecents periodically in order to get the latest recents.
isRecentsAvailable needs to be enabled as well.
-
isSensitiveContent
final Boolean isSensitiveContent()
Hide the history of this module
-
setSensitiveContent
final Unit setSensitiveContent(Boolean isSensitiveContent)
Hide the history of this module
-
isCastEnabled
final Boolean isCastEnabled()
Enable cast feature if your module uses direct video links.
-
setCastEnabled
final Unit setCastEnabled(Boolean isCastEnabled)
Enable cast feature if your module uses direct video links.
-
getReviewConfig
final ReviewConfig getReviewConfig()
Enable the review feature in the information page, you can decide to request a star based review, a written review, or both.
-
setReviewConfig
final Unit setReviewConfig(ReviewConfig reviewConfig)
Enable the review feature in the information page, you can decide to request a star based review, a written review, or both.
-
getSearchBarText
final String getSearchBarText()
Set a custom message for the search bar, by default the Module name is used.
isSearchAvailable needs to be enabled.
-
setSearchBarText
final Unit setSearchBarText(String searchBarText)
Set a custom message for the search bar, by default the Module name is used.
isSearchAvailable needs to be enabled.
-
getCustomDecoders
final List<VideoDecoder> getCustomDecoders()
Declare custom video decoders, the Main app already supports:
Fembed
GDrive
GoUnlimited
Mixdrop
Mp4Upload
MStream
SBVideo
StreamTape
Upstream
VideosSH
Vudeo
YourUpload
ZippyShare
Direct video files needs to be specified in knf.hydra.core.models.data.SourceItem.needDecoder
-
setCustomDecoders
final Unit setCustomDecoders(List<VideoDecoder> customDecoders)
Declare custom video decoders, the Main app already supports:
Fembed
GDrive
GoUnlimited
Mixdrop
Mp4Upload
MStream
SBVideo
StreamTape
Upstream
VideosSH
Vudeo
YourUpload
ZippyShare
Direct video files needs to be specified in knf.hydra.core.models.data.SourceItem.needDecoder
-
getBypassBehavior
final BypassBehavior getBypassBehavior()
Change the behavior and look of the Cloudflare bypass system, default is BypassBehavior.Default.
You can disable the bypass for your module using BypassBehavior.Disabled.
-
setBypassBehavior
final Unit setBypassBehavior(BypassBehavior bypassBehavior)
Change the behavior and look of the Cloudflare bypass system, default is BypassBehavior.Default.
You can disable the bypass for your module using BypassBehavior.Disabled.
-
getAnalyticsSettings
final Analytics.Settings getAnalyticsSettings()
Enable the recommended system, you can choose between collecting the whole information page or only the Tags.
If enabled the Main app will call HeadRepository.analyticsRecommended with the list of Analytics.Event.
-
setAnalyticsSettings
final Unit setAnalyticsSettings(Analytics.Settings analyticsSettings)
Enable the recommended system, you can choose between collecting the whole information page or only the Tags.
If enabled the Main app will call HeadRepository.analyticsRecommended with the list of Analytics.Event.
-
getDirectoryOrientation
final DirectoryModel.Orientation getDirectoryOrientation()
Specify if the directory style needs to be VERTICAL for portraits, or HORIZONTAL for videos.
Default is VERTICAL.
-
setDirectoryOrientation
final Unit setDirectoryOrientation(DirectoryModel.Orientation directoryOrientation)
Specify if the directory style needs to be VERTICAL for portraits, or HORIZONTAL for videos.
Default is VERTICAL.
-
getSettingsPage
final SettingPage getSettingsPage()
Specify a list of custom settings, an icon will be visible for the user to enter this settings, this settings will persist in the Main app even if the Module is uninstalled.
You can access this preferences from ModulePreferences object.
-
setSettingsPage
final Unit setSettingsPage(SettingPage settingsPage)
Specify a list of custom settings, an icon will be visible for the user to enter this settings, this settings will persist in the Main app even if the Module is uninstalled.
You can access this preferences from ModulePreferences object.
-
-
-