Skip to content

Overview of Android SDK

Here you can read an overview over how to the android-sdk is structured and used.


This is the core of the sdk, here you can find content providers, Overbliq-services models, request handlers, different services and utils.

Content providers

A content-provider is a simple class to get json responses from Overbliq-services parsed to objects to use in the application.
All content-providers must be run in a background thread by using an AsyncTask or equivalent, but it is recommended to use a GenericLoader which is a Service in the OverbliqTools library (the genericloader has error handling and uses a thread pool for requests, it also reports to a asynctask manager for better overview).
Example för GenericLoader:

GenericLoader<Schedule, String> ( "Get schedule task", {
    // background thread 
    scheduleProvider.getSchedule( scheduleId )
}, {
    // main thread
    // do something with your schedule
onFail = { 
    msg, _ -> Log.e(TAG, msg) 


Here is a list of services in the OverbliqTools library

  • GenericLoader: Use to du background tasks such as downloading content from Overbliq-Services. Example found above
  • OverbliqFactory: Contains references to all providers in the library and works like a global dependency tool.
    OverbliqFactory example: OverbliqFactory.getInstance(application).beaconProvier().all

Example: How it fit together

To use the providers with services is explained in the following example.

// Get provider from overbliqfactory. You can also use getInstanceOrNull() to get an optional<OverbliqFactory>   
// if you dont have access to an application at the moment, but the first call to the overbliqfacotyr must be with  
// an application, otherwise it cannot create the instance.
val scheduleProvider = OverbliqFactory.getInstance(application).scheduleProdvider

// Create a new GenericLoader and execute it
GenericLoader<Schedule, String> ( "Get schedule task", {
    // Here in background thread use the provider to return i schedule in this case  
    scheduleProvider.getSchedule( scheduleId )
}, { schedule -> 
    // do something with your schedule 
    // For example if you also have access to the android-widgets library (android-widgets depends on OverbliqTools, so only needed to include one or the other)
    // You can instance a new ScheduleView to include somewere
         FetchFilteredScheduleView(context, schedule = schedule)
onFail = { msg, _ ->
    // Handle error message that may occer 
    Log.e(TAG, msg) 

Android widgets

This package can be used as a complete application see Getting started
Or you can use parts of it. Following sections contains all the parts of the android-widgets package.



An activity that reacts to actiontargets sent by the application.
Can be extended.


This is the MainActivity of a generic overbliq application, it extends ActionTargetHandlingActivity.


This is an extension to OverbliqMainActivity which provides beaconsupport, it sends actiontargets depending on nearby beacons.


The generic splash screen used in OverbliqMainActivity to load all necessary start content for the activity to work this activity can be replaced in the OverbliqApplication class.


This is an other splash screen with similar properties as GenericSplash, but it can show an ad for a defined amount of time. To use this activity as instead of GenericSplash in OverbliqMainActivity use following line in OverbliqApplication.

    var splashClass: KClass<out AppCompatActivity> = GenericAdSplash::class


Use newInstance static method on the fragments to make instance.


An abstract class which contains an actiontarget and a title, this fragment is the base fragment for all other fragments that comes from a actiontarget intent.


Extends TitledFragment.
This Fragment is a helper if you want to wrap i view inside a fragment. Use if you need an Overbliq-View and can only use fragments in your current context, example viewpager.


Extends TitledFragment.
This is the most important fragment in the overbliq-android-sdk. It takes a componentPage and uses formats from

    var typeMap : HashMap<Component.Type, HashMap<String, AbstractFormat>>

in OverbliqApplication to make a componentPage view.
To add own formats add AbstractFormat implementation to namespace se.overbliq.lib.componentFormats.
Soon you should be able to add own ComponentModule as well (Not implemented yet). Example on ComponentModule is FavouriteModule.


Extends TitledFragment.
Displays a list of ViewHolders in a ViewGroup (Not recycling).
Use for menu where all links is visible and dont need recycling. Example is bottom menu in Overbliq default application.


Extends TitledFragment.
A fragment to display web content from an ActionTarget where target is an url.


Extends TitledFragment.
This fragment is to display all insights in a google map view.
This is a complex fragment which is easiest managed with MapManager.


Extends TitledFragment. Use to display a Carousel image view with actionTargetHolders.


Extends TitledFragment.
Display your pej orders, only used if pej integration is enabled in appConfig.xml

    <bool name="pejEnabled">true</bool>
    <string name="pejUrl" translatable="false"></string>
    <string name="pejSchemeForManifest" translatable="false">example</string>


Overbliq-Views is generic views for all model objects in Overbliq-services. All views recourse files can be overwritten in each application-project if you have all the necessary ids for the views. All views should be able to use in xml layout file if provided with correct data


View for form.


View for a schedule or a list of events. The view displays all provided events and a filter function to only display events with a specific tag.


View for a schedule or a list of events. The view is to display all provided events in a horizontal recycler view with two events on each row.


Generic view for a ActionTargetHolder. Sends ActionTarget when clicked on.


A view to display a list of ActionTargetHolders in a mosaic like pattern (Can be overwritten).


A view to display a list of ActionTargetHolders in a RecyclerView.


An imageView that can download image from an url.


A debug page for developers and tester to verify app version.


A simple sound controller view, that can play sounds from an url.


Is a extension to Android-widgets that lets you extend the provided openbackApplication to get push notifications to work in your application.
Just extend the openbackApplication and overwrite following with the openback id.

    <string name="openBackId"> </string>