This week's book giveaway is in the JDBC and Relational Databases forum.
We're giving away four copies of Murach's MySQL and have Joel Murach on-line!
See this thread for details.
Win a copy of Murach's MySQL this week in the JDBC and Relational Databases 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to switch activity properly without android launcher shooting down

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi, I'm working in a project which need to show my MainActivity after i run several java class. i need to run bluetooth> register > MainActivity. MainActivity is the only activity that contain layout. because Bluetooth and register doesn't have layout, i deleted this and ;. I also put intent in my program to refer one activity to another. After that i change my AndroidManifest stuctured like this :

after i open the program, it shut down immediately. can you tell me how to switch activity properly without android launcher shooting down? thank you for your help.
 
Saloon Keeper
Posts: 7573
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whenever an activity crashes, the full stack trace is written to the logcat - post it here (NOT the entire content of the logcat, just the relevant bits).
 
nida azizah
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
here's the logcat :

 
nida azizah
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I forget something, i'm also using sqlitedatabase in DatabaseHelper Activity but i can't insert it to AndroidManifest, so i didn't do that. I hope it doesn't cause any problem.
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.append(java.lang.CharSequence)' on a null object reference
       at com.example.windows8.registerlogin.Bluetooth.CheckBTState(Bluetooth.java:191)


What variable/value is null on line 191?
 
Tim Moores
Saloon Keeper
Posts: 7573
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

nida azizah wrote:i'm also using sqlitedatabase in DatabaseHelper Activity but i can't insert it to AndroidManifest, so i didn't do that.


You mean the <provider> element? Why not? That sure sounds like it could cause problems. Also tell us which object is null when you try to call "append" on it, and why.
 
Bartender
Posts: 2270
20
Android Java ME Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Probably the text view being referred is not inflated from the referred layout xml file properly.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic