-
-
Save ahmedfgad/dfe3207cf2404da1a55912efd31330e4 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="horizontal"> | |
<TextView | |
android:layout_weight="1" | |
android:layout_width="wrap_content" | |
android:layout_height="match_parent" | |
android:text="IPv4 Address" /> | |
<EditText | |
android:layout_weight="4" | |
android:layout_width="wrap_content" | |
android:layout_height="match_parent" | |
android:id="@+id/IPAddress" | |
android:text="192.168.1.8" /> | |
</LinearLayout> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:orientation="horizontal"> | |
<TextView | |
android:layout_weight="1" | |
android:layout_width="wrap_content" | |
android:layout_height="match_parent" | |
android:text="Port Number" /> | |
<EditText | |
android:layout_weight="4" | |
android:layout_width="wrap_content" | |
android:layout_height="match_parent" | |
android:id="@+id/portNumber" | |
android:text="5000"/> | |
</LinearLayout> | |
<Button | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:text="Connect to Server" | |
android:onClick="connectServer"/> | |
<TextView | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:text="Message from the Server ..." | |
android:id="@+id/responseText" /> | |
</LinearLayout> |
Hi,
I am sorry that such a problem occurred while testing the project. I did not encounter this before and thus I searched by your text Unfortunately (OO) has stopped but all search results are about System UI has stopped Working. I do not clearly know whether the problem is an exception in my code, FYI it is pre-tested and works properly, or it is a problem in the Android device.
Could you please give more information on a screenshot of what happens?
Hi, may I know where should I run this code? Android studio?
Hi, may I know where should I run this code? Android studio?
Hi @nurulazealia,
This file is part of an Android Studio project which is available here: https://github.com/ahmedfgad/AndroidFlask
Please let me know if you have a problem running it.
https://heartbeat.fritz.ai/uploading-images-from-android-to-a-python-based-flask-server-691e4092a95e
I am a student who is learning java for the first time. I entered the code you wrote, but it doesn't work. When you press the connect to server button, the phrase 'Unfortunately (OO) has stopped' appears. What do I have to do?