Where to store images for android app? - java

I'm creating a android application for Tourists. In that application user will be able to take photo and send them to storage. Other users will be able to display this photos on their devices. My question what kind of storage I have to choose to only display that photos without downloading them ?

If one person takes the picture and another can view it on another device, it means you will have a server involved. This means you'll need to download a version of the image (even just a low quality version of it as cache) or you cant view it. Check out firebase ->firebase<- quite handy & well documented to do this kinda thing

Related

Where should I store images for my android app? How to store and retrieve those images?

The app is an online app. And the size of my app (.apk) is already over 85mb. I want to store the images I am using on "some" server, instead of drawable folder. The problem is I don't know the particular server, and how do I store and retrieve the those images?
The app is written in java language.
It's an app to locate charging station for electric vehicle.
So, please give me some "servers" on which I can store images, and use them as and when reguired.

Android: making a Music Player app more efficient

I am making an android music app. I have a few queries about how to make it more efficient-
Should I store the tracks available on the device, in my app? If yes, what should I use JSON, SQLite or CouchbaseLite?
How often should I refresh the stored records?
Any other tips will be highly appreciated.
There is no need to save the music in your own app's database, android saves them for you and provides a content provider (MediaStore) that allows you restricted access to the content of that database. So every time your app wants to load music from the device, it would use the load music from the Media Store, making your own database would only mean having a copy of the data in the device and that would be waste of memory since you would still have to query your database to get the music.
you can learn more about content providers and media store from the following tutorials.
Media Store
Content Provider

Is it possible to make an Android App that records Audio while taking fotos?

I've read somewhere that it isn't still possible to record Audio while using the Camera function on Android phones. But this source was kind of outdated.
I've also read, that this is possible on Iphone.
But I need this function for Android to create an App.
Can anybody say more to that?
Is there a possibility on Android to archive that in an Application?
I don't see why not. They don't share the same hardware. Even if not, you could easily fake it by recording video (which also records sound) and just taking the first still image of the video as your photo.

Uploading data from Android App to desktop program

I'm pretty new to android so apologies if I'm missing an obvious solution, I'm developing an android app that would be used to record various data including photographs and hopefully the intention would be for this collected data to be uploaded to a desktop application where certain desktop specific jobs could be carried out.
Due to the fact I intend to save photographs within the app in the SQLite database as a bytearray which recorded information would be I think that it would be too data intensive to send to a server, plus I wouldn't want the desktop app to necessarily be on a server, it should be standalone. I'd prefer to use the USB connection and allow a USB upload of the data from the app sqlite db direct to the database on the pc, probably sql server. What would be the best way to approach this? Could the android ADB be used to acheive this?
Any help or suggestions on this would be much appreciated.
Regards
I believe that your sqllite database (as well as photos contained there) will be stored on the SD card of the device. You have to options here, first, when your desktop applications find the folder on the device SD card (should be mounted on the filesystem after connecting the device to your PC), second is to use bluetooth and initialize the transfer from the device to your desktop application.
You could try having them on the same network and having them interact that way. I know applications such as RemoteDroid do this, but I have no experience doing so myself. There is also the fact that there is the data saved on the sd card / by putting your device in Storage mode and you could just point your desktop to the device drive and assume a designated folder your app uses exists.
Adding on to the answers here, you could save your photos as files in your sd card and transfer it to your pc from there.
Here is a dev guide on storing files.
Another way is to transfer over WiFi. Ice cream sandwich seems to have a WiFi Direct api that allows us to perform P2P transfers over WiFi. I have not used it yet but have a look at this
Solution 1
I would probably use rsync between my desktop and android. This way you can export data from your sqlite to a flat file and import it to your local database on your desktop. This way you can also put your schema into a file.
RSync is a very stable protocol to exchange files.
Solution 2
You can also use Amazon S3 for this purpose. The file name can contain the version number for ensuring that you have the latest file.

Architecture for Java, Android, Database Application? what should the app look like

I have a site where, via Android, a user needs to:
fill in a document (simple html I think).
the next step would be to sign on the Android.
the data should be saved into a database inside the site.
Points I should mention:
the UI should be as simple as it gets
I am the one who should build the web database
So therefore my idea was :
the application would open an browser where the user will insert all his stuff into the html.
the html will save automatically all the data into a class called data.
the next intent of the application would be the surfaceView (where like a painter the user will sign).
the surfaceView will be saved into png and with data both will be stored in another class which will be inserted into the server.
so in this class would be two files the png one and one contain all the info that was on the html as strings (Jonathan Leffler I hope this one solves my misleading)
the server will take this class and parse it and save it into tables.
Someone has another idea?
In which language should I write it? I thought Java and Android where the database would be MySQL. Does anyone have another idea?
another idea I have is to change this html file into Android sheet
so all the information would be stored on the device and by clicking upload all the information would be sent to the internet site where a server will store it in his database
Can someone point what would be a better solution
note:in my second solution no internet availability is needed so it can work offline where in the first case its needed.
I would like to hear more then on solution on to pick the best who fits my qualities
You will need a webpage optimized for mobile display for Android. That should be PHP and MySQL.
The next thing would be a native Android application written in Java. That will probably use some local data, so it will use mobile SQLite database on the phone.
When the user logs into your website, that is done by the web, and later it will redirect the user to a custom scheme something like signature://capture . The webview will detect this scheme, and will launch your native app.
You will setup your Android application to react to this custom scheme, so it will open up, and will open up the SurfaceView. Then the user will be able to touch the screen, to give his signature.
When you capture the signature, either the set of the points (reccomended) or the generated image (will cause postprocessing issues) you will issue a simple HTTP Post method, that will send/post the data to your server.
So you will end up having in your web environment the captured signature.
Good luck with development.

Categories