yashsingh1/xdaforums huggingface dataset:
[XPERIA X8 Q&A, Help & Troubleshooting] AGuyOnNet:
Thanks i guess i can use the 2.2 or 2.3 rom with stock k. then

To the rest who told me to use search are a bunch of ass***** who only replied here to increase their post count if you dont have anything to say then simply dont post here

Lol i need to enter captcha every time i post this forum is a joke place filled with annoying people
[XPERIA X8 Q&A, Help & Troubleshooting] cascabel:
you must have not read the rules then. i guarantee you will encounter the same ass***** regardless whichever subforum you visit in xda if you continue your ask-first-search-maybe-never attitude. and fyi, we have more than enough posts to our names, thank you. if this forum is filled with annoying people, well, no one's asking you to stay. lol. :rolleyes:

Just because i don't doesn't mean i can't.
[XPERIA X8 Q&A, Help & Troubleshooting] AGuyOnNet:
I bet 1000 of your posts were all about using search
[XPERIA X8 Q&A, Help & Troubleshooting] kreatonn:
Before make a new thread better to google first, if u not find ur solution then, ask here..:rolleyes:
[XPERIA X8 Q&A, Help & Troubleshooting] AGuyOnNet:
Help pls i installed gingerdx rom 2.3.7 but i get stuck on the second gingerdx logo (animated 1)
[XPERIA X8 Q&A, Help & Troubleshooting] Toledo_JAB:
Google is your friend.

Please read and read and read then read some more.

Thread closed
[HTC Sensation] RoryUK:
A Couple of days back I woke to find my phone hot with the alarm going off (it had been going of for a while it would seem.... I was clearly tired, lol)

I dismissed the alarm and put the phone in my pocket.

A couple of hours later I find the phone is off.... It doesn't switch, nor does it show any charging light. Equally it is not recognised via usb :(

I'm assuming it as had a motherboard/ main board failure resulting in a pretty brick?

What else to add? I tried putting it on charge with the battey/sim/sd card removed overnight (as I had read) but still no joy.

An other recommendations?

Cheap places to purchase a mainboard? (I know one way obviously is to buy a XE with a cracked screen etc.

All help appreciated as always, thank you.
[HTC Sensation] RoryUK:
Surprised I didn't get an answer, even if it was confirming the worst :(

On the plus side, it push me into purchasing an HTC ONE (on route now) but would still like to get the Sensation up and running again to give to my wife.

Living with my old Nokia N97 at the moment. (OMG It makes you realise how much I miss my Smartphone)
[HTC Sensation] extrem0:
Try removing your battery for a while (20 minutes) then put it back and try to charge.
[HTC Sensation] RoryUK:
Cheers, tried that but to no avail, in fact I think I have tried everything that I searched for on XDA.

On the plus i'm loving the my new ONE (missing the removable storage though!
[Nexus 10 Q&A, Help & Troubleshooting] newellj79:
Any suggestions on a good I/o scheduler for downloading torrents? I download alot and my tablet seems to lag a lot at anything over 1Mb/s. I was wondering if playing with the scheduler might help? Thanks...
[Nexus 10 Q&A, Help & Troubleshooting] lvnatic:
Use atorrent and limit the max connections from 64 to 32 in bandwith settings
[Nexus 10 Q&A, Help & Troubleshooting] newellj79:
Huh?
[AT&T HTC One (M7)] parkerfriend:
So yesterday I tried flashing this tweak on my HTC One. Sadly it crashed my phone somehow and I ended up wiping the phone, and now it's telling me each time I reboot that it has no OS. I decided to try to flash stock Sense 5, but I realized I don't have a backup or anything. I've been trying to use Android File Transfer to make the OS available in recovery. Sadly it seems when it's on recovery I can't use file transferring. I would turn it on, but it won't boot any further than the "HTC Quietly Brilliant" loading screen.

Anyone have any ways I can get the OS back on the phone? Please help!
[AT&T HTC One (M7)] whitetiger_0603:
Are you using TWRP? Cause I've been wondering the same thing lately.
[AT&T HTC One (M7)] parkerfriend:
So I figured out how to fix it- using adb I sent stock Sense back to my phone and flashed it, worked like a charm.
[AT&T HTC One (M7)] whitetiger_0603:
What command did you use?
[AT&T HTC One (M7)] GermanGuy:
adb push %PATH TO BE PUSHED% %PATH WHERE TO BE PUSHED%

Sent from my HTC One
[AT&T HTC One (M7)] whitetiger_0603:
Haha thanks. I was dumb and didn't think of the command used in SuperCID until right before you posted this.
[HTC One S] Ster76:
So I recently updated my hboot to 2.15 for the new 3.4 kernel. I have a Telus branded One S, so I used this firmware to update: http://www.androidfiles.org/ruu/getdownload.php?file=Ville/OTA_Ville_U_JB_45_S_TELUS_WWE_3.16.661.4_1.13.50.05.31_10.30.50.08L_release_307532nohrvy5j6i2o2i8i.zip

However, when I update to this hboot, I lose service. I will have it for a couple seconds or so, then I will lose it. This has happened on every ROM I have tried, including the new ones with 3.4 (CM, PAC, Carbon). I have tried going back and using the previous RUU's (I've tried this, and this) But those two aren't on the same hboot correct? Those two don't work, and I am unaware of any others as none are listed on that site.

