Click here to Skip to main content
15,910,471 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have Android app and 1 php application. I want to invoke android function when the button is clicked on my php application (on latop-pc browser). So basically Php to android communication. How to achieve that?
Posted
Comments
Mohibur Rashid 10-Mar-14 1:54am    
A common question to every one, what did you try?
I would suggest you to search on google.

I will also give you a simple concept.
The thing is, you are not trying to communicate with PHP. You are trying to communicate with a HTTP Server. So, You will have to implement or perform HTTP Communication.

You may want to explore Google Cloud Messaging for Android (GCM)[^]
As per google’s documentation “Google Cloud Messaging for Android (GCM) is a service that helps developers send data from servers to their Android applications on Android devices”.
 
Share this answer
 
Okay, Peter Leow is right.
Or rather you may go for Observer Pattern[^].
Where, if one application is changing its state, other would be notified and can perform operations accordingly.

-KR
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900