1

I am making an app in which the app installed in phone B will send data to the phone A using an intermediate web server.I want to know how my app will download the uploaded data as fast as possible.Which methodology should I use?How should I complete this task of downloading and uploading from and to a webserver as fast as possible? PLease provide me help using programming.I dont know anything about this

user3788866
  • 118
  • 3
  • 10

2 Answers2

1

Once solution is to use a push notification library such as Parse in order to send a signal to other devices new data must be downloaded. If you send a push notification with parse without entering text for message you are able to catch it from an android device an instead of displaying a push notification you use it as a signal there is new data to be downloaded.

Another solution is to use SignalR as a way to initiate data download, having all clients connected to your server and devices communicating with each other.

to help you understand the concept further, if we take the Parse solution as for example the architecture looks somehow like this :

enter image description here

If any of the above fits your requirements I will be more than happy to help you out further

J.Vassallo
  • 2,282
  • 3
  • 15
  • 14
  • Yes I exactly wanted this scenario.How can I implement this? – user3788866 Jan 12 '15 at 10:30
  • ok great, as you may imagine all this involves a bit of work to implement..i suggest the first step is to get hands on the Parse library which you can get from here (https://parse.com/) , you create an account for push services. Do all the setup and check you are able to send normal push notification. In the meantime i prepare some code snippets – J.Vassallo Jan 12 '15 at 10:53
  • Thank you very much sir.Is it a free service or I have to pay for it?? – user3788866 Jan 12 '15 at 12:20
  • You can send unlimited number of push with the free service up to 1 million unique connected devices...you have to pay though once you exceed the 1 million devices which is fair imo – J.Vassallo Jan 12 '15 at 12:24
  • Ok I made the project there and downloaded the file Parse-Starter.Should I import this as project in eclipse? – user3788866 Jan 12 '15 at 12:33
  • follow the Parse guidelines here..choose between new or existing project > https://parse.com/apps/quickstart#parse_push/android – J.Vassallo Jan 12 '15 at 13:27
  • I tried to follow the guidelines.But they are not so much helpful.I tried to run the app with changing the manifest and The activity but My App is crashed – user3788866 Jan 13 '15 at 17:03
  • ava.lang.RuntimeException: Unable to start activity ComponentInfo{com.robotrackerclient/com.robotrackerclient.MainActivity}: java.lang.IllegalArgumentException: listener==null I think the problem is in the code.I am having a main activity which is launching activity of the app.I am putting the parse.initialize() code in the onCreate method of main activity.Is this creating the problem? There is one more error: You must call parse.initialize(..) before using the parse library – user3788866 Jan 13 '15 at 17:22
  • I hit the office soon and i will have the code needed..but i think its better u start a new question re parse so that others may benefit – J.Vassallo Jan 13 '15 at 17:31
  • Ok JOhan V I have started a new question.If you can help me please help me.I have put the code of MainActivity there also.And your answer to my question was right.thanx a lot for guiding me. http://stackoverflow.com/questions/27928687/trouble-in-using-parse – user3788866 Jan 13 '15 at 18:22
1

If you still are in the process of managing this, I encountered Lightstreamer which offers this type of service, it looks promising so maybe you should have a look : Lightstreamer

J.Vassallo
  • 2,282
  • 3
  • 15
  • 14