Programing for Andriod. - General Questions and Answers

How do I create a program that can be encoded as a jpg/image file, that can then be placed on a tablet or cell phone and when clicked moves a file or mutiple files that are encoded in it to a specific location located on the device like anther folder on the media storage partition of the android internal file system. .Is this possible? Can some one write code for me if i send files that i want encoded into the photo and ware I want them to copy or move to. Basically where i want those files to be move once the photo is clicked.

Related

[Q] mp4 files won't play when copied to phone via USB

Motivation: I am creating a more organized folder structure on my phone (LG Quantum) and am using the hack that allows the phone to be seen as a USB storage device.
1. I copy all the JPG and MP4 files from the phone to my computer.
2. I use exiftool to organize the files into folders by date and rename the files with more informative date-related names.
3. I then recopy the directory structure on the computer onto the phone.
It works very nicely for the JPG files. However, the MP4 files, that were originally created on the phone, only show up as video files with black thumbnails, and these files do not play.
If I use Zune to sync them, they go into the Video folder and DO PLAY on the phone. However, I do not want them in the Video folder. I want them in the structured directories in the "Pictures" folder that I made (I want pictures and videos in the same folders by date).
I can copy the files in the phones Video folder to the Pictures directory structure I created on the phone, but a bunch of black thumbnails are left in the Video folder that don't play, making it very inconvenient (since I only want music videos or movies in the Videos folder).
Does anyone know why MP4 files created by the phone will not play when copied to the computer and then back to the phone via USB?
Is this a bug? Any hacks to fix?
Thank you.

Sync'ing Music and Playlists on Galaxy S3

