I explain the situation:
I give permission to use the internet in the manifest and then I want to make an unanswered request by get to a web
If I write (to test) the URL works fine link
But if I write it inside a button in the android studio it does not call
I do it in the following way:
try {
url = new URL("http://iva.whatsline.com/Carga.aspx?key=1|542233223322|0");
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
Log.e("respuestaA", String.valueOf(urlConnection));
} catch (MalformedURLException e) {
Log.e("respuestaB", "BBB");
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
Log.e("respuestaC", "CCC");
}
if you can help me
My logcat says:
04-16 15: 56: 16.693 30759-30759 / com.example.notebook.respuestas D / ViewRootImpl @ db21b33 [MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1
04-16 15: 56: 16.695 30759-30759 / com.example.notebook.respuestas D / ViewRootImpl @ db21b33 [MainActivity]: mHardwareRenderer.initializeIfNeeded () # 2 mSurface = {isValid = true482020271616}
04-16 15: 56: 16.699 30759-30759 / com.example.notebook.respuestas V / InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@48d8852 nm: com.example.notebook.respuestas ic = null
04-16 15: 56: 16.699 30759-30759 / com.example.notebook.respuestas I / InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
04-16 15: 56: 16.707 30759-30776 / com.example.notebook.respuestas D / InputTransport: Input channel constructed: fd = 83
04-16 15: 56: 16.707 30759-30759 / com.example.notebook.respuestas V / InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@1383723 nm: com.example.notebook.respuestas ic = null
04-16 15: 56: 18.116 30759-30759 / com.example.notebook.respuestas D / ViewRootImpl @ db21b33 [MainActivity]: ViewPostImeInputStage processPointer 0
04-16 15: 56: 18.119 30759-30759 / com.example.notebook.respuestas W / System: ClassLoader referenced unknown path: /system/framework/QPerformance.jar
04-16 15: 56: 18.12030759-30759 / com.example.notebook.respuestas E / BoostFramework: BoostFramework (): Exception_1 = java.lang.ClassNotFoundException: Did not find class "com.qualcomm.qti.Performance" on path: DexPathList [[], nativeLibraryDirectories = [/ system / lib64, / vendor / lib64]]
04-16 15: 56: 18.120 30759-30759 / com.example.notebook.respuestas V / BoostFramework: BoostFramework (): mPerf = null
04-16 15: 56: 18.26530759-30759 / com.example.notebook.respuestas D / ViewRootImpl @ db21b33 [MainActivity]: ViewPostImeInputStage processPointer 1
04-16 15: 56: 18.278 30759-30759 / com.example.notebook.respuestas D / NetworkSecurityConfig: No Network Security Config specified, using platform default
04-16 15: 56: 18.279 30759-30759 / com.example.notebook.respuestas E / responseA: com.android.okhttp.internal.huc.HttpURLConnectionImpl: link