Activity Stream
93,440 MEMBERS
27 ONLINE
Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A)
Results 1 to 2 of 2
  1.    Tweet this post   Share This Post On Facebook Share This Post On Google+
    #1
    Symbian Translator
    Python Master
    Python Section MOD
    Rebel's Avatar
    Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A)

    Default Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A)

    This script hides images and videos in your desired folder by creating a .nomedia file in that folder.
    for running this code, you need to install sl4a and python for android on your devise.
    for downloading the sl4a and py4a(python for android) and more info, please visit: code.google.com/p/python-for-android

    How to use:
    1. Put the py file from zip file in: sdcard/sl4a/scripts
    2. Run SL4A and click on RebelNoMedia.py
    3. Select the cog-wheel icon and you are done



    Source Code : 
    # -*- coding: utf-8 -*-
    #title            :RebelNoMedia.py
    #description    :This script hidex pictures and videos in selected 
    #               directory by making a .nomedia file in that directory.
    #author            :Rebel
    #date            :2012-02-25
    #version        :0.0.1
    #python_version    :2.6.2
    #==================================================

    import androidostime
    droid 
    android.Android()
    base_dir '/sdcard'

    def hide(path):
        
    droid.dialogCreateSpinnerProgress(path'Hiding Images and Videos')
        
    droid.dialogShow()
        
    time.sleep(3)
        
    open(path+'/.nomedia''w')
        
    f.close()
        
    droid.dialogDismiss()
        
    droid.makeToast('Media files made hidden in this folder'
    def show_dir(path=base_dir):
        
    nodes os.listdir(path)
        if 
    path != base_dirnodes.insert(0'...')
        
    droid.dialogCreateAlert(os.path.basename(path).title())
        
    droid.dialogSetItems(nodes)
        
    droid.dialogShow()
        
    result droid.dialogGetResponse().result
        droid
    .dialogDismiss()
        if 
    'item' not in result:
            return
        
    target nodes[result['item']]
        
    target_path os.path.join(pathtarget)
        if 
    target == '...'target_path os.path.dirname(path)
        if 
    os.path.isdir(target_path):

    [Login or Register to remove this advertisement]

            
    droid.dialogCreateAlert('Choose an Action:')
            
    droid.dialogSetItems(['Hide Media in this Folder''Continue Browsing'])
            
    droid.dialogShow()
            
    result droid.dialogGetResponse().result
            droid
    .dialogDismiss()
            if (
    result['item']==0):
                
    hide(target_path)
                
    show_dir(base_dir)
            else:
                
    show_dir(target_path)
        else:
            
    droid.dialogCreateAlert('Error''Please choose a folder not a file')
            
    droid.dialogSetPositiveButtonText('Ok')
            
    droid.dialogShow()
            
    droid.dialogGetResponse()
            
    show_dir(path)
    if 
    __name__ == '__main__':
        
    show_dir() 
    Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A)-45040788532466593456-gif
    Rebel Reviewed by Rebel on . Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) This script hides images and videos in your desired folder by creating a .nomedia file in that folder. for running this code, you need to install sl4a and python for android on your devise. for downloading the sl4a and py4a(python for android) and more info, please visit: code.google.com/p/python-for-android How to use: 1. Put the py file from zip file in: sdcard/sl4a/scripts 2. Run SL4A and click on RebelNoMedia.py 3. Select the cog-wheel icon and you are done Rating: 5
    Attached Images Attached Images
    Attached Files Attached Files
    [IMG]http://up.********.com/images/n6oouxsnesjmahzqjs8y.png[/IMG]

  2.   Advertisements

  3.    Tweet this post   Share This Post On Facebook Share This Post On Google+
    #2
    Symbian Translator
    Python Master
    Python Section MOD
    Rebel's Avatar
    Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A)

    Grin Updated

    I made a small UI and code refinement


    Source Code : 
    # -*- coding: utf-8 -*-
    #title            :RebelNoMedia.py
    #description    :This script hidex pictures and videos in selected
    #               directory by making a .nomedia file in that directory.
    #author            :Rebel
    #date            :2012-03-06
    #version        :0.0.2
    #python_version    :2.6.2
    #===================================================================



    import androidostime
    droid 
    android.Android()
    base_dir '/sdcard'

    def hide(path):
        
    droid.dialogCreateSpinnerProgress(path'Hiding Images and Videos')
        
    droid.dialogShow()
        
    time.sleep(3)
        
    open(path+'/.nomedia''w').close()
        
    droid.dialogDismiss()
        
    droid.makeToast('Media files made hidden in this folder')
        
      
    def show_dir(path=base_dir):
        
    node os.listdir(path)
        
    nodes = []
        for 
    name in node:
            if 
    os.path.isdir(os.path.join(pathname)):
                
    nodes.append(name)
        
    nodes sorted(nodes)
        if 
    path != base_dirnodes.insert(0'...UP')
        
    droid.dialogCreateAlert(path)
        
    droid.dialogSetSingleChoiceItems(nodes)
        
    droid.dialogSetPositiveButtonText("Browse This Dir")
        
    droid.dialogSetNegativeButtonText("Hide This Dir")
        
    droid.dialogShow()
        
    result droid.dialogGetResponse().result
        item 
    droid.dialogGetSelectedItems().result 
        droid
    .dialogDismiss()
        print 
    item
        target 
    nodes[item[0]]
        
    target_path os.path.join(pathtarget)
        if 
    target == '...UP'target_path os.path.dirname(path)
        if 
    result['which'] == 'positive'
            
    show_dir(target_path)
        
    elif result['which'] == 'negative':
            if 
    len(nodes)>and (target != "...UP"): 
                
    hide(target_path)
            else:
                
    hide(path)
            
    show_dir(target_path)

    if 
    __name__ == '__main__':
        
    show_dir() 
    Attached Images Attached Images
    Attached Files Attached Files
    [IMG]http://up.********.com/images/n6oouxsnesjmahzqjs8y.png[/IMG]

Thread Information

Users Browsing this Thread

There Are Currently 1 Users Browsing This Thread. (0 Members and 1 Guests)

Similar Threads

  1. ViPER4 FX Android Audio Driver v2.3.2.5
    By BrainDrain in forum Android OS Applications
    Replies: 0
    Last Post: 11th March 2014, 11:26 AM
  2. Image-Line FL Studio Mobile v1.02 (Android)
    By Selena in forum Android OS Applications
    Replies: 0
    Last Post: 28th April 2013, 01:05 AM
  3. How to Hide Audio / Image Files From Media Players
    By 1AnDrOiD1 in forum Android Tips & Tutorial
    Replies: 0
    Last Post: 24th July 2012, 05:52 PM
  4. Replies: 0
    Last Post: 4th March 2012, 01:57 PM
  5. How to Sign Android APK and ZIP Files
    By [email protected]$h in forum Developing & Hacking for Android
    Replies: 0
    Last Post: 17th March 2011, 08:13 PM

Tags for this Thread

BE SOCIAL
Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A) Hiding Media(Audio, Video, Image) files in Android using Python for Android(Py4A)