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
inline static void get_lock(fl_lock_t* lock) | |
{ | |
#ifdef ADAPTIVE_WAIT | |
int i=ADAPTIVE_WAIT_LOOPS; | |
#endif | |
while(tsl(lock)){ | |
#ifdef BUSY_WAIT | |
#elif defined ADAPTIVE_WAIT | |
if (i>0) i--; |
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 connect5g.com.a5geo; | |
import android.Manifest; | |
import android.app.AlarmManager; | |
import android.app.PendingIntent; | |
import android.app.Service; | |
import android.content.ComponentName; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.SharedPreferences; |
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 connect5g.com.a5geo; | |
import android.Manifest; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.location.Criteria; | |
import android.location.Location; | |
import android.location.LocationListener; | |
import android.location.LocationManager; |
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 connect5g.com.a5geo; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.content.pm.PackageManager; | |
import android.location.Location; | |
import android.location.LocationListener; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.support.v4.content.ContextCompat; |
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 final Location getLocation(){ | |
Location location = null; | |
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); | |
criteria = new Criteria(); | |
String mProvider = String.valueOf(locationManager.getBestProvider(criteria, true)); | |
try{ | |
getApplicationContext().getSystemService(LOCATION_SERVICE); | |
isEnabledNetwork = locationManager.isProviderEnabled(networkProvider); | |
isEnabledGPS = locationManager.isProviderEnabled(gpsProvider); |
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
Timer timerFileCreate = new Timer(); | |
TimerTask taskFileCreate = new TimerTask() { | |
@Override | |
public void run() { | |
SignalLogFile = createFileInstance(); | |
String signaLogFile = nameFile(); | |
createFile(signaLogFile, SignalLogFile); | |
Log.i("Logging:","created a new file"); | |
} | |
}; |
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
protected class SignalStrengthListener extends PhoneStateListener{ | |
int signalDBB = 0; | |
@Override | |
public void onSignalStrengthsChanged(SignalStrength signalStrength) { | |
telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); | |
stringSignalStrength = signalStrength.toString(); | |
parts = stringSignalStrength.split(" "); |