How do i stream files from a website to my app? - android

I feel like 'stream' isn't the right word for it but how do i, let's say on my website i have jpg/mp3 files and i want to get these said files and make them appear in my android app.
Okay so... 1.) I set up a site then upload files there.
2.) then somehow retrieve files from said site to my android app.
3.) Play mp3's hence 'stream' do i put these files(jpg/png/mp3/mp4) on a sql database? then access it from the application? that's only method i could think of but i would like to know if there's another way to do it.
Oh and a the site i mentioned is where i just upload these files, so i plan to put a search bar on my app then if someone searches "soccerball.jpg" for example then it'll grab the file from the site then make it appear on the app.

Related

Xamarin.Forms - Best way to open dialog to search file

I created an little application in Xamarin.Forms to get the images in my file with XLabs. It work with android and IOS.
But now, i want to import file and i search the best plugin to do that.
I found this : https://developer.xamarin.com/recipes/android/data/files/browse_files/
But it dosent exist with IOS. And i don't know if it's possible (to search and get file)
And it's why i come here, to get answers.
Can you give me a plugin or a solution to get file/path of any file with OpenDialog, intent, or page custom
Thank you
Are you wanting something that can search files outside of your app's directory on iOS or only files within the app's directory?
If you want the former, iOS severely restricts this kind of thing, unlike Android. So it is not possible to do the same thing on iOS that you can do on Android.
Look at the second paragraph here and see that the app is sandboxed which means it cannot view files outside of it's own directories.
That being said other apps can make files available to be shared with other applications, see here.
You can also get access to other files from the device's iCloud account. See this for pre-iOS 8 and this for post iOS 8.

How to attach a picture from android gallery into my note app?

I'm developing a simple note app, some kind of diary but I need a function where I click on the "attach" button so I could attach files from internal and external memory from the phone, the files would be pictures and maybe, if possible, video and wav files, all of them together with the text file on the note app, and I would need to save all this in a database, so I would like to know if that is possible and how do I do it , I read about sharing files from apps to apps on android developer site but I got confused, so I would like someone to help if possible, btw sorry for my bad English I'm not a native English speaker and it's my first time asking here, so I would be glad of somebody could help with this.
Hi Leonardo Medina Lango,
You do not need to save whole file in your app's folder. Save only file path to your sqlite database. If you that files in your cloud than sync sqlite database with your cloud server from background service.

open specific files from within android app

As part of an app I'm writing, I need an ability to look for specific files, like .doc or .rtf, from within the app. After finding them, the app will store their adress or something like that, so that they could later be opened when necessary. The app wouldn't open them itself, it will use a different app for that. So, all I'm looking for is a way to browse for those files from within my app.
As i understand you need to find files with given extension. For this approach you can use FileFilter. Check this answer.

Sharing Files in Android with some partners using Dropbox

this is the first time I'm taking a look at the Dropbox API so I'm afraid I kinda don't understand much.
My purpose is to develop an App in which I place some files into a directory so as to be automatically uploaded to the server and synced in another device whose owner I'm sharing them with, so different accounts are being used of course.
In the end, it has to be something similar to Dropbox app itself: you are able to create a file, upload it and share it with some friends.
Any idea if this is possible, what to begin with, is it possible to use for this goal any folder i want or it has to be one particularly chosen by Dropbox...?
If you're asking for a way to programmatically share a folder with another user, the API doesn't currently support that. To do what you're doing, you would need to manually (with the Dropbox app or via dropbox.com) share a folder with the other user. From then on, you could use the Dropbox API to read from and write to that shared folder. (And the same would work from the other account, since the folder would be visible to both of you.)

how to use android_asset

I try to make Webview from to display application/x-shockwave-flash embed element in my app, but i have blank gray screen on emulator and white on device. There are many topics about this problem but any1 really solved.
I explore log of simillar app and see: file//android_asset/index.html. So question... this static file or i can get it from web or modify it.
I trying get my data video.loadDataWithBaseURL() from web, but can i have that data from local storage?
Maybe I said something wron but it's look for me like 'convert web data to local'?? Can some one help my in my problem or explain in this question.
Thank you.
file://android_asset/ is a way that allows android apps access assets by a network-based URI. But assets represent neither local nor online files, they are packed into your apk. Put any files in assets folder in a android project and they will be packed into the apk file by the builder.

Categories

Resources