Connect Android with PHP, MySQL – Part 1

السلام عليكم ورحمة الله وبركاته

انهاردة هنشرح ازاى نعمل تطبيق اندرويد يتصل بقاعدة بيانات MYSQL موجودة على سيرفر

 

للاسف لا يمكن عمل اتصال مباشر بين تطبيق الاندرويد وقاعدة البيانات على السيرفر

 

لازم نستخدم وسيط

 

الوسيط دة هو web service وهى عبارة عن اكواد مكتوبة بلغة PHP يمكن من

خلالها الاتصال بقاعدة البيانات وتنفيذ

العمليات المطلوبة

 

php2

الفكرة العامة هو انى بعمل request من تطبيق الاندرويد يتم ارسالة الى web

 

service والتى  تبدأ بتنفيذه على

 

قاعدة البيانات ثم تُرسل النتيجة الى تطبيق الاندرويد وبعدين اتعامل مع النتيجة

 

اللى رجعت لية فى تطبيق الاندرويد

 

علشان نبسط الموضوع هنقسم المشروع الى جزئين

 

الجزء الاول اسمه client side وهو عبارة عن تطبيق الاندرويد

 

الجزء الثانى اسمة server side وهو عبارة عن web service و قاعدة البيانات

 

php

 

دلوقتى هنبدأ ب server side

 

ازاى هعمل قاعدة البيانات ؟؟؟؟

 

علشان اعمل قاعدة بيانات MYSQL لازم يبقى عندى سيرفر

 

فى مواقع بتقدم الخدمة دى بشكل مجانى

 

زى

 

http://ar.marocwebs.com/

 

لما بتسجل حساب علية بيكون ليك مساحة 10 جيجا تخزين و 100 جيجا bandwidth فى الشهر

 

بعد ما بتسجل علية الموقع دة , هنعمل قاعدة البيانات زى الفيديو ما بيوضح

 

دلوقتى عملنا قاعدة بيانات ودة الجزء الاول فى server side

هنبدأ فى عمل web service

 

بإستخدام اى محرر نصوص – عن نفسى باستخدم ++notepad

هنعمل ملف php جديد بإسم connection.php

ونضيف لية الكود التالى

الملف دة هو المسئول عن connection بين web service و قاعدة البيانات

 

هنعمل ملف php جديد بإسم configration.php

هنضيف لية بعض الثوابت اللى بتحتاجها web service

 

دلوقتى هنعدل ملف configration.php زى الفيديو دة ما بيوضح وهنرفع الملفين على السيرفر

 

 

دلوقتى هنعمل ملف جديد بإسم insert.php

الملف دة بياخد بيانات من تطبيق الاندرويد ويخزنها فى قاعدة البيانات

هنضيفه الكود ده

 

وبعدين نرفعه مع الملفين السابقين

 

لحد كدة احنا خلصنا server side

 

نبدأ فى الجزء المتبقى وهو client side

تطبيق الاندرويد

 

نعمل مشروع جديد

 

نضيف permission الى ملف manifest

<uses-permission android:name=”android.permission.INTERNET”/>

نضيف كلاس جديد بإسم JSONParser

وهو المسئول عن الاتصال وارسال البيانات الى web service

وايضا تحليل البيانات التى يستقبلها التطبيق من webservice

نكتب بداخله الكود التالى

 

نقوم بتعديل التصميم عن طريق تعديل ملف activity_main.xml

اخر جزء

تعديل MainActivity.java

من خلال MainActivity.java سنقوم بإرسال البيانات الى web service والتى ستقوم بتخزنها فى الجدول ثم ترسل النتيجة الى التطبيق اذا كان تم التخزين بنجاح ام لا

ملا حظات هامة جدا

يجب تغير الرابط فى MainActivity.java بحيث يكون هو نفس الرابط الخاص بك بملف insert.php الذى رفعته على السيرفر

 

لكى تستطيع تخزين بيانات باللغة العربية فى قاعدة البيانات , عند انشاء اى جدول قم بتغيير collection الى utf8-general-ci

 

قم بعمل run للتطبيق وسيعمل بشكل صحيح ان شاء الله

 

 دى الصورة النهائية للتطبيق 

 

