· 6 years ago · Feb 20, 2019, 01:14 PM
1File file = new File( root_sd + "/.Akhil"+"/"+foldername);
2 File list[] = file.listFiles();
3 if(list.length>0){
4 for( int i=0; i< list.length; i++)**strong text**
5 {
6 name = list[i].getPath();
7
8 String filenames1=list[i].getName();
9
10 if(filenames1.contains(".sla")){
11 String[] filename=filenames1.split(".sla");
12 imagename=filename[0].toString();
13
14 }
15 byte[] keyBytes = new byte[] {XXXXXXXX};
16 SecretKey skey =new SecretKeySpec(keyBytes, "AES");
17 try {
18 encipher = Cipher.getInstance("AES");
19 } catch (NoSuchAlgorithmException e1) {
20 // TODO Auto-generated catch block
21 e1.printStackTrace();
22 } catch (NoSuchPaddingException e1) {
23 // TODO Auto-generated catch block
24 e1.printStackTrace();
25 }
26 try {
27 encipher.init(Cipher.DECRYPT_MODE, skey);
28 } catch (InvalidKeyException e) {
29 // TODO Auto-generated catch block
30 e.printStackTrace();
31 }
32
33 try {
34 file1 = new FileInputStream(new File(name));
35 } catch (FileNotFoundException e) {
36 // TODO Auto-generated catch block
37 e.printStackTrace();
38 }
39 CipherInputStream cis = new CipherInputStream(file1, encipher);
40
41
42 if(filenames1.contains(".3gp")||filenames1.contains(".mp4"){
43
44 **How can i get video files Thumbnail from cis to arraylist and how to add video files to arraylist and play them...**
45
46 }
47
48
49 BufferedInputStream bis=new BufferedInputStream(cis);
50
51 Bitmap image = BitmapFactory.decodeStream(bis);
52
53
54 items1.add(imagename);
55 images1.add(image);