Results 1 to 4 of 4

Thread: Phone?

  1. #1
    BMJ2013 is offline Member
    Join Date
    Nov 2015
    Posts
    2
    Rep Power
    0

    Default Phone?

    I am very new to Java. I just bought "Head First Java" to help me learn. Is there any way I could have code that when something happens, i get a message on my phone?

    For example:

    if(something){
    send a message to my phone}

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    14

    Default Re: Phone?

    It all depends on what you mean by "when something happens." That implies an event (e.g. your home heater turns on, you get an email, your phone rings, etc.). But in any case, you would probably have to be familiar with both Android programming and whatever JVM system generates the event. None of this is trivial and would require lots of study and practice. So I recommend you read the basics to learn Java first.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    399
    Rep Power
    6

    Default Re: Phone?

    AS Jim says, the whole scenario is a little more complex than the programming language behind it. You first have to define the purpose of the setup, then the hardware and the network you want to use for that application. The programming language is then determined by your hardware, whether Java is one of the options is not guaranteed.

    If you are looking for a quick and dirty solution just to get your feet wet, I would check out phidgets.com, these components have a Java driver/API and they have a lot of examples for starter solutions. If you want to have access to the process via you Android phone there is a solution for that as well (check this) together with some fun application examples.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: Phone?

    Quote Originally Posted by BMJ2013 View Post
    when something happens, i get a message on my phone?
    'something happens' implies a sensor of some sort and a (text) 'message' means a device that can communicate over (at least) a G2 network; for the latter, google for 'sim 900'. For sensors, you have to supply some more detail. With a simple serial connection, you can program a sim 900 in Java; it depends on what sensor you want to use whether or not Java can do it ...

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

Similar Threads

  1. Replies: 2
    Last Post: 02-24-2014, 09:24 AM
  2. Replies: 0
    Last Post: 06-06-2012, 08:26 AM
  3. get an app to run on a mobile phone
    By oontvoo in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 03-08-2011, 07:20 AM
  4. GUI Phone
    By nanna in forum New To Java
    Replies: 10
    Last Post: 02-07-2009, 01:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •