How to create OBB files USING jobb tool Android

后端 未结 2 967
时光取名叫无心
时光取名叫无心 2021-02-10 04:41

My app has grown to be over 50mb, so I now need to use an expansion file. On searching I came to know that there are different files that can be used as expansion files such as

相关标签:
2条回答
  • 2021-02-10 05:15

    my cmd saying jobb is not recognise as internal or external command

    Add /tools to your path or instead of jobb use path/to/sdk/tools/jobb.bat

    which type of files are put in these obb files

    Big ones. Like drawables, sounds etc. Then, for example, you can use this code to put drawable file into ImageView:

    imageView.setImageBitmap(
        BitmapFactory.decodeFile(
            sm.getMountedObbPath("/path/to/obb/file") + 
            "path/to/file/in/obb.png")
    

    or, play sound:

    mp.setDataSource(AcItem.this, 
        Uri.fromFile(new File(
            sm.getMountedObbPath("/path/to/obb/file") + 
            "path/to/file/in/obb.png"));
    mp.prepare();
    mp.start();
    

    As I promised, GitHub link to my obb manager class: https://github.com/uncleLem/AndroidUtils/blob/master/src/io/github/unclelem/androidutils/utils/ObbExpansionsManager.java I hope it would help.

    0 讨论(0)
  • 2021-02-10 05:15

    Just write Like this in command prompt and press enter

    C:\>C:\Development\Android\adt-bundle-windows-x86-20140321\sdk\tools\jobb -d C:\
    Myworkspace\ImageTargets\assets\ -o Imagetargets.obb -k globe -pn com.ib.globeap
    p.activity -pv 200 -v
    
    0 讨论(0)
提交回复
热议问题