I have found a gallery app that I have integrated into my own app.
http://manishkpr.webheavens.com/android-viewpager-as-image-slide-gallery-swipe-gallery/
Currently the gallery displays images that are founded in drawable i want to modify it to show image from sd card (i.e. /sd/images/)
I tried different approach but without luck, unfortunately.
Thanks in advance!
heahmad said:
I have found a gallery app that I have integrated into my own app.
http://manishkpr.webheavens.com/android-viewpager-as-image-slide-gallery-swipe-gallery/
Currently the gallery displays images that are founded in drawable i want to modify it to show image from sd card (i.e. /sd/images/)
I tried different approach but without luck, unfortunately.
Thanks in advance!
Click to expand...
Click to collapse
You have to use BitmapFactory.decodeFile() on each File in that directory. You can then set the returned bitmap to your imageView in the instantiateItem() method of your PagerAdapter with setImageBitmap(). Though you might want to cache thing first for better performance...
ok i know that, but the problem is that the app itself generate photos with different number and name (Timestamp) so i want it to read an entire folder not a single file each time
heahmad said:
ok i know that, but the problem is that the app itself generate photos with different number and name (Timestamp) so i want it to read an entire folder not a single file each time
Click to expand...
Click to collapse
you can get all images from diretory
PHP:
File file= new File(android.os.Environment.getExternalStorageDirectory(),"MyFolder");
if (file.isDirectory())
{
listFile = file.listFiles();
for (int i = 0; i < listFile.length; i++)
{
f.add(listFile[i].getAbsolutePath());
}
}
zipzip27 said:
you can get all images from diretory
PHP:
File file= new File(android.os.Environment.getExternalStorageDirectory(),"MyFolder");
if (file.isDirectory())
{
listFile = file.listFiles();
for (int i = 0; i < listFile.length; i++)
{
f.add(listFile[i].getAbsolutePath());
}
}
Click to expand...
Click to collapse
i do not get it can you explain more, there is no return function with data
Related
HI to every one.
Is there a way to get the apk file name when an app it was launched ?
Scenario: I want to append some additional data to the file name and when the app is launched I want somehow by application Id to locate the file name and extract that additional data to fill some fields inside my app .
Is there some methods which are in charge with that ? or even a way to do that ? or tutorial doing that ?
Also if not then what different methods exists to retrieve some additional data at downloading process, or even from file name ... etc ???
Thank you in advance .
asteroidg said:
HI to every one.
Is there a way to get the apk file name when an app it was launched ?
Scenario: I want to append some additional data to the file name and when the app is launched I want somehow by application Id to locate the file name and extract that additional data to fill some fields inside my app .
Is there some methods which are in charge with that ? or even a way to do that ? or tutorial doing that ?
Also if not then what different methods exists to retrieve some additional data at downloading process, or even from file name ... etc ???
Thank you in advance .
Click to expand...
Click to collapse
Which App Is It If You Don't Mind?
I Might Know The Exact Name?
Sent from my HERO200 using XDA App
It will be my *.apk file name downloaded from my server. I saw that every time that *.apk file went to my \sdcard\download, can I assume that that path will be for every android user ?
asteroidg said:
It will be my *.apk file name downloaded from my server. I saw that every time that *.apk file went to my \sdcard\download, can I assume that that path will be for every android user ?
Click to expand...
Click to collapse
It Usually Names The File,
At Least On My Hero!
Wait.... File Name? Or App Name?
For File Name, Try.... Root Explorer!!
Root Explorer, Allows You To Basically Dissect Apks.
For App Name, Try.... AppMonster!!
Install AppMonster, And Once It's Installed....
Reinstall The App/Apps You Want The Name Of, & Reopen AppMonster & They Should Show Up As Apps Currently Installed!
Lemme Know If That Works!!
Sent from my HERO200 using XDA App
Thanks. But I am looking doing that inside the code, by programming . I know how to get the file name from specific folder but i need to look for the file name from the whole device that't my point , if any suggestion or even line of codes will be appreciated.
File dir = new File("/data/app");
File[] fileList = dir.listFiles();
if (fileList != null)
{
for ( int i = 0;i<fileList.length;i++)
{
filename = fileList.getName();
Log.d("FN-log","file name="+filename);
if (-1 != filename.indexOf(appName.toString()))
{
break;
}
}
}
I am using the above code to retrieve the file name form specific folder, I need something from the whole device , any idea ?
asteroidg said:
Thanks. But I am looking doing that inside the code, by programming . I know how to get the file name from specific folder but i need to look for the file name from the whole device that't my point , if any suggestion or even line of codes will be appreciated.
File dir = new File("/data/app");
File[] fileList = dir.listFiles();
if (fileList != null)
{
for ( int i = 0;i<fileList.length;i++)
{
filename = fileList.getName();
Log.d("FN-log","file name="+filename);
if (-1 != filename.indexOf(appName.toString()))
{
break;
}
}
}
I am using the above code to retrieve the file name form specific folder, I need something from the whole device , any idea ?
Click to expand...
Click to collapse
Oh ok, Sorry misunderstood you!
Sent from my HERO200 using XDA App
Try searching the whole sd card folder by folder
XDA App
TheRedDrake said:
Try searching the whole sd card folder by folder
XDA App
Click to expand...
Click to collapse
It seems that I have to check first in the root folder of device which is "/", that thing will show the root list. Then I need a for in for intsructions to be called ... to check all subfolders until I will find the file, it's a solution but first I have to write this algorithm of searching which is a little bit annoying and I am afraid about that process will slow the app ... That's why I was looking for something which should be already in Android API, do not invent bicycle again ? But any help will be appreciated. (By the time I was thinking to use Linus find shell command , I tried but every time I am getting no permission access is denied ... )
Thank you.
Hi!
Is it possible to make an animation in CM7 like this one showed in video bellow in 0:26 when the screen is rotating?
http://www.youtube.com/watch?v=DgPdSKLAPGc
Animation in Blur 2.3 very sexy.
I hope someone can port it to our milestone.
Id really appreciate if someone would port this. ive been looking for this for ages..
Any news about this? Has this been ported to other phones/roms?
m0jo said:
Any news about this? Has this been ported to other phones/roms?
Click to expand...
Click to collapse
No news about it. I've been searching for some clues in GB rom for Defy, but I don't even know where to search for it (I mean: what file can do that, it's is probably somewhere in framework-res or coded in .jar)
adamz667 said:
No news about it. I've been searching for some clues in GB rom for Defy, but I don't even know where to search for it (I mean: what file can do that, it's is probably somewhere in framework-res or coded in .jar)
Click to expand...
Click to collapse
Screen animations should be in the launcher while windows animation are in framework-res.apk. Try using the animation xml files in /res/anim folder. Not sure if it will work, but worth a try.
sileshn said:
Screen animations should be in the launcher while windows animation are in framework-res.apk. Try using the animation xml files in /res/anim folder. Not sure if it will work, but worth a try.
Click to expand...
Click to collapse
I've tried it, but I can't compile framework-res (with both - apk-tool and apk-manager). There are some problems with NinePatch files (HO!NO! CM7 mod framework).
adamz667 said:
I've tried it, but I can't compile framework-res (with both - apk-tool and apk-manager). There are some problems with NinePatch files (HO!NO! CM7 mod framework).
Click to expand...
Click to collapse
No need to decompile. Just copy paste using 7zip.
Sent from my GT-I9100 using Tapatalk
sileshn said:
No need to decompile. Just copy paste using 7zip.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Okay, I've done it and the phone hangs on bootanimation, so it will probably doesn't work.
@adamz667: Can you send me framework-res.apk from this ROM?
Sent from my Milestone using XDA App
kv1dr said:
@adamz667: Can you send me framework-res.apk from this ROM?
Sent from my Milestone using XDA App
Click to expand...
Click to collapse
Absolutely Here you've got even more - complete framework folder, hope it helps
http://hotfile.com/dl/122984343/f518479/motoblurframework.zip.html
Opps, before I forgot: blur-framework-res.apk should be renamed to framework-res.apk, because I've changed its name to prevent mess.
Are we getting any more developments, or is this dead?
really wanted to see this
tr4z
tr4zz0id said:
Are we getting any more developments, or is this dead?
really wanted to see this
tr4z
Click to expand...
Click to collapse
Now I'm downloading sources of CM7. Later I'll try to compile CM7 framework with animations from GingerBlur. Maybe it will works.
Edit: Oh, I think that animation is also included in Honeycomb, so maybe I'll look into its framework.
Edit2: In Honeycomb framework there are xml files with rotate animations, but just adding them to GB framework doesn't do anything. I think it need to be coded somewhere, but I don't have a needed experience to do that and I can't find any clues where can be needed file.
If somebody know how to do it, please share with us.
Edit3: Okay, I've got some idea, but I need time to mess with xml files and code.
adamz667 said:
Absolutely Here you've got even more - complete framework folder, hope it helps
http://hotfile.com/dl/122984343/f518479/motoblurframework.zip.html
Opps, before I forgot: blur-framework-res.apk should be renamed to framework-res.apk, because I've changed its name to prevent mess.
Click to expand...
Click to collapse
Mendozinas of UOT Kitchen tried to extract the animation from this framework, I test it but it's doesn't work!
Are you sure that there is the rotation animation in this framework?
Maybe is this animation not only in framework?
Travis90x said:
Mendozinas of UOT Kitchen tried to extract the animation from this framework, I test it but it's doesn't work!
Are you sure that there is the rotation animation in this framework?
Maybe is this animation not only in framework?
Click to expand...
Click to collapse
I think that it need to be coded in Animation.java. I've got rotate animations from Honeycomb and idea how to implement it in GB, but don't have a time now to do that.
I've been having a look at the this particular animation and trying to get it working on HTC Sense (i don't own a moto device). If i get it working on my rom then it should be easy to get it working on the Droid. I have a few ideas, however i need to know which xml file in the anim folder is responsible for the animation. Check in framework-res.apk/res/anim. I think it may be the "loupe" xmls.
If we pinpoint this, then i can have a look in the framework.jar file and see if i can patch things up.
I should mention, im still a noob at this stuff so don't get your hopes too high
SupremeBeaver said:
I've been having a look at the this particular animation and trying to get it working on HTC Sense (i don't own a moto device). If i get it working on my rom then it should be easy to get it working on the Droid. I have a few ideas, however i need to know which xml file in the anim folder is responsible for the animation. Check in framework-res.apk/res/anim. I think it may be the "loupe" xmls.
If we pinpoint this, then i can have a look in the framework.jar file and see if i can patch things up.
I should mention, im still a noob at this stuff so don't get your hopes too high
Click to expand...
Click to collapse
Every animation should be also defined in java. Android should know which animation must be played when eg. we open new window. So we need to define screen orientation change and assing to it animation.
Example:
Code:
private OnClickListener mZoomListener = new OnClickListener() {
public void onClick(View v) {
// Request the next activity transition (here starting a new one).
startActivity(new Intent(Animation.this, Controls1.class));
// This is a more complicated animation, involving transformations
// on both this (exit) and the new (enter) activity. Note how for
// the duration of the animation we force the exiting activity
// to be Z-ordered on top (even though it really isn't) to achieve
// the effect we want.
overridePendingTransition([B]R.anim.zoom_enter[/B], [B]R.anim.zoom_exit[/B]);
}
};
R.anim.zoom_exit is a "link" to animation in /res/anim/zoom_exit.xml
adamz667 said:
Every animation should be also defined in java. Android should know which animation must be played when eg. we open new window. So we need to define screen orientation change and assing to it animation.
Example:
Code:
private OnClickListener mZoomListener = new OnClickListener() {
public void onClick(View v) {
// Request the next activity transition (here starting a new one).
startActivity(new Intent(Animation.this, Controls1.class));
// This is a more complicated animation, involving transformations
// on both this (exit) and the new (enter) activity. Note how for
// the duration of the animation we force the exiting activity
// to be Z-ordered on top (even though it really isn't) to achieve
// the effect we want.
overridePendingTransition([B]R.anim.zoom_enter[/B], [B]R.anim.zoom_exit[/B]);
}
};
R.anim.zoom_exit is a "link" to animation in /res/anim/zoom_exit.xml
Click to expand...
Click to collapse
Yes i understand, but which xml is responsible for the animation? We can't get anything started until we find out which are the xmls.
SupremeBeaver said:
Yes i understand, but which xml is responsible for the animation? We can't get anything started until we find out which are the xmls.
Click to expand...
Click to collapse
Xmls are the smallest problem We can just copy it from Honeycomb SDK or write by ourselfs, it's not complicated.
Biggest problem is with java code which will activate the animation
there was a similar animation like this in 1.5 which could be activated through spare parts but it got removed from android -.-
perhaps u guys could look there in the sdk for something to port. it was there already anyway.
also adobe reader has a nice flip animation when turning screen afaik, but it is not OSS so i think it is of no use.
would love to see this too but i'm no dev.
Hey,
I current have a wallpaper set which was unfortunately deleted, however, to my surprise it is still active on my screen. I was wondering if anyone knows the location where the image (adjusted to the size I chose) would be stored so i could use root explorer and copy it back to reset my lock screen image?
Cheers
etern1ty said:
Hey,
I current have a wallpaper set which was unfortunately deleted, however, to my surprise it is still active on my screen. I was wondering if anyone knows the location where the image (adjusted to the size I chose) would be stored so i could use root explorer and copy it back to reset my lock screen image?
Cheers
Click to expand...
Click to collapse
What does it say in /data/system/wallpaper_info.xml ?
it has an xml version,
standalone='yes'
wp width = -1, height = -1, name = ""
then the component says "android/com.android.internal.service.wallpaper.ImageWallpaper"
thats it, i scouted that before, but nothing with the image or telling me where it could be D=
Hi
How can I modify Home.apk?
I unzipped the file but it seems that all xml files are encoded !
Can I use home.apk of Sony PRS T1 for Nook Simple Touch ?
I extracted all files using apktools
Now all xml files are readable
Is there any reference on what each xml file means ? I want to edit /Layout files
Make sure that you do a full backup.
Home.apk is a system app and uses a shared Id.
If you start to modify too much stuff the system may refuse to acknowledge it.
Apktool is the right tool for unzipping and making xml visible/editable.
It does delete all the META-INF.
You need to put the original stuff back in.
Use an unzip to get META-INF and after you use apktool put it back with unzip/zip.
I haven't looked at res/layout but if you understand the layout system well enough to modify it the intent of each file should be obvious.
Be careful modifying the xml files. Messing up something will prevent it from loading at runtime.
My modification to Home.apk was to delete it.
Renate NST said:
Make sure that you do a full backup.
Home.apk is a system app and uses a shared Id.
If you start to modify too much stuff the system may refuse to acknowledge it.
Apktool is the right tool for unzipping and making xml visible/editable.
It does delete all the META-INF.
You need to put the original stuff back in.
Use an unzip to get META-INF and after you use apktool put it back with unzip/zip.
I haven't looked at res/layout but if you understand the layout system well enough to modify it the intent of each file should be obvious.
Be careful modifying the xml files. Messing up something will prevent it from loading at runtime.
My modification to Home.apk was to delete it.
Click to expand...
Click to collapse
Thanks a lot ...
It's weird ... but can I install the Home Screen of Sony PRS T1 to Took Touck ?
I want to try but witch files should I replace ? just Home.apk ?
Thanks
There is a ton of interaction going on between the various B&N apps.
The Sony app will not have the integration so a lot of stuff will be broken.
Just to give you an idea of the scale of the interaction:
http://forum.xda-developers.com/showpost.php?p=24061856&postcount=11
Renate NST said:
There is a ton of interaction going on between the various B&N apps.
The Sony app will not have the integration so a lot of stuff will be broken.
Just to give you an idea of the scale of the interaction:
http://forum.xda-developers.com/showpost.php?p=24061856&postcount=11
Click to expand...
Click to collapse
Renate,
Wow!
I missed that post.
How did you build that diagram?
ApokrifX said:
How did you build that diagram?
Click to expand...
Click to collapse
Lol! I had to look, I had forgotten already!
I wrote a program that analyzes AndroidManifest.xml in APKs.
It generates either an SVG or a DXF.
I usually turn the SVG into a PNG.
Code:
pkgtodxf /v /w3145 /h1355 /s45 /m20 scheme.svg E:\Home 11 0 E:\Library 11 "-21.4" E:\Reader 35 0 E:\Shop 59 0
Renate NST said:
Lol! I had to look, I had forgotten already!
I wrote a program that analyzes AndroidManifest.xml in APKs.
It generates either an SVG or a DXF.
I usually turn the SVG into a PNG.
Code:
pkgtodxf /v /w3145 /h1355 /s45 /m20 scheme.svg E:\Home 11 0 E:\Library 11 "-21.4" E:\Reader 35 0 E:\Shop 59 0
Click to expand...
Click to collapse
Right. No need to ask.
You answer is the same always: "I wrote a program that..."
It's gotta be a way to do it in MS Visio - I've never tried.
I not clear how to describe dependencies so it can swallow them.
It supposed to be able to "consume" C# or Java code directly, tho.
ApokrifX said:
No need to ask.
Click to expand...
Click to collapse
Aw, I don't mean to be obtuse.
The information displayed is pretty much just a clean printout of each AndroidManifest.xml
There is no correlation done between different APKs.
It's just that it prints out neater than the regular XML.
Moreover it doesn't document the BroadcastReceivers that are registered programatically.
For instance, in Reader.apk these are registered programatically and aren't mentioned in AndroidManifest.xml:
com.BN.intent.action.UMS_ABOUT_TO_START
com.bn.intent.extra.getreadposition.value
com.BN.intent.action.SCREEN_LIGHTS_OFF (in glow Nook)
Within Roms have a file called CERT.SF (not quite understand its function, but it has something related to the installation of libs, apks, etc). There has several pairs of two sentences separated by a line, e.g.:
Name: system / lib / libaudioeffect_jni.so
SHA1-Digest-Manifest: shbfXYXU2zq9P46wqscfR6A5YHk =
Name: system / app / Browser.apk
SHA1-Digest-Manifest: HgFxATVuqi8rYvNZdnBKQGaiUMw =
Name: system / lib / libnv.so
SHA1-Digest-Manifest: + = ARoEbtBX287Y7b56MIMvVtL8EM
Finally, there is a simple logic in the first sentence, we have the location followed by the package name. In the second, we have such a SHA1-Digest-Manifest.
I was wondering if anyone can tell me where I find the SHA1-Digest-Manifest package, and if possible, try to explain at least the basics of this subject.
Sorry my English, i'm doing my best
And sorry my ignorance, i just wanna learn
Or when i sign, it appear automatically?
60 views and 0 answers?
Hugo Castelani said:
Or when i sign, it appear automatically?
Click to expand...
Click to collapse
How i suspect, when we sign it's appear automatically, done deal!
At least, now you know that I am persistent rsrsrsrsrsrsrs
Hugo Castelani said:
Within Roms have a file called CERT.SF (not quite understand its function, but it has something related to the installation of libs, apks, etc). There has several pairs of two sentences separated by a line, e.g.:
Name: system / lib / libaudioeffect_jni.so
SHA1-Digest-Manifest: shbfXYXU2zq9P46wqscfR6A5YHk =
Name: system / app / Browser.apk
SHA1-Digest-Manifest: HgFxATVuqi8rYvNZdnBKQGaiUMw =
Name: system / lib / libnv.so
SHA1-Digest-Manifest: + = ARoEbtBX287Y7b56MIMvVtL8EM
Finally, there is a simple logic in the first sentence, we have the location followed by the package name. In the second, we have such a SHA1-Digest-Manifest.
I was wondering if anyone can tell me where I find the SHA1-Digest-Manifest package, and if possible, try to explain at least the basics of this subject.
Sorry my English, i'm doing my best
Click to expand...
Click to collapse
Hey man! You should ask in xda q&a or other zones not in l3/l5/l7 area
You are right, but now it's too late... The problem was resolved