Android--面试题整理(二)
发布日期:2021-05-10 12:46:48 浏览次数:22 分类:精选文章

本文共 4367 字,大约阅读时间需要 14 分钟。

  1. ������������������������������Activity���������������������������Task���������������
  2. ������������������Activity������������������Task���������������������������������������Activity������������������Intentflag���������������������������

    ���������

    Intent intent = new Intent(A.this, B.class);intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);startActivity(intent);

    ���������������Activity������������Task���������������

    1. Activity���������service������������������activity������������������������service���
    2. ������������������������������������

    3. ������bindService()���
    4. Intent intentService = new Intent(this, MyService.class);bindService(intentService, new MyServiceConnection(), BIND_AUTO_CREATE);

      ������ServiceConnection������������������������������������������bindService()���unbindService()������������������������������������������

      1. ������startService()���
      2. startService(new Intent(this, MyService.class));

        startService()������������������������������������������������������������������������������������

          1. ���������Service������������������������������������Service������������������������������������������������������Service���
          2. Service���Android������������������������������������������������������������������������������

            • onCreate()
            • onStartCommand()
            • onDestroy()
            • onBind()
            • onUnbind()
            • onServiceConnected()
            • onServiceDisconnected()

            Service������������������������

          3. ������startService()������������������onStartCommand()���������������stopService()���������������������������������������������������
          4. ������bindService()������������������onBind()���������������������������������������������������������������������������������������������������
          5. Service���onCreate()������������������������������������startService()������bindService(), ���������Service������������������������

            ���������������������stopService()���������onDestroy()���unbindService()������������onUnbind()���onDestroy()������������������stopService()���onDestroy()������������������

            1. ������service���B���������������������������A���������B���������������������������������������������
            2. ���������������������������������

              startActivityForResult(new Intent(A.this, B.class));

              B���������������������������������������onActivityResult���������������������������������������������

              1. ���������IntentService������������������
              2. IntentService���Android������������������������������������������������Service���������������������������

              3. ������������������

              4. ������������������������onHandleIntent()���������������������������

              5. ���������������������UI������

              6. ������������������������

              7. ������������������Service���

              8. ������������Service������������������

              9. ���������������������������������������������������������������
              10. ��� BroadcastReceiver������������
              11. ������������������UI������������������������
              12. ������������������������������������������������
              13. ���������������������������
              14. Service���������������������������������������������������������������������������������

                1. ���������������Intent���Intent Filter���
                2. Intent���Android������������������������������������������������������������������Intent Filter���������������������������������������������������������������

                  • Action
                  • Data���������URI���MIME������������������������������������
                  • Category

                  ������������Intent������������������������������������Intent Filter���������������������������������

                  1. Intent���������������������������������������������������
                  2. Intent������������������������������������

                  3. ���������������
                  4. intent.putExtra("data", "���������");// ������������������Parcelable������Parcelable data = new Parcelable() {};intent.putExtra("data", data);
                    1. ������URI���
                    2. intent.setData("content://com.example appraisal");
                      1. MIME������������������������������������������������������������~/.class������������������������������������������������������������

                      2. Activity���Intent���Service������������������

                      3. ������������Android���������������������������������������������������������������

                        • Activity������������������������������������������
                        • Intent���������������������������������������������������
                        • Service������������������������������������������������������������

                        ���������������������������������������

                        startActivity(new Intent(this, MusicPlayerActivity.class));

                        ������Intent������Activity������������������������������������������������Service������������������������������������

                        ������������������������������������������Service������������������������������Scene������Activity���������������

上一篇:Android--面试题整理(三)
下一篇:Android--面试题整理(一)

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2025年04月27日 22时45分40秒