Can you make an android app with the languages PHP JSON and others like that? Like is there a specific frameworkd for it to run on? Any answer is gladly appreciated.

Dani AI

Generated

Multiple practical approaches exist to build an Android app that talks to a PHP + JSON backend; which to pick depends on whether you want native performance, a single shared codebase, or fast reuse of an existing web UI. 's underlying idea (use PHP to deliver structured data) is exactly the pattern most apps use: keep business logic and data on the server and let the mobile client consume JSON.

Three common routes and when they make sense:

  • Native (Kotlin or Java): best for performance, smooth UI and full access to platform APIs. Use a robust HTTP client and map JSON into typed models, keep networking off the UI thread, and persist important data locally for offline support.
  • Cross‑platform compiled (Flutter or React Native): one codebase for Android and iOS, good tradeoff between reuse and native feel; still consumes the same PHP JSON endpoints.
  • Hybrid/web wrapper (Capacitor/Ionic or a simple WebView): fastest if you already have a web front end to reuse, but limited for rich native interactions.

Practical server-side and API design notes (PHP side):

  • Treat the backend as an API: consistent JSON shapes, semantic HTTP verbs/status codes, and endpoint versioning.
  • Secure endpoints with HTTPS and token-based auth (short-lived tokens or OAuth/JWT patterns), validate and sanitize inputs, use prepared statements, and enforce rate limits/logging.
  • Provide pagination, filtering, and clear error messages so mobile clients can be efficient and handle failures cleanly.

Client-side best practices:

  • Parse JSON into typed objects, handle errors and connectivity gracefully, cache responses for offline use, and store any tokens securely (platform-keystore). Test APIs with tools like Postman or curl, and iterate with a small proof-of-concept client before committing to a full framework choice.

Building an API-first backend and then picking the client technology that matches your goals lets you reuse PHP logic while giving the mobile app the flexibility it needs. Combining points raised by and , an API-first + appropriate client library approach is the most practical and maintainable path.

Recommended Answers

All 3 Replies

PHP is a scripting language that usually powers the backend of a website, and JSON is a format used to transmit data between servers. I don't think either of those have anything to do with Android development. I do know, however, that you are trying to use our API, so maybe some others could point you in the best direction towards integrating our API into an Android app.

Member Avatar for Member #120589

You can use sites like PhoneGap to convert CSS, HTML and JS to native apps. I've yet to see a conversion site that can convert PHP code to Java (native Android) or ObjectiveC (Apple) in this context.

You could develop a "front-end" which connects to a remote host which can deal with your php/mysql stuff via ajax (js). However, if you're dealing with the DW API, you can use "just js" (Implicit Flow), which may obviate the need for any server-side code, thus allowing you to use sites like PhoneGap.

I've tried many of these types of sites and the best involve using node.js This is great for those already up to their necks in it. Bit of a learning curve for those not so hot on it. The code samples on a lot of these sites can be problematic too. Inasmuch as they don't work! Take time to check them out, perhaps you'll be luckier than me.

//EDIT

You will probably need to download an SDK for each platform (and possibly each device). That's fun too :(
Some sites provide a plugin for Eclipse. I tried these with varying degrees of failure. heh heh.

Android Apps are pretty much written in JAVA compiled in android SDK. The only thing that the PHP can help achieving the mobile apps is to provide the API in the form of RSS or XML. Even so, XML and RSS are not always a good source of data. What I have seen in the past was a complete parsing of the URL and the harvested data are then translated into the JAVA compliant xml file.

There is an rss feed reader on github of which I believe can help you start with this project. The script will read any rss feed from daniweb.

You can pretty much make this work by downloading the Android SDK or the Android STudio and then just import the source codes from the linked git hub source codes above.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.