Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Android databases technology

OP JohnDeere1334

23rd April 2014, 11:10 AM   |  #11  
arpitkh96's Avatar
Senior Member
Flag panipat
Thanks Meter: 551
 
1,126 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Quote:
Originally Posted by Jonny

if you wanted to open it from within the application you could do something like:

Code:
ZipFile z = new ZipFile("/mtn/sdcard/download/teste.zip");
But if you wanted the intent to launch into a different app to handle the zip (eg Archidroid etc) then have you tried something like:
Code:
File file = new File("mnt/sdcard/download/test.zip");
            Intent i = new Intent();
            i.setAction(android.content.Intent.ACTION_VIEW);
            i.setDataAndType(Uri.fromFile(file), "application/zip");
            try {
                   startActivity(i);
            } catch (ActivityNotFoundException e) {
                  Toast.makeText(MainActivity.this,"No Application Available to View Zip files",Toast.LENGTH_SHORT).show();
            }

Thanks.
One more.l am asking about the method i suggested of downloading the database for readonly purpose.where should i upload the database so that server could handle multiple downloads etc.

Sent from my GT-S5570 using XDA Premium 4 mobile app
23rd April 2014, 11:25 AM   |  #12  
Jonny's Avatar
Forum Moderator
Flag Cheshire
Thanks Meter: 8,273
 
8,122 posts
Join Date:Joined: Jul 2011
Donate to Me
More
Quote:
Originally Posted by arpitkh96

Thanks.
One more.l am asking about the method i suggested of downloading the database for readonly purpose.where should i upload the database so that server could handle multiple downloads etc.

Sent from my GT-S5570 using XDA Premium 4 mobile app

I'd have thought just having the database on the server and using the php script to output a JSON response then put the JSON response into a local SQLite database would do that.... I'm not entirely sure what you're asking though
23rd April 2014, 12:34 PM   |  #13  
arpitkh96's Avatar
Senior Member
Flag panipat
Thanks Meter: 551
 
1,126 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Quote:
Originally Posted by Jonny

I'd have thought just having the database on the server and using the php script to output a JSON response then put the JSON response into a local SQLite database would do that.... I'm not entirely sure what you're asking though

Have you ever used Dictionary.com app.it has an option for offline mode in which it downloads the whole database into the internal memory to use it any time.i want to do that.I am asking where should i upload that database(server,website etc) so that i could download that easily in myapp

Sent from my GT-S5570 using XDA Premium 4 mobile app
23rd April 2014, 02:32 PM   |  #14  
Jonny's Avatar
Forum Moderator
Flag Cheshire
Thanks Meter: 8,273
 
8,122 posts
Join Date:Joined: Jul 2011
Donate to Me
More
Quote:
Originally Posted by arpitkh96

Have you ever used Dictionary.com app.it has an option for offline mode in which it downloads the whole database into the internal memory to use it any time.i want to do that.I am asking where should i upload that database(server,website etc) so that i could download that easily in myapp

Sent from my GT-S5570 using XDA Premium 4 mobile app

Ah right I get it, you would need a server with sql support - or at least a hosting package that allows you to add your own database, then just use phpMyAdmin/MySQL to create the database.
23rd April 2014, 03:06 PM   |  #15  
arpitkh96's Avatar
Senior Member
Flag panipat
Thanks Meter: 551
 
1,126 posts
Join Date:Joined: Feb 2012
Donate to Me
More
Quote:
Originally Posted by Jonny

Ah right I get it, you would need a server with sql support - or at least a hosting package that allows you to add your own database, then just use phpMyAdmin/MySQL to create the database.

Thats ok.but which server or website can do this.

Sent from my GT-S5570 using XDA Premium 4 mobile app
23rd April 2014, 03:14 PM   |  #16  
Jonny's Avatar
Forum Moderator
Flag Cheshire
Thanks Meter: 8,273
 
8,122 posts
Join Date:Joined: Jul 2011
Donate to Me
More
Quote:
Originally Posted by arpitkh96

Thats ok.but which server or website can do this.

Sent from my GT-S5570 using XDA Premium 4 mobile app

2 services I'm currently using are http://www.unlimitedwebhosting.co.uk/ & http://x10premium.com/ - you're probably ok with the low cost options that offer "unlimited" stuff (subject to interpretation and fair use etc) because the overhead on MySQL is not a lot so you probably won't use much bandwidth.

As a general guide pretty much anyone who offers cpanel or similar control software will have MySQL enabled - though be sure to check because hosts have been known to disable MySQL in cpanel before.
The Following User Says Thank You to Jonny For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes