I have a question. I tried using this method but I'm not able to get the value of the result string from the doInBackground method into MainActivity. how do I do that? I essentially want to take the string value that was received in BackgroundWorker and save it to a variable in MainActivity
Maybe too late but can help others. In your php convert your response to json before echoing and in Java get that. Note it will be converted to json array so know how to handle it in Java. know to send that to MainActivity, your contractor has to take two parameters. One will be the context and the other will be an instance of your mainActivity.
Great Video! Worked fine for me. One question though. Let's say I wanted to put the php files in a different directory. For example a directory called Android. How would I navigate there ? thx in advance!
I want to create the simple app which sends and receive data from MySql DB. But, now I have the problem with which kind of connection to choose. Which one is more popular or the best for Android apps? What when I do not have WebServer, only DB access? Is it worth of that to create web service for one simple app? Data should be sent in a background but I was read about Asynch and people said it`s not good practice to use this because of a memory leak. What instead?
Will you please tell me some online server database website in which i can make my own database freely for testing purpose...if its of smaller size...doesn't matter....plz give me some website names.
I am tring to launch the app after setting the same in my C Panel Hosting.. it is working fine in my computer ..But when want to launch same in mobile.. Result coming only "login Status" But Log in success or not success message is not appearing..need help also need guide to store information in C Panel database from my Android studio..
i have a wammp server on my pc but want to test this on my mobile phone. how do i change the string login_url to connect from my phone to my pc with wamp server?
get your ip address using ipconfig/ifconfig from the terminal also change the line "require local" to "require all granted" in your httpd-vhosts.conf file in the apache tools hope this helps :)
hi. I have a database where images are uploaded. i want to get notification on my android app when a new image is uploaded. like a push notification. can you help me with this please?
How can i start new activity depending upon result of login script. For example if username passwor is correct, new activity should be started otherwise error message. I know how to start activity. and my connection with login.php is fine
Does anyone know if this video also works with XAMPP process and not WAMP? in this case just asking because I did put my .php files in the htdocs folder
sir i am useing free web hosting and free domain,and i have two php file which save data in database and another retrive data if i am see these files in website then it will give responce as localhost but when i am save url of these file in android studio project then it give some error the errror is like "this site requires javascript to work,please enable javascript in your browser or use a browser with javascript support" please suppot me sir frequently please
bonjour,merci pr ce cours; je voudrais savoir comment relier une database a mon applicationa ndroid map ;autrement dit , les coordonnees de mes positions sont stockers dans la base de donnee et je vousrais les afficher sur map .? comment faire? merci de me repondre
hi in my local host it is working but online i had uploaded scripts and php scripts are working online perfectly i had tested by applying if conditions to both scripts but i am giving my domain name instead of ip but it is not working error: blank login status string url not working online
im just getting an alert box Login status but nothing is coming weather login successful or not plss help me i just bought hosting from 1 month in godaddy
mine is unsuccessful. it just show login status. how can i fix it? when i try to change the url into ip address of the website, it show some message. can anybody help me?
I am getting file not found error.. My android device and laptop(on which wamp server is running) are both connected to same wifi. However when i am trying to access the url : my_ip_address/login.php, i get correct response from wamp server
Pratik Wadibhasme could you please explain it clearly how did you get the correct response? I used the IP address of my computer (by typing ipconfig in command prompt).I connected net of phone to computer.(Both are in same n/w).But my app is stopping when I click register button. Can you please help?
this is not working for me. When I run the app pointed to the web hosted server I get login not success. I've double checked all passwords...any ideas?
what is the meaning of this line?is it necessary?BufferedRaeder bufferedReader=new BufferedReader(new InputStreamReader(inputStream, "iso-8859-1"));please help?
Hi there, i have a working login/register android app with php and sqlite, (locally), i have an account with godday, i uploaded my server files, and changed the db connection, but i am unable to acess the database from my andriod phone. is that an issue with remote access or i must have done something wrong. thanks
I am having a problem: When I connect the app to my local server it works well, when I connect the app to the server hosted on free we hosting it returns some garbage in the alert box. I created a dummy php script that posts the same data that the android app is posting and it worked fine. Can someone please help me? Thank you very much
Hi. I am not able to register. When i click on register button, no msg is shown just the preexecute msg is displaying, and while login. my login is failed msg is showing.
@@apcs9973 little late but i had the same problem but was able to solve it with that forum stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted
I tried this on an online hosting site. But after clicking 'Login' button.. my alertdialog shows message "This site does not support Javascript....." Any help??????????
Hello. Good tutorial but i have a problem im getting an error: Error:(25, 25) error: non-static method execute(Params...) cannot be referenced from a static context where Params,Progress,Result are type-variables: Params extends Object declared in class AsyncTask Progress extends Object declared in class AsyncTask Result extends Object declared in class AsyncTask its about: BackgroundWorker.execute(type, username, password);
create a new activity, then create a method with an intent inside it calling the 2nd activity, then calling the method you just created to your main method in the 1st activity
Hi I hope someone can help me . My webserver is hosted online but when I send the login info I get a long message that I think is sent as HTML format and basically it says "This site requires JavaScript to work please enable javascript in your browser" any idea how I can get the actual response e.g "login successful"
Sami Kanafani yeah you can actually get is as HTML format from Android studio then copy it and paste into a new HTML page so you can see the actual response. Mine showed some error msg or something wrong I can't remember what it was .
Hello Sir I purchased a economy hosting from godaddy And Now I want to connect it with php Now I followed you as you have explained in video but it did not work for me . Will you give me any other idea about connecting the database with php I watched your video that how to create database in cpanel You are an Indian I'm also an Indian. So You should help me in this because everyone help each other
this video before year ago ,Maybe some of codes are changed! i am learn an application programmer,but we don't learn the mysql yet.but maybe your problem at the php code
i have error "java.io.FileNotFound exception" in the Url despite of uploading the necessary php file in the webhost cpanel kindly help me. i have used the same code as well
Hi, I got very good knowledge from your Android Studio Tutorials, and i have started making apps in Android. But I am getting java.net.UnknownHostException when i am trying to fetch my login.php file from 000webhost.com. So please try to solve this query and answer me as soon as possible.
hi i created a account on 000webhost.com and created database and using file manager i have created the login.php and conn.php.Where I have to save the files and what is the server name in conn.php and what is the login url in backgroundworker.java?Can you please help me out?my email id is:saravananraj2196@gmail.com
A localhost means the place where the host server is running. So if you use Wamp or uWamp or other hosting applications and host it on your pc, the localhost is your own pc machine. But when the hoster at this case is godaddy, the localhost is pointed to their hosting server.
I can't believe I found a toturial for doing EXACTLY what I needed to do with all the same services and interfaces.
broo seriously that helped me a lot thank you so much for sharing your knowledge
you are breathtaking
very useful tutorial.. I am new in mysql db and your videos #1 on my favorite list ^^
very useful sir, i have really enjoyed.
thank youuuuuuuuuuuuuuuuuuuuuuuuuuuuu you're the best !!! thumbs up !
very cool you are the best
I have a question. I tried using this method but I'm not able to get the value of the result string from the doInBackground method into MainActivity. how do I do that? I essentially want to take the string value that was received in BackgroundWorker and save it to a variable in MainActivity
Maybe too late but can help others. In your php convert your response to json before echoing and in Java get that. Note it will be converted to json array so know how to handle it in Java. know to send that to MainActivity, your contractor has to take two parameters. One will be the context and the other will be an instance of your mainActivity.
Really helpful.
Thanks a lot for making this video.
indians so good at coding
Great Video!
Worked fine for me.
One question though.
Let's say I wanted to put the php files in a different directory.
For example a directory called Android.
How would I navigate there ?
thx in advance!
thanks for your videos sir
i hope you make tutorials about android connection to sql database using web server
Thank you sir
thank you sir.
its helpful
thnx for this amazing videos 👏👏
my database only allow to access from my ip not another ip adresses. Is there any solution for this problem? ı m using centos web panel.
Can we connect existing firebase data to my own hosting server
I want to create the simple app which sends and receive data from MySql DB.
But, now I have the problem with which kind of connection to choose.
Which one is more popular or the best for Android apps?
What when I do not have WebServer, only DB access? Is it worth of that to create web service for one simple app?
Data should be sent in a background but I was read about Asynch and people said it`s not good practice to use this because of a memory leak. What instead?
I mean one of them is using php script and phrasing get post
Can use jdbc instead of php
Awesome Bro!
im using hostinger "single shared hosting" what it is not working at all any ideas?
very helpful!
Thank you so much :)
Will you please tell me some online server database website in which i can make my own database freely for testing purpose...if its of smaller size...doesn't matter....plz give me some website names.
So in this step we need to have Web that already been hosting right? Hmm
Yes, you need for web site to access remote data
I am tring to launch the app after setting the same in my C Panel Hosting..
it is working fine in my computer ..But when want to launch same in mobile..
Result coming only "login Status"
But Log in success or not success message is not appearing..need help
also need guide to store information in C Panel database from my Android studio..
This is not working for me. When i run this app then it will show "This site requires javascript to work".
i have a wammp server on my pc but want to test this on my mobile phone. how do i change the string login_url to connect from my phone to my pc with wamp server?
AbikersPOV do you know now what the answer is?
get your ip address using ipconfig/ifconfig from the terminal
also change the line "require local" to "require all granted" in your httpd-vhosts.conf file in the apache tools
hope this helps :)
can i show the message "login successful" on the app instead of an alert window with this code?
hi. I have a database where images are uploaded. i want to get notification on my android app when a new image is uploaded. like a push notification. can you help me with this please?
How can i start new activity depending upon result of login script. For example if username passwor is correct, new activity should be started otherwise error message. I know how to start activity. and my connection with login.php is fine
Can we connect two application using database to each other reply plz
Does anyone know if this video also works with XAMPP process and not WAMP? in this case just asking because I did put my .php files in the htdocs folder
Thanks for your support. Can you send me the link where there are multiple pages and there is a hyperlink. Thanks one again
sir i am useing free web hosting and free domain,and i have two php file which save data in database and another retrive data if i am see these files in website then it will give responce as localhost but when i am save url of these file in android studio project then it give some error
the errror is like "this site requires javascript to work,please enable javascript in your browser or use a browser with javascript support" please suppot me sir frequently please
hi sir can you help how to make and classrecord apps ... ???
can it run on online database ? , hosting(cpanel) ?
bonjour,merci pr ce cours;
je voudrais savoir comment relier une database a mon applicationa ndroid map ;autrement dit , les coordonnees de mes positions sont stockers dans la base de donnee et je vousrais les afficher sur map .? comment faire? merci de me repondre
tysm working fine
Is your database on online server?
hi in my local host it is working but online i had uploaded scripts and php scripts are working online perfectly i
had tested by applying if conditions to both scripts but i am giving my domain name instead of ip but it is not working
error: blank login status
string url not working online
Right? Right.. Right? RIIIIGHHHHHTTTTTT.. RIGHT?
(Funny, thanks for helpfull vids)
im just getting an alert box Login status but nothing is coming weather login successful or not plss help me i just bought hosting from 1 month in godaddy
mine is unsuccessful. it just show login status. how can i fix it? when i try to change the url into ip address of the website, it show some message. can anybody help me?
What message does it display?
dont copy the code on the link follower his steps the code in the link has a problem
Could you please do it with aws
I am getting file not found error.. My android device and laptop(on which wamp server is running) are both connected to same wifi. However when i am trying to access the url : my_ip_address/login.php, i get correct response from wamp server
Pratik Wadibhasme could you please explain it clearly how did you get the correct response?
I used the IP address of my computer (by typing ipconfig in command prompt).I connected net of phone to computer.(Both are in same n/w).But my app is stopping when I click register button.
Can you please help?
this is not working for me. When I run the app pointed to the web hosted server I get login not success. I've double checked all passwords...any ideas?
every time I press login button I dont konw why it always give me login unsuccessful (which i put in else condition in php file).
what is the meaning of this line?is it necessary?BufferedRaeder bufferedReader=new BufferedReader(new InputStreamReader(inputStream, "iso-8859-1"));please help?
got a login success but after that their is some kind of code in their(Analytic code) how to hide it
Do i need a premium account to host or I can just use a offers free web hosting sites that have a mysql database and phpmyadmin
free one works
how can i open a new activity after logging in? Thank you
Hi there, i have a working login/register android app with php and sqlite, (locally), i have an account with godday, i uploaded my server files, and changed the db connection, but i am unable to acess the database from my andriod phone. is that an issue with remote access or i must have done something wrong. thanks
did u add user to your database privilege after creating it??
How do I retrieve data from MySQL database using android studio?
Mine isn't working. I have godaddy too and did what you did. but my login button only display status.
i have the same probleme
same situation its the NotTrustedException related to SSL its not able to extablish proper connection
Rahul Yadav Sounds like it, is there a fix to it? Don’t tell me I have to buy the SSL? Either way I will still be able to continue working on my app.
Apparently, you cannot seem to connect with your database.
Have turned internet connection in your emulator ? Try to turn your wifi / data on in your emulator
I can't find the PHP file if I enter the URL in searchbar (like the IP/login.php), anyone has a fix?
i did exactly the same and its giving file not found exception
Can you tell me about login successful and go to new activity(home activity)
did you figure out how to move to a new activity when login success?
лайк, программисты
***** обоснуй
***** тогда все ясн)
I am having a problem:
When I connect the app to my local server it works well, when I connect the app to the server hosted on free we hosting it returns some garbage in the alert box. I created a dummy php script that posts the same data that the android app is posting and it worked fine. Can someone please help me?
Thank you very much
I am having the same problem... Did you find the solution??
My application just crashed when i hit login button please help
Hi. I am not able to register. When i click on register button, no msg is shown just the preexecute msg is displaying, and while login. my login is failed msg is showing.
check your login url
everytime i try i get this File not found (404 error)
This video is really helpful ,but instead of showing a toast message I want to open next activity. So, how can I achieve that?
I am getting a blank status message. I am using godaddy.
Sir, how do I connect this mysql database online into netbeans?
Is this tutorial eventually going to talk about a remote access to the Mysql database?
Yes, it's telling how access or read remote MySql database using java android
You can't see all the code .... how can I see it?
how we can pass the result into another java class?
Is this server works only when your computer is online?
+official zaim No it works almost !
+Jop Wolterink I'm sorry. I'm really new to programming. I still don't understand how it's work
I also official zaim
Sir How Can i Check mySql database User Name or Password in Cpanel..??
It always returns null. Is there a solution?
Where is english subtitle it help up, please provide this video with it.
i have shown on "login status" alert box bot not show" login success" message
its not showing in actual android device alsoo plss help me : (
have same problem, were you able to resolve it?
@@apcs9973 little late
but i had the same problem but was able to solve it with that forum
stackoverflow.com/questions/45940861/android-8-cleartext-http-traffic-not-permitted
hello sir i want to upload as well as text data so please send video for upload image
is godaddy server free?
I tried this on an online hosting site.
But after clicking 'Login' button.. my alertdialog shows message "This site does not support Javascript....."
Any help??????????
on which hosting service you are trying?
I also faced the same issue?Have you solved it?
i am using ultimatefreehost.in
its not working show filenotfound exception
Hello. Good tutorial but i have a problem im getting an error:
Error:(25, 25) error: non-static method execute(Params...) cannot be referenced from a static context
where Params,Progress,Result are type-variables:
Params extends Object declared in class AsyncTask
Progress extends Object declared in class AsyncTask
Result extends Object declared in class AsyncTask
its about:
BackgroundWorker.execute(type, username, password);
I resolved alone afterall :P to be honnest i dont know what was the problem ... i retyped it and worked
Sir. how can i run my app on a real android device and not in emulator
developer.android.com/training/basics/firstapp/running-app.html
How do i go to another activity on android?
create a new activity, then create a method with an intent inside it calling the 2nd activity, then calling the method you just created to your main method in the 1st activity
Hi I hope someone can help me . My webserver is hosted online but when I send the login info I get a long message that I think is sent as HTML format and basically it says "This site requires JavaScript to work please enable javascript in your browser" any idea how I can get the actual response e.g "login successful"
+Reema Domino Did you fix the problem?
I am having it also.
Thank you
Sami Kanafani yeah you can actually get is as HTML format from Android studio then copy it and paste into a new HTML page so you can see the actual response. Mine showed some error msg or something wrong I can't remember what it was .
Sami Kanafani after you fix whatever error in the code you will get the login successful msg.
Having the same problem. Any solution as of yet?
Hi, did you find the solution?
how to upload image Online Mysql Database.
brother i want that tutorial
How can i open a new activity when i click on the button "login" ?
+Jop Wolterink simply add startActivity(new Intent(this, NewActivity.class)) to your buttons onClick method
Reha DanielYes, but i want only open a new activity when the password is correct.
then add startActivity() to an if statement, something like:
if(passwordTextView.getText() == correctPasswordString)
{
startActivity(etc...);
}
Reha Danielokey thnx
No problem
Why not use wamp?
wamp is just for local use
can anyone has that background java file shown in this video at 13:22
Every time I click login it says login failed even though i have the correct details inserted
+Pauric Boyle Did you find the solution? I am getting the same error. Code is working fine on localhost.
Is it is free or cost any money
?
Same doubt
Hello Sir
I purchased a economy hosting from godaddy And Now I want to connect it with php Now I followed you as you have explained in video but it did not work for me . Will you give me any other idea about connecting the database with php
I watched your video that how to create database in cpanel
You are an Indian I'm also an Indian.
So You should help me in this because everyone help each other
Do I really have to buy cpanel to do this tutorial?
you can have free cpanel too
sta da niya kuss ao majburi daaaaaaaaaaaaaaa ao warka dang
after clicking the login button, my app crashes. Did anyone else run into this issue?
this video before year ago ,Maybe some of codes are changed! i am learn an application programmer,but we don't learn the mysql yet.but maybe your problem at the php code
I am facing same problem
i have error "java.io.FileNotFound exception" in the Url despite of uploading the necessary php file in the webhost cpanel kindly help me.
i have used the same code as well
same error
Hi, I got very good knowledge from your Android Studio Tutorials, and i
have started making apps in Android. But I am getting
java.net.UnknownHostException when i am trying to fetch my login.php
file from 000webhost.com. So please try to solve this query and answer me as soon as possible.
hi i created a account on 000webhost.com and created database and using file manager i have created the login.php and conn.php.Where I have to save the files and what is the server name in conn.php and what is the login url in backgroundworker.java?Can you please help me out?my email id is:saravananraj2196@gmail.com
somebody got a flue...
where sub ? :(
So many ads
God damn it, I'm just getting connection unsuccesful and login unsuccesful
Turns out that I needed to put "localhost" as server_name, since the website host is hosting the database also(localhosting).
same goes with me..but why is it local host again? can u explain to me in a simple word? Tq
A localhost means the place where the host server is running. So if you use Wamp or uWamp or other hosting applications and host it on your pc, the localhost is your own pc machine. But when the hoster at this case is godaddy, the localhost is pointed to their hosting server.
Bhai ap ka whatsapp number kiya ha muje ap ki help chahiey please
How do I retrieve data from MySQL database using android studio?
androidbash.com/connecting-android-app-to-a-database-using-php-and-mysql/