Android app - saving/storing images at runtime - java

I am learning to build an android app for the first time...this is an educational project.
I don't have a database, and I'm not using a cloud server. The latter is slightly outside of the project scope, and I was advised that I was better using XML to store data, rather than SQLite.
My app should enable users to select images from their image gallery at runtime, these are then resized, and stored in the app (visually - it will look like a pin board of thumbnails). I was going to store them in the resources folder, but have just realised from reading other posts, that this isn't accessible at runtime.
Can anyone point me in the direction of what my options are when I'm not using a cloud server.
Is XML feasible? If so, how do I go about storing images in XML at runtime?
Can I make use of the SD card?
Or is SQLite the only option?
Is there any info where I can read about the limitations and benefits of each of these?
Any advice would be so much appreciated!!

Realm is better for you. Look at the below links you will get Idea to use realm in your project
https://realm.io/news/realm-for-android/
http://www.androidhive.info/2016/05/android-working-with-realm-database-replacing-sqlite-core-data/

Related

How to make an android app like a recycle bin?

I have searched for weeks but I couldn't find any useful information about how to manage files while deleting in android.and want to develop an app to manage deleted files and APKs.can anyone tell me how I can achieve this?
Use SQLite to read and write data,
The limit of a SQLite database is something like 2TB. Your Android device will not have that much storage space.
You can get the SQLite tutorial, here it is explained quite well.

Image Recognition using OpenCv and android

I want to work on making an android app by integrating OpenCV with android Studio. I have a set of 2D hardcopy card images that i want to save as templates with in the app. Then, using the app, when i place my camera on any of the cards, the app should search the directory which contain the templates and look for match and provide feedback if a match is found. If anyone can guide on how to achieve this, it will be highly appreciated.
Also, if not OpenCV, then which SDK or tool should be preferred ?
The question is a general one, so the answer will be general as well, and will make assumptions about what you'd like to accomplish with your application.
Android Studio with OpenCV is probably a reasonable stack to use.
Presuming the library has more than a trivial number of images, you'll probably want to extract matching information for each image in your library in an offline process (on your code-development machine). So for instance, you would configure your development machine with a SQLite database driver and OpenCV, construct a program that extracts feature points and saves those to your a SQLite database. That file can then be loaded into the Android APK assets, and it would be ready upon the application's first use. The application would take frames from the camera and compare those with each item in the database, looking for matches.

Using Ionic with Smart Card (Java Card)

Good day,
I have a project on building mobile app that read and write data to a smart card (java card),
in form of text as a storage using a USB connector to an android mobile phone to communicate with the card.
But i know Ionic (cordova/ Javascript) does not have a plugin to read/write with smart card
My research show that it can only be done with java, But i do not want to design the app from ground up
using a native language cos i have loved working with ionic - cordova.
i need a help on ways to make this work, i dont want to believe that it is not possible,
i need a resources, technic, materials that i can use to make this possible.
Thanks
If you cannot find a preexisting solution then you would have to plugin your own for the platforms you require. There seems to be an NFC plugin which can form a starting point on how to build such a thing.
You could use the seek-for-Android project as base to build your own API. In the simplest form you could just decide to make a port: basically copying the API into Cordoba.
Note that all this may not be easy. Good luck.

How to use google cloud storage with ADT?

Total beginner here.... :(
I am using Eclipse with ADT and Google App Engine plug in.
I have built my "awesome" android app, but now I want to save some of the data the app produces onto a cloud service so I can share it between my users.
So I am trying to do this with google services. I have incorporated in my project both Cloud Storage API and Google Cloud Datastore API, both using the GDT plug in, but that's as far as I can get :((((
I know I am asking a lot, but I don't even know if it is a lot, it might be a few lines of code, at least that's what I think.
So now I need a way, through some Google API to connect to a database that "belongs" to me, and store 5 numbers there from each of my users, and share other user's numbers with each other...
Can someone take me by the hand and tell me what I need to import and what not...?
I have spend hours reading all documentation about these APIs I could find and I ended up going in circles :( either trying commands that cannot be resolved, like DataStoreService(), or simply not even finding where do I put my info to get to "my" database....
Thank you all.

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