Android Open Source - metawear-antifitness U R L Fetcher Async From Project Back to project page metawear-antifitness .
License The source code is released under:
GNU General Public License
If you think the Android project metawear-antifitness listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package za.co.paulscott.networkhelpers;
/ / w w w . j a v a 2 s . c o m
import org.apache.http.impl.cookie.BasicClientCookie;
import android.content.Context;
import android.util.Log;
import com.loopj.android.http.*;
public class URLFetcherAsync {
private final String BASE_URL = "http://mobi.dstv.com/highlights/" ;
private final String TAG = "URLFetcher" ;
private PersistentCookieStore myCookieStore;
private AsyncHttpClient client = new AsyncHttpClient();
public void initCookies(Context context) {
myCookieStore = new PersistentCookieStore(context);
client.setCookieStore(myCookieStore);
// set up the EPG Cookie
BasicClientCookie epgCookie = new BasicClientCookie("EPGService" ,
"40_1" );
epgCookie.setVersion(1);
epgCookie.setDomain("mobi.dstv.com" );
epgCookie.setPath("/" );
myCookieStore.addCookie(epgCookie);
BasicClientCookie mwCookie = new BasicClientCookie("mw" , "800" );
mwCookie.setVersion(1);
mwCookie.setDomain(".mobi.dstv.com" );
mwCookie.setPath("/" );
myCookieStore.addCookie(mwCookie);
}
public void get(String url, RequestParams params,
AsyncHttpResponseHandler responseHandler) {
client.setCookieStore(myCookieStore);
client.setUserAgent("Android4.4 - antifitness App" );
Log.i(TAG, getAbsoluteUrl(url));
client.get(getAbsoluteUrl(url), params, responseHandler);
}
public void post(String url, RequestParams params,
AsyncHttpResponseHandler responseHandler) {
client.post(getAbsoluteUrl(url), params, responseHandler);
}
private String getAbsoluteUrl(String relativeUrl) {
return BASE_URL + relativeUrl;
}
}
Java Source Code List no.nordicsemi.android.nrftoolbox.AppHelpFragment.java no.nordicsemi.android.nrftoolbox.dfu.DeviceDisconnectedException.java no.nordicsemi.android.nrftoolbox.dfu.DfuActivity.java no.nordicsemi.android.nrftoolbox.dfu.DfuException.java no.nordicsemi.android.nrftoolbox.dfu.DfuInitiatorActivity.java no.nordicsemi.android.nrftoolbox.dfu.DfuService.java no.nordicsemi.android.nrftoolbox.dfu.HexFileValidationException.java no.nordicsemi.android.nrftoolbox.dfu.HexInputStream.java no.nordicsemi.android.nrftoolbox.dfu.NotificationActivity.java no.nordicsemi.android.nrftoolbox.dfu.RemoteDfuException.java no.nordicsemi.android.nrftoolbox.dfu.UnknownResponseException.java no.nordicsemi.android.nrftoolbox.dfu.UploadAbortedException.java no.nordicsemi.android.nrftoolbox.dfu.adapter.FileBrowserAppsAdapter.java no.nordicsemi.android.nrftoolbox.dfu.fragment.UploadCancelFragment.java no.nordicsemi.android.nrftoolbox.dfu.settings.AboutDfuPreference.java no.nordicsemi.android.nrftoolbox.dfu.settings.SettingsActivity.java no.nordicsemi.android.nrftoolbox.dfu.settings.SettingsFragment.java no.nordicsemi.android.nrftoolbox.scanner.DeviceListAdapter.java no.nordicsemi.android.nrftoolbox.scanner.ExtendedBluetoothDevice.java no.nordicsemi.android.nrftoolbox.scanner.ScannerFragment.java no.nordicsemi.android.nrftoolbox.scanner.ScannerServiceParser.java no.nordicsemi.android.nrftoolbox.utility.DebugLogger.java no.nordicsemi.android.nrftoolbox.utility.GattError.java za.co.paulscott.adapters.InteractiveArrayAdapter.java za.co.paulscott.antifitness.DeviceInfoFragment.java za.co.paulscott.antifitness.MainActivity.java za.co.paulscott.antifitness.MetawearReceiver.java za.co.paulscott.antifitness.ModuleActivity.java za.co.paulscott.antifitness.ModuleFragment.java za.co.paulscott.models.DStvHighlights.java za.co.paulscott.networkhelpers.URLFetcherAsync.java