• 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

GPRS and servlets

 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Consider this...

A mobile phone is on the internet through GPRS and sends data to a servlet by invoking it through a URL say www.blah.com\blalet. The servlet accepts the data and then saves the data. Now... is it possible for this servlet to contact this mobile phone later to send some data to the phone ? Let us assume that the mobile phone has a J2ME application running that is listening on a port. My question is if it is possible for the servlet to contact the phone... how exactly would it go about doing it ? Does the mobile acquire an IP address when it connects to the internet !? Can the mobile phone uniquely identify itself on the web ? Does the dynamic IP address scheme apply to mobile phones ? Do IP addresses apply to mobile phoes ? Arrggghhh so many questions.
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The MIDP API defines UDP datagram connections, TCP/IP socket connections
and SSL connections, that may be implemented by devices
apart from HTTP / HTTPS (but the later two may be WAP
based for example instead of IP-based).
So, yes, a mobile phone can be IP-aware.

But in terms of design, I think you should consider
the phone app to query the web service regularly
instead of trying to send a notification the other way round.
You see, apart from considering that the IP is dynamic,
you must account that the phone's connection is not permanent.

So it looks like a more workable design to have the phone contact
your server when it is online (and maybe poll it regularly)
rather than the server checking if the phone is online and what it is its IP.

Regards,
Eduardo
 
Deepak Bala
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is precisely what i was thinking of as an alternative, ask the server every now and then if there is any data to send. That solves that. thanks
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic