Comments (10)
I've not tested ACRA with services yet... I'll start.
Anyway, if the report is sent, there should be no big deal with handling custom
data.
Original comment by kevin.gaudin
on 13 Mar 2011 at 7:31
from acra.
Just implemented a simple test based on
http://developer.android.com/intl/fr/resources/samples/ApiDemos/src/com/example/
android/apis/app/LocalService.html
As I am building for Android 1.5, I used onStart() instead of onStartCommand(),
and everything went fine: custom data is correctly received in the spreadsheet.
Next test will be with onStartCommand(), running on 2.1.1 avd.
Original comment by kevin.gaudin
on 13 Mar 2011 at 10:26
from acra.
New test done on Android 2.1.1 with ACRA 3.1.1, using onStartCommand:
@Override
public int onStartCommand(Intent intent, int flags ,int startId) {
Log.i("LocalService", "Received start id " + startId + ": " + intent);
ErrorReporter.getInstance().putCustomData("Hello", "World!");
String nul = null;
nul.toString();
return START_NOT_STICKY;
}
Report looks ok, with "Hello=World!" in the custom column.
Are you sure it is not just hidden due to the default bottom left text
alignment ?
https://docs.google.com/uc?id=0B9J0DEDzWLEjMGU2YjBkMDItMzA5Zi00YzZiLWI0MDYtM2M5Y
mJlMjZhZWVk&export=download&hl=fr&align.png
Original comment by kevin.gaudin
on 13 Mar 2011 at 10:50
from acra.
Hi Kevin,
Thank you for verifying the issue so quickly. I wonder you tried with service
without
process=":remote"
which runs service in same process. In this case it worked. (I verified today.)
But running service in separate process by giving
process=":any_string_you_like"
ends up with blank "custom" data. Please try just adding above key word to
service tag in AndroidManifest.xml.
I hope you will see same issue that I'm having.
Original comment by [email protected]
on 13 Mar 2011 at 10:59
from acra.
My first test was without specifying any android:process value.
I just tested with
<service android:name="LocalService" android:process=":test_process"></service>
and it still works as expected (custom data is sent).
What is your setting for android:process in the <application> tag?
Original comment by kevin.gaudin
on 13 Mar 2011 at 11:12
from acra.
Hi Kevin,
I verified this issue again and found this.
If service is running in separate process and and call putCustomData in that
process, and crushes in that process it WORKS as expected.
But if service is running in separate process and and call putCustomData in
that process, and crushes in ANOTHER process (in my case main Activity) it DOES
NOT work as expected.
Could you check it again?
Original comment by [email protected]
on 13 Mar 2011 at 11:28
from acra.
Ok, I reproduced this. And it kind of makes sense as we are now using 2
different processes... the ErrorReporter is not a singleton anymore.
I have to think about this.
Original comment by kevin.gaudin
on 13 Mar 2011 at 11:43
from acra.
I can't see a simple way to work this around... I think we would need to make
the remote service send a message to the main process to handle the exception
(and any custom data) instead of handling it in the service process.
http://developer.android.com/intl/fr/guide/topics/fundamentals/bound-services.ht
ml#Messenger
It may be possible to provide some tooling to ease this but it requires too
much effort to be done now. I have to plan this after the release of v3.2.
If you want to work on this and contribute back your findings, you are welcome
;-)
Original comment by kevin.gaudin
on 15 Mar 2011 at 12:34
- Added labels: Priority-Low
- Removed labels: Priority-Medium
from acra.
Hi Kevin,
Thank you for taking time for this issue.
I understood the situation. I hope ACRA will support this sometime in future.
Original comment by [email protected]
on 15 Mar 2011 at 8:06
from acra.
Original comment by kevin.gaudin
on 25 Nov 2011 at 11:20
- Changed state: Accepted
- Added labels: Milestone-Undefined
from acra.
Related Issues (20)
- ErrorReporter NPE caused by (valid) missing resDialogEmailPrompt. HOT 1
- LogCat field broken by Jelly Bean changes HOT 7
- NullPointerException during ACRA init HOT 9
- Wifi Not Connecting - Jellybean 4.1 Issue on Asus Transformer Pad TF300 HOT 1
- ACRA Crash in 4.3.0b2 NullPointerException HOT 2
- Invalid cookie header HOT 5
- EmailIntentSender shows list of too many email applications
- If acra.alwaysaccept preference is set, ACRA sends report without waiting for DIALOG output HOT 11
- ACRA sends reports into wrong spreadsheet HOT 4
- Compression for log posts
- Does not verify SSL certificate
- CrashReportDialog appears again if it was closed by BACK button HOT 4
- Comment field of CrashReportDialog is lost after rotation device HOT 5
- Make content of CrashReportDialog scrollable HOT 6
- stacktrace file could not be created
- Acra android HOT 1
- Failed to send crash reports : Package is not a constant in org.acra.ReportField HOT 2
- acra will auto restart the application ,how to kill the app normally above Android 4.0?
- Is it ACRA coding Bug?
- g
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 acra.