Android FileBrowser v.2.0

Tutorials with advanced 'difficulty' and more Lines of Code.

Postby Katharnavas » Fri Feb 22, 2008 7:33 am

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?
Katharnavas
Senior Developer
Senior Developer
 
Posts: 100
Joined: Tue Dec 04, 2007 5:57 am
Location: India

Top

Postby plusminus » Fri Feb 22, 2008 12:41 pm

Hello Katharnavas,

in my opinion it is a bug.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby cabernet1976 » Tue Mar 04, 2008 5:20 pm

Hi plusminus,

Have you found File.listFiles cannot list the files/directorys under directory /data :?:
My SDK is M5.
Thanks.
Upload2Flickr's blog: http://upload2flickr.blogspot.com
cabernet1976
Senior Developer
Senior Developer
 
Posts: 154
Joined: Fri Nov 16, 2007 2:34 am
Location: China

Postby plusminus » Tue Mar 04, 2008 7:01 pm

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
Last edited by plusminus on Wed Mar 05, 2008 1:50 pm, edited 1 time in total.
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby cabernet1976 » Wed Mar 05, 2008 2:15 am

Thanks for your reply, plusminus.
I will try it.
Upload2Flickr's blog: http://upload2flickr.blogspot.com
cabernet1976
Senior Developer
Senior Developer
 
Posts: 154
Joined: Fri Nov 16, 2007 2:34 am
Location: China

Postby cabernet1976 » Wed Mar 05, 2008 1:21 pm

Hi plusminus,

I just copy the apk file to /system/app/, but don't know how to run it in simulator.
:(
Upload2Flickr's blog: http://upload2flickr.blogspot.com
cabernet1976
Senior Developer
Senior Developer
 
Posts: 154
Joined: Fri Nov 16, 2007 2:34 am
Location: China

Top

Postby smalltalk » Fri Mar 07, 2008 10:23 am

Hello you? (miss nick) :D
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
smalltalk
Junior Developer
Junior Developer
 
Posts: 20
Joined: Tue Feb 12, 2008 3:34 pm

Postby plusminus » Fri Mar 07, 2008 1:39 pm

Hello cabernet,

this Android_Developers-Group topic ( http://groups.google.com/group/android- ... 174c48401b ) says:
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:
F:ProgrammingAndroidandroid-sdk_m5-rc15_windowstools>adb push C:UsersplusminusDesktopAndroidFileBrowser.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 :(

@smalltalk
You should be using: boolean android.app.ApplicationContext.deleteFile(String name)
i.e.:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.deleteFile(name)
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby smalltalk » Fri Mar 07, 2008 5:48 pm

Hello +-(plusminus) :D
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" :( because class File don't support much, but I 'll try. Thanks for tutorial, you're great :). If you know much about File class in android. Please reply me fast :wink:
smalltalk
Junior Developer
Junior Developer
 
Posts: 20
Joined: Tue Feb 12, 2008 3:34 pm

Postby smalltalk » Sat Mar 08, 2008 3:57 pm

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 :?
smalltalk
Junior Developer
Junior Developer
 
Posts: 20
Joined: Tue Feb 12, 2008 3:34 pm

Postby plusminus » Sat Mar 08, 2008 5:22 pm

Hello smalltalk,

deleteFile is not abstract :!:

See: http://code.google.com/android/referenc ... ang.String)
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:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. context.getFileStringPath("filetodelete.foo").delete();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

File

Postby smalltalk » Sun Mar 09, 2008 2:21 pm

Hello +- :(
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 :x
smalltalk
Junior Developer
Junior Developer
 
Posts: 20
Joined: Tue Feb 12, 2008 3:34 pm

Postby plusminus » Mon Mar 10, 2008 12:23 am

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
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Path of the Images by default

Postby ankur.kulkarni » Mon May 26, 2008 11:26 am

[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?
ankur.kulkarni
Freshman
Freshman
 
Posts: 2
Joined: Tue May 06, 2008 8:05 am

Postby ankur.kulkarni » Thu Jul 03, 2008 5:20 pm

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?
ankur.kulkarni
Freshman
Freshman
 
Posts: 2
Joined: Tue May 06, 2008 8:05 am

Top
PreviousNext

Return to Advanced Tutorials

Who is online

Users browsing this forum: No registered users and 3 guests