Folks,
I was frustrated sync'ing music and playlists on Galaxy S3. Basically I wanted to simply copy all my music folders and playlists to Galaxy S3. And then do the same incrementally thru some kinda automation tools. It's usually one-way sync since I don't make any changes on the Phone (like creating playlists). Occasionally though, I have my friends push music to my phone. I make it a point to copy that to my PC the next time I connect my phone to my PC.
After couple of days of reading and actually trying to setup my phone with music and playlists, I figured that the fastest way to sync music and playlists reliably is to do the creation, setup and sync manually. Since I am a hard core geeky coder I find it easy to by-pass the Kies software.
NOTE:
- If you're not familiar with using the command prompt, MP3Tag tool, editing text files using macros, etc., you might find this process extremely cumbersome. Better stop reading!
- The steps listed in this post are intented for a user to create playlists, copy music and playlists to the phone, evolve a process (with the help of tools/code/scripts) that works for him/her from scratch. If you have your music and stuff already on your phone do not follow these steps unless you really want to start fresh - read: setup music all over again.
- Read the whole post before executing any of the steps
- I am not responsible for any damages caused to you or your phone by following some or all of the steps below
- I have tried this only with my phone - Galaxy S3 International version with stock OS and Apps.
Knowing well that Kies doesn't allow you to sync playlists to the Galaxy S3, it is best to copy the playlists to the phone manually. The rest of this post will guide you in doing that and much more.
Step-by-step process:
1. Ready your music folder:
It is best to have one music folder consisting of your complete music repository. It could have folders based on Albums, Artists, etc., It is best to keep just music files (mp3 for example) in these folders.
2. Create sample list of files that you would like to be your playlist:
Galaxy S3 stock music player supports playlists in m3u format. It is a simple plain-text file format. Assuming you've a bunch of music files that must go into a playlist:
- Open a Command prompt window (Start -> Run -> Cmd.exe)
- Navigate to the folder where your music files are
- Run the dir command: dir /OD /B > <my_music_folder>\playlist-1.m3u
- In the above dir command stick in the path of your main music (top-level) folder in place of <my_music_folder>
- Open playlist-1.m3u. You will see the list of mp3 files that you intend to have in your playlist
- You could also create listing based on wild-cards like: dir MJ*.mp3 /OD /B > <my_music_folder>\playlist-1.m3u
- The above command will write the list of files starting with MJ to playlist-1.m3u
- Alternatively you could use MP3Tag tool (it's free and it works great) that let's you sort the files by tags of your choice and export the list of files on customized templates. I used MP3Tag to create the list of files that eventually transform into playlists - read on to see how.
3. Create playlist file:
- Open playlist-1.m3u
- Ensure that the files are listed in the following format:
#EXTM3U
/mnt/sdcard/media/<music-sub-folder>/Track 1.mp3
/mnt/sdcard/media/<music-sub-folder>/Track 2.mp3
/mnt/sdcard/media/<music-sub-folder>/Track 3.mp3
- You will have to insert #EXTM3U in the first line of the file. Elsewhere on the net I read that this is optional. But on my Galaxy S3 (intl. version) the stock music player ignores the first line if I have a track listed on the first line instead of #EXTM3U. That causes it to skip the first listed track.
- <music-sub-folder> = this is the path to the music folder under which you have your music files. For example: If on my PC the path looks like: D:\All-My-Music\Albums\Album-1\Track 1.mp3
I'll have /mnt/sdcard/media/Albums/Album-1/Track 1.mp3 in the playlist file.
- Once you're done creating the file consisting of the list of files in the format specified above, save the file in UTF-8 format. This is *****very very***** important. The stock music player is unable to read playlist files saved in other formats. UTF-8 allows the system to support all languages (all characters and not just the basic ASCII characters). All standard editors allow you to save files in UTF-8 format.
- I suggest that you save your playlist file under the top-level music folder. Under D:\All-My-Music for example.
4. Copy music and playlists to the phone:
- This is the easy part with just one quirk. First delete all existing playlists from your phone. This is not mandatory but if you plan to follow just one method to sync your music and playlists, it is best to delete the playlists that were probably created in a different way. If you don't follow this step you might notice the quirks - creation of strange duplicate playlists.
- You will have to delete the existing playlists in the phone. Run the stock music player on the phone. Click on Playlists -> Press and hold each playlist for a second -> From the pop-up menu select Delete.
- Connect your phone to the PC (if it's not connected already)
- Open windows explorer
- Open the Phone folder (device)
- When I connect my phone to my PC I am able to navigate to Computer\GT-I9300\Phone\media. I don't have an external SD card. I am using the stock 16 GB internal memory. Note: If you've external SD card installed you might have to navigate to a different folder.
- In the first point above I told you to delete your existing playlists in the phone - the reason being - for some strange reason a) I was not able to see some of the playlist files thru Windows explorer b) Even when I was able to see the playlist files in windows explorer, deleting them via my PC really didn't work. I believe there's some caching going on (perhaps a copy of the playlists are stored elsewhere in the phone that is not visible in Windows explorer)
- Final step: Copy your entire music folder to the phone via Windows explorer. Based on the examples provided above, this would mean copying D:\All-My-Music\*.* to Computer\GT-I9300\Phone\media
Safely disconnect your phone from the PC. You should see all your music and playlists on your phone.
NOTES:
- I understand that this is not the most elegant way to sync your music with your Galaxy S3. But if you're a developer or a person really good at doing things thru the backdoor, it could help you find the right tools to implement the steps listed in this post. I've automated most of it except deleting playlists manually on the phone. I am currently researching to find out how the phone is storing the playlists internally - that is preventing me to delete/edit playlists via my PC. If you happen to have technical information in this area please share pronto.
- While you're browsing your music files using Windows Explorer, check if you have xxxx.mp3.dup0 files. These are duplicate mp3 files that the music player/android creates in some situations. I found all my music files duplicated (the very first time I browsed the music folder). You know what that means? I'd 5GB of music and guess what? It was consuming 10GB of storage space. Crazy! Who's that developer who merrily wrote the code to create duplicate copies of music files? Hope they didn't do that for video/picture files. You might wanna delete the duplicate music files (if any) to recover lost storage space.
- The advantages of doing the music sync in your own customized way thru Windows explorer / tools / code / scripts are as follows:
- Complete control of music repository and playlists
- Copying file to the phone is super fast (Windows explorer treats the phone as a USB pen drive)
- No need to run Kies
- Migrating playlists from other players possible thru scripting (hey you know what's under the hood)
- Have fun doing it your way
- Some learning...
- It's a long post, if you find any errors, please don't beat me up but do point out.
This seems most apparent when adding files to a Fat32 formatted external card (but can occur on the internal carda s well)
It can be resolved by rebuilding the Mediastore process cache or formatting the extSD to exFAT before inserting it into the phone.

Folders in video player

Is it possible to configure which folders the video player looks in, and only include certain ones?
Yes, make a file called '.nomedia' and put it in the directories you don't want to see.
Edit: should have clarified more. This is just a blank file called .nomedia you don't need anything in the file itself.

[Guide] Save instagram videos for offline viewing

hi all,
Just a small guide on a way i found out to save videos that your friends have uploaded to instagram. Take care that you need to have viewed them atleast once or you might have to view them once before you save them as they are saved in a cache file.
To save videos off instagram on android here is an easy way that i found out :
1. Use any good file explorer like ES file explorer.
2. go to your SDCARD > Android > Data
3. Search for a folder named "Com.Instagram.Android"
4. Inside it you will find a folder called "Cache"
5. Inside this you will find another folder called "video"
6. you will find all videos that your friends have uploaded and have been viewed over here.
the filename will be something like abc12kl.0
7. copy these files anywhere safe on your sd card or external sd card...
8. rename the extension ".0" to ".mp4"
that's it..you can play these videos with any player that plays mp4 files.
enjoy! :cyclops:
Kirtan
How to save Instagram photos & vidoes android phone
In latest Instagram feature, you can save photos and videos on your Instagram account android phone using this.. I hope this article will help you to save photos or videos.
kirtandoshi said:
hi all,
Just a small guide on a way i found out to save videos that your friends have uploaded to instagram. Take care that you need to have viewed them atleast once or you might have to view them once before you save them as they are saved in a cache file.
To save videos off instagram on android here is an easy way that i found out :
1. Use any good file explorer like ES file explorer.
2. go to your SDCARD > Android > Data
3. Search for a folder named "Com.Instagram.Android"
4. Inside it you will find a folder called "Cache"
5. Inside this you will find another folder called "video"
6. you will find all videos that your friends have uploaded and have been viewed over here.
the filename will be something like abc12kl.0
7. copy these files anywhere safe on your sd card or external sd card...
8. rename the extension ".0" to ".mp4"
that's it..you can play these videos with any player that plays mp4 files.
enjoy! :cyclops:
Kirtan
Click to expand...
Click to collapse
Can i find live stories in that folder also? During streaming or after they end..
Re: Saving videos from private accounts
What if you're a follower on a private account. Is it possible to save videos from that account?
kirtandoshi said:
hi all,
Just a small guide on a way i found out to save videos that your friends have uploaded to instagram. Take care that you need to have viewed them atleast once or you might have to view them once before you save them as they are saved in a cache file.
To save videos off instagram on android here is an easy way that i found out :
1. Use any good file explorer like ES file explorer.
2. go to your SDCARD > Android > Data
3. Search for a folder named "Com.Instagram.Android"
4. Inside it you will find a folder called "Cache"
5. Inside this you will find another folder called "video"
6. you will find all videos that your friends have uploaded and have been viewed over here.
the filename will be something like abc12kl.0
7. copy these files anywhere safe on your sd card or external sd card...
8. rename the extension ".0" to ".mp4"
that's it..you can play these videos with any player that plays mp4 files.
enjoy! :cyclops:
Kirtan
Click to expand...
Click to collapse
Thanks!
I also found a trick to download Instagram photo and videos. Just put the link to GramKeep and then you can directly download photo and video from Instagram!

copy files from network share in alphabetical order?

I use my phone as an mp3 player, and I have the music folder and download folder on our desktop pc shared on the home network.
when I want to put music on the phone, I use es file explorer to copy music from the shared folder to the sd card. sometimes files don't copy in alpha-numeric order, I think it happens when there's a wider variation in file sizes in the folder. the sd card is formatted in FAT (exfat, I think), which indexes files in order of creation.
if the files have been copied and indexed out of order, music player apps will then play them in that order, regardless of what the track numbers in the metadata says. this is an old problem that's been plaguing digital music fans for years.
it's relatively easy to fix, by just cutting and pasting the files into another folder on the sd card, where they are re-indexed into alpha-numeric order.
is there a way to stop it happening to start with, either at the phone end or on the pc (linux mint 17)? I'd assume that formatting the sd card in a different file system would just cause me problems, can I force es file explorer to copy the files in order? or is there a different file manager that will? or would sharing the files via ftp instead of smb sort it out?

Categories

Resources