Android : Way To Get Absolute Path And Filename From VideoView Object
Jan 10, 2010
Just started writing java / android and I am trying to use android.widget.VideoView.
I set the video by using the setVideoPath('/path/filename') method, but can't seem to figure out how to get the path on an existing object?
I'm using methods such as 'getDuration()', and 'getCurrentPosition()' and they work great.. but where is a getPath method?
View 1 Replies
Sep 3, 2010
I have a file path to the SD card on a String.. like this : /sdcard/ download/recentPic.jpg.And I'd like to get just the filename and extension recentPic.jpg.Is there any simple way to do this?
View 15 Replies
View Related
Sep 2, 2009
I need to get the absolute path of the file associated with a specific android.net.Uri instance. I know how to get the URI instance based on the file instance (with Uri.fromFile(file)) and i need the inverse action.
View 4 Replies
View Related
Nov 9, 2010
What is the absolute path of the assets folder? I need it to reference some images saved in this folder from a html file saved in the memory device.
View 1 Replies
View Related
Nov 11, 2010
How do I reference the assets from phone memory? I need it to write the absolute path into a html file to load some images which are in assets folderThis html is saved in the phone memory but I can't to save these images in the memory phone because these are very big.
View 1 Replies
View Related
Mar 31, 2010
I know this has to be trivial but I just don't find the right resource, I guess.
So all I want to do is retrieving a thumbnail for a video. All I have is the absolute path to the file on the sdcard as a String. So please point me into the right direction.
View 1 Replies
View Related
May 28, 2010
VideoView cannot play long path video issue: Bug#8699
enviroment: Platform 2.0 simulator and G2 H/W.
If setVideoPath("/data/data/com.abc.android.abcd/Transformers.mp4");
It can play well.
While, If setVideoPath("/data/data/com.abc.android.abcd/content/ Transformers.mp4");
It cannot play.
Btw: familiar things occured when I display the jpeg file
bit = BitmapFactory.decodeFile(fileName); mImgView.setImageBitmap(bit);
If the fileName is /data/data/com.abc.android.abcd/content/2.jpeg It cannot display
While, If the fileName is /data/data/com.abc.android.abcd/2.jpeg It display well.
View 3 Replies
View Related
Aug 3, 2010
I have an onActivityResult returning from an mediastore image selection which I can get a URI for an image using the following:
Uri selectedImage = data.getData();
Converting this to a string gives this:
content://media/external/images/media/47
Or to a path gives:
/external/images/media/47
However I can't seem to find a way to convert this into an absolute path, as I want to load the image into a bitmap without having to copy it somewhere. I know this can be done using the URI and content resolver but this seems to break on rebooting of the phone, I guess MediaStore doesn't keep its numbering the same between reboots.
View 1 Replies
View Related
Jul 5, 2010
Is there a way to read the points created when drawing a path? It seems silly to me that a path cannot be readable.Or is it just better to manually write the current finger position to an array?
View 1 Replies
View Related
Sep 9, 2009
I want to do some automated testcase with Instrumentation . Suggest that my AUT has 2 Activity. After clicking the button in ther first Activity, the second one will be shown with new content base on what we enter in the first Activity.) Instrumentation provides us the function called startActivitySync() and return the Activity object for processing. My question is how we can get the pointer of the second Activity after the it is shown by clicking the button on the first activity.?
View 2 Replies
View Related
Jun 8, 2009
I would like to convert a Picture object to Bitmap object in memory, without writing data to disk.
View 2 Replies
View Related
Sep 21, 2009
I have an Activity that running on system. I can get the Intent that is used to start the activity. But i don't know how to get the Activity object from the Intent object or something else. Can anyone tell me how to do this??? Note that, I don't use Instrumentation object.
View 11 Replies
View Related
Jun 2, 2009
How to set ringtone by using filename inplace of using its ID number. I don't want to use. Uri newUri=Uri.parse("content://media/external/audio/media/"+ (String.valueOf(position+1))); Settings.System.putString(this.getContentResolver(), Settings.System.RINGTONE, newUri.toString()); Inplace of this newUri ,I want to use filename.means Uri newUri =Uri.fromFile("..."); How can I use this Uri to set Ringtone.
View 3 Replies
View Related
May 24, 2010
In my Android application, I want to rename the file name at runtime. How can I do it?
This is my code:
CODE:.......
I also used renameTo(File f) method but its also not working..
View 1 Replies
View Related
Mar 7, 2009
Is there a way to access a raw resource file by having its filename in a String? According Google's documentation, I need to use "Resources.openRawResource (R.raw.myDataFile)". This requires that I have the file name at compile time, but what if I have 20 or so files and want to do something to a specific file by passing its file name at runtime?
View 6 Replies
View Related
Jul 11, 2010
Was wondering if there was a way to change the way the camera names a picture. Me and my g/f merge our pictures every now and then so we both have all the pictures of our son to look at whenever { he's pretty much awesome } and so we always get the 'do you want to overwrite' prompts.
View 2 Replies
View Related
Aug 20, 2010
I'll notify something to user after 30 minutes for example. so I need to get a time which is not changable by user or anything. Does it call UTC? I guess I need to get current time and it should have nothing to do with user handle or location actually, I'm focusing '30minutes from now' rather than current time. It also should work even in case of power off and on. Can I use alarm manager for this?
View 12 Replies
View Related
Jul 2, 2010
what are the names of the apk's of pdf viewer and 'navigation'? the navigation i refer to has the blue arrow and is called 'navigation'.
View 2 Replies
View Related
Nov 7, 2011
Is it possible to modify the permission of the files in the data/data/yourpack/filename ? i have manage to solve the downloading of the file to the data/data/yourpack/filename. now whenever i run my programme the downloaded copy of the file is being overwritten by the new copy which i suspect is due to its permissiion... anyway the downloaded copy permission is -rw------- while the new copy is -wr-wr-----
View 2 Replies
View Related
Jan 19, 2010
Is there something like a FileDialog available? From previous threads, it appears there isn't one.
If not, has someone written one?
I want to allow a user to
a) Specify a folder/filename on storage for creating an SQLite database.
b) Specify an existing file/folder on storage card for opening as an SQLite Database.
View 4 Replies
View Related
Feb 8, 2010
I'm trying to get the absolute screen pixel coordinates of the top left corner of a view. However, all methods I can find such as getLeft() and getRight() don't work as they all seem to be relative to the parent of the view, thus giving me 0. What is the proper way to do this?
If it helps, this is for a 'put the picture back in order' game. I want the user to be able to draw a box to select multiple pieces. My assumption is that the easiest way to do that is to getRawX() and getRawY() from the MotionEvent and then compare those values against the top left corner of the layout holding the pieces. Knowing the size of the pieces, I can then determine how many pieces have been selected. I realise I can use getX() and getY() on the MotionEvent, but as that returns a relative position that makes determining which pieces were selected more difficult. (Not impossible, I know, but it seems unnecessarily complicated).
View 4 Replies
View Related
Nov 4, 2009
View.getLeft() and View.getTop() give the position of the view relative to the parent.
Is there a way to get the absolute screen position of that view?
Either a way to translate those coordinates into screen coordinates to make a call to get the position in screen coordinates.
View 2 Replies
View Related
Oct 29, 2010
I am trying to go widget-free, using Zeam launcher instead of LauncherPro which seems to randomly have issues for me, I'm just wondering what tips you all may have for getting the best performance possible from your phone. I'm on a Captivate. I care more about in-app performance and stability over bells and whistles. What do you suggest?
View 6 Replies
View Related
Sep 11, 2009
I am implementing OnTouchListener and am receiving MotionEvent objects. Some ACTION_MOVE events reports absolute X/Y coordinates, while some reports relative coordinates.
How can I ask a MotionEvent what kind of coordinates it currently represents?
View 3 Replies
View Related
Jul 20, 2010
Is it possible to set the absolute position of a view in android? (I know that there is an AbsoluteLayout, but it's deprecated...)
Lets say I have a screen 240x320px, and I want to put an ImageView which is 20x20px with its center at the position (100,100).
What do I have to do?
View 1 Replies
View Related
Aug 9, 2010
If you use an AbsoluteLayout (I know that it is deprecated, but it was the only way to solve my problem ) you can give the childViews the tag "android:layout_x" and "android:layout_y" to set their absolute position within the AbsoluteLayout.
However I dont want to set these informationen in the xml, because I only know them at runtime. So how can I set these parameters at runtime programmatically? I dont see any method on the View like view.setLayoutX(int x) or something.
Here is my XML, which works fine, when I set the layout_x and layout_y values. code...
View 1 Replies
View Related
Nov 21, 2010
I have an image setup inside an absolute panel.I am trying to set it's position via code.But I do not see any applicable method/property to set its position.
Here is my layout.
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/marker" android:src="@drawable/marker" android:layout_y="106dp" android:layout_x="290dp"></ImageView>
</AbsoluteLayout>
Here is my code to set its position...
View 1 Replies
View Related
Jul 28, 2010
I have set image in AbsoluteLayout but it'll not display in full screen on G1 but when i run the same application in Nexus it is working properly.
I have set setContentView(new Test(this)) in my activity class. Test is my AbsoluteLayout class.
My code looks like...
Can anyone tell me that why i am not getting full image on G1 mobile screen?
View 1 Replies
View Related
Nov 27, 2010
A couple months ago i finally decided i needed to get a new phone because it seemed the camera on my old w810i was starting to **** out - it wouldn't focus very well and the camera button wouldn't snap a picture too reliably anymore. I figured it was probably because i had taken thousands and thousands of images over the time i had the phone since 2006 does anyone understand what I'm talking about and can tell me if I'm doing something wrong or how to fix this in the x10?
View 6 Replies
View Related
Sep 26, 2010
I have a custom ViewGroup. The idea is to be able to place controls at absolute positions and then have the ViewGroup scale those controls based on the difference in the screen dimensions with respect to the original design dimensions. I am using the code below. In response to the 'onMeasure' message, I am storing the width and height of the view. Then on the 'onLayout' message I am computing new dimensions for the child controls and adjusting their sizes proportionally. This all works to some degree. However for certain controls (e.g. button controls), the control resizes, but the text inside does not remain centered within the control. I am thinking that there is some other call I need to make to update the child controls after I change their size.
View 3 Replies
View Related