-9

I am developing an application for Android that runs a PHP file on the server. PHP file in which there is a connection with a connection to remote database and selecting SQL commands. In addition I have a Listview in my MainActivity that when I click on an item in the list represents ask other activity statements of my command SQL data. If I click on another item , the information changes.รง

I tried to do it with a AsyncTask and Thread.

How can I do this?? Can somebody help me?

Updated

Yes, I get the data in JSON format.

I want to do this:

Main Activity --> Background Process --> Second activity --> Click Item_List -> Process data in JSON format -> Represents on a second activity the information

I need to know how to do the background process (service, asynctask, thread)

The select have a WHERE clause that depends on the item clicked.

Ajay2707
  • 5,690
  • 6
  • 40
  • 58
Sergio
  • 1
  • 2

1 Answers1

0

Is not secure to connect an Android application directly to SQL server, you should create a web page that contains the data you need in a parsable format, like JSON. You find a good guide here: How to connect Android to a database server

Community
  • 1
  • 1