ان شاء الله المرة القادمة 

هنعمل بعض العمليات الاخرى مثل 

SELECT

DELETE

UPDATE 

واضافة بعض الخصائص الاخرى الى التطبيق

لتحميل كود التطبيق من هنا

 

 

الى القاء فى الجزء الثانى 

يرجي تقييم الموضوع

Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather
The following two tabs change content below.

Comments

comments

الوسوم

14 تعليقات علي “Connect Android with PHP, MySQL – Part 1

  1. انا قمت بعمل كل شيئ كما هو موضح وف الاخير في الايميوليتور قالي
    Application has stopped unexpectedly .please try again .
    انا شغال علي Genymotion هل عادي ولا لازم ايميوليتور اكليبس وشكرا

  2. التطبيق ممكن يشتغل على
    Genymotion
    او ايميوليتور

    المشكلة غالبا فى الكود

    اعرض log هنا علشان اقدر احدد المشكلة بالظبط

  3. بتظهرلي الرسالة دي عندما ادوس على مدير الملفات في marocwebs.com ايه الحل
    Service Temporarily Unavailable

    The server closed the connection without sending any data.

    The server is temporarily unable to service your request due to maintenance downtime or capacity problems.

    Due to heavy load on the server, connections may be temporarily blocked from locations that fetch an unusually high number of pages.

    We apologize for the inconvenience.

  4. دى مشكلة مؤقته فى السيرفر ممكن بسبب عطل عندهم او بسبب الضغط علية
    جرب تانى وهتشتغل
    ahmed abd elazeem

  5. شرح رائع
    بس بيقول في الاخر users stopped working
    و log
    06-09 14:49:29.438: D/dalvikvm(698): Not late-enabling CheckJNI (already on)
    06-09 14:49:30.039: E/Trace(698): error opening trace file: No such file or directory (2)
    06-09 14:49:30.888: E/ResourceType(698): Style contains key with bad entry: 0x01010479
    06-09 14:49:31.359: D/gralloc_goldfish(698): Emulator without GPU emulation detected.
    06-09 14:49:38.629: D/InputEventConsistencyVerifier(698): KeyEvent: ACTION_UP but key was not down.
    06-09 14:49:38.629: D/InputEventConsistencyVerifier(698): in android.widget.EditText@41015958
    06-09 14:49:38.629: D/InputEventConsistencyVerifier(698): 0: sent at 170645000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_TAB, scanCode=15, metaState=0, flags=0x8, repeatCount=0, eventTime=170645, downTime=170480, deviceId=0, source=0x101 }
    06-09 14:49:57.279: I/Choreographer(698): Skipped 30 frames! The application may be doing too much work on its main thread.
    06-09 14:49:57.899: I/Choreographer(698): Skipped 58 frames! The application may be doing too much work on its main thread.
    06-09 14:49:58.809: W/dalvikvm(698): threadid=11: thread exiting with uncaught exception (group=0x40a13300)
    06-09 14:49:59.028: I/Choreographer(698): Skipped 37 frames! The application may be doing too much work on its main thread.
    06-09 14:49:59.048: D/dalvikvm(698): GC_CONCURRENT freed 196K, 5% free 6228K/6535K, paused 16ms+29ms, total 143ms
    06-09 14:49:59.308: E/AndroidRuntime(698): FATAL EXCEPTION: AsyncTask #1
    06-09 14:49:59.308: E/AndroidRuntime(698): java.lang.RuntimeException: An error occured while executing doInBackground()
    06-09 14:49:59.308: E/AndroidRuntime(698): at android.os.AsyncTask$3.done(AsyncTask.java:299)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    06-09 14:49:59.308: E/AndroidRuntime(698): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.lang.Thread.run(Thread.java:856)
    06-09 14:49:59.308: E/AndroidRuntime(698): Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.net.InetAddress.getAllByName(InetAddress.java:214)
    06-09 14:49:59.308: E/AndroidRuntime(698): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
    06-09 14:49:59.308: E/AndroidRuntime(698): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
    06-09 14:49:59.308: E/AndroidRuntime(698): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    06-09 14:49:59.308: E/AndroidRuntime(698): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
    06-09 14:49:59.308: E/AndroidRuntime(698): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
    06-09 14:49:59.308: E/AndroidRuntime(698): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
    06-09 14:49:59.308: E/AndroidRuntime(698): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
    06-09 14:49:59.308: E/AndroidRuntime(698): at com.example.users.JSONParser.makeHttpRequest(JSONParser.java:54)
    06-09 14:49:59.308: E/AndroidRuntime(698): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:65)
    06-09 14:49:59.308: E/AndroidRuntime(698): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:1)
    06-09 14:49:59.308: E/AndroidRuntime(698): at android.os.AsyncTask$2.call(AsyncTask.java:287)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    06-09 14:49:59.308: E/AndroidRuntime(698): … 5 more
    06-09 14:49:59.308: E/AndroidRuntime(698): Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
    06-09 14:49:59.308: E/AndroidRuntime(698): at libcore.io.Posix.getaddrinfo(Native Method)
    06-09 14:49:59.308: E/AndroidRuntime(698): at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:55)
    06-09 14:49:59.308: E/AndroidRuntime(698): at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
    06-09 14:49:59.308: E/AndroidRuntime(698): … 19 more
    06-09 14:49:59.308: E/AndroidRuntime(698): Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
    06-09 14:49:59.308: E/AndroidRuntime(698): … 22 more
    06-09 14:49:59.859: I/Choreographer(698): Skipped 89 frames! The application may be doing too much work on its main thread.
    06-09 14:50:00.119: I/Choreographer(698): Skipped 62 frames! The application may be doing too much work on its main thread.
    06-09 14:50:00.488: I/Choreographer(698): Skipped 49 frames! The application may be doing too much work on its main thread.
    06-09 14:50:00.658: I/Choreographer(698): Skipped 43 frames! The application may be doing too much work on its main thread.
    06-09 14:50:00.808: I/Choreographer(698): Skipped 39 frames! The application may be doing too much work on its main thread.
    06-09 14:50:01.938: E/WindowManager(698): Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@41035530 that was originally added here
    06-09 14:50:01.938: E/WindowManager(698): android.view.WindowLeaked: Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@41035530 that was originally added here
    06-09 14:50:01.938: E/WindowManager(698): at android.view.ViewRootImpl.(ViewRootImpl.java:374)
    06-09 14:50:01.938: E/WindowManager(698): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:292)
    06-09 14:50:01.938: E/WindowManager(698): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
    06-09 14:50:01.938: E/WindowManager(698): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
    06-09 14:50:01.938: E/WindowManager(698): at android.view.Window$LocalWindowManager.addView(Window.java:547)
    06-09 14:50:01.938: E/WindowManager(698): at android.app.Dialog.show(Dialog.java:277)
    06-09 14:50:01.938: E/WindowManager(698): at com.example.users.MainActivity$CreateUser.onPreExecute(MainActivity.java:55)
    06-09 14:50:01.938: E/WindowManager(698): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
    06-09 14:50:01.938: E/WindowManager(698): at android.os.AsyncTask.execute(AsyncTask.java:534)
    06-09 14:50:01.938: E/WindowManager(698): at com.example.users.MainActivity$1.onClick(MainActivity.java:40)
    06-09 14:50:01.938: E/WindowManager(698): at android.view.View.performClick(View.java:4084)
    06-09 14:50:01.938: E/WindowManager(698): at android.view.View$PerformClick.run(View.java:16966)
    06-09 14:50:01.938: E/WindowManager(698): at android.os.Handler.handleCallback(Handler.java:615)
    06-09 14:50:01.938: E/WindowManager(698): at android.os.Handler.dispatchMessage(Handler.java:92)
    06-09 14:50:01.938: E/WindowManager(698): at android.os.Looper.loop(Looper.java:137)
    06-09 14:50:01.938: E/WindowManager(698): at android.app.ActivityThread.main(ActivityThread.java:4745)
    06-09 14:50:01.938: E/WindowManager(698): at java.lang.reflect.Method.invokeNative(Native Method)
    06-09 14:50:01.938: E/WindowManager(698): at java.lang.reflect.Method.invoke(Method.java:511)
    06-09 14:50:01.938: E/WindowManager(698): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    06-09 14:50:01.938: E/WindowManager(698): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    06-09 14:50:01.938: E/WindowManager(698): at dalvik.system.NativeStart.main(Native Method)
    06-09 14:50:04.929: I/Process(698): Sending signal. PID: 698 SIG: 9
    06-09 14:52:19.739: E/Trace(746): error opening trace file: No such file or directory (2)
    06-09 14:52:20.238: E/ResourceType(746): Style contains key with bad entry: 0x01010479
    06-09 14:52:20.519: D/gralloc_goldfish(746): Emulator without GPU emulation detected.
    06-09 14:52:57.209: I/Choreographer(746): Skipped 36 frames! The application may be doing too much work on its main thread.
    06-09 14:52:57.719: W/dalvikvm(746): threadid=11: thread exiting with uncaught exception (group=0x40a13300)
    06-09 14:52:57.968: I/Choreographer(746): Skipped 31 frames! The application may be doing too much work on its main thread.
    06-09 14:52:58.078: D/dalvikvm(746): GC_CONCURRENT freed 197K, 5% free 6228K/6535K, paused 16ms+24ms, total 209ms
    06-09 14:52:58.298: E/AndroidRuntime(746): FATAL EXCEPTION: AsyncTask #1
    06-09 14:52:58.298: E/AndroidRuntime(746): java.lang.RuntimeException: An error occured while executing doInBackground()
    06-09 14:52:58.298: E/AndroidRuntime(746): at android.os.AsyncTask$3.done(AsyncTask.java:299)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    06-09 14:52:58.298: E/AndroidRuntime(746): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.lang.Thread.run(Thread.java:856)
    06-09 14:52:58.298: E/AndroidRuntime(746): Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.net.InetAddress.getAllByName(InetAddress.java:214)
    06-09 14:52:58.298: E/AndroidRuntime(746): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
    06-09 14:52:58.298: E/AndroidRuntime(746): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
    06-09 14:52:58.298: E/AndroidRuntime(746): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    06-09 14:52:58.298: E/AndroidRuntime(746): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
    06-09 14:52:58.298: E/AndroidRuntime(746): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
    06-09 14:52:58.298: E/AndroidRuntime(746): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
    06-09 14:52:58.298: E/AndroidRuntime(746): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
    06-09 14:52:58.298: E/AndroidRuntime(746): at com.example.users.JSONParser.makeHttpRequest(JSONParser.java:54)
    06-09 14:52:58.298: E/AndroidRuntime(746): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:65)
    06-09 14:52:58.298: E/AndroidRuntime(746): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:1)
    06-09 14:52:58.298: E/AndroidRuntime(746): at android.os.AsyncTask$2.call(AsyncTask.java:287)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    06-09 14:52:58.298: E/AndroidRuntime(746): … 5 more
    06-09 14:52:58.298: E/AndroidRuntime(746): Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
    06-09 14:52:58.298: E/AndroidRuntime(746): at libcore.io.Posix.getaddrinfo(Native Method)
    06-09 14:52:58.298: E/AndroidRuntime(746): at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:55)
    06-09 14:52:58.298: E/AndroidRuntime(746): at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
    06-09 14:52:58.298: E/AndroidRuntime(746): … 19 more
    06-09 14:52:58.298: E/AndroidRuntime(746): Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
    06-09 14:52:58.298: E/AndroidRuntime(746): … 22 more
    06-09 14:52:59.198: I/Choreographer(746): Skipped 128 frames! The application may be doing too much work on its main thread.
    06-09 14:52:59.560: I/Choreographer(746): Skipped 31 frames! The application may be doing too much work on its main thread.
    06-09 14:52:59.928: I/Choreographer(746): Skipped 46 frames! The application may be doing too much work on its main thread.
    06-09 14:53:00.049: I/Choreographer(746): Skipped 31 frames! The application may be doing too much work on its main thread.
    06-09 14:53:00.188: I/Choreographer(746): Skipped 34 frames! The application may be doing too much work on its main thread.
    06-09 14:53:01.058: E/WindowManager(746): Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@41033e80 that was originally added here
    06-09 14:53:01.058: E/WindowManager(746): android.view.WindowLeaked: Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@41033e80 that was originally added here
    06-09 14:53:01.058: E/WindowManager(746): at android.view.ViewRootImpl.(ViewRootImpl.java:374)
    06-09 14:53:01.058: E/WindowManager(746): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:292)
    06-09 14:53:01.058: E/WindowManager(746): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
    06-09 14:53:01.058: E/WindowManager(746): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
    06-09 14:53:01.058: E/WindowManager(746): at android.view.Window$LocalWindowManager.addView(Window.java:547)
    06-09 14:53:01.058: E/WindowManager(746): at android.app.Dialog.show(Dialog.java:277)
    06-09 14:53:01.058: E/WindowManager(746): at com.example.users.MainActivity$CreateUser.onPreExecute(MainActivity.java:55)
    06-09 14:53:01.058: E/WindowManager(746): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
    06-09 14:53:01.058: E/WindowManager(746): at android.os.AsyncTask.execute(AsyncTask.java:534)
    06-09 14:53:01.058: E/WindowManager(746): at com.example.users.MainActivity$1.onClick(MainActivity.java:40)
    06-09 14:53:01.058: E/WindowManager(746): at android.view.View.performClick(View.java:4084)
    06-09 14:53:01.058: E/WindowManager(746): at android.view.View$PerformClick.run(View.java:16966)
    06-09 14:53:01.058: E/WindowManager(746): at android.os.Handler.handleCallback(Handler.java:615)
    06-09 14:53:01.058: E/WindowManager(746): at android.os.Handler.dispatchMessage(Handler.java:92)
    06-09 14:53:01.058: E/WindowManager(746): at android.os.Looper.loop(Looper.java:137)
    06-09 14:53:01.058: E/WindowManager(746): at android.app.ActivityThread.main(ActivityThread.java:4745)
    06-09 14:53:01.058: E/WindowManager(746): at java.lang.reflect.Method.invokeNative(Native Method)
    06-09 14:53:01.058: E/WindowManager(746): at java.lang.reflect.Method.invoke(Method.java:511)
    06-09 14:53:01.058: E/WindowManager(746): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    06-09 14:53:01.058: E/WindowManager(746): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    06-09 14:53:01.058: E/WindowManager(746): at dalvik.system.NativeStart.main(Native Method)
    06-09 14:53:52.028: E/Trace(810): error opening trace file: No such file or directory (2)
    06-09 14:53:52.519: E/ResourceType(810): Style contains key with bad entry: 0x01010479
    06-09 14:53:52.869: D/gralloc_goldfish(810): Emulator without GPU emulation detected.
    06-09 14:53:56.869: D/InputEventConsistencyVerifier(810): KeyEvent: ACTION_UP but key was not down.
    06-09 14:53:56.869: D/InputEventConsistencyVerifier(810): in android.widget.EditText@41017fa0
    06-09 14:53:56.869: D/InputEventConsistencyVerifier(810): 0: sent at 428853000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_TAB, scanCode=15, metaState=0, flags=0x8, repeatCount=0, eventTime=428853, downTime=428675, deviceId=0, source=0x101 }
    06-09 14:53:58.558: D/InputEventConsistencyVerifier(810): KeyEvent: ACTION_UP but key was not down.
    06-09 14:53:58.558: D/InputEventConsistencyVerifier(810): in android.widget.EditText@410197d8
    06-09 14:53:58.558: D/InputEventConsistencyVerifier(810): 0: sent at 430572000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_TAB, scanCode=15, metaState=0, flags=0x8, repeatCount=0, eventTime=430572, downTime=430404, deviceId=0, source=0x101 }
    06-09 14:54:03.298: I/Choreographer(810): Skipped 32 frames! The application may be doing too much work on its main thread.
    06-09 14:54:03.728: I/Choreographer(810): Skipped 43 frames! The application may be doing too much work on its main thread.
    06-09 14:54:05.120: W/dalvikvm(810): threadid=11: thread exiting with uncaught exception (group=0x40a13300)
    06-09 14:54:05.359: D/dalvikvm(810): GC_CONCURRENT freed 207K, 5% free 6219K/6535K, paused 27ms+23ms, total 193ms
    06-09 14:54:05.548: E/AndroidRuntime(810): FATAL EXCEPTION: AsyncTask #1
    06-09 14:54:05.548: E/AndroidRuntime(810): java.lang.RuntimeException: An error occured while executing doInBackground()
    06-09 14:54:05.548: E/AndroidRuntime(810): at android.os.AsyncTask$3.done(AsyncTask.java:299)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    06-09 14:54:05.548: E/AndroidRuntime(810): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.lang.Thread.run(Thread.java:856)
    06-09 14:54:05.548: E/AndroidRuntime(810): Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.net.InetAddress.getAllByName(InetAddress.java:214)
    06-09 14:54:05.548: E/AndroidRuntime(810): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
    06-09 14:54:05.548: E/AndroidRuntime(810): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
    06-09 14:54:05.548: E/AndroidRuntime(810): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    06-09 14:54:05.548: E/AndroidRuntime(810): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
    06-09 14:54:05.548: E/AndroidRuntime(810): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
    06-09 14:54:05.548: E/AndroidRuntime(810): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
    06-09 14:54:05.548: E/AndroidRuntime(810): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
    06-09 14:54:05.548: E/AndroidRuntime(810): at com.example.users.JSONParser.makeHttpRequest(JSONParser.java:54)
    06-09 14:54:05.548: E/AndroidRuntime(810): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:65)
    06-09 14:54:05.548: E/AndroidRuntime(810): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:1)
    06-09 14:54:05.548: E/AndroidRuntime(810): at android.os.AsyncTask$2.call(AsyncTask.java:287)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    06-09 14:54:05.548: E/AndroidRuntime(810): … 5 more
    06-09 14:54:05.548: E/AndroidRuntime(810): Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
    06-09 14:54:05.548: E/AndroidRuntime(810): at libcore.io.Posix.getaddrinfo(Native Method)
    06-09 14:54:05.548: E/AndroidRuntime(810): at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:55)
    06-09 14:54:05.548: E/AndroidRuntime(810): at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
    06-09 14:54:05.548: E/AndroidRuntime(810): … 19 more
    06-09 14:54:05.548: E/AndroidRuntime(810): Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
    06-09 14:54:05.548: E/AndroidRuntime(810): … 22 more
    06-09 14:54:06.249: I/Choreographer(810): Skipped 77 frames! The application may be doing too much work on its main thread.
    06-09 14:54:06.599: I/Choreographer(810): Skipped 61 frames! The application may be doing too much work on its main thread.
    06-09 14:54:06.758: I/Choreographer(810): Skipped 35 frames! The application may be doing too much work on its main thread.
    06-09 14:54:07.380: I/Choreographer(810): Skipped 38 frames! The application may be doing too much work on its main thread.
    06-09 14:54:07.510: I/Choreographer(810): Skipped 33 frames! The application may be doing too much work on its main thread.
    06-09 14:54:08.039: E/WindowManager(810): Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@410399c8 that was originally added here
    06-09 14:54:08.039: E/WindowManager(810): android.view.WindowLeaked: Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@410399c8 that was originally added here
    06-09 14:54:08.039: E/WindowManager(810): at android.view.ViewRootImpl.(ViewRootImpl.java:374)
    06-09 14:54:08.039: E/WindowManager(810): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:292)
    06-09 14:54:08.039: E/WindowManager(810): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
    06-09 14:54:08.039: E/WindowManager(810): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
    06-09 14:54:08.039: E/WindowManager(810): at android.view.Window$LocalWindowManager.addView(Window.java:547)
    06-09 14:54:08.039: E/WindowManager(810): at android.app.Dialog.show(Dialog.java:277)
    06-09 14:54:08.039: E/WindowManager(810): at com.example.users.MainActivity$CreateUser.onPreExecute(MainActivity.java:55)
    06-09 14:54:08.039: E/WindowManager(810): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
    06-09 14:54:08.039: E/WindowManager(810): at android.os.AsyncTask.execute(AsyncTask.java:534)
    06-09 14:54:08.039: E/WindowManager(810): at com.example.users.MainActivity$1.onClick(MainActivity.java:40)
    06-09 14:54:08.039: E/WindowManager(810): at android.view.View.performClick(View.java:4084)
    06-09 14:54:08.039: E/WindowManager(810): at android.view.View$PerformClick.run(View.java:16966)
    06-09 14:54:08.039: E/WindowManager(810): at android.os.Handler.handleCallback(Handler.java:615)
    06-09 14:54:08.039: E/WindowManager(810): at android.os.Handler.dispatchMessage(Handler.java:92)
    06-09 14:54:08.039: E/WindowManager(810): at android.os.Looper.loop(Looper.java:137)
    06-09 14:54:08.039: E/WindowManager(810): at android.app.ActivityThread.main(ActivityThread.java:4745)
    06-09 14:54:08.039: E/WindowManager(810): at java.lang.reflect.Method.invokeNative(Native Method)
    06-09 14:54:08.039: E/WindowManager(810): at java.lang.reflect.Method.invoke(Method.java:511)
    06-09 14:54:08.039: E/WindowManager(810): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    06-09 14:54:08.039: E/WindowManager(810): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    06-09 14:54:08.039: E/WindowManager(810): at dalvik.system.NativeStart.main(Native Method)
    06-09 14:54:10.408: I/Process(810): Sending signal. PID: 810 SIG: 9
    06-09 14:58:16.318: E/Trace(862): error opening trace file: No such file or directory (2)
    06-09 14:58:16.768: E/ResourceType(862): Style contains key with bad entry: 0x01010479
    06-09 14:58:17.078: D/gralloc_goldfish(862): Emulator without GPU emulation detected.
    06-09 14:58:31.729: I/Choreographer(862): Skipped 37 frames! The application may be doing too much work on its main thread.
    06-09 14:58:32.608: D/dalvikvm(862): GC_CONCURRENT freed 201K, 4% free 6222K/6471K, paused 27ms+16ms, total 159ms
    06-09 14:58:32.638: W/dalvikvm(862): threadid=11: thread exiting with uncaught exception (group=0x40a13300)
    06-09 14:58:32.889: E/AndroidRuntime(862): FATAL EXCEPTION: AsyncTask #1
    06-09 14:58:32.889: E/AndroidRuntime(862): java.lang.RuntimeException: An error occured while executing doInBackground()
    06-09 14:58:32.889: E/AndroidRuntime(862): at android.os.AsyncTask$3.done(AsyncTask.java:299)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
    06-09 14:58:32.889: E/AndroidRuntime(862): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.lang.Thread.run(Thread.java:856)
    06-09 14:58:32.889: E/AndroidRuntime(862): Caused by: java.lang.SecurityException: Permission denied (missing INTERNET permission?)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.net.InetAddress.lookupHostByName(InetAddress.java:418)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.net.InetAddress.getAllByName(InetAddress.java:214)
    06-09 14:58:32.889: E/AndroidRuntime(862): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
    06-09 14:58:32.889: E/AndroidRuntime(862): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
    06-09 14:58:32.889: E/AndroidRuntime(862): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
    06-09 14:58:32.889: E/AndroidRuntime(862): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
    06-09 14:58:32.889: E/AndroidRuntime(862): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
    06-09 14:58:32.889: E/AndroidRuntime(862): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
    06-09 14:58:32.889: E/AndroidRuntime(862): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
    06-09 14:58:32.889: E/AndroidRuntime(862): at com.example.users.JSONParser.makeHttpRequest(JSONParser.java:54)
    06-09 14:58:32.889: E/AndroidRuntime(862): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:65)
    06-09 14:58:32.889: E/AndroidRuntime(862): at com.example.users.MainActivity$CreateUser.doInBackground(MainActivity.java:1)
    06-09 14:58:32.889: E/AndroidRuntime(862): at android.os.AsyncTask$2.call(AsyncTask.java:287)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
    06-09 14:58:32.889: E/AndroidRuntime(862): … 5 more
    06-09 14:58:32.889: E/AndroidRuntime(862): Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
    06-09 14:58:32.889: E/AndroidRuntime(862): at libcore.io.Posix.getaddrinfo(Native Method)
    06-09 14:58:32.889: E/AndroidRuntime(862): at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:55)
    06-09 14:58:32.889: E/AndroidRuntime(862): at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
    06-09 14:58:32.889: E/AndroidRuntime(862): … 19 more
    06-09 14:58:32.889: E/AndroidRuntime(862): Caused by: libcore.io.ErrnoException: getaddrinfo failed: EACCES (Permission denied)
    06-09 14:58:32.889: E/AndroidRuntime(862): … 22 more
    06-09 14:58:33.478: I/Choreographer(862): Skipped 75 frames! The application may be doing too much work on its main thread.
    06-09 14:58:34.299: I/Choreographer(862): Skipped 34 frames! The application may be doing too much work on its main thread.
    06-09 14:58:35.299: E/WindowManager(862): Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4103acf8 that was originally added here
    06-09 14:58:35.299: E/WindowManager(862): android.view.WindowLeaked: Activity com.example.users.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@4103acf8 that was originally added here
    06-09 14:58:35.299: E/WindowManager(862): at android.view.ViewRootImpl.(ViewRootImpl.java:374)
    06-09 14:58:35.299: E/WindowManager(862): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:292)
    06-09 14:58:35.299: E/WindowManager(862): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
    06-09 14:58:35.299: E/WindowManager(862): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
    06-09 14:58:35.299: E/WindowManager(862): at android.view.Window$LocalWindowManager.addView(Window.java:547)
    06-09 14:58:35.299: E/WindowManager(862): at android.app.Dialog.show(Dialog.java:277)
    06-09 14:58:35.299: E/WindowManager(862): at com.example.users.MainActivity$CreateUser.onPreExecute(MainActivity.java:55)
    06-09 14:58:35.299: E/WindowManager(862): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
    06-09 14:58:35.299: E/WindowManager(862): at android.os.AsyncTask.execute(AsyncTask.java:534)
    06-09 14:58:35.299: E/WindowManager(862): at com.example.users.MainActivity$1.onClick(MainActivity.java:40)
    06-09 14:58:35.299: E/WindowManager(862): at android.view.View.performClick(View.java:4084)
    06-09 14:58:35.299: E/WindowManager(862): at android.view.View$PerformClick.run(View.java:16966)
    06-09 14:58:35.299: E/WindowManager(862): at android.os.Handler.handleCallback(Handler.java:615)
    06-09 14:58:35.299: E/WindowManager(862): at android.os.Handler.dispatchMessage(Handler.java:92)
    06-09 14:58:35.299: E/WindowManager(862): at android.os.Looper.loop(Looper.java:137)
    06-09 14:58:35.299: E/WindowManager(862): at android.app.ActivityThread.main(ActivityThread.java:4745)
    06-09 14:58:35.299: E/WindowManager(862): at java.lang.reflect.Method.invokeNative(Native Method)
    06-09 14:58:35.299: E/WindowManager(862): at java.lang.reflect.Method.invoke(Method.java:511)
    06-09 14:58:35.299: E/WindowManager(862): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
    06-09 14:58:35.299: E/WindowManager(862): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
    06-09 14:58:35.299: E/WindowManager(862): at dalvik.system.NativeStart.main(Native Method)
    06-09 15:03:33.169: I/Process(862): Sending signal. PID: 862 SIG: 9

  6. Pingback: Android Login And Register To Online Mysql Database With PHP

  7. مدير الملفات لا يمكن الوصول إليه في هذا الوقت. تأكد من أن الدومين بك يشير إلى خوادم الأسماء لدينا.

  8. مدير الملفات لا يمكن الوصول إليه في هذا الوقت. تأكد من أن الدومين بك يشير إلى خوادم الأسماء لدينا.

  9. Pingback: Connect Android with PHP, MySQL – Part 2

اترك تعليقاً

لن يتم نشر عنوان بريدك الإلكتروني. الحقول الإلزامية مشار إليها بـ *