sending and receiving data from android app to another - android

I'm building an android app , I need to contact with another app called Easy taxi .
this app need to fill some data like mobile number and destination, the problem is my app help blind people so I need to send this data from my app without the need to fill it and force the Easy taxi to confirm and request the taxi.
I read this article Sending Simple Data to Other Apps
but Easy taxi don't support to share even my Location , any Ideas to start from it ?!

The application you mentioned must have a parsing mechanism to handle incoming data from other apps. This mechanism is called as URL scheme where an app listens for data coming from registered scheme and parses it to handle action. In your case, you should contact to Easy Taxi developers to find out if they have a URL scheme mechanism.

You wan't be able to communicate to other apps if they don't support this. If that app can't handle some intents or doesn't expose data via Content Providers, then there's nothing you can do.

Related

Send request from one android app to another app using a Web server

I am doing my Semester project of Android.I am making a food delivery app.The work I have to do is that the user will send the request to a nearest restaurant.
The restaurant will accept the request and deliver the desired order that a user requested.
I know I have to work with maps and webserver.Maps will be used to get the location of the user and I am pretty good working on that.I know how to connect the android app with webserver as well.
But, I don't know how the user from his app will send request to the restaurant app by using webserver.How the resturant will accept and which restaurant will accept (in my case a nearest restaurant should accept,but first I just need to connect the user with restuarant).
Need a guide or Tutorials how I should Start this.I am really confused.
I strongly recommend you use Firebase - [https://firebase.google.com/?hl=pt-br][1] - to receive/send messages throught web. It´s very simple to use!

How to avoid hardcoded urls in IOS/Android app

I'm developing a django web-project and I'm going to develop its IOS and Android API.
Is there a way to avoid using hardcoded url addresses in the app code?Something like django url name system
The following problem faces me if there isn't any solution to my question:
If I want to change some of my urls, I should change the app code and also all the previous installed apps on peoples' devices won't work and should be updated.
The way I see it, you probably have two options:
a) Code very generic forwarding links into your app, such as:
http://www.example.com?linkid=1
http://www.example.com?linkid=2
You can then, from your side, forward these on to where you need them to go by using the query string ID number.
b) Write a web service to push updated URLs to your app, maybe on load so you're not polling the service all the time.
How often are the URLs likely to change?

detecting current IU android app

I want create an intentservice android application which can send a string to current application which have an edittext and I don't have the code source of this current app.my question is : is that possible to send data to other application ? if yes how can I detect the edittext of the current application?
You can send the data between applications through intents only if the other application is ready to handle your data. There is a good training in Android Developers site.
Also you can use ContentProvider for interconnections, but the other app should also allow you to pass the data to it.
In any way, if you cannot modify the code of current app to handle your data, you cannot send data to this app.

How does user's whatsapp application detects change in profile picture of its contact?

I was going through whatsapp application and I noticed that, for the first time it fetches thumbnails from the server, keeps them in cache memory, and thereafter it fetches these from the cache memory instead of server. (Like bitmap lazyloading).
Till now I have completed implementing the bitmap lazyloading part.
However I have a question as follows:
When any contact changes its profile picture how does the user's whatsapp application detects that particular change and how does it update that particular thumbnail only, cause the application is supposed to fetch the thumbnails from cache memory.
I am clueless about this. Any help is appreciated.
EDIT:
Does it use push notification to notify the client applications to update the corresponding profile thumbnail?
Source:
WhatsApp is build upon C2DM and XMMP for message delivery. MQTT is another protocol which is used to minimise the battery usage.
When any contact changes its profile picture how does the user's
whatsapp application detects that particular change and how does it
update that particular thumbnail only, cause the application is
supposed to fetch the thumbnails from cache memory
Answering your question: So WhatsApp may be using XMMP push or a GCM push notification(C2DM is deprecated ;] ) to inform all the client that some event has occurred and all it's client needs to take care of the same. In your case event is to update your profile pic in devices of your friends in WhatsApp contacts
In your case, you can use GCM to update clients regarding such events.
I don't have much idea about XMPP but You can also have a look at Smack API(An Open Source XMPP (Jabber) client library for instant messaging and presence) and this interesting post
I hope I answered your question. Good Luck :)
Edit:
GCM is a service from Google that uses a persistent XMPP connection to communicate with Android devices. You can use any of the following techniques of GCM to achieve this.
Send "send-to-sync" messages
Send messages with payload
An easy way to handle this situation will be to keep an modified datetime in the table where you store the path of the image and thumbnail. You have to keep the url of the image along with the modified date as the parameter.
Eg:
http://yourdomain.com/images/user_id.png?q=modifieddatetime
Whenever the app will try to open this link, it will first check whether it is available in cache or not. If not the new image will be fetched from the server.
I have not tried this on Android, but it should work. I usually do this in my web applications.

Push Notification from server

I have developed an app in which i am collecting data from server through parsing. So , i want to add push notification in my app whenever the service adds new data. I have searched the web bt cldn't fnd smthn useful.
The best way is to either get a webserver with cronjob this will send information directly to your mobile ... or, to make an backgroundservice in your application.
It's not a simple thing to do, in the upcomming few days I'll be posting a tutorial on http://p-xr.com wich explains it in detail.

Categories

Resources