Giter Site home page Giter Site logo

Comments (10)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024

Original comment by kevin.gaudin on 25 Nov 2011 at 11:20

  • Changed state: Accepted
  • Added labels: Milestone-Undefined

from acra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.