• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Will not start

Left on overnight with a charged battery but next morning would not start. Tried to charge battery but no indication. Also with alternative working charger and cable. Tried power/vol buttons to start but again nothing. Phone seems to be bricked, no screen or sound, nothing.
Is this more likely to be the battery or a hardware fault?

How to parse several xml files at the same time and display them with their data in a listview

Hello I would parser several xml files and display their data each in a list. I manage to parse a single file. The code is just below. How to parse multiple files in a folder of external memory and display their data in a list?

this is my MainActivity

public List<ModelKmlData> modelkmldata = null;

private View parent_view;

private RecyclerView recyclerView;
private AdapterListInbox mAdapter;
private androidx.appcompat.view.ActionMode actionMode;
private Toolbar toolbar;
private FloatingActionButton fabbtn;
SqliteHelper sqliteHelper;

public List<KmlDataModel> kmldatamodel = null;

@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gps_data);

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
if (ActivityCompat.checkSelfPermission(this,
Manifest.permission.WRITE_EXTERNAL_STORAGE)
== PackageManager.PERMISSION_GRANTED){

// Analyser les données KML dans un thread non-ui
new LoadKmlTask().execute();

}


else{

ActivityCompat.requestPermissions(this, new String[]
{Manifest.permission.WRITE_EXTERNAL_STORAGE}, 1);
}
}
else{
//startActivity(new Intent(getActivity(),
SQLite2ExcelActivity.class));
}

/*sqliteHelper = new SqliteHelper(this);

initToolbar();
initComponent();
Toast.makeText(this, "Appui long effectué",
Toast.LENGTH_SHORT).show();*/
}

private class LoadKmlTask extends AsyncTask<String, Void, Cursor>{
@override
protected Cursor doInBackground(String... args) {

// interroger la base de données et retourner un curseur des
//données kml.
SqliteHelper sqliteHelper = new
SqliteHelper(getApplicationContext());

Cursor cursor = sqliteHelper.getAllKmlCursor();

return cursor;
}

@override
protected void onPostExecute(Cursor cursor) {

String[] dataColumns = { sqliteHelper.COLUMN_KMLNAME,
sqliteHelper.COLUMN_KMLUNID, sqliteHelper.COLUMN_KMLDESC,
sqliteHelper.COLUMN_KMLCOORD};
int[] viewIDs = { R.id.list_item_name, R.id.list_item_title,
R.id.list_item_department,R.id.list_item_email };

SimpleCursorAdapter records = new
SimpleCursorAdapter(getBaseContext(), R.layout.item_inbox,
cursor, dataColumns, viewIDs, 0);

ListView listView = (ListView) findViewById(R.id.list);
if (listView != null) {
listView.setAdapter(records);
}

}

}

the code that parses :

// noms des balises KML
private static final String PLACEMARK = "Placemark";
private static final String DOCUMENT = "Document";
private static final String VALUE = "value";
private static final String NAME = "name";
private static final String DESCRIPTION = "description";
private static final String COORDINATES = "coordinates";
private ArrayList<ModelKmlData> kmlList = null;
private ModelKmlData currentKml = null;
private boolean done = false;
private String currentTag = null;

