I’m looking to develop an Android app which resides on both phones, sends location data and receives the same to know the distance and absolute direction of the other device, and shows whether the user is going in the right direction(i.e. distance decreasing) or not.
How can the devices communicate? Would 2G/3G internet or SMS be a good choice? Is it hard to implement this idea? Any suggestions would be helpful.
You have three choices to automatically acquire a devices position: GPS, Cell Signal Triangulation and WiFi directional location. You can read about their individual strengths and weaknesses in this guide: Location Strategies
As for communicating over long distances you have 2-3 options to push and pull data from a device: Mobile Data, WiFi, and under the right circumstances Bluetooth. Here is an article on WiFi Direct.
These are all involved topics that are too complex for one question, under the FAQ:
However you can accomplish your goal by taking it on subject at a time.