So my problem is that I have no service, and I can't go back to previous hboots and I don't know why. Is it a problem with the new radio? If so I haven't found any great tutorials on where and how to get different radios.

If anyone could help me at all I would be so grateful if they could point me in the right direction. If someone helps me I could definitely make it worth their while over paypal ;)

I can post screen shots or whatever if someone could tell me if they need any information in order to help.

Hboot-2.15.000

Radio-1.13.50...

Can't SuperCID as it's JB... CID is Telus_001 atm
[HTC One S] cuiltheory:
Did you look at the s=off post?. Go to http://www.moonshine.io and see if your phone is on the list. I had OTA 2.15 and with moonshine script I got the s=off. With s=off you can go back to stock.
[HTC One S] Ster76:
Doesn't work since I am on the TELUS WWE 3.16.6614, and that says it is only for 3.14
[HTC One S] mr_zero:
I'm on the same boat with you. CID is Telus_001 too. If you find a way to solve the problem, please let me know, I'll do the same too. Thanks a lot.
[HTC One S] cuiltheory:
Moonshine is updating the script, so check his web site from time to time.
[HTC One S] GUGUITOMTG4:
the problem is not the new hboot. is new cm10.1 based roms. (NOW SEEMS FIXED)

it happened to me too. I did not update hboot and stayed with 1.14.0004 and flashed early versions of Carbon_HALO roms with 3.0.80 kernel by $droyd$ and lost signal until toggle airplane mode on-off.. then wiped and flashed carbon with 3.4 kernel.. same thing. data issue again. Then flashed carbon 6-21 build and data has worked well so far for 20+ hours.
[Nook HD, HD+ Q&A, Help & Troubleshooting] P Complex:
A question for any intellectual Android/Nook-addicts out there...

