Skip to content

Service Intent Builder

Roman Tcaregorodtcev edited this page Apr 2, 2018 · 1 revision

Create intent to start service. Just add service class name to constructor and you could start service.

OmegaIntentBuilder.from(this)
                .service(TestService.class)
                .startService();

Also you can put data to extras.

OmegaIntentBuilder.from(this)
                .service(TestService.class)
                .putExtra("Your_key", Integer.MAX_VALUE)
                .putExtra("Your_key2", Integer.MIN_VALUE)
                .startService();