Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,811,702 Members 54,104 Now Online
XDA Developers Android and Mobile Development Forum

Android databases technology

Tip us?
 
arpitkh96
Old
#11  
arpitkh96's Avatar
Senior Member
Thanks Meter 384
Posts: 1,093
Join Date: Feb 2012
Location: panipat
Quote:
Originally Posted by Jonny View Post
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
 
Jonny
Old
#12  
Jonny's Avatar
Forum Moderator
Thanks Meter 8,003
Posts: 7,983
Join Date: Jul 2011
Location: Cheshire

 
DONATE TO ME
Quote:
Originally Posted by arpitkh96 View Post
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
 
arpitkh96
Old
#13  
arpitkh96's Avatar
Senior Member
Thanks Meter 384
Posts: 1,093
Join Date: Feb 2012
Location: panipat
Quote:
Originally Posted by Jonny View Post
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
 
Jonny
Old
#14  
Jonny's Avatar
Forum Moderator
Thanks Meter 8,003
Posts: 7,983
Join Date: Jul 2011
Location: Cheshire

 
DONATE TO ME
Quote:
Originally Posted by arpitkh96 View Post
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.
 
arpitkh96
Old
#15  
arpitkh96's Avatar
Senior Member
Thanks Meter 384
Posts: 1,093
Join Date: Feb 2012
Location: panipat
Quote:
Originally Posted by Jonny View Post
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
 
Jonny
Old
#16  
Jonny's Avatar
Forum Moderator
Thanks Meter 8,003
Posts: 7,983
Join Date: Jul 2011
Location: Cheshire

 
DONATE TO ME
Quote:
Originally Posted by arpitkh96 View Post
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: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


WowWee Mip – Android Accessory Review – XDA Developer TV

The holidays will be here in no time, so why not start thinking about … more

Stream Your Media Files with the New Version of Droid Sync Manager

Android is a Linux-based operating system, but this fact doesn’t put … more

Old but Gold Internet Browser is a Blast from the Past

A Web browser is one of these applications that we can’t live without. We useit … more

Real-World Battery Saving Tips for Android – XDA Developer TV

You need Real-World Battery Saving Tips for your Android device. Our … more