Uploaded image for project: ' AGL Development'
  1. AGL Development
  2. SPEC-1919

access afm-main in homescreen-service

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: Major Major
    • None
    • None
    • None
    • None

      I make a new class named HS_AppManager in homescreen-service to manage applciations information
      and access to application framework(afm-main).The mainly purpose is to make application liked
      launcher/homescreen doesn't need to access application framework directly,they only need to interact
      with homescreen-service,thus reduce the work of applications.Secondly to manage application status in
      homescreen-service.

      Now in homescreen-service have two changes,

      1. add one verb and one event, the verb named "runnables" to get runnables application list;
        the event named "app_list_changed" to to notify launcher the runnables application list has changed.
        Additional,in the runnables list which homescreen-service send to launcher has checked excpetion applications
        liked launcher/homescreen/onscreen application that can't display on launcher.
        please refer to runnables sequence.
      2. change tap_shortcut function: when application isn't started,homescreen-service will call "start" verb of
        afm-main to start application,by this way when homesceen/launcher start application will only need to
        call "tap_shortcut", don't need to pay attention to start application.
        please refer to start_application sequence.

      Sourcecode path is below:
      agl-service-homescreen

      anyone can test these two sequence by afb-client-demo used below command:

      	afb-client-demo --human 'ws://localhost:1045/api?token=HELLO'
      	homescreen subscribe {"event":"app_list_changed"}
      	homescreen runnables
      	homescreen tap_shortcut {"application_id":"poi"}
      

      An Isuue:
      When install a service liked "low-can-service@5.99", homescreen-service also can get "application-list-changed" event.
      So I must use runnables verb once more to get runnables list, then judge if this installed application
      need to change runnables list in HS_AppManger.
      IMHO, from the name of this event, it is not appropriate to push event in this scenario, so could afm-main change this event?
      If can change it, I only need using "detail" verb to get application details.

        1. start_application.png
          start_application.png
          32 kB
        2. runnables.png
          runnables.png
          57 kB
        3. hs-class.png
          hs-class.png
          42 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            wangzhiqiang zhiqiang wang
            wangzhiqiang zhiqiang wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: