21 package com.arm.malideveloper.openglessdk.minMaxBlending;
24 import java.io.InputStream;
25 import java.io.RandomAccessFile;
27 import android.os.Bundle;
28 import android.app.Activity;
29 import android.content.res.AssetManager;
30 import android.util.Log;
35 private static String
LOGTAG =
"MinMaxBlending";
41 protected void onCreate(Bundle savedInstanceState)
43 super.onCreate(savedInstanceState);
54 for (
int i = 1; i <= 109; i++)
60 setContentView(graphicsView);
65 graphicsView.onPause();
70 graphicsView.onResume();
83 Log.d(
LOGTAG,assetName +
" already exists. No extraction needed.\n");
87 Log.d(
LOGTAG, assetName +
" doesn't exist. Extraction needed. \n");
92 RandomAccessFile out =
new RandomAccessFile(
assetDirectory + assetName,
"rw");
93 AssetManager am = applicationContext.getResources().getAssets();
96 InputStream inputStream = am.open(assetName);
97 byte
buffer[] =
new byte[1024];
103 count = inputStream.read(
buffer, 0, 1024);
113 if(fileTest.exists())
115 Log.d(
LOGTAG,
"File extracted successfully");
static String assetDirectory
static android.content.Context applicationContext
void onCreate(Bundle savedInstanceState)
TutorialView graphicsView
GLenum GLenum GLsizei count
void extractAsset(String assetName)