0

I'm programming an Android app that use arToolkit for AR Tags analyse (obtaining the device position using AR tags). The main activity extends to andARActivity who extends to Activity, so I can't make it a Service.

I'm trying to make the AR app run in background while an other app is running (using the data from the first app). The problems is that if I press the HOME button, the BACK button or I force a second execution from eclipse, it launch the onPause() metod from the Activity class. That metod make the execution pause and the app stop all their processes.

I've tried to implement a onPause() method who avoid the execution of the Activity onPause(). Normally, if in the mainActivity onPause() method I don't call the super.onPause(), and that method doesn't do anything, it would exit to the home screen while running the app, but it stop and exit.

Anybody know how can I make the app run without pausing or using a Service class?

Thanks!

Wooble
  • 87,717
  • 12
  • 108
  • 131
ZanattMan
  • 746
  • 1
  • 7
  • 26
  • 1
    You can't. Or if there IS some way of doing so, you SHOULDN'T. Any background processing should be running in a Service. – Kevin Coppock May 22 '12 at 17:22

1 Answers1

1

The best way is native module in C. Threads, sockets etc. - all running all of the time.

theWalker
  • 2,022
  • 2
  • 18
  • 27
  • I have android app with native modules in C. In Java part of this app run GpsReceiver and SmsReceiver. OnPause() stops only UI, but receivers still send events to the running C native part with threads, timers, sockets and file IO. – theWalker May 22 '12 at 17:47