I just wanna implement this Storage Access Framework in my app.
Could anyone please help help me to find out tutorials, or sample app ?
I really have no idea about Storage Access Framework, and not able to understand the tutorial. please some one help me.. I am very beginner.
Many mobile users who regularly access their files across multiple devices have found that relying on cloud storage just makes life simpler, but many of us don't keep our files stored in just one place. Now Android 4.4 is rolling out a new way to open files within apps that makes accessing all of these providers both easier and prettier. With KitKat's new storage access framework, apps that prompt users to browse for files will open a sidebar navigation menu that lists recent files, available cloud storage providers, and files stored internally.
This new system is far more attractive than the popup window Android apps currently toss up, and it provides a more intuitive experience. Users won't have to enter what appears to be a separate app to load a file. Now, regardless of whether they're pulling data from Dropbox, Google Drive, or their local gallery, they will be presented with a consistent experience.
More Info
Related
I have a suite of Cordova-based apps that have the need to store data in a spot outside of the app's sandbox so other apps can read it.
I've taken a look at two plugins, cordova-plugin-secure-storage and cordova-plugin-ios-keychain. Neither explicitly mention that the storage being used can be accessed outside of the running app's scope.
I've tried my luck with cordova-plugin-secure-storage and was not able to share between two apps on Android; even though the store had the same name, the keys differed between the apps. That's OK -- I can store the file externally on Android.
My question is, am I wasting my time looking into keychain plugins to cover iOS? If so, any suggestions, or easier implementations?
This will be a tricky one, I don't know it's even possible. So I am writing an application ,where after login the user can have access for some sensitive data. If the user belongs to a VIP group than she has access to more sensitive data (such as market reports). In order to provide maximum security we want to extract VIP related code (activity, layouts, backend calls) and only download, when a user really need it.
The solution should be native android, so opening a webView within the app is not a solution for us.
I am looking for something such as "Android Instant Apps", but we have to be independent from Google to provide our own service.
Any idea?
Extract functionality into a separate JAR file, convert it to DEX and load dynamically using DexClassLoader.
There are plenty of questions at SO which covers the topic. For example: https://stackoverflow.com/a/6860579/648313
I want to make an application which has a button and when it is clicked, i want to open another activity using intent and display the pdf file reading it from the local server in the phone.
But i am new to the server part of it. so it would be really helpful if someone could just eduacte me about that since am completely new to the server side.
Your question doesn't provide us with enough details towards what you want to do.
Are your users uploading these PDFs and then viewing them within the app? Does the "server" implementation for your files have to handle different users for these files and provide authentication?
There are several different ways you can handle storing and accessing files in a "server". This is often referred to as the "back-end" component of your app.
If you need to handle user authentication and users uploading and accessing these files parse.com's android sdk is a really simple and easy way to prototype and get into this with a relatively easy learning curve. parse.com starts you off with a free plan and this can get you by for a long time. They start charging for api requests when you go over 30requests/sec or go over their 20GB of provided storage for their free account (see here)
Parse isn't the only provider of such services but I've used them before and find their SDK to be very simple and easy to use. The fact that you can use them for free (with limited resources) makes it great for prototyping or small apps. Firebase is an interesting one as well.
You could learn about servers and setup your own implementation for your users and files. You could purchase your own online storage solution or server. You could use libraries such as Square's OkHTTP (Github link) to speed things up. Doing a custom implementation would definitely be interesting and opens up the playing field so you can use many different languages and frameworks to get to your goal.
I have several applications built on the same engine. This engine is storing data in SQLite. The database structure is the same for all applications. I need to organize a common storage for all these applications.
For example, there is an application A and B. First user installed the application A and added data, then installed the application B and this is necessary to synchronize databases of those two apps. Using a function of Content Providers will not work because in this case application B will not work without the application A. And also we will not know which application user installs first.
There is an idea to synchronize the database of all applications and each application will remain with its own database, but then I will have a copy of the databases. Means as many apps are installed as many copies of databases I will have.
Perhaps there is some kind of a neat way to realize the idea?
Why don't you try using "sharedUserId" across all your apps. With this you can access the data of the other apps as well.
Assuming you already know all the your others apps, on first load of every application you start searching for a common folder where you create your database. This folder can be in your sdcard. If you find the DB file there then you can open it and use it. Otherwise you create one. Then use the same database across all apps?
I'm not sure what are the implications of opening/writing to the same DB from various apps. Maybe you need to figure out a way for locking mechanism during writes (Maybe create a .lock file when writing to the DB?)
I encountered myself same design problem (multiple apps using same engine contains persistent SQLite database tables, Services, and tons of logic).
after I did my own research, I afraid that the conclusion was that the only way doing that is: doing that in Googles's way:
Google Play Services is a process that google made up exactly to solve this problem for their own scenario - engine that should be always available to all apps (including thier own). that's mean that it's an independent application that exposes it services and content providers to all apps.
Google force Google Play Services installation seamlessly in background via Google Play store app. that's a privilege that no other app can have, because they controlling both apps, and the OS Android itself (not fair!)
so, if you can force your users to download dedicated application only for your engine (like Google do) - that's great!
if not - then you will have to settle until then with a Master/primary app that must be installed, and it's the only one the exposing the data and services to all other.
You can store the database on the external storage and access it from all of your applications (Use getExternalStorageDirectory).
Use the openOrCreateDatabase method of the SQLiteDatabase class to access it and read/write data from it.
Since accessing from multiple processes can cause locks, I suggest you manage that yourself using a file with the name/packagename of the locking application so you can sync the data access between your applications.
good morning,
how can i do a SSO valid between my 3 apps.
i have 3 apps that should be installed on same phone. like google apps or facebook
and if i'm logged on one of them then other apps bypass the auth part.
i'm looking for good practices
thanks for advices.
By default android runs each app on separated sandbox so apps can not access data from other apps. But you can run as many apps as you like under the same sandbox. In that case you can access any data from other apps (database, files, etc.)
This is only one way of sharing data and not the preferred way BTW. Another approached that highly encourage by android team is to create content providers and allow controlled access to other applications in platform. This is exactly the way you are accessing users contact database in android for example.
I don't explain how to do it here. there are plenty of resources on internet and several well explained youtube videos.