andbook!.pdf - Learning Android Get an anddev.org - Android-Shirt Back to index
anddev.org Header Logo
FAQ Search Top rated articles Browse Feeds anddev.org - Authors Contact Details Register Log in

Android FileBrowser v.2.0

Goto page Previous  1, 2, 3  Next
 
       anddev.org - Android Development Community | Android Tutorials | Index -> Advanced Tutorials
Author Message
Katharnavas
Senior Developer
Senior Developer


Joined: 04 Dec 2007
Posts: 100
Location: India

PostPosted: Fri Feb 22, 2008 7:33 am    Post subject: Reply with quote

plusminus wrote:
Hello Katharnavas,

just tried it myself. It seems this error happens because of the change to focusing.
If I remember right, in m3 when we clicked to a listItem, the Selection was placed before one could retrieve the sleectedItemIndex() (<-- functionname in m3).

Now I'm just using the "position"-parameter of onListItemClick(...) to make it work.

Regards,
plusminus

PS: I'll port to m5 now.


Thanks for the update and now its working like a charm actually i went on replacing that line with some other function. Is there any way to change the highlighted overview color height. Its broad and annoying?
Back to top
View user's profile Send private message Yahoo Messenger
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2439
Location: College Park, MD

PostPosted: Fri Feb 22, 2008 12:41 pm    Post subject: Reply with quote

Hello Katharnavas,

in my opinion it is a bug.

Regards,
plusminus

_________________
Please remember, that this board is give & take Smile

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cabernet1976
Senior Developer
Senior Developer


Joined: 16 Nov 2007
Posts: 147
Location: China

PostPosted: Tue Mar 04, 2008 5:20 pm    Post subject: Reply with quote

Hi plusminus,

Have you found File.listFiles cannot list the files/directorys under directory /data Question
My SDK is M5.
Thanks.

_________________
EveryAlbum - http://www.anddev.org/viewtopic.php?p=7117#7117
Back to top
View user's profile Send private message Visit poster's website
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2439
Location: College Park, MD

PostPosted: Tue Mar 04, 2008 7:01 pm    Post subject: Reply with quote

Hello cabernet1976,

the reason you cannot browse to that folder is because you need Administrator-Privileges, which you do not have with your app.

I've heard, that if you install the apk into /system/app then it will run at a higher level.

Regards,
plusminus

_________________
Please remember, that this board is give & take Smile

| Android Development Community / Tutorials


Last edited by plusminus on Wed Mar 05, 2008 1:50 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
cabernet1976
Senior Developer
Senior Developer


Joined: 16 Nov 2007
Posts: 147
Location: China

PostPosted: Wed Mar 05, 2008 2:15 am    Post subject: Reply with quote

Thanks for your reply, plusminus.
I will try it.

_________________
EveryAlbum - http://www.anddev.org/viewtopic.php?p=7117#7117
Back to top
View user's profile Send private message Visit poster's website
cabernet1976
Senior Developer
Senior Developer


Joined: 16 Nov 2007
Posts: 147
Location: China

PostPosted: Wed Mar 05, 2008 1:21 pm    Post subject: Reply with quote

Hi plusminus,

I just copy the apk file to /system/app/, but don't know how to run it in simulator.
Sad

_________________
EveryAlbum - http://www.anddev.org/viewtopic.php?p=7117#7117
Back to top
View user's profile Send private message Visit poster's website
smalltalk
Junior Developer
Junior Developer


Joined: 12 Feb 2008
Posts: 19

PostPosted: Fri Mar 07, 2008 10:23 am    Post subject: Reply with quote

Hello you? (miss nick) Very Happy
I want to ask you how to change apk file into system/...
I can't do it.
Ps: I want to ask +- why I can't use function delete() in class File to delete a file I choose. I did but it(function) return false. Please reply me fast
Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2439
Location: College Park, MD

PostPosted: Fri Mar 07, 2008 1:39 pm    Post subject: Reply with quote

Hello cabernet,