public ArrayList<ModelKmlData> parse(Context context) {

try{
String state = Environment.getExternalStorageState();
String path = Environment.getExternalStorageDirectory()
+ File.separator + "Fodecc_csv" + File.separator + "GFAM-
20190916-150100.kml";
XmlPullParserFactory xppf = XmlPullParserFactory.newInstance();
xppf.setNamespaceAware(true);
XmlPullParser parser = xppf.newPullParser();

File file = new File(Environment.getExternalStorageDirectory()
+ File.separator + "Fodecc_csv" + File.separator + "GFAM-
20190916-150100.kml");
FileInputStream fis = new FileInputStream(file);
parser.setInput(new InputStreamReader(fis));


//XmlPullParser parser = fis;

int eventType = parser.getEventType();
while (eventType != XmlPullParser.END_DOCUMENT && !done) {

switch (eventType) {
case XmlPullParser.START_DOCUMENT:
kmlList = new ArrayList<ModelKmlData>();
break;
case XmlPullParser.START_TAG:
currentTag = parser.getName();
if (currentTag.equalsIgnoreCase(PLACEMARK)) {
currentKml = new ModelKmlData();
} else if (currentKml != null) {
if (currentTag.equalsIgnoreCase(NAME)) {
currentKml.set_kmlName(parser.nextText());
// currentEmployee.setId(parser.nextText());
} else if (currentTag.equalsIgnoreCase(VALUE)) {
currentKml.set_kmlUNID(parser.nextText());
} else if
(currentTag.equalsIgnoreCase(DESCRIPTION)) {
currentKml.set_kmlDesc(parser.nextText());
} else if
(currentTag.equalsIgnoreCase(COORDINATES)) {
currentKml.set_kmlCoord(parser.nextText());
}
}
break;
case XmlPullParser.END_TAG:
currentTag = parser.getName();
if (currentTag.equalsIgnoreCase(PLACEMARK) &&
currentKml != null) {
kmlList.add(currentKml);
} else if (currentTag.equalsIgnoreCase(DOCUMENT)) {
done = true;
}
break;
}
eventType = parser.next();
}
} catch (XmlPullParserException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

return kmlList;
}
}

How could I add a loop that will recover all files and view their contents ?

Calls breaking up

I have the Moto G5 Plus running Android 8.1.0. The phone app Phone 11.0 which I believe came pre-installed with the phone. I am using Straight Talk for my wireless provider.
When I make a call it breaks up repeatedly and cuts out. I don't have any problems with texting but I can't use my phone as a phone. Any ideas what my problem might be? Thanks!

Help Mac not holding onto Bluetooth connection from my OnePlus6

Been using a MacBook Pro for 5 years with no Bluetooth problems whatsoever.
Changed the Mac two days ago for a 2019 Macbook Pro.
The Mac can see my OnePlus6 and occasionally the OnePlus can see the Mac but the connection only lasts a second or two before it drops it.
I've done everything possible in the Mac and also cleared all the cache on the OnePlus.
Anybody got any suggestions?

Good/healthy way to charge the phone?

I'm happy to tell that I just ordered a Mi 9t! My first Snapdragon 700 series phone! Because it's brand new I'm very sensitive for it and I want to "baby"(very careful) it. So I wonder what is a good way to charge a phone without damaging it a bit, like should I completely turn it off(holding power button and select off)? Or is it fine that only the screen is off and charge it? I read that you shouldn't make it reach it 100% and 0% because it will damage the battery is it true though?

Use tablet as handsfree for any Android Phone

Hello there,
I would like some suggestions for a project. I have a car with a cassette radio. I want to install a tablet in the car as a head unit. Sound from the tablet will go into a "aux in cassette" that will be permanently inside the tape deck. What I am missing in this entire scenario is... an app that will allow me to connect my phone (android) via BT to the tablet and make/answer calls from the tablet. I will use the 3.5jack for microphone and audio (that will go into the cassette). I tested with "TabletTalk" but I can't seem to get the sound to move from the phone. Besides you need the app on both devices. Also Tethering went through my mind (via OTG) but that would mean the phone is getting charged and .. I kinda wanna keep my battery healthy.

Does anyone know how to use a tablet as a handsfree? (Mr Google does not give me a good answer)
If you need more info I am happy to give.
Thank you for the time.

[Game][Free] Trick Colors 2

Hi,
We made a simple casual puzzle game. All you have to do is tap any one of the boxes colored red, blue and green. If the word reads blue, tap the blue box or if the color of the word is red, tap the red box.
View attachment 144605 View attachment 144606 View attachment 144607
Our friends tried it out and they loved it(maybe they wanted us to be happy) but we need some outside thoughts . We would appreciate it if you could check it out and show it to your friends and tell us what you really think.
Thank you.
Here's the link
https://play.google.com/store/apps/details?id=com.trickcolors2.rodio

Help Galaxy j3 2016 keeps restarting

Phone was working fine so I tried to root it it said I was rooted then I restarted the phone and now it's stuck in a restarting loop that's all it will do . The only other thing it will let me do is go to recovery mode so I tried factory reset and it didn't work. I tried wiping the cache and that didn't work I don't know what else to do hoping for some advice.

Oven cleaning made less toxic

I had to use Easy Off for now. Man, that stuff is strong. I had to go outside for a while. Even with repeated spraying, I couldn't get rid of all the crud. I finally resorted to Soft Scrub with bleach and a razor blade. That at least got most. Then there were the racks. They're a lot cleaner now, but there's still some left. What do I try next?

Help Moto G5s wont start after battery gone flat

If your Moto G5s goes flat there isn't enough charge to boot phone. The phone will boot then shut down & you cant charge it.

To fix
1 Plug in USB charger
2 Hold Vol- ( lower volume button) & power button for 10 seconds or so
3 Now you should boot into Command prompt recover mode. ( see pic of Android bot with his panel open & text beneath him,
4 Look at text. Look for line that states Battery ok (charging) if this is green then phone is charging.
5 Wait 30 minutes or so, you should by now have at-least 10% charge in phone. ( wont show until you start phone)
6 select with volume control buttons option on right near buttons for power & volume, the option Start.

Now phone should boot.

7 leave on charger until phone charged

sqliteOpenHelper...Unique combination of columns?

Hello.

I'm looking for some direction on creating a table that has uses UNIQUE constraints. When adding new rows to my database, I want to make sure I don't add a duplicate value. However, I need to check that the combination of two columns is unique.

for example the column names are as follows.

Code:
KEY_RECORD     KEY_FILE     KEY_TIME     KEY_TEMP     KEY_CONC

KEY_RECORD will repeat over 7 rows, with a the KEY_FILE iterating 1-7 such as

Code:
KEY_RECORD     KEY_FILE     KEY_TIME     KEY_TEMP     KEY_CONC
0001              1
0001              2
...
0001              7
0002              1
0002              2
....

currently I'm creating my DB using sqliteOpenHelper. I do the following.

Java:
private static final String TABLE_CREATE = "CREATE TABLE " + TABLE_RECORDS + "(" + KEY_ID + " INTEGER PRIMARY KEY," + KEY_RECORD + " TEXT," + KEY_FILE + " TEXT," + KEY_TIME + " TEXT," + KEY_TEMP + " TEXT," + KEY_CONC + " TEXT" + " )";

...

@Override
public void onCreate (SQLiteDatabase db)
{

    db.execSQL(TABLE_CREATE);
    db.close();
}

I know if I add the keyword UNIQUE I can make any of the columns unique.

Java:
private static final String TABLE_CREATE = "CREATE TABLE " + TABLE_RECORDS + "(... + " TEXT UNIQUE," + KEY_FILE + ..." + " )"

But how do I do it so that a combination of the two columns must be unique in order to add.

Message from the developers

Hi,

We created this forum to get unique views from you.
Trick Colors 2 is a casual puzzle game developed by Rodio studios (just two people).
Our friends who have tried out the game really liked it(but....). So can you check the game out and give your thoughts on it ?
We would appreciate it if you can.
Thanks a lot.

Here's the link to the game
https://play.google.com/store/apps/details?id=com.trickcolors2.rodio


Here's the link to the trailer

Attachments

  • Screenshot_20190910-222839.png
    Screenshot_20190910-222839.png
    40.1 KB · Views: 89
  • Screenshot_20190910-222805.png
    Screenshot_20190910-222805.png
    38.2 KB · Views: 83

Jetaudio problem with GPS

Hello,

I have the jetaudio + 9.9.0 for android on my Samsung s8 which give entire satisfaction except 1 thing

I start the music and that's work very fine but when i start a gps program at the same time with sound like ( google map, waze , tom tom , mazda gps car ) i have the sound also but when the message is finished the sound does not come back to the jetaudio player

I cannot have the 2 sound together working ( 1 after the other )

Is this something that we can solve in the settings (so many settings ) ,am i the only one, a known bug ?

Many thanks for your help

Filter

Back
Top Bottom