-
Notifications
You must be signed in to change notification settings - Fork 0
Background Service
Efra Espada edited this page Jun 6, 2018
·
1 revision
Rotor Core works in background in order to receive updates or messages when application is on background or foreground. You must add RotorService to your AndroidManifest.xml
file:
<application>
<service
android:name="com.rotor.core.RotorService"
android:enabled="true"
android:exported="true" />
</application>
This service is controlled when the application is present and must be bind
or unbind
. Add in activities:
@Override
protected void onResume() {
super.onResume();
Rotor.onResume();
}
@Override
protected void onPause() {
Rotor.onPause();
super.onPause();
}
override fun onResume() {
super.onResume()
Rotor.onResume()
}
override fun onPause() {
Rotor.onPause()
super.onPause()
}
Android Oreo is not supported yet. In the new Android version, all background services has been blocked. That means Rotor Core can't work (and Database and Notifications). Only Firebase Cloud Message service still working.
Copyright 2018 RotorLab Organization
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.