Hello,
Early apologies if this is an incorrect forum but it's what i found about app development. If so can someone link me to something relevant?
I am going to preface this post by saying I have been using OOP languages for a long time now yet all localized self contained programs usually in python. I've gotten fairly used to some of the android API and parsing XML data to java and the reverse however I'm completely ignorant when it comes to php parsing.
I'm working on an android project for a client. I want to do an commerce application. Starting off I have already established XML UI's for a logging in, new user, main menu, and product search page. My main concern at this point is getting the remote data. Please correct me if I'm wrong but this was my plan for data handling.
Three different PHP scripts on a remote go-daddy server to access a database that holds a user data table as well as a product data table structure is as you'd expect user:{first_name, last_name, password, ect....} product:{SKU, UPC, Name, ect...}.
One of these PHP scripts pulls data from the products table for the products activity. One compares log-in credentials for the log-in activity so people can find purchase history ect... and one inserts rows to the user table for the new user activity.
Again if this isn't optimal some advice would be helpful. If this setup works however I already have a written PHP script(again held on the remote server) that parses the data into JSON format. My next step would be to write the java for the products activity to run the script and parse the JSON back into a usable format. Is there a specific java library to do this? Any UML depictions or tutorial links would be appreciated,
Secondly a big concern would be the new user script specifically how do i pass data from the java activity into the php "Insert script" i've read some on GET and it seems to be applicable to html but not java also this would be stupid for password security. again any help on any of these matters would be appreciated.
Have a look at Google's Gson library. It's great.
Related
Hello everyone,
I come to you for some advice about an application I'm developing for Android 1.6 and higher.
Specifically, this application must be able to query a remote MySQL database and display the retrieved data. It need also be able to UPDATE data on this databse and that is where things get complicated ...
For selection queries, I wrote a small PHP script on the remote server that retrieves the desired data in the database and encodes them in JSON. From my Android application, I have no problem to retrieve, process and display them.
Now I wonder about the solution (if there is one ...) to run UPDATE from my application on the remote database. For now, I see only two solutions:
- Develop a webService on the server with an update method. Several problems with that: it seems webServices on Android are not easy (not native, have to go through external libs). Moreover, as it's UPDATE query, I want to make sure nobody else can use this webService.
- Alternatively, write a PHP script that makes the UPDATE and call it via HTTP. Same problem as webService: I want to secure this call to be sure that only I can use this script. These scripts can be integrated into an application already present on my server and which is secured by login / password. So, if it is possible to manage PHP sessions from Android, it's won! but Ican't find anything about it ...
What do you think? Ideas?
Thx!
Hello everyone !
I want to create an android app, that should take input username and password and then login to a website. Basically any website. Well, I am trying to create an app for a website with login page in .aspx form.
I googled regarding this but was unable to find some effective solution. Almost all websites I searched contained only login page design and a simple java code which equals username and password and then makes a toast text. I need some info regarding how to login into that particular page with active session.
Let login page be: 127.0.0.1/login.aspx
I am not a beginner and have developed few apps. This project is very important for me. So please help me regarding this.
Anykind of help is highly appreciated. Please do help.
Thanks
Come On Guys , Show some effort
Making apps "for website" in my opinion could be easily sorted turning the app "server side"... read my comment at this post.
By following my advice you have several advantages:
Users don't need to update their app when new version comes out
Harder to crack (unless they hack your server...)
Compatibility with different platforms/os
No disk-space needed on user device
If you really really need java code for that (as it's a school project requiring java or something ...) have you considered using raw sockets (probably not the best idea, but you asked for "Any kind of help" so... ) ? You said you have experience (I don't with java so can't help with the code, but I used similar technique in python, php, etc, ...) so it shouldn't be hard to find a simple code snippet for handling raw packet sending... Use your PC and fire up Wireshark or any other sniffer and debug the communication between client-server. Look at the header informations and data sent, and it will be easy to replicate those request-response via raw socket.
Hi All.
I'm looking for some implementation advice. I hope you can help me
I'm planning to build an application working mostly inside a WebView and some javascript code running inside of it. I need also that the underlying native java code to provide, as a dedicated web server for this WebView, any kind of data (typically json strings) in response to ajax calls made by the javascript program.
A ContentProvider sounds a good idea, mainly because it allows me to addess it using an URL in the javascript code but it only lets me serve static files, so it isn't suitable. I need to generate run-time the answer string to ajax calls.
I hope I explained myself. How can build this kind of private web server?
thanks for all your help.
Hello, I'm developing an android app that needs access to a .xml database that will be updated from time to time by various Admins.
How do I do so that, when I create a new field, it synchronized with the android application? I read about the SQLite database, but I did not understand if it can be done so that it can be changed once you have compiled the app...
PS: Sorry for my english
Firstly, you need a PHP script, or any web language script that is able to grab data from the database and echo them out on the browser.
Then your app would just need to make a HTTP request to the URL and get the data. As simple as that.
SQLite Database is Android's internal database used and created by each individual app. It has nothing to do with web's database.
XML parsing.. someone told me about it
I like the partially online/mostly offline approach... this may consume big amount of internal storage, but maybe what the OP is looking for... For accessing online database, a PHP interface is the most common, with this we can consult the online db, parse the data, insert it into the local database and work there...
Sent from my GT-S5830M using Tapatalk 2
You need a server side script in any laguage to fetch data from database. Then create a HTTP request to the url and get the data from online database.
Hello,
I am a beginner on Android coding.
I own a Minecraft Pocket Edition server, and I would like to create an assistant app that would include in-app purchases to get in-game ranks. As a consequence, when a player purchases something, it needs to edit my MySQL database to give him his purchase on all servers.
I though to use PHP script to do so, but anyone uncompiling the app would be able to see how it works and get ranks for free.
I would like to know a secure way to edit a MySQL database on in-app purchase.
Thanks for your help
Edit : apparently it has something to do with the RSA key we get on our dev console. If I understand, when a purchase is made, an encrypted data is sent back to our application. From the application, I have to send that encrypted data to a php script. The php script has to verify that data signature is correct using the RSA key that I have to put in my script, and use open_ssl_verify.
Did I understand or not at all ?
Thanks again