Android Studio Tutorial - Order Foods Part 13 (Order Management)

Share
Embed
  • Published on Sep 12, 2017
  • Link donate : www.paypal.me/edmtdev
    #OrderFoodAndroidEDMTDev #AndroidEDMTDev #EDMTDev
    Facebook : facebook.com/edmtdev
    Link database : ceesty.com/wMz6Lt
    Welcome back ! In this tutorial , you will learn how to manage order like : Update / Edit order
    And we will make Client side receive update Notification when Order is update !
    I will show you in this tutorial :
    - Load Orders
    - Custom Alert Dialog
    - Material Spinner
    - Service


    android development tutorial,
    android programming tutorial,
    android app development tutorial,
    android tutorial for beginners ,
    android app tutoria,
    android studio tutorial,
    learn android programming ,
    android developer tutorial ,
    android programming,
    android development,
    android studio tutorial for beginners,
    android course,
    android training,
    android development course,
    android app development course

Comments • 663

  • Muhammad Arslan
    Muhammad Arslan 4 months ago +11

    for those who are still getting the error in the notification and can't load the foodList in client side:-
    have a look down here:-


    in android orio api level 26 or above there is an update in the notification that you have to create a channel for this ...
    just replace the few lines of codes with your showNotification method.. and your codes runn like a charm
    **************************************************************************************************
    private void showNotification(String key, Request request) {
    Intent intent=new Intent(getBaseContext(), OrderStatus.class);
    intent.putExtra("userPhone",request.getPhone()); //we need put user phone
    PendingIntent contentIntent=PendingIntent
    .getActivity(getBaseContext(),0,intent,PendingIntent.FLAG_UPDATE_CURRENT);

    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O){
    NotificationChannel channel=
    new NotificationChannel("foodStatus","foodStatus",NotificationManager.IMPORTANCE_DEFAULT);
    NotificationManager notificationManager=getSystemService(NotificationManager.class);
    notificationManager.createNotificationChannel(channel);

    }

    NotificationCompat.Builder builder=new NotificationCompat.Builder(getBaseContext(),"foodStatus");
    builder.setAutoCancel(true)
    .setDefaults(Notification.DEFAULT_ALL)
    .setWhen(System.currentTimeMillis())
    .setTicker("food")
    .setContentInfo("your order was updated")
    .setContentText("Order #"+key+" was updated to "+ Common.convertCodeToStatus(request.getStatus()))
    .setContentIntent(contentIntent)
    .setContentInfo("Info")
    .setSmallIcon(R.mipmap.ic_launcher);

    NotificationManager notificationManager=(NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.notify(1,builder.build());

    }
    **********************************************************************************************************
    from reference :- developer.android.com/training/notify-user/build-notification

    and for those who are getting white screen can't open the view in foodList just make sure you have used "menuId" istead of "MenuId" in loadSuggest()....startSearch()..... loadListFood() ---->FoodList.java in client sides :)

    • parul'son
      parul'son Month ago

      Thanks for sharing with us ! 😊😊😊😊

    • Anastasios Kougkalis
      Anastasios Kougkalis 4 months ago

      Thanks man. I watched the video 3 times to find out what I did wrong and couldn't get notifications to work... and see foods in client side...

    • muhammad Mouaz
      muhammad Mouaz 4 months ago

      Thank you E''

    • cristian anaya
      cristian anaya 4 months ago

      in StartSearch() would change the Name to name ?

  • Alhaitham Gamal
    Alhaitham Gamal 3 days ago +1

    there is no explanation of how the second app know the service came from first app you said by FCM but unfortunately no explanation in this video about that anymore !!!

    • Alhaitham Gamal
      Alhaitham Gamal 2 days ago

      @EDMT Dev Done successfully bro the problem was my app couldn't receive notification from the server app it was because I created 2 projects in Firebase with split databases so I remove the second project and add one database with the 2 apps thank you bro anyway :D

    • EDMT Dev
      EDMT Dev  2 days ago +1

      Sorry i don't understand your comment my dear ! Please give me more :D

  • sai ramya
    sai ramya 5 days ago +1

    how to get our ordered food and total amount in notification on both server side and client side

    • EDMT Dev
      EDMT Dev  3 days ago

      You already have function to send notification , just create content you want :D

  • Pola pavithra
    Pola pavithra 6 days ago +1

    How to get our ordered food items in orders..?? You showed address, mobile no., status, order Id. But I also want what we added into our cart

    • EDMT Dev
      EDMT Dev  5 days ago +1

      :D Continue watch some next tutorial my dear :D

  • Abhishek Panchal
    Abhishek Panchal 9 days ago +1

    Hi,
    The notification is working in the android emulator app, but is not working when I am using apks on my android phone.
    I logged in, in both the server and main apps, and tried to update the order, but no notification is received. It works fine in the emulator. Can you help me find the problem?

    Thanks

    • EDMT Dev
      EDMT Dev  8 days ago

      Notification use POST request to send , if you can't retrieve notification , make sure request send notification is success :D

  • Sheriyar Ali
    Sheriyar Ali 12 days ago +1

    Please sir help me.
    when i subcategory of foods then foodlist not showing and also order list not showing please help me ?

    2019-08-06 07:51:38.249 23180-23180/rb.dangerous V/InputMethodManager: Starting input: tba=rb.dangerous ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
    2019-08-06 07:51:38.249 23180-23180/rb.dangerous D/InputMethodManager: startInputInner - Id : 0
    2019-08-06 07:51:38.249 23180-23180/rb.dangerous I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
    2019-08-06 07:51:38.252 23180-23180/rb.dangerous D/InputTransport: Input channel constructed: fd=107
    2019-08-06 07:51:38.252 23180-23180/rb.dangerous D/InputTransport: Input channel destroyed: fd=102
    2019-08-06 07:51:38.294 23180-23241/rb.dangerous V/FA: Activity resumed, time: 100187147
    2019-08-06 07:51:38.632 23180-23272/rb.dangerous W/libEGL: EGLNativeWindowType 0x754163c010 disconnect failed
    2019-08-06 07:51:38.632 23180-23272/rb.dangerous D/OpenGLRenderer: eglDestroySurface = 0x754174d500, 0x754163c000
    2019-08-06 07:51:38.675 23180-23180/rb.dangerous D/ViewRootImpl@baa5869[FoodList]: Relayout returned: old=[0,0][1440,2960] new=[0,0][1440,2960] result=0x5 surface={valid=false 0} changed=true
    2019-08-06 07:51:38.678 23180-23180/rb.dangerous D/ViewRootImpl@baa5869[FoodList]: setWindowStopped(true) old=false
    2019-08-06 07:51:38.680 23180-23180/rb.dangerous D/ViewRootImpl@baa5869[FoodList]: Surface release. android.view.WindowManagerGlobal.setStoppedState:669 android.app.Activity.performStop:7647 android.app.ActivityThread.callActivityOnStop:4373 android.app.ActivityThread.performStopActivityInner:4351 android.app.ActivityThread.handleStopActivity:4426 android.app.servertransaction.TransactionExecutor.performLifecycleSequence:192 android.app.servertransaction.TransactionExecutor.cycleToPath:165 android.app.servertransaction.TransactionExecutor.executeLifecycleState:142
    2019-08-06 07:51:38.704 23180-23180/rb.dangerous D/ViewRootImpl@baa5869[FoodList]: dispatchDetachedFromWindow
    2019-08-06 07:51:38.705 23180-23180/rb.dangerous D/ViewRootImpl@baa5869[FoodList]: Surface release. android.view.ViewRootImpl.doDie:7956 android.view.ViewRootImpl.die:7924 android.view.WindowManagerGlobal.removeViewLocked:497 android.view.WindowManagerGlobal.removeView:435 android.view.WindowManagerImpl.removeViewImmediate:124 android.app.ActivityThread.handleDestroyActivity:4748 android.app.servertransaction.DestroyActivityItem.execute:39 android.app.servertransaction.TransactionExecutor.executeLifecycleState:145
    2019-08-06 07:51:38.717 23180-23180/rb.dangerous D/InputTransport: Input channel destroyed: fd=84
    2019-08-06 07:51:43.297 23180-23241/rb.dangerous V/FA: Inactivity, disconnecting from the service
    2019-08-06 07:56:38.270 23180-23180/rb.dangerous D/InputMethodManager: prepareNavigationBarInfo() DecorView@3cca048[Home]
    2019-08-06 07:56:38.271 23180-23180/rb.dangerous D/InputMethodManager: getNavigationBarColor() -855310
    2019-08-06 07:56:38.271 23180-23180/rb.dangerous V/InputMethodManager: Starting input: tba=rb.dangerous ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false

    • EDMT Dev
      EDMT Dev  8 days ago

      @Sheriyar Ali This is useless log cat my dear :)

    • Sheriyar Ali
      Sheriyar Ali 9 days ago

      @EDMT Dev i am waiting for your reply sir please help me see my logcat sometimes given error SurfaceFlinger

    • Sheriyar Ali
      Sheriyar Ali 9 days ago +1

      @EDMT Dev but sir i am watch video again and again not error in coding and not showing FoodList

      #LOGCAT
      2019-08-09 07:54:35.426 6176-6176/? I/InputMethodService: dispatchStartInputWithToken
      2019-08-09 07:54:35.427 6176-6176/? I/SKBD_Performance: [IIManager] [PF_CL][onFinishInput] 173231
      2019-08-09 07:54:35.427 6176-6176/? D/InputMethodService: checkDisplayOfStartInputAndUpdateKeyboard display Id 0last 0
      2019-08-09 07:54:35.427 6176-6176/? I/SKBD: SamsungKeypad [IMI] onStartInput - caller pid : 4604, caller uid : 10341
      2019-08-09 07:54:35.427 4604-4604/rb.deliciousdishes D/ViewRootImpl@26f2edf[FoodList]: MSG_RESIZED: frame=Rect(0, 0 - 1440, 2960) ci=Rect(0, 84 - 0, 168) vi=Rect(0, 84 - 0, 168) or=1
      2019-08-09 07:54:35.430 3829-4455/? D/ConnectivityService: filterNetworkStateForUid() uid: 10028, pid: 4829
      2019-08-09 07:54:35.430 3829-4455/? D/ConnectivityService: filterNetworkStateForUid() uid: 10028, pid: 4829, networkInfo: [type: MOBILE[LTE], state: CONNECTED/CONNECTED, reason: (unspecified), extra: zonginternet, failover: false, available: true, roaming: false]
      2019-08-09 07:54:35.432 3829-4455/? D/SamsungAlarmManager: Cancel Alarm calling from uid:10028 pid :4829 / op:PendingIntent{1bd2887: PendingIntentRecord{28ce221 com.google.android.gms broadcastIntent}}
      2019-08-09 07:54:35.435 3829-4455/? I/SamsungAlarmManager: setLocked to kernel - T:2 / 20190809T195441, SetElapsed=359570378, nowELAPSED=359564381
      2019-08-09 07:54:35.445 3829-6684/? D/SamsungAlarmManager: setInexact Intent (T:2/F:0/AC:false) 20190809T200701 - CU:10028/CP:4829
      2019-08-09 07:54:35.445 3829-6684/? I/SamsungAlarmManager: setLocked to kernel - T:2 / 20190809T195441, SetElapsed=359570378, nowELAPSED=359564391
      2019-08-09 07:54:35.457 3310-3310/? I/SurfaceFlinger: Display 0 HWC layers:
      type | handle | flag | format | source crop (l,t,r,b) | frame | name
      ------------+--------------+------+-----------+----------------------------+---------------------+------
      Client | | 0000 | Unknown | 0.0 0.0 -0.2 -0.5 | 0 0 1440 2960 | animation background stackId=491#0
      Client | 0x7885e4a6c0 | 0002 | RGBA_8888 | 0.0 3.0 1440.0 2960.0 | 0 0 1440 2957 | rb.deliciousdishes/rb.deliciousdishes.Home[4604]#0
      Client | | 0000 | Unknown | 0.0 0.0 -1.0 -1.0 | 0 0 1440 2960 | Dim Layer for - Task=2412#0
      Device | 0x7885e49460 | 0002 | RGBA_8888 | 0.0 0.0 1440.0 2298.0 | 0 662 1440 2960 | rb.deliciousdishes/rb.deliciousdishes.FoodList[4604]#0
      Device | 0x78862519c0 | 0000 | RGBA_8888 | 0.0 0.0 1440.0 84.0 | 0 0 1440 84 | StatusBar[25291]#0
      Device | 0x7886251800 | 0000 | RGBA_8888 | 0.0 0.0 67.0 571.0 | 1373 857 1440 1428 | com.samsu
      2019-08-09 07:54:35.457 3310-3310/? I/SurfaceFlinger: ng.android.app.cocktailbars[...]arservice.CocktailBarService[9473]#0
      Device | 0x7886251640 | 0000 | RGBA_8888 | 0.0 0.0 1440.0 168.0 | 0 2792 1440 2960 | NavigationBar[25291]#0
      2019-08-09 07:54:35.536 3310-3310/? I/SurfaceFlinger: Display 0 HWC layers:
      type | handle | flag | format | source crop (l,t,r,b) | frame | name
      ------------+--------------+------+-----------+----------------------------+---------------------+------
      Client | 0x7885e4a6c0 | 0002 | RGBA_8888 | 0.0 28.0 1440.0 2960.0 | 0 0 1440 2932 | rb.deliciousdishes/rb.deliciousdishes.Home[4604]#0
      Client | | 0000 | Unknown | 0.0 0.0 -1.0 -1.0 | 0 0 1440 2960 | Dim Layer for - Task=2412#0
      Client | 0x7885e49460 | 0002 | RGBA_8888 | 0.0 0.0 1440.0 2750.0 | 0 210 1440 2960 | rb.deliciousdishes/rb.deliciousdishes.FoodList[4604]#0
      Device | 0x78862519c0 | 0000 | RGBA_8888 | 0.0 0.0 1440.0 84.0 | 0 0 1440 84 | StatusBar[25291]#0
      Device | 0x7886251800 | 0000 | RGBA_8888 | 0.0 0.0 67.0 571.0 | 1373 857 1440 1428 | com.samsung.android.app.cocktailbars[...]arservice.CocktailBarService[9473]#0
      Device | 0x7886251640 | 0000 | RGBA_8888 | 0.0 0.0 1440
      2019-08-09 07:54:35.536 3310-3310/? I/SurfaceFlinger: .0 168.0 | 0 2792 1440 2960 | NavigationBar[25291]#0
      2019-08-09 07:54:35.659 23296-23296/? W/Notification: Use of stream types is deprecated for operations other than volume control
      2019-08-09 07:54:35.659 23296-23296/? W/Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
      2019-08-09 07:54:35.661 3829-3858/? D/ApplicationPolicy: isStatusBarNotificationAllowedAsUser: packageName = com.internet.speed.meter.lite,userId = 0
      2019-08-09 07:54:35.661 3829-3858/? D/API test: getContainerInfo: value is 150,1359085616

    • EDMT Dev
      EDMT Dev  11 days ago

      This is useless log cat my dear :)
      In my tutorial , i store data food by categoryId , so make sure you pass right categoryId for your query load food list

  • Abhishek Panchal
    Abhishek Panchal 13 days ago +1

    Hi, Is it possible to ensure that the latest order appears first? How?
    Thanks

  • Abhishek Panchal
    Abhishek Panchal 14 days ago +1

    Hello,
    We are showing notification when Child is changed irrespective of who is logged in. That means a user will get notification even if it is not his order status which is updated. How to solve this, that the notification should only go to the user whose order status is updated??
    Thanks

    • EDMT Dev
      EDMT Dev  14 days ago

      ^^ Continue watch next tutorial my dear :D I will show you how to fix it :D

  • Iqbal Setiawan
    Iqbal Setiawan 15 days ago +1

    Help. Since i apply this code on your video to my project, when i already place order (as client side), i cant see my order on order tab. Why?

    • EDMT Dev
      EDMT Dev  14 days ago

      1. Make sure in Firebase , Order has been create
      2. Check your query load Order from Firebase , make sure it is right Reference name

  • Shabahat Zia
    Shabahat Zia 17 days ago +1

    i can't load my orders at admin side! i check my every line of code. please help me to fix this problem...

    • Shabahat Zia
      Shabahat Zia 16 days ago

      Ok i will try again

    • EDMT Dev
      EDMT Dev  16 days ago +1

      Check again my dear , not your code , check again your Reference name , reference structure....etc and condition of your query

  • bhawesh nath
    bhawesh nath Month ago +1

    im getting this error as i click on update java.lang.NullPointerException: Attempt to invoke virtual method 'void com.jaredrummler.materialspinner.MaterialSpinner.setItems(java.lang.Object[])' on a null object reference

    • parul'son
      parul'son Month ago

      @bhawesh nath bro, just now solved it ! problem was i forget to add view. before findviewbyid.. :D

    • bhawesh nath
      bhawesh nath Month ago

      Before calling findviewbyid cast it to ur view that will solve ur problem

    • parul'son
      parul'son Month ago

      @bhawesh nath hey bro i am having the same problem... can you please explain me the solution?

    • bhawesh nath
      bhawesh nath Month ago

      ya i got it

    • EDMT Dev
      EDMT Dev  Month ago

      You have an MaterialSpinner object is null , please check and make sure you already call findViewById for it before

  • Ewan Fairfull
    Ewan Fairfull Month ago +1

    Really Frustrating issue is the one I am experiencing which is the OrderStatus won't show on the client side of my app however it used to display fine before this tutorial and the notification works fine also the OrderStatus shows perfectly once I have clicked on the notification. So my only issue is that the OrderStatus for the user won't display on the client side followed tutorial perfectly and added the pinned comment into my code which allowed the notification to work but still no Order Status. Thankyou kidnly

    • EDMT Dev
      EDMT Dev  Month ago

      ​@Abhishek Kumar Maybe you can't get userPhone from Intent extra :D Check and make sure you already send it by Notification

    • EDMT Dev
      EDMT Dev  Month ago

      ​@Abhishek Kumar Maybe you can't get userPhone from Intent extra :D Check and make sure you already send it by Notification

    • Ewan Fairfull
      Ewan Fairfull Month ago

      @Abhishek Kumar nah I havent found a solution yet but I will let you know if I do!! :))

    • Abhishek Kumar
      Abhishek Kumar Month ago

      have u solved the problem

    • Abhishek Kumar
      Abhishek Kumar Month ago +1

      i am facing the same problem , i think the issue is in this line ...if(getIntent()==null) {
      loadOrders(Common.currentUser.getPhone());}
      else{loadOrders(getIntent().getStringExtra("userPhone")); } .......if i just use loadOrders(Common.currentUser.getPhone()); then the client site data is showing

  • Hashim Alade
    Hashim Alade 2 months ago +1

    How do i connect the two apps to 1 firebase Database, Currently i am using different DB

    • EDMT Dev
      EDMT Dev  2 months ago

      Just add new app to your existing Firebase project my dear ! Don't create new :D

  • HolyTea69- roi shenkar
    HolyTea69- roi shenkar 2 months ago +1

    Alert dialog not showing, when i press on the long click update button nothing happens btw i watched part 13 like 4 times and redone the code ad nothing happens, please help meee im in a hurrryyyy

    • HolyTea69- roi shenkar
      HolyTea69- roi shenkar 2 months ago

      EDMT Dev thanks for the help it seems that in the orderviewholder the “long click menu “ had 2 updates and not 1 update and 1 delete so I changed it and it worked

    • EDMT Dev
      EDMT Dev  2 months ago

      Please put break point on your code and trace it , make sure it can stop at your break point because if it don't stop , that mean your event not be fired

    • HolyTea69- roi shenkar
      HolyTea69- roi shenkar 2 months ago +1

      @EDMT Dev in the end of the show update dialog function I put the alert dialog.show

    • HolyTea69- roi shenkar
      HolyTea69- roi shenkar 2 months ago

      EDMT Dev I did it still nothing when I click update

  • HolyTea69- roi shenkar
    HolyTea69- roi shenkar 2 months ago +1

    are the server side and the client side conntected by the end of the video (if i delete category in server side will it be deleted in client side too?
    ?

    • EDMT Dev
      EDMT Dev  2 months ago

      @HolyTea69- roi shenkar No , need same project too

    • EDMT Dev
      EDMT Dev  2 months ago

      @HolyTea69- roi shenkar No , need same project too

    • EDMT Dev
      EDMT Dev  2 months ago

      @HolyTea69- roi shenkar No , need same project too

    • EDMT Dev
      EDMT Dev  2 months ago

      @HolyTea69- roi shenkar No , need same project too

    • EDMT Dev
      EDMT Dev  2 months ago

      @HolyTea69- roi shenkar No , need same project too

  • Aryan Gupta
    Aryan Gupta 2 months ago +1

    Hi, I am facing one issue that is Order status is getting updated but I am not getting the notification of updating order status in the device notification bar so can you please help me out in this?

    • EDMT Dev
      EDMT Dev  2 months ago

      ^^ That mean some reason
      1. Your Token is not true
      2. Your app can't send notification by POST REQUEST with TOKEN
      Please check

  • Adarsh Jain
    Adarsh Jain 2 months ago +1

    Hello EDMT Dev, I have a problem. My status of changes in the server app and is shown in firebase, but I am not able to get the notification in the client app. What could be the problem?

    • Adarsh Jain
      Adarsh Jain 2 months ago

      @EDMT Dev So the code mentioned in part 13 video is deprecated and will not work? Because I read that NotificationCompat which imports v7 library is deprecated and you are using this mentioned in the video.

    • EDMT Dev
      EDMT Dev  2 months ago

      @Adarsh Jain I've decalre in IFCMService , the interface you will use Retrofit to post request notification to FCM

    • Adarsh Jain
      Adarsh Jain 2 months ago +1

      @EDMT Dev I checked your video and I couldn't find any POST request in your part 13 video.

    • EDMT Dev
      EDMT Dev  2 months ago

      That mean your code where you use to send notification between app is not work. Check your sendNotification code , make sure it can send success POST request to FCM Services

  • Ronny Effendi
    Ronny Effendi 2 months ago +1

    why my notification not coming out?

    • EDMT Dev
      EDMT Dev  2 months ago

      That mean your FCM not work. Please watch single tutorial about it : ru-clip.net/video/QXPgMUSfYFI/video.html

  • Hamza Mughal
    Hamza Mughal 3 months ago +1

    populateViewHolder is not showing ..help?

    • EDMT Dev
      EDMT Dev  3 months ago

      Because you use newer FirebaseUI than me :D

  • Hamza Mughal
    Hamza Mughal 3 months ago

    i'm not using FirebaseRecycler ui , i'm doing it in old simple way
    can you tell how i can get adapter.getRef(item.getOrder()).getKey;
    and by this which value trying to get?

  • Yuan Li
    Yuan Li 3 months ago +1

    sir i already redo the tutorial 13 3 times, but the Client Orders still is empty. but from notification, the orders is correct. can get some suggestion?

    • Yuan Li
      Yuan Li 3 months ago +1

      sir, i try to remove if (getIntent() == null)
      loadOrders(Common.currentUser.getPhone());
      else
      loadOrders(getIntent().getStringExtra("userPhone"));
      and only keep loadOrders(Common.currentUser.getPhone());
      the orders in client can work correctly...

  • Ghazwa Alqahtani
    Ghazwa Alqahtani 3 months ago +1

    Did anyone got issues when running the client app after registering the Service on the Home page? because, mine even in the Manifest file the automatic declaration for the service having a red underline it? HELP PLEASE

    • Ghazwa Alqahtani
      Ghazwa Alqahtani 3 months ago

      Like I get the status updated on the client side but I don't get the notification that is changed

    • Ghazwa Alqahtani
      Ghazwa Alqahtani 3 months ago

      @EDMT Dev I have it in the right path as yours, under the Java pacakge of the app

    • EDMT Dev
      EDMT Dev  3 months ago +1

      Make sure you have service file in right path , my dear

  • Ghazwa Alqahtani
    Ghazwa Alqahtani 3 months ago +1

    Sir, can you please help me, cause I did everything as the tutorial, and I registered the service on the home Java on the client side, and now when I run the client side app and press Log-in the app crashes. The logcat gives me this erro 'explicit class can't be accessed and did you initialise it on Manifiest file?!

    • Ghazwa Alqahtani
      Ghazwa Alqahtani 3 months ago

      @EDMT Dev Please sir my submission is after 12 hours I only need this feature to work! I searched a lot about the problem I am facing I applied every solution I have read and none is working! Can you please help me. And sorry in advance if I annoyed you

    • Ghazwa Alqahtani
      Ghazwa Alqahtani 3 months ago

      @EDMT Dev Sir, I do not mean to spam but I really need to make the service to work! I followed the tutorial carefully twice and I still get the same issue that I showed the logcat for. PLEASE REPLY ASAP

    • Ghazwa Alqahtani
      Ghazwa Alqahtani 3 months ago

      @EDMT Dev
      This is it
      Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.alqahtag.orderassistant/com.example.alqahtag.orderassistant.Service.ListenOrder}; have you declared this activity in your AndroidManifest.xml?
      at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2112)
      at android.app.Instrumentation.execStartActivity(Instrumentation.java:1757)
      at android.app.Activity.startActivityForResult(Activity.java:4781)
      at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
      at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:68)
      at android.app.Activity.startActivityForResult(Activity.java:4721)
      at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:751)
      at android.app.Activity.startActivity(Activity.java:5142)
      at android.app.Activity.startActivity(Activity.java:5110)
      at com.example.alqahtag.orderassistant.Home.onCreate(Home.java:103)

    • EDMT Dev
      EDMT Dev  3 months ago +1

      Show me your log cat when your app is crash , my dear :D

  • omar abu sabha
    omar abu sabha 3 months ago +1

    hi sir , i hope u are okay , i have problem, orders in server side doesn't show to me

    • Hamza Mughal
      Hamza Mughal 3 months ago +1

      issue is in your xml in which recycleview is placed...

    • omar abu sabha
      omar abu sabha 3 months ago

      @EDMT Dev i do it step by step , but i have error {E/RecyclerView: No adapter attached; skipping layout} whats that mean !? and thank u alot ^_^

    • EDMT Dev
      EDMT Dev  3 months ago +1

      Please watch my tutorial step by step , and make sure you load order from Firebase , with right reference name :D

  • Ghazwa Alqahtani
    Ghazwa Alqahtani 3 months ago +1

    When I press login on the Client App I get this error in the Logacat:
    Unable to find explicit activity class

    • EDMT Dev
      EDMT Dev  3 months ago

      Please watch my tutorial step by step , my dear

  • Ahtasham Ali
    Ahtasham Ali 3 months ago +1

    Hi sir i need help i still facing some error like in client side .Service.LisenOrder not declare

    • EDMT Dev
      EDMT Dev  3 months ago

      You're welcome my dear :D

    • Ahtasham Ali
      Ahtasham Ali 3 months ago

      Hehe i resolved the problem we using the starActivity but the solution is use startserves

    • Ahtasham Ali
      Ahtasham Ali 3 months ago

      Sir when I register the services i face this issue

  • Fahmida Tasnim Lisa
    Fahmida Tasnim Lisa 3 months ago +1

    it would've been of great help if the source code was given

    • EDMT Dev
      EDMT Dev  3 months ago +1

      All source code available in my tutorial , please watch and get it my dear !

  • Célio manso
    Célio manso 3 months ago +1

    notification.builder is deprecated, i cant receive notification on cliente-side when i change the order status on server-side. help me please

    • Ghazwa Alqahtani
      Ghazwa Alqahtani 3 months ago

      @Célio manso How did you solve it? becuase I have a probel on the Home.java page when I register service by using Intent. The login button doesn't allow it to go to Home?
      SOME help PLEASE this is my logact:
      Unable to find explicit activity class {com.example.alqahtag.orderassistant/com.example.alqahtag.orderassistant.Service.ListenOrder}; have you declared this activity in your AndroidManifest.xml?

    • Célio manso
      Célio manso 3 months ago

      @EDMT Dev its working now :D :D .... I feel relieved! i can go to tutorial14# now :D

    • Célio manso
      Célio manso 3 months ago

      i had to do this @Override
      public ComponentName startService(Intent service) {

      service=new Intent(HomeActivity.this, ListenOrder.class);
      return super.startService(service);
      }
      but its not working. please help

    • Célio manso
      Célio manso 3 months ago

      one more thing :D it's showing an error when i startService(service) on Home.java . it says Invalid method declaration; return type required Missing method body, or declare abstract what should i do? thanks in advance

    • EDMT Dev
      EDMT Dev  3 months ago +1

      Deprecated is just warning , it still show notification for you if your FCM is work
      Your problem becuz your FCM is not work :D

  • wham syria
    wham syria 3 months ago +1

    Hi thank you for this lesson but I have a problem
    I can not change the situation
    Do you have a solution

    • EDMT Dev
      EDMT Dev  3 months ago +1

      @wham syria

    • EDMT Dev
      EDMT Dev  3 months ago +1

      @wham syria

    • EDMT Dev
      EDMT Dev  3 months ago +1

      @wham syria

    • wham syria
      wham syria 3 months ago +1

      @EDMT Dev Haha Thank you I wanted to have a problem and found the solution Thank you

    • EDMT Dev
      EDMT Dev  3 months ago +1

      @.@ Sorry i don't understand your comment my dear :D

  • Anonymous Giraffe
    Anonymous Giraffe 3 months ago +1

    after adding
    //load order by phone from Common
    if (getIntent()== null)
    loadOrders(Common.currentUser.getPhone());

    else
    loadOrders(getIntent().getStringExtra("userPhone"));
    my order not appearing anymore, i tried checking "userPhone" and end up it is null, how do i fix this?

  • Brandon Ekbatani
    Brandon Ekbatani 3 months ago +1

    Also just noticed that when I click on the Order on the Client Side the Client Side App Crashes, Below is log cat after clicking on an order
    E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.stuft_pizza_v3, PID: 6734
    java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.stuft_pizza_v3.Interface.ItemClickListener.onClick(android.view.View, int, boolean)' on a null object reference
    at com.example.stuft_pizza_v3.ViewHolder.OrderViewHolder.onClick(OrderViewHolder.java:37)
    at android.view.View.performClick(View.java:6597)
    at android.view.View.performClickInternal(View.java:6574)
    at android.view.View.access$3100(View.java:778)
    at android.view.View$PerformClick.run(View.java:25885)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    I/Process: Sending signal. PID: 6734 SIG: 9
    Application terminated.

    • EDMT Dev
      EDMT Dev  3 months ago

      You forgot to implement recycler click event on onBindViewHolder , please check my tutorial again :D

    • Brandon Ekbatani
      Brandon Ekbatani 3 months ago

      @Shyam Patel really thanks couldnt tell from the logcat

  • Brandon Ekbatani
    Brandon Ekbatani 3 months ago +1

    Hello EDMT Dev, I have followed all 12 previous videos and everything is perfect and working properly. However, I have finished this video and both apps run and work perfectly. No errors in either logcat/run output. Yet, when I change the status of the order on the server side there is no notification appearing on the client side. And I cannot figure out why as there are no errors being displayed. I have followed the tutorial slowly, and implemented the fix from "Muhammad Arslan" and still no notifications on client side. Any suggestions?... I also have noted that video 22 is labeled 'Notifcation Fixes' Would that be the solution? I mean I have no crashes, or errors. I would like to jump to that video as Im not sure when I will be able to get to that video. Please leave me any suggestions.

    • EDMT Dev
      EDMT Dev  3 months ago

      @Brandon Ekbatani Yes you need

    • EDMT Dev
      EDMT Dev  3 months ago

      @Brandon Ekbatani Yes you need

    • EDMT Dev
      EDMT Dev  3 months ago

      @Brandon Ekbatani Yes you need

    • Brandon Ekbatani
      Brandon Ekbatani 3 months ago +1

      EDMT Dev do I need to set up FCM? I don’t remember that being apart of this tutorial

    • EDMT Dev
      EDMT Dev  3 months ago +1

      Try debug your code and make sure Retrofit can submit your POST request to FCM API endpoint and your notification has been success to send :D

  • Vishal Pawar
    Vishal Pawar 3 months ago +1

    ThankYou Very Much EDMTDev :* :)

    • EDMT Dev
      EDMT Dev  3 months ago

      You're welcome my bro

  • Angel Marie Salvador
    Angel Marie Salvador 4 months ago +1

    Hi Sir! Why I can't receive notification in the client side? Can you help me please?

    • EDMT Dev
      EDMT Dev  4 months ago

      First , make sure your notification can be send success
      Second , make sure your app can retrieve notification by check FirebaseServiceMessaging :D

  • Carlo BERMUNDO
    Carlo BERMUNDO 4 months ago +1

    Hi again Sir. the order status is changing from both sides, the only problem is that I can't receive notifications from the client side of the app. i tried using app.v4.notifcation and just like in your tutorial which is app.v7.notifcation compat but the result is the same. Can you help me to fix this sir?

    • Carlo BERMUNDO
      Carlo BERMUNDO 4 months ago

      ​@EDMT Dev so should i implement FCM in my app sir? if so, will you please teach me how?

    • EDMT Dev
      EDMT Dev  4 months ago

      @Carlo BERMUNDO FCM = Firebae Cloud Messaging

    • Carlo BERMUNDO
      Carlo BERMUNDO 4 months ago +1

      @EDMT Dev what is FCM sir?

    • EDMT Dev
      EDMT Dev  4 months ago

      Notification is send / receive by Firebase Cloud Messaging. Your problem need check FCM first , make sure it success to send / receive

  • Prathamesh Choukekar
    Prathamesh Choukekar 4 months ago +1

    @EDMT Dev also,can we make database tables of firebase? I mean,I am doing this as my university project and I am supposed to enter it's database tables too, but I dont find any tutorial regarding how to make tables...I mean,I know requests,food,categories,users are tables but what are the primary keys and foreign keys inside them?

    • EDMT Dev
      EDMT Dev  4 months ago +1

      @Prathamesh Choukekar Hi , you can call me Eddy Lee ^^

    • Prathamesh Choukekar
      Prathamesh Choukekar 4 months ago +1

      @EDMT Dev and bro,what's ur real name? I wud like to give both your channel name,and real name in my project's acknowledgement.... You have been a great help

    • EDMT Dev
      EDMT Dev  4 months ago +1

      This is noSQL , my dear !

  • Igor Lerinc
    Igor Lerinc 4 months ago +1

    I checked manifestz file and it contains but still wont install app

    Failed to finalize session : INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl550492207.tmp/base.apk (at Binary XML file line #29): does not have valid android:name

    • EDMT Dev
      EDMT Dev  4 months ago

      This is not error my dear , please show me more :D

  • Fayaz Rahman
    Fayaz Rahman 5 months ago +2

    @EDMT Dev Have you fixed the dark green screen error, sir? If you have, please tell me the solution. Really appreciate your work, thank you.

    • EDMT Dev
      EDMT Dev  5 months ago +1

      Please continue watch next part tutorial my dear ! All error is solve until end part :)

  • Rafael Cardoso
    Rafael Cardoso 5 months ago +1

    Gostaria de ver o código fonte do AndroidManifest.xml

    • Rafael Cardoso
      Rafael Cardoso 5 months ago

      because my aplication have a problem in activity Login

    • Rafael Cardoso
      Rafael Cardoso 5 months ago

      I would if possible take a look at the source code of AndroidManifest.xml

    • EDMT Dev
      EDMT Dev  5 months ago

      Please use English my bro :D

  • Jason 226
    Jason 226 5 months ago +1

    hi sir where to setup the delete dialog? since the dialog is 2 update...

    • EDMT Dev
      EDMT Dev  5 months ago

      Please watch my tutorial kindly my dear

  • hùng trần
    hùng trần 5 months ago +1

    do you have statistics management? thanks

    • EDMT Dev
      EDMT Dev  5 months ago

      I don't have , sorry my dear :D

  • Seihan Noriega
    Seihan Noriega 5 months ago

    Android resource linking failed
    C:\Users\Seihan\AndroidStudioProjects\Administracion\app\src\main\res\layout\activity_food_list.xml:11: error: 'match parent' is incompatible with attribute layout_width (attr) dimension|enum [fill_parent=4294967295, match_parent=4294967295, wrap_content=4294967294].
    error: failed linking file resources.

    • Seihan Noriega
      Seihan Noriega 5 months ago

      I can soluted this problema with versión u r the Best sir :')

    • EDMT Dev
      EDMT Dev  5 months ago

      T_T Please check your code kindly , 'match_parent' not 'match parent'

    • Seihan Noriega
      Seihan Noriega 5 months ago

      i have problems whit recyclerview

    • Seihan Noriega
      Seihan Noriega 5 months ago

  • Seihan Noriega
    Seihan Noriega 5 months ago +1

    Plz i cnat see orders in admin app this is my code private void loadOrders(String phone) { Query getOrderByUser=requests.orderByChild("phone")
    .equalTo(phone);
    FirebaseRecyclerOptions orderOptions=new FirebaseRecyclerOptions.Builder()
    .setQuery(getOrderByUser,Request.class)
    .build();
    adapter=new FirebaseRecyclerAdapter(orderOptions) {
    @Override
    protected void onBindViewHolder(@NonNull OrderViewHolder viewholder, int position, @NonNull Request model) {
    viewholder.txtOrderId.setText(adapter.getRef(position).getKey());
    viewholder.txtOrderStatus.setText(Common.convertCodeToStatus(model.getStatus()));
    viewholder.txtOrderAddress.setText(model.getAddress());
    viewholder.txtOrderPhone.setText(model.getPhone());
    viewholder.setItemClickListener(new ItemClickListener() {
    @Override
    public void onClick(View view, int position, boolean isLongClick) {
    }
    });

    }

    • Fayaz Rahman
      Fayaz Rahman 5 months ago

      Hey man, I fixed it. just replace "requests.orderByChild("phone") .equalTo(phone);" with just "requests". Might have happened when you copy pasted this stuff. You don't want the requests of a particular phone to show up, you want them all. So here is the solution.

    • Fayaz Rahman
      Fayaz Rahman 5 months ago

      I got the same problem and I found the reason. But I can't solve it. The thing is that if you login with the same account on both client and server side, and make an order from client side, then it comes up on server side. It shows all of 'your' orders and not of anybody else's. Please put forward the solution if you have found it.

    • Seihan Noriega
      Seihan Noriega 5 months ago

      i copy and paste in client server to admin server and i cant see orders in admin server

    • Seihan Noriega
      Seihan Noriega 5 months ago

      Yes :/

    • EDMT Dev
      EDMT Dev  5 months ago

      Make sure in your Firebase , in Request Reference , you have Order data in there

  • Jason 226
    Jason 226 5 months ago +1

    hi sir in video 13:54 when i chick in to the order the app will close this is a locat said java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
    at com.example.user.androidbookstoreadmin.Common.Common.convertCodeToStatus(Common.java:15)
    at com.example.user.androidbookstoreadmin.OrderStatus$1.populateViewHolder(OrderStatus.java:65)
    at com.example.user.androidbookstoreadmin.OrderStatus$1.populateViewHolder(OrderStatus.java:60)

    • EDMT Dev
      EDMT Dev  5 months ago

      You have an null string at Common line 15 , please check again

  • Kenny Redosendo
    Kenny Redosendo 5 months ago +1

    Hi sir, is there any way I can sort order by status?
    UPDATE: I already got it in server side, but I'm having a problem with client side.

    • Kenny Redosendo
      Kenny Redosendo 5 months ago

      @EDMT Dev in Server side OrderStatus, I managed to sort out orders by status with this code:
      adapter = new private void loadOrders() {
      adapter = new FirebaseRecyclerAdapter(
      Request.class,
      R.layout.order_layout,
      OrderViewHolder.class,
      requests.orderByChild("status")
      )
      So, my problem is How can I also do this in Client side:
      private void loadOrders(String phone) {
      adapter = new FirebaseRecyclerAdapter(
      Request.class,
      R.layout.order_layout,
      OrderViewHolder.class,
      requests.orderByChild("phone").equalTo(phone)
      )

    • EDMT Dev
      EDMT Dev  5 months ago

      What problem with you ? :D

  • Work Shop
    Work Shop 5 months ago +1

    i am facing a problem
    D/Notification: allPendingIntents
    and no show notification

    • EDMT Dev
      EDMT Dev  5 months ago

      Please watch my tutorial and do step by step

  • Shaima AlGhamdi
    Shaima AlGhamdi 5 months ago

    Not allowed to start service Intent { cmp=com.example.assus.orderline/.Service.ListenOrder }: app is in background uid UidRecord{16c7a9b u0a85 TPSL idle procs:1 seq(0,0,0)}
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.example.assus.orderline/.Service.ListenOrder }: app is in background uid UidRecord{16c7a9b u0a85 TPSL idle procs:1 seq(0,0,0)}
    at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1577)
    at android.app.ContextImpl.startService(ContextImpl.java:1532)
    at android.content.ContextWrapper.startService(ContextWrapper.java:664)
    at com.example.assus.orderline.Home.onCreate(Home.java:94)

    Line 94: startService(service);

    • EDMT Dev
      EDMT Dev  5 months ago

      stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten
      See here , my dear :D

    • Shaima AlGhamdi
      Shaima AlGhamdi 5 months ago

      The notification is not showing in user side

  • Akshay Nair
    Akshay Nair 5 months ago +1

    How to show notification when new order is received by the restaurant

    • EDMT Dev
      EDMT Dev  5 months ago

      It's already design in this tutorial series , my dear :D

  • Acoustic Puneet
    Acoustic Puneet 5 months ago +1

    endAllActiveAnimators on 0x7bd803f100 (MenuPopupWindow$MenuDropDownListView) with handle 0x7bf15beaa0

    i m getting this when clicked on update or delete button no drop down menu showing plz help sir

    • EDMT Dev
      EDMT Dev  5 months ago

      Please watch my tutorial step by step , my bro :D

  • Enriico chiiesa
    Enriico chiiesa 6 months ago

    Hi sir, I have a few question for you, and I need your help:
    1. Please create Sign out code in Order Management please, I can't create Sign out function. I've been trying to like part 6 and didn't work :(
    2. You don't create history activity for order food ?

    • Enriico chiiesa
      Enriico chiiesa 6 months ago

      I just need Sign out function for order management sir, which part you add sir ?

    • EDMT Dev
      EDMT Dev  6 months ago

      You just watch part 13 :) Please finish all part of this series and show me what is missing :D

  • prashant bhalekar
    prashant bhalekar 6 months ago +1

    every thing is perfect
    but when i see orders from client side
    it doesnt show my orders

    • prashant bhalekar
      prashant bhalekar 6 months ago

      @Enriico chiiesa ya it works thanks

    • Enriico chiiesa
      Enriico chiiesa 6 months ago +1

      Write this :
      if (getIntent().getExtras() == null)
      loadOrders(Common.currentUser.getPhone());
      maybe this can help you :)

    • prashant bhalekar
      prashant bhalekar 6 months ago

      @EDMT Dev when i am using if else condition which is at 35:10
      then this problem occur
      otherwise it show the order from client side
      but then it crash when click on notification bar

    • EDMT Dev
      EDMT Dev  6 months ago

      Check your app and make sure your app can rtrieve data from Firebase , and check your condition filter order

  • 鄭亦淳
    鄭亦淳 6 months ago +1

    why when i close the client
    I will don't get any notification???

    • Enriico chiiesa
      Enriico chiiesa 6 months ago

      don't close the client app bro. it will didn't show your notification :D

    • EDMT Dev
      EDMT Dev  6 months ago

      Show me your log cat when your app is crash , my dear

  • Abd Alkarim Albeik
    Abd Alkarim Albeik 6 months ago +1

    Question:
    why didn't you change rules in database in "MenuId" to "menuId" and "Name" to "name" ?

    • EDMT Dev
      EDMT Dev  6 months ago

      To compare with code my dear ! You can change in code instead of Firebase :)

  • Abd Alkarim Albeik
    Abd Alkarim Albeik 6 months ago +2

    my code work fine , but when i click notification and go to OrderStatus activity,
    i can't see any orders , i checked "userPhone" and it is right
    what is solve ????

    • Shaima AlGhamdi
      Shaima AlGhamdi 5 months ago +1

      @Abd Alkarim Albeik Thank u bro. Worked!

    • hen dika
      hen dika 5 months ago +1

      @Abd Alkarim Albeik thanks bro

    • Enriico chiiesa
      Enriico chiiesa 6 months ago +1

      thanks bro to fix it

    • Enriico chiiesa
      Enriico chiiesa 6 months ago

      this is work bro ? I can't see any orders too in my order food. do you fix it ?

    • Abd Alkarim Albeik
      Abd Alkarim Albeik 6 months ago +2

      @EDMT Dev thanks for your interest :
      i check the condition and i write like that :
      if (getIntent().getExtras() == null)
      loadOrders(Common.currentUser.getPhone());
      else
      loadOrders(getIntent().getStringExtra("userPhone"));
      and it work FINE ❤❤❤

  • ROHSHEAN V KAMARAJA
    ROHSHEAN V KAMARAJA 6 months ago +1

    Sir the device im using is api 28 but my android version for my application in android studio is android 7 do i need to do the notification channel to show notification in my device? and if yes which part of your video do u explain about it?

    • EDMT Dev
      EDMT Dev  6 months ago

      If you use Android from Oreo or higher , you should add Notification Channel ru-clip.net/video/CVI4CfdtbkA/video.html

  • MD Naimur Rahman
    MD Naimur Rahman 6 months ago +1

    I have problem in loading orders in server app... Whenever I click on order , app got crashed.. Here is my logcat... ( Your Home activity is my MainActivity )
    01-28 12:52:30.129 30543-30543/? E/Zygote: no v2
    01-28 12:52:33.001 30543-30543/com.sdmgapl1a0501.naimur.jpadmin E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.sdmgapl1a0501.naimur.jpadmin, PID: 30543
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sdmgapl1a0501.naimur.jpadmin/com.sdmgapl1a0501.naimur.jpadmin.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.sdmgapl1a0501.naimur.jpadmin.Model.User.getName()' on a null object reference
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3319)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
    at android.app.ActivityThread.-wrap17(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:7325)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
    Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.sdmgapl1a0501.naimur.jpadmin.Model.User.getName()' on a null object reference
    at com.sdmgapl1a0501.naimur.jpadmin.MainActivity.onCreate(MainActivity.java:102)
    at android.app.Activity.performCreate(Activity.java:6904)
    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1136)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3266)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415)
    at android.app.ActivityThread.-wrap17(ActivityThread.java)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821)
    at android.os.Handler.dispatchMessage(Handler.java:102)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:7325)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

    • EDMT Dev
      EDMT Dev  6 months ago

      You're welcome my dear

    • MD Naimur Rahman
      MD Naimur Rahman 6 months ago +1

      @EDMT Dev Thank u so much.. My problem is solved now.. and Thank u very much for your all tutorials . All tutorials are very helpful for the students like us.

    • EDMT Dev
      EDMT Dev  6 months ago

      java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.sdmgapl1a0501.naimur.jpadmin.Model.User.getName()' on a null object reference
      =>
      You have an User object is null at MainActivity line 102 , make sure you have assign value for this view before

  • King arthur Prest
    King arthur Prest 6 months ago +1

    can i use normal spinner

  • King arthur Prest
    King arthur Prest 7 months ago +1

    implementation 'com.jaredrummler:material-spinner:1.1.0'
    Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.jaredrummler:material-spinner:1.1.0.
    Open File
    Show Details


    Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.jaredrummler:material-spinner:1.1.0.
    Open File
    Show Details
    it not working and i have upgrade it any solutions

    • King arthur Prest
      King arthur Prest 6 months ago

      it not working even if i start a totally new projexct can i use another spinner

    • King arthur Prest
      King arthur Prest 6 months ago

      @EDMT Dev tried that it also doesnt work

    • EDMT Dev
      EDMT Dev  6 months ago

      implementation 'com.jaredrummler:material-spinner:1.3.1'

  • arma dahackerz
    arma dahackerz 7 months ago +1

    NOTIFICATION IS NOT SHOW AT CLIENT APP
    for someone who have problem why notification is not show at clinet app, this because : NotificationCompat.Builder deprecated in Android O
    you may check at showNotification in your ListOrder class
    and follow instruction from this website, change your code.
    stackoverflow.com/questions/45462666/notificationcompat-builder-deprecated-in-android-o

    • arma dahackerz
      arma dahackerz 7 months ago

      thanks for reply mr.@EDMT Dev but part 34 is far away from me, right now, i'm still at tutorial Part 15 (Check Internet Connection and Delete Cart's item) :D
      anyway thanks sir

    • EDMT Dev
      EDMT Dev  7 months ago

      ru-clip.net/video/mRswwMAwRoI/video.html&lc=UgwjkDUCIycIswFYnll4AaABAg
      :D Part 34 already fix this problem my dear :D

  • Aditya Jaiswal
    Aditya Jaiswal 7 months ago +2

    Hlo edmtdev sir notification client side pr show nhi ho raha h please help me

    • Evan Chatterjee
      Evan Chatterjee 6 months ago +1

      EDMT Dev Sir he is saying that notification is not appearing in client side please help

    • EDMT Dev
      EDMT Dev  7 months ago +1

      Please use English my dear T_T

  • Aditya Jaiswal
    Aditya Jaiswal 7 months ago +1

    Hlo sir food order ke 13 pe part me Jo notification jaa raha h server side to client side .Maine same prosses kiya h but notification nhi aaraha h please help me

    • EDMT Dev
      EDMT Dev  7 months ago

      Please check your client side - FirebaseMessagingService and make sure it work :) Try debug and make sure when server send notification , this event is fired

    • Aditya Jaiswal
      Aditya Jaiswal 7 months ago

      Please help me sir

    • Aditya Jaiswal
      Aditya Jaiswal 7 months ago +1

      The notification on the client side is not being shown. The messages that are being sent from the server side And all the working applications are not just a notification show

    • EDMT Dev
      EDMT Dev  7 months ago

      English , please T_T

  • ZHEN WEI
    ZHEN WEI 7 months ago +1

    Dear sir, I have some problems in both sides. Actually I finished notification in your video (Notification fixes).So I can receive message from both of them. But when I check my app,I found :
    1. In client,my order page show nothing but order can be updated in firebase.
    2. In my server, my order page only show 1 order details even I use recyclerView.
    Hope you can tell me where are problems.
    Thanks.

    • EDMT Dev
      EDMT Dev  7 months ago

      1. Make sure you have entered right path for Firebase Database Refenrences to retrieve data from Order table
      2. Order detail only show 1 detail of 1 order

  • Java Pr
    Java Pr 7 months ago +1

    when i open the client apps and change the status order the notification is working fine, but when i close the apps the notification id not working, anybody can help me????
    ListenOrder.java
    public class ListenOrder extends Service implements ChildEventListener{

    FirebaseDatabase database;
    DatabaseReference requests;

    public ListenOrder() {
    }

    @Override
    public IBinder onBind(Intent intent) {
    return null;
    }

    @Override
    public void onCreate() {
    super.onCreate();
    database = FirebaseDatabase.getInstance();
    requests = database.getReference("Requests");
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
    requests.addChildEventListener(this);
    return super.onStartCommand(intent, flags, startId);

    }

    @Override
    public void onChildAdded(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {

    }

    @Override
    public void onChildChanged(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {
    Request request = dataSnapshot.getValue(Request.class);
    assert request != null;
    showNotification(dataSnapshot.getKey(),request);
    }

    private void showNotification(String key, Request request) {
    Intent intent = new Intent(getBaseContext(), OrderStatus.class);
    intent.putExtra("userPhone",request.getPhone());
    PendingIntent contentIntent = PendingIntent.getActivity(getBaseContext(),0,intent,PendingIntent.FLAG_UPDATE_CURRENT);

    NotificationCompat.Builder builder =new NotificationCompat.Builder(getBaseContext());

    builder.setAutoCancel(true)
    .setDefaults(Notification.DEFAULT_ALL)
    .setWhen(System.currentTimeMillis())
    .setTicker("EMDTDev")
    .setContentInfo("Your Order Was Updated")
    .setContentText("Order #" + key+ " was updated status to "+ Common.convertCodeToStatus(request.getStatus()))
    .setContentIntent(contentIntent)
    .setContentInfo("Info")
    .setSmallIcon(R.mipmap.ic_launcher);

    NotificationManager notificationManager=(NotificationManager)getBaseContext().getSystemService(Context.NOTIFICATION_SERVICE);
    assert notificationManager != null;
    notificationManager.notify(1,builder.build());
    }

    @Override
    public void onChildRemoved(@NonNull DataSnapshot dataSnapshot) {

    }

    @Override
    public void onChildMoved(@NonNull DataSnapshot dataSnapshot, @Nullable String s) {

    }

    @Override
    public void onCancelled(@NonNull DatabaseError databaseError) {

    }
    }
    Home.Java but only in part
    public class Home extends AppCompatActivity
    implements NavigationView.OnNavigationItemSelectedListener {

    FirebaseDatabase database;
    DatabaseReference category;
    TextView txtFullName;
    RecyclerView recycler_menu;
    RecyclerView.LayoutManager layoutManager;
    FirebaseRecyclerAdapter adapter;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_home);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    toolbar.setTitle("Menu");
    setSupportActionBar(toolbar);

    //Init Database
    database = FirebaseDatabase.getInstance();
    category = database.getReference("Category");


    Paper.init(this);

    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View view) {
    Intent intent = new Intent(Home.this,Cart.class);
    startActivity(intent);
    }
    });

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
    this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.addDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    navigationView.setNavigationItemSelectedListener(this);

    //Set Nama User
    View headerView = navigationView.getHeaderView(0);
    txtFullName = headerView.findViewById(R.id.txtFullName);
    txtFullName.setText(Common.currentUser.getName());

    //Load Menu
    recycler_menu = findViewById(R.id.recycler_menu);
    recycler_menu.setHasFixedSize(true);
    layoutManager = new LinearLayoutManager(this);
    recycler_menu.setLayoutManager(layoutManager);


    if (Common.isConnectedToInternet(this))
    loadMenu();
    else{
    Toast.makeText(this, "Please Check Your Internet Connection", Toast.LENGTH_SHORT).show();
    return;
    }

    Intent service = new Intent(Home.this, ListenOrder.class);
    startService(service);

    }

    • EDMT Dev
      EDMT Dev  7 months ago

      IF you want to retrieve notification when app is closed , you need use 'data payload' to sent :) Not send by Title and Content

  • orange FOX
    orange FOX 7 months ago +1

    hi edmt! merry christmas!
    my problem is when i tap the notification, orders are displayed , but in client side , orders are not displayed

    • EDMT Dev
      EDMT Dev  7 months ago

      Hi , that mean your notification in Server side is good :D So just do samething with your Client :D

  • ZHEN WEI
    ZHEN WEI 7 months ago +1

    Thanks for sharing,sir. But I have a problem about spinner in server side and I try to figure out the problems one day. But I failed. The problem shown in logcat :
    Process: com.example.canteenstaffserver, PID: 17677
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.jaredrummler.materialspinner.MaterialSpinner.setItems(java.lang.Object[])' on a null object reference
    I always try to compare with your code but I am think they are same. So please help me! Thanks!

    • Muhammad Ashraf
      Muhammad Ashraf 5 months ago

      spinner = (MaterialSpinner)view.findViewById(R.id.statusSpinner);

    • EDMT Dev
      EDMT Dev  7 months ago

      You have an MaterialSpinner is null , please make sure you have call findViewById for it before

  • a2s city
    a2s city 7 months ago +1

    if you got error while run "META-INF/proguard/androidx-annotations.pro" add android{ packagingOptions { exclude 'META-INF/proguard/androidx-annotations.pro' }} in build.gradle to solve

    • EDMT Dev
      EDMT Dev  7 months ago

      You're welcome my bro

  • Danish riaz
    Danish riaz 8 months ago +1

    35:25 when i do this
    if (getIntent() == null)
    loadOrders(Common.currentUser.getPhone());
    else
    loadOrders(getIntent().getStringExtra("userPhone"));
    then in customer panel customer can not check their order status.

    • Danish riaz
      Danish riaz 8 months ago

      @EDMT Dev Without
      if (getIntent() == null)

      else
      loadOrders(getIntent().getStringExtra("userPhone"));
      OrderStatus show to the customer...why?
      i store order by user phone

    • EDMT Dev
      EDMT Dev  8 months ago

      Make sure in your Firebase , you store order status by userPhone my dear :)

  • TheSTUDIOKONDI
    TheSTUDIOKONDI 8 months ago +4

    If your list of foods doesn't shows up on client side make sure to change MenuId to menuId because the names of fields in db has changed :)

    • Hamza Maqsood
      Hamza Maqsood 4 months ago

      @orange FOX did you fix this ?

    • Enriico chiiesa
      Enriico chiiesa 6 months ago

      which part is it bro ? i can't find it

    • orange FOX
      orange FOX 7 months ago +1

      @EDMT Dev hi edmt! merry christmas!
      my problem is when i tap the notification, orders are displayed , but in client side , orders are not displayed

    • EDMT Dev
      EDMT Dev  8 months ago

      You're welcome my bro :D

  • Kapil jain
    Kapil jain 8 months ago +1

    Client side service ListenOrder error input.putExtra("userPhone",request.getPhone); getPhone is red color error

    • Kapil jain
      Kapil jain 8 months ago

      i know but not solve this pblm

    • Kapil jain
      Kapil jain 8 months ago

      @EDMT Dev please sir send full code getPhone

    • EDMT Dev
      EDMT Dev  8 months ago

      T_T getPhone you missing () => should be : getPhone() => This is basic syntax of Java , you shouldn't forget it !

    • Kapil jain
      Kapil jain 8 months ago +1

      public class Request {
      private String phone;
      private String name;
      private String address;
      private String total;
      private String status;
      private List foods; //List of food order
      public Request() {
      }
      public Request(String phone, String name, String address, String total, List foods) {
      this.phone = phone;
      this.name = name;
      this.address = address;
      this.total = total;
      this.foods = foods;
      this.status = "0"; //Default is 0 , 0: Placed , 1: Shipping , 2: Shipped
      }
      public String getStatus() {
      return status;
      }
      public void setStatus(String status) {
      this.status = status;
      }
      public String getPhone() {
      return phone;
      }
      public void setPhone(String phone) {
      this.phone = phone;
      }
      public String getName() {
      return name;
      }
      public void setName(String name) {
      this.name = name;
      }
      public String getAddress() {
      return address;
      }
      public void setAddress(String address) {
      this.address = address;
      }
      public String getTotal() {
      return total;
      }
      public void setTotal(String total) {
      this.total = total;
      }
      public List getFoods() {
      return foods;
      }
      public void setFoods(List foods) {
      this.foods = foods;
      }
      }

  • rahul jha
    rahul jha 8 months ago +1

    Sir you make notification manager in client side or server side.

    • EDMT Dev
      EDMT Dev  8 months ago +2

      I made both Client and Server side are have same system : send / receive notification

  • Kenneth M.
    Kenneth M. 8 months ago +1

    Hellou teacher!, i have a question. when are we going to be able to see what the order is? (see the foodlist of the order), because till now i can change status but i dont even know what am i deliverying hahahha
    Thank you alot teacher!

    • EDMT Dev
      EDMT Dev  8 months ago +1

      Continue watch next part my dear , i don't remember exactly :D

    • AL SP
      AL SP 8 months ago +1

      EDMT Dev which part is it sir? Can’t find

    • EDMT Dev
      EDMT Dev  8 months ago +1

      Continue watch next part my dear , i have already made features see order detail from Server app :D

  • rahul jha
    rahul jha 9 months ago +1

    Sir i don't get any notification

    • arma dahackerz
      arma dahackerz 7 months ago

      NotificationCompat.Builder deprecated in Android O
      you may check at showNotification in your ListOrder class
      and follow instruction from this website, change your code.
      stackoverflow.com/questions/45462666/notificationcompat-builder-deprecated-in-android-o

    • EDMT Dev
      EDMT Dev  9 months ago +1

      Try watch my tutorial step by step my dear :D

  • Meet Mehta
    Meet Mehta 9 months ago +1

    Can i get this whole project .. so i can check it out what things are missing in my project...

    • EDMT Dev
      EDMT Dev  9 months ago

      Sorry my dear :) This project can't be share source :D You can write it by yourself

  • Sham Joe
    Sham Joe 9 months ago +1

    Hello sir. I need help.im having a problem which my client orders wont show with food list. But my server shows everything. Im run it theres no error and the part 13 has done perfectly

    • EDMT Dev
      EDMT Dev  9 months ago

      Hi , check your Order ADapter and make sure it have Food detail here :D Try to debug

  • Codder IT
    Codder IT 9 months ago +1

    Hello , i have a problem when i send notification to client side , i'm not have a notification in client side

    • arma dahackerz
      arma dahackerz 7 months ago

      NotificationCompat.Builder deprecated in Android O
      you may check at showNotification in your ListOrder class
      and follow instruction from this website, change your code.
      stackoverflow.com/questions/45462666/notificationcompat-builder-deprecated-in-android-o

    • EDMT Dev
      EDMT Dev  9 months ago

      Hi , please watch my tutorial step by step my dear ! If you can't receive notification in client side , try check your send notification code and make sure notificaction has been sended