this Android_Developers-Group topic ( http://groups.google.com/group/android-developers/browse_frm/thread/23a94989d964d7fd/2e16d6174c48401b ) says:
Quote:
The only way I know to grant system-level permissions to android apps
(right now) is to install them to /system/app.


I gave it a try:
Quote:
F:\Programming\Android\android-sdk_m5-rc15_windows\tools>adb push C:\Users\plusminus\Desktop\AndroidFileBrowser.apk /system/app
363 KB/s (21837 bytes in 0.058s)

So it worked and I could start the app right from the Home-Screen. (Click the "All"-Button in the lower right edge of the screen, to see all apps)
Unfortunately I still cannot look into the /data -folder Sad

@smalltalk
You should be using: boolean android.app.ApplicationContext.deleteFile(String name)
i.e.:
Java:
this.deleteFile(name)


Regards,
plusminus

_________________
Please remember, that this board is give & take Smile

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
smalltalk
Junior Developer
Junior Developer


Joined: 12 Feb 2008
Posts: 19

PostPosted: Fri Mar 07, 2008 5:48 pm    Post subject: Reply with quote

Hello +-(plusminus) Very Happy
Do you miss .this.deleteFile(String) is an abstract method. I used but android state error. I'm going to 'raise level' your version. I want to make it(Browser of you) be able to copy,paste,move,delete...I think this is rather "difficult" Sad because class File don't support much, but I 'll try. Thanks for tutorial, you're great Smile. If you know much about File class in android. Please reply me fast Wink
Back to top
View user's profile Send private message
smalltalk
Junior Developer
Junior Developer


Joined: 12 Feb 2008
Posts: 19

PostPosted: Sat Mar 08, 2008 3:57 pm    Post subject: Reply with quote

Hello +-.
I'm waiting for you about class File. I posted this above (deleteFile is an abstract method, can't use). Please reply me fast Confused
Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2439
Location: College Park, MD

PostPosted: Sat Mar 08, 2008 5:22 pm    Post subject: Reply with quote

Hello smalltalk,

deleteFile is not abstract Exclamation

See: http://code.google.com/android/reference/android/app/ApplicationContext.html#deleteFile(java.lang.String)
Quote:
boolean deleteFile(String name)
Delete the given private file associated with this Context's application package.

If it was abstract, the Activity-Class would also have to be abstract, which it is not!

But maybe try:
Java:
context.getFileStringPath("filetodelete.foo").delete();


Regards,
plusminus

_________________
Please remember, that this board is give & take Smile

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
smalltalk
Junior Developer
Junior Developer


Joined: 12 Feb 2008
Posts: 19

PostPosted: Sun Mar 09, 2008 2:21 pm    Post subject: File Reply with quote

Hello +- Sad
I'm really confused (very confused). I read File Topic very very carefully, but I can't find solution.
My problem is:
I pushed a file named Views.apk in /system/app (system path)
I want to delete this file with 2 way.
First way I use deleteFile(String) but I don't know fill what in String argument.
Second way I generate a new File(absolute path) and use delete() method.
Both of ways have no error but they return false (can't delete).
I simply want ask you [b]how to delete a file in system file[/b]
Please reply me fast (I'm really hurry)
Ps:
I read File topic carefully but not finding solution. I'm really confused Mad
Back to top
View user's profile Send private message
plusminus
Site Admin
Site Admin


Joined: 14 Nov 2007
Posts: 2439
Location: College Park, MD

PostPosted: Mon Mar 10, 2008 12:23 am    Post subject: Reply with quote

Hello smalltalk,

I haven't tried that up to now!
But one is not supposed to use the common File-Object when working on the emulator (sd-card is another topic).

deleteFile(String) of ApplicationContext is very probably supposed to delete files in its "application-folder" (/data/data/your_package_structure/files). So it is the Counter-part of openFileOutput.

I don't know how to delete a file in /system/.
But I'm pretty sure you won''t be able to do with the normal application-privileges!

Regards,
plusminus

_________________
Please remember, that this board is give & take Smile

| Android Development Community / Tutorials
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ankur.kulkarni
Freshman
Freshman


Joined: 06 May 2008
Posts: 2

PostPosted: Mon May 26, 2008 11:26 am    Post subject: Path of the Images by default Reply with quote

[font=Arial] [/font][size=12] [/size][color=blue] [/color]

I want to display images at the image default folder in the Android Phone.
Can anybody help me what is the path for the same? How will I get its access?
Back to top
View user's profile Send private message
ankur.kulkarni
Freshman
Freshman


Joined: 06 May 2008
Posts: 2

PostPosted: Thu Jul 03, 2008 5:20 pm    Post subject: Reply with quote

I am new to android..

want to change properties of images (like name ) loaded on SD card thru application..

so please any 1 can help me?
Back to top
View user's profile Send private message
Display posts from previous:   
       anddev.org - Android Development Community | Android Tutorials | Index -> Advanced Tutorials All times are GMT + 1 Hour
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


© 2007, Android Development Community
All rights reserved.
Powered by phpBB.