Comments (17)
Try the new option IS_FOREGROUND_SERVICE set to false in GlobalConstants.java:
see https://code.google.com/p/android-python27/source/detail?r=d88a6707f13d
Original comment by [email protected]
on 6 Jun 2012 at 6:05
from android-python27.
Great! Thanks!!!
Original comment by [email protected]
on 6 Jun 2012 at 2:51
from android-python27.
The script service keeps on running no matter what I change
"IS_FOREGROUND_SERVICE" to. Any ideas?
Original comment by [email protected]
on 7 Oct 2012 at 5:06
from android-python27.
This should be fixed see:
http://code.google.com/p/android-python27/issues/detail?id=7
I check with ps that the process died when the script ends.
Original comment by [email protected]
on 7 Oct 2012 at 5:19
from android-python27.
When I run your test script with "IS_FOREGROUND_SERVICE" set to false,
everything is fine. However when I run my script then the service keeps on
running after my script exits. My script does start some sub-processes, a
bottle server to be precise, but all of these are terminated before my script
exits. My script also works when packaged with the script-for-andriod-template
taken from sl4a.
I intend to do some more experimentation to see if there is something wrong
with my app. Maybe I'm not managing my sub-processes correctly or something.
One last thing, I'd like to take the opportunity to thank you for your hard
work.
Original comment by [email protected]
on 7 Oct 2012 at 7:40
from android-python27.
Could you attach a minimal script reproducing the problem ?
Original comment by [email protected]
on 8 Oct 2012 at 5:03
from android-python27.
Yes I can because I just managed to recreate the problem with a simple example.
I can attach the "my_python_project.zip" file or the entire eclipse project I
use for testing. Which do you prefer?
Original comment by [email protected]
on 8 Oct 2012 at 7:15
from android-python27.
Just the zip is fine.
Original comment by [email protected]
on 8 Oct 2012 at 7:21
from android-python27.
[deleted comment]
from android-python27.
Here is the zip file as requested. The script does the following things:
1) creates a bottle server running in the background
2) starts a browser to read the start page
3) when you close the browser, renders a button so you can stop the bottle server
4) exits
The python process exits but "com.android.python27" does not. If I don't kill
the process my script is started at regular intervals.
Original comment by [email protected]
on 8 Oct 2012 at 7:00
Attachments:
from android-python27.
[deleted comment]
from android-python27.
When I click the button to stop the bottle server both com.android.python27 and
python process exit properly on my device, FWIW I'm using 4.0.4, which android
version are you using ?
You are using IS_FOREGROUND_SERVICE = false, is that correct ?
So BackgroundScriptService class should be used, you can add some Log in
@Override
public void run() {
mProxy.shutdown();
stopSelf(startId);
killProcess();
android.os.Process.killProcess(android.os.Process.myPid());
To see in the Logcat if this is called.
Original comment by [email protected]
on 8 Oct 2012 at 7:15
from android-python27.
Yes, I'm using IS_FOREGROUND_SERVICE = false and I'm also using android 4.0.4.
Its getting late here in Poland so I'll check the logs tomorrow. Is it possible
that there is something wrong with the way I'm building my applications?
Original comment by [email protected]
on 8 Oct 2012 at 7:51
from android-python27.
Attached my test APK.
Original comment by [email protected]
on 8 Oct 2012 at 8:12
Attachments:
from android-python27.
Your app works fine for me too. All processes exited normally. Any chance you
could send me your eclipse project so that I can compare it with mine and also
see what happens when I build an apk with it.
The problem is obviously at my end. I downloaded the repository just a few days
ago and I'm sure the project I'm using is based on that download. I'll redo
everything from scratch and see what happens.
Thanks a lot for your help because I now know where the problem lies.
Original comment by [email protected]
on 8 Oct 2012 at 8:39
from android-python27.
I just cleaned out all my python projects and downloaded the repository again.
Now everything works fine for me too. Sorry about that, I must have mixed up my
projects somehow. I guess I owe you a beer!
Original comment by [email protected]
on 8 Oct 2012 at 8:59
from android-python27.
Glad that's working now. I would bet for an Eclipse/ADT bug, I hit already so
much of them.
Original comment by [email protected]
on 8 Oct 2012 at 9:01
from android-python27.
Related Issues (20)
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Patna +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Vadodara +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Ghaziabad +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Faridabad +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Rajkot +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in navi mumbai +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Allahabad +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Dehradun +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Karnal +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantra for love success in Mohali +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantras for love in Bangalore +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantras for love in Pune +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantras for love in Hyderabad +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantras for love in Mumbai +91-8875513486
- +91-8875513486 %%!!రామ్ దేవ్ జీ%%! vashikaran mantras for love in New Delhi +91-8875513486
- How can I pass String value from EditText In Android Activity to Python Script and also make the activity able to retrieve the String result from a function in the python script ?
- Interaction with python file
- Install on external storage
- Can't install android-python27 to Samsung Galaxy 4
- how to create android app in eclipse using python code on windows 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-python27.