This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> | |
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/> | |
*/ | |
package com.itog_lab.sample.wifi; | |
import android.app.Activity; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void extractZipFiles(String dest, String zipName) { | |
try { | |
AssetManager assetManager = context.getAssets(); | |
InputStream inputStream = assetManager.open(zipName, AssetManager.ACCESS_STREAMING); | |
ZipInputStream zipInputStream = new ZipInputStream(inputStream); | |
ZipEntry zipEntry = zipInputStream.getNextEntry(); | |
while (zipEntry != null) { | |
String entryName = zipEntry.getName(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void combineDevidedFiles(String destination, String devidedFilePrefix) { | |
File destFile = new File(destination); | |
destFile.mkdirs(); | |
destination += devidedFilePrefix; | |
destFile = new File(destination); | |
InputStream input = null; | |
try { | |
AssetManager assetManager = context.getAssets(); | |
OutputStream output = new FileOutputStream(destFile); |
NewerOlder