This file contains hidden or 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 boolean networkIsAvailable() { | |
ConnectivityManager manager = (ConnectivityManager) | |
getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo networkInfo = manager.getActiveNetworkInfo(); | |
boolean isAvailable = false; | |
if (networkInfo != null && networkInfo.isConnected()) { | |
isAvailable = true; | |
} | |
return isAvailable; | |
} |
This file contains hidden or 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
package com.keinix.interactivestory; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.pm.ActivityInfo; | |
import android.os.Bundle; | |
public class InteractiveStoryApplication extends Application { | |
@Override | |
public void onCreate() { |
This file contains hidden or 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 class Main { | |
public static void main(String[] args) { | |
Gson gson = new Gson(); | |
String file; | |
JsonObject jsonObject; | |
// used in the map example only | |
Type type = new TypeToken<Map<String, String>>(){}.getType(); | |
FileReader json = null; |
This file contains hidden or 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
class Game { | |
private String answer; | |
private String hits; | |
private String misses; | |
public static final int MAX_MISSES = 7; | |
public Game(String answer) { | |
this.answer = answer; | |
hits = ""; | |
misses = ""; |
NewerOlder