Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start service with start foregroundService on Android Oreo #1786

Closed

Conversation

brvier
Copy link
Contributor

@brvier brvier commented Apr 5, 2019

And add a notification channel for Oreo permanent service notification
Fix #1785

…ification channel for Oreo permanent service notification kivy#1785
@Ravi2232
Copy link

Ravi2232 commented Apr 5, 2019

Yes we are

@inclement
Copy link
Member

Thanks @brvier, the changes look basically good to me. It looks like travis is complaining about a build issue though, is this a real problem with the code?

{% if sticky %}
@Override
public int startType() {
return START_STICKY;
return START_NOT_STICKY;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm really not getting that part 🤔 we have the if sticky in the template, but we decide to return not sticky.
There's something fishy about it no?

@AndreMiras
Copy link
Member

@inclement @brvier I think usually the CI fails for good reasons. Here for instance we have:

:compileDebugJavaWithJavac/home/user/.local/share/python-for-android/dists/bdisttest_python3_sqlite_openssl_googlendk/src/main/java/org/kivy/android/PythonService.java:22: error: package android.support.v4.app does not exist
import android.support.v4.app.ActivityCompat;
                             ^
/home/user/.local/share/python-for-android/dists/bdisttest_python3_sqlite_openssl_googlendk/src/main/java/org/kivy/android/PythonService.java:28: error: package android.support.v4.app does not exist
import android.support.v4.app.NotificationCompat;
                             ^
/home/user/.local/share/python-for-android/dists/bdisttest_python3_sqlite_openssl_googlendk/src/main/java/org/kivy/android/PythonService.java:139: error: package NotificationCompat does not exist
            NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, "persistent");
                              ^
/home/user/.local/share/python-for-android/dists/bdisttest_python3_sqlite_openssl_googlendk/src/main/java/org/kivy/android/PythonService.java:139: error: package NotificationCompat does not exist
            NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context, "persistent");
                                                                                   ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

@brvier
Copy link
Contributor Author

brvier commented Apr 8, 2019

I think usually the CI fails for good reasons.

Hopefully, else it s useless.

So here Travis point to dependancies i have, and which isn't default on pythonforandroid.

Is there any problem to add this deps in pythonforandroid ?

@AndreMiras
Copy link
Member

Yes if your pull request requires a dependency, then yes add that dep as part of your pull request and also think about about updating the docs in that same PR

@AndreMiras
Copy link
Member

Up @brvier 👋
There's an up to date PR also here #1725 can you give it a try before we merge it?

@inclement inclement changed the base branch from master to develop June 6, 2019 20:40
@ghost
Copy link

ghost commented Jun 25, 2019

Is this superseded now and possibly should be closed? @inclement & @AndreMiras I'm seeing similar code already in current develop

@ghost
Copy link

ghost commented Jul 9, 2019

Since we seem to have something similar on develop already I'll close this for now. Thanks so much for your contribution, sorry it didn't make it into the project in exactly your provided form!

If anyone thinks this is closed by mistake let me know and I'll gladly immediately reopen

@ghost ghost closed this Jul 9, 2019
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

StartService in Android Oreo and More should use startForegroundService
4 participants