Basically, I've rooted my Nook HD+ (Numberous times now) and have experience rooting android devices in the past and have had no problems. I used the CWM method - installed universal root on factory stock (And afterwards, 2.1.0 stock just to see if it fixed the problem... it didn't) and extras (Tried not installing extras twice also, didn't make a difference)

Basically, I've learnt the hard way that eight resets on boot and the device hard-resets to factory stock. The first Root Bootup is fine (The bootup after removing the CWM sdc) and, after turning it off and on again, so is the second bootup... But the third one is where the problem occurs. I power on as normal, and the standard 'Nook' screen appears as it begins to boot...

It then proceeds to resetting itself eight times - never getting past the 'Nook' screen that appears at the start of every bootup, therefore causing a hard factory reset.

I've tried using the CWM recover method to the OS I used before rooting the nook originally, and there doesn't seem to be any problems if the device isn't rooted. I've also just let it update itself from factory version to current version - and it works fine with that also.

Perhaps this is common and I'm just a plain idiot. I honestly can't find any answers - so if it is common, sorry for wasting your time!

Thanks for your time!

- P
[Nook HD, HD+ Q&A, Help & Troubleshooting] leapinlar:
Do you have some apps being automatically installed by Play Store? Sometime people have their settings set so that happens. Then a root app gets installed and makes some changes to /system and causes a reset. Go to Play Store and tell it not to automatically install or upgrade apps.`

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook HD, HD+ Q&A, Help & Troubleshooting] P Complex:
No apps that automatically download that i can see. But you're likely onto something - I do install all the apps manually (No matter how menial) (Going through the list, hitting install for each of them) before manually logging into each one afterwards. I do use a few root apps - no ad-versions to avoid those annoying popups, Ultrabox, Superuser, Pimp my Android and Root Browser to name most, if not all of them.

I'm going to have to do things the awkward way now, installing each app, setting them to the setting I want for them, and seeing what happens. I have a mild suspicion it's a setting on Pimp my Android...

I'll let you know if I sort it. Thanks for the suggestion :):cyclops:
[Nook HD, HD+ Q&A, Help & Troubleshooting] leapinlar:
Why are you installing superuser? It is already installed with the universal root. That may be it too.

Edit: And some of the apps I put on there are old on purpose. Like Root Browser. I have it set so that the free version is ad free. If you update it, the ad free goes away.

Sent from my Nook HD+ running CM10.1 on emmc.
[Nook HD, HD+ Q&A, Help & Troubleshooting] P Complex:
I am VERY sorry it's taken me so long to reply! Even though I've only just joined, I should have done it long before now.

I found the problem - it was 'Pimp my Android' app. I was experiencing something called 'boot loop' - so much for my research skills for such a common problem. I fiddled about with my usual settings - and found some that cause it to get stuck like that, even when they're set not to activate on startup!

Tis' all working now. Everything else seems to be just peachy! You were right, thanks for your help :)
[Java for Android App Development] alobo:
Additional Information

Changelog

November 3, 2013

Added a link to the GitHub repository.

June 26, 2013

Updated PHP Code. It's more reliable and uses the newer MySQL APIs. Thanks to [MENTION=4423995]dbarrera[/MENTION] & [MENTION=4311415]vijai2011[/MENTION]

July 7, 2013

Updated the Android project and added Internet permissions (ClientServerRESTDemo v2.zip)
[Java for Android App Development] vijai2011:
Thanks for this amazing guide but I have a issue.I have my own table and columns.So I changed your php code according to that and when I do a post query in rest,I get all null.But if I do the same in phpmyadmin,I have results.

This is what I get in postman:

{"pid":null,"name":null,"UID":null,"mobile":null,"description":null,"created_at":null,"updated_at":null}

attached the output of phpmyadmin.

And my phpcode:

<?php

#Setup variables
$firstname = $_POST["FirstNameToSearch"];

#Avoid SQL injection attacks
$firstname = mysql_real_escape_string($firstname);

#Connect to Database
$con = mysql_connect("localhost","user","pass");
if (!$con)
{
die('Could not connect');
}

#Select the test database
mysql_select_db("mydb", $con);

#Get the user details from the database
$userdetails = mysql_query("SELECT * FROM mytable WHERE name = '$firstname'");

#Catch any errors
if (!$userdetails) {
echo 'It seems the server is down.Please try later';
exit;
}

#Get the first row of the results
$row = mysql_fetch_row($userdetails);

#Build the result array (Assign keys to the values)
$result_data = array(
'pid' => $row[1],
'name' => $row[2],
'UID' => $row[3],
'mobile' => $row[4],
'description' => $row[5],
'created_at' => $row[6],
'updated_at' => $row[7],
);

#Output the JSON data
echo json_encode($result_data);

?>

Thanks for help.

Edit: just found that your app is missing internet permission in manifest

<uses-permission android:name="android.permission.INTERNET" />
[Java for Android App Development] cyberbeast:
:thumbup::) :D

Thanks so much for this. I will try it out soon.
[Java for Android App Development] alobo:
I was able to reproduce the null result - it means that the result was not available in the database. You'll want to double check the value you are passing to the script in Postman. (When I used 'FirstNameToSearch' and 'test' - I got a correct result. However, when I used 'testa', I got a null result.)

You can try adding this into the PHP script to catch this problem:

#Get the first row of the results
$row = mysql_fetch_row($userdetails);

[B]#Check to see if a result was returned.
if(!$row){
echo 'User does not exist';
exit;
}[/B]

I also noticed a few things in your PHP script:

In your screenshot, your table name appears to be 'Myapp', however in your PHP script, it looks like you are using 'mytable'

When you build the result array at the end, you are trying to access a column that doesn't exist:

This code tries to access an 8th column/index:

'pid' => $row[1],
'name' => $row[2],
'UID' => $row[3],
'mobile' => $row[4],
'description' => $row[5],
'created_at' => $row[6],
'updated_at' => $row[7],

You only have seven columns, so it should be:

'pid' => $row[0],
'name' => $row[1],
'UID' => $row[2],
'mobile' => $row[3],
'description' => $row[4],
'created_at' => $row[5],
'updated_at' => $row[6],

Good catch - Thanks! I'll update the project asap.
[Java for Android App Development] vijai2011:
That is not a error in table name because I just wanted to hide it out here but actually it got revealed in the screenshot :D.No issues will try your php code and correct my json array too.thanks
[Java for Android App Development] vijai2011:
For some reason,the problem was caused by the mysql_real_escape_string.I commented that line and it is working now.
[Java for Android App Development] alobo:
Now that's interesting.. I've never experienced a problem with that before.

I took a look at the PHP docs and found that mysql_real_escape_string() is depreciated - that could be contributing to the problem. I'll investigate this further and adjust the guide as necessary.

Thanks for sharing your solution!.
[Java for Android App Development] vijai2011:
Maybe you are using ancient php module :P.BTW Can I also put data into tables using your php and slightly modifying "mysql_query" and using post?Or should I use put along with mysql_query?If later is the solution,could give me the snippet of how a put variable looks?because I dono php and I was waiting for someone to write this guide because before I was connecting to db with JDBS which isnt safe.Thanks and sorry for the trouble.

Edit: I got it to work like I said.But only issue is the created at and updated at time stamp which is not the part of php nor the app.I will correct it from mysql.Thanks once again.Will be happy to trouble you soon lol...No dont take it serious BTW
[Java for Android App Development] alobo:
Ha you beat me to it! I'll definitely try and add a section into the guide about updating tables. I appreciate your feedback on the guide, and I'm glad it helped you. Feel free to trouble me :)
[Java for Android App Development] dbarrera:
Perfect! Just what i needed for my next week exam!
[Java for Android App Development] objaa:
Super, thx!

But please tell me what I'm doing wrong.

Code:

HttpResponse response = httpclient.execute(httppost); //throw...​

i save errors in log (attached)

pls help ;(
[Java for Android App Development] vijai2011:
You are doing something on the main thread which actually has to be done in a different thread.I suspect its at line #119.If you show the entire code,somebody might point it out easily for you
[Java for Android App Development] objaa:
ok, all code:

package com.nsp.obja;

import java.util.ArrayList;

import org.apache.http.HttpEntity;

import org.apache.http.HttpResponse;

import org.apache.http.NameValuePair;

import org.apache.http.client.HttpClient;

import org.apache.http.client.entity.UrlEncodedFormEntity;

import org.apache.http.client.methods.HttpPost;

import org.apache.http.impl.client.DefaultHttpClient;

import org.apache.http.message.BasicNameValuePair;

import org.apache.http.params.BasicHttpParams;

import org.apache.http.params.HttpConnectionParams;

import org.apache.http.params.HttpParams;

import org.apache.http.util.EntityUtils;

import android.os.Bundle;

import android.app.Activity;

import android.util.Log;

import android.view.Menu;

import android.widget.Toast;

public class MainActivity extends Activity {

[MENTION=439709]override[/MENTION]

public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.myscreen);

post();

}

[MENTION=439709]override[/MENTION]

public boolean onCreateOptionsMenu(Menu menu) {

getMenuInflater().inflate(R.menu.main, menu);

return true;

}

void post()

{

try

{

ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();

nameValuePairs.add(new BasicNameValuePair("FirstNameToSearch", "wow"));

//Create the HTTP request

HttpParams httpParameters = new BasicHttpParams();

//Setup timeouts

HttpConnectionParams.setConnectionTimeout(httpParameters, 15000);

HttpConnectionParams.setSoTimeout(httpParameters, 15000);

HttpClient httpclient = new DefaultHttpClient(httpParameters);

HttpPost httppost = new HttpPost("http://www.xda-developers.com/");

httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

HttpResponse response = httpclient.execute(httppost);

HttpEntity entity = response.getEntity();

String result = EntityUtils.toString(entity);

Toast.makeText(this, result.length(), Toast.LENGTH_LONG).show();

}

catch(Exception e)

{

Log.e("ClientServerDemoX", "Error: ", e);

Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show();

}

}

}
[Java for Android App Development] vijai2011:
Do post() in async because it has to do http request which needs to be done in another thread.
[Java for Android App Development] objaa:
hoooww :crying::crying:

Thanks, I figured out and got the code page of our glorious forum :)
[Java for Android App Development] dbarrera:
I'm having an issue while testing the Query... I'm using Firefox and using RESTClient for debugging... and testing whatever value, db always responds null (See attachment)...
[Java for Android App Development] vijai2011:
Exactly what I experienced first time.Try after commenting the line which prevents mysql injection and see if it works.If you run latest mysql,the chances are probably that its the issue
[Java for Android App Development] dbarrera:
Already tried that... No go... Had to write the whole thing using w3schools example code as base... Just resolved a couple minutes ago and completed the project (it can be viewed @ Github:CardManager (App) and cardmanager_json (Web Service, only principal.php is the one handling the whole thing))...

Maybe a good add to the tutorial would be to have a config.php file with the user, passwd, database and table data calling it through require_once()... The DBConexion and DBGestion files (in my github) are supposed to do that, but didn't work either (hence doing the principal.php code all over again)...
[Java for Android App Development] alobo:
Interesting.. I'll take a look at at your script, revisit the W3 tutorials, and then re-write mine. It's really rudimentary and tends to fail easily. I wanted to write about the config.php, however, I also wanted to keep this guide as simple as possible for newer users. Maybe I'll add in an advanced section.

I'll update the guide in a few days, as I'm right in the middle of exams :/

Thanks for the feedback!
[Java for Android App Development] dbarrera:
No problem... I'll wait for your update... And by the way, thank you for helping me make my mid term project work... For next Tuesday I need to create a new project from scratch using Web services and need to recycle code...
[Java for Android App Development] domenukk:
It's nice that you care a little about security. However afaik you schould always use prepared statements for sql.

http://php.net/manual/de/pdo.prepared-statements.php
[Java for Android App Development] francis11:
nice topic

nice topic ,,
[Java for Android App Development] alobo:
Updated!

[MENTION=4423995]dbarrera[/MENTION] I've updated the PHP script! If you could check that out, it would be awesome!

[MENTION=2280187]domenukk[/MENTION] After reading your post, I did some research into prepared statements. They do look elegant and provide security by escaping strings automatically. However, I'm not too sure of their efficiency, especially when used for a single query as in this tutorial. I'm going to do some further research and get back to you. If you have any input/suggestions regarding prepared statements, I'd be glad to hear them!

Thanks to everyone for the support - you're all helping make this guide better!
[Java for Android App Development] stekarson:
Database connection error: Access denied for user 'root'@'localhost' (using password: NO)

Thanks for an excellent tutorial! However, I'm stuck at testing my DB with Postman. I get the error message above when I try to send the command.

I guess I have to assign some user to the mySQL table, am I right? I've tried to find it myself, but I can't...

EDIT:

simon@tuxflux8:~$ mysql mytestdatabase
ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mytestdatabase'

simon@tuxflux8:~$ sudo mysql mytestdatabase
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

It seems like the table(?) isn't visable. If I enter 'mysql' and then dubbletap on tab, i get the following output:

simon@tuxflux8:~$ mysql
information_schema test

EDIT2:

So this worked, but that doesn't help me :(

simon@tuxflux8:~$ sudo mysql -p mytestdatabase
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 198
Server version: 5.5.31-0ubuntu0.13.04.1 (Ubuntu)

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

EDIT3: Could it be that I'm trying to execute the .php-script from outside localhost? I'm trying to set up the DB on my VPS, so I'm not working localy when I'm using Postman.
[Java for Android App Development] dbarrera:
[MENTION=4553333]Alkonic[/MENTION] nice update... I'm in exams this week, so a bit hard to try, but it looks good to me... Today I added a new repository to my Github which uses your and mine implementation... TalleresUEES it's called... You know what would be nice? Separate the DoPOST code from the activity code... Was trying that earlier today, but as I had to turn in my exam early, couldn't be experimenting much...

Cheers!
[Java for Android App Development] dbarrera:
Actually, what you need to do is specify the server, user, password in the connection ($con) statement... Apparently, you're not supplying the password, hence the problem you're facing...
[Java for Android App Development] stekarson:
Yeah, I entered my password a few times, I even tried to make a new account in phpMyAdmin with a super-easy password - but it doesn't work!
[Java for Android App Development] dbarrera:
Can you post your php code?