Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

How to make your application to run as the Phone Boots up?

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all

i want to run my application as soon as the Phone/Emulator Boots up..
actually, i want the service to run at background continuously...

i've tried



but it's not working...
when i Start th emulator, the application doesn't run neither i can see the icon for the same....

can anyone plaese help me out...???
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
take a look at this tutorial
 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks monu...

i already referred that...

but my problem is that i want to start service at Boot up...

here's the code m working...



and here's the LocalService.java




and AndroidManifest.xml



i don't want anything on foreground... the service should be running at background...

but with this code i get "The process stopped unexpectedly" error as i launch the emulator...


can you please tell me what's wrong with this code...

Thank you so much
 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey..

i made it...

what i was doing wrong is i did not set latest event info for my notification... and that's why it was giving me IllegalArgumentException

her's the updated code for showNotification()




and it worked....
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic