Allow a user to select a folder on an SD card - android

I'm looking for a way to allow a user to press a button to browse the contents of the SD card, and then select a folder, whose path will be returned to the application. Similar to how you pull up the "Browse..." dialog on Windows for installations.

Okay, so what I ended up doing was just using a ListActivity with a ListView (choiceMode:simple_list_item_multiple_choice) where the user can check the folders they wish to use. Then I used a custom layout that placed a Submit button below the ListView, which the user can press to confirm the selection.

There is nothing built into Android for it AFAIK. You can integrate something like OpenIntents File Manager, but that is a separate APK that users would need to install.

You can use AndroXplorer, the hook is quite simple, but then again, yes, it is another APK to install

Related

Creating .apk from another .apk

Can someone tell me if it's possible to create an apk file during runtime?
I'll explain:
I want to create a Android app that can create apk (android apps) when I run it
it will be like:
start the app
set application parameters (number of buttons in the menu, links, images, etc..)
press create
install the apk file on the phone or save that .apk in the server
hope you understand ^^" and thx for any help (:
It should very well be possible. AIDE has been doing it for a while - https://play.google.com/store/apps/details?id=com.aide.ui&hl=en
you can also try to create a app that takes parameter for all the UI you expect to show and once UI is finalized and user click save. The inner module use the information and create the App, its more like not showing customization part of your app to user again and again, rather route the user to the finalized views.
Once finalized the meta data can be stored to server. Its more like developing skins.

i want to display files stored in sdcard on clicking button in my android app. How do i do that?

i want to display files stored in sdcard on clicking button in my android app. How do i do that?
I search a lot for browsing sdcard for files which i can choose for attachment in my android Tab app.
There is a open source project which gives you a complete file picker and can be invoked using intents
https://github.com/iPaulPro/aFileChooser
See this link. its File Chooser example in that you will get current Directory.
Now you have do that like on touch of list item you have to get that doc path and that will useful to send to server or ant other purpose. Make sure if you delete that file from sd card then it will not work .

android: displaying radio buttons when starting application

I have an application in android that shows a list of videos.. However, the list can be stored either in internal storage or in external storage. What I want is that when the application starts, I want two radio buttons and a save button. The radio buttons should ask the user about whether they want to select internal storage or external storage.. And the save button should save the settings. Can anyone tell me how this can be achieved?
Thanks alot
I would highly suggest using SharedPreferences for anything along the lines of user-controlled settings or configurations you would like to save.
What I would do is have an opening activity (that could be made to look like a dialog if you so choose) that presents the option to the user and then passes that option to the next activity that actually runs the program.

Android installing an apllication by code......and start an application with some arguments

i'm really freaking out cause i don't know how to find example or documentation for my issue. I developed a kind of Ndroid Market that let you download .zip file and save the in the sd (ex root\download). Each zip contains an icon and an html web application (ex. Icon1.ico and Application1.html). When the download is finished MyMarket unzips the application1.zip file and puts it in a folder.
What I would like to do is to find out how to add the application1.html to the list of my application using icon1.ico as icon, basically I'd like that if someone clicked on the menu button of the phone in the list of my application is shown one with the icon1.ico image, but how to to that? I can't find any code example.
And then the second step. I have to develop both this alternatives and then someone else will choose beetween them
When i click on the icon1 on the list application the default browser is opened and the html application is run inside it....
The most difficul, when i click on the icon1 MyMarket Application is opened but with a parameter, like when in java you run program1 but with one argument that you can retrieve in the argv array. So for esample if i click on the MyMarket icon or on the Icon1 icon the same application is started but then MyMarket check if the "argv" is empty and if it's not and for exmaple there is a string "application1" it open another activity with a webview and run the html file inside it.
but how to to that?
That is not possible for most home screen implementations. The only things shown in a standard launcher are activities, from APK files, flagged as belonging in the launcher. You cannot create these on the fly.
You are welcome to make your own home screen that offers your desired behavior as a feature.

how to open a folder navigation when button clicked in Android App?

How can I open a folder navagation in my Android apps. I dont want to use any third party app like AndExplorer or ASTRO.
I want a button in my app and when click on it,a particular folder may be ("/sdcard/mywebfolder") should upen and user then can browser its content.
Please help me to accomplish it.
Thanks
Parvendra
Well without the use of third party apps you are going to need to code a file explorer or at least a view to display a certain folder's contents.
You could always just let the user select the program for the browsing via an intent, but I could understand not wanting to do that. Only downside is it means more work and more coding.

Categories

Resources