2

I'm a website designer and would like to learn mobile app development.

Websites like facebook & twitter is usable through a browser and a app, and you see the same data regardless of where you enter it from. I have a website that is coded in PHP and I want an Android APP for that website, so that people don't have to access it through a browser and so that they can get notifications on mobile etc.

My question is... Can a PHP website be linked to an android app (in other words... communicate with eachother) Or was the website supposed to be coded in another language?

Does anyone have any links to places that explains how to get this done?

Shtarley
  • 313
  • 9
  • 22
  • Yes, you need to write an API. If you search for "Android API PHP" there is plenty of material - just avoid the tutorials with the stonking great security vulnerabilities. `;-)` – halfer Apr 10 '15 at 09:05
  • yes they can. just provide webservice for request from android. using REST or SOAP – Randyka Yudhistira Apr 10 '15 at 09:05
  • He doesn't need a special API for PHP since it doesn't matter that the website is PHP. He can use any HTTP API, such as [HTTPURLConnection](http://developer.android.com/reference/java/net/HttpURLConnection.html). (Or SOAP, or JSON, or websocket, or whatever.) – David Schwartz Apr 10 '15 at 09:07

5 Answers5

2

Yes, it is possible.

The following points will be useful if you want to learn mobile application development:

1) There are 2 options to develop a mobile application

a) Hybrid: Develop an app using Cordova / Phonegap (HTML, CSS, Jquery)

b) Native: Develop an app using JAVA (for android) and Objective C (for iPhone)

This can be useful to make a choice between the options: https://softwareengineering.stackexchange.com/questions/201487/what-are-the-pros-and-cons-of-html5-native-and-hybrid-mobile-app-approaches

2) If your website is on Wordpress and you choose to develop the app using Phonegap / Cordova you can consider this plugin https://apppresser.com/. It will help you convert the entire website into a Cordova application.

3) Alternative frameworks for Phonegap / Cordova (hybrid apps): ionic framework & Onsen UI. But to use these you must be well-versed with AngularJs

Community
  • 1
  • 1
Utpal - Ur Best Pal
  • 4,472
  • 3
  • 17
  • 28
0

It makes no difference what language the web site is coded in. What matters is what the site does, not how it does it. From the outside, you can't tell how it's done, and the app would be on the outside.

David Schwartz
  • 179,497
  • 17
  • 214
  • 278
0

Create a mobile view app for your site. Android app, that optimize your site for mobile viewing.

There is multiple framework out there that can help you achieve what you want.

One of it is, Phonegap.

Izzat Z.
  • 437
  • 1
  • 7
  • 15
0

Short answer: yes, it's possible

but, there are some concepts that you must understand before start.

  • API(Application Programming Interface): are a set of methods that you will use for interact with your app. For example: get your posts in facebook, get the friend's list, publish a new post, update your profile, etc.
  • Webservice: basically is a software component that let you share information between applications in a network (more at http://www.w3schools.com/webservices/ws_intro.asp). It's a kind of API that use http for communication. Are many options, but personally the most I use is REST with JSON. (https://stackoverflow.com/a/840713/1359796)

You must decide which information you want share between your web and the app. Maybe you just want expose new content to the app, in that case you will need just few 'get' methods. But maybe you want add information from the app to the web, in that case you will need 'set' methods, and also authentication (user, login, pass). Can be so complicate how you need it ;)

Then, go to work :) http://blog.ijasoneverett.com/2013/02/rest-api-a-simple-php-tutorial/ also can be http://www.androidhive.info/2014/01/how-to-create-rest-api-for-android-app-using-php-slim-and-mysql-day-23/

With that, you will have a website that 'talk' to others apps which can connect to it's API and can send, receive and update information from other sources.

Now you go to the other side: the mobile app. There you have hybrid or native solutions, but you want 'learn mobile app development', so go to native.

When you will understand the environment (and the lang), you can go directly for your solution:

note 1: many of those links I didn't read complete, you can use just like examples and I enforce you for find others by searching in the web.

note 2: Android and iOS are similar but complete different worlds. I think is better you understand the main concepts, but start to develop just in one of them. After you feel confortable, if you want continue with the second, great, but start with both at same moment can be a hard task.

note 3: if your side use some CMS, sure will exist some module (plugin) that can help you.

Community
  • 1
  • 1
HEDMON
  • 727
  • 10
  • 24