• 【Android基础】利用Intent在Activity之间传递数据

    时间:2023-12-01 20:27:20

    前言:上一篇文章给大家聊了Intent的用法,如何用Intent启动Activity和隐式Intent,这一篇文章给大家聊聊如何利用Intent在Activity之间进行沟通。从一个Activity获取返回结果:启动一个Activity不仅仅是startActivity(Intent intent)...

  • Android中Bundle和Intent的区别

    时间:2023-11-27 23:43:33

    Bundle的作用,以及和Intent的区别:一、Bundle: A mapping from String values to various Parcelable types键值对的集合类继承关系:java.lang.Object android.os.Bundle Bundle类是一个fina...

  • SecurityException:Not allowed to start service Intent ,without permission not exported from

    时间:2023-11-27 20:13:39

    本来是学长以前的项目,我正在重做一遍。结果突然出现了异常,我很是不解啊,怎么莫名其妙的就出现异常了呢?我昨天用还是好好的,根本就没动过源代码。于是在网上开始了一遍又一遍的查询,有的说要加权限、有的说这,有的说那。终于,在CSND上找到了原因。那个LZ也是在stackflow上找到了灵感。http:/...

  • 解决图片裁剪com.android.camera.action.CROP和intent.putExtra("return-data", true);

    时间:2023-11-27 14:26:55

    最近在做一个图片上传,在上传之前需要对照片进行裁剪,遇到一个坑,在别的手机上运行都正常,在小米手机上却遇见一个问题,选中图片无法裁剪,直接闪退,目前已解决!之前出过问题的地方会标红//选择图片private void choosePhotos(){Intent intent = new Intent...

  • 隐式intent启动电子邮件,不需要非电子邮件应用程序。

    时间:2023-11-22 21:55:41

    Intent intent = new Intent(Intent.ACTION_SENDTO);intent.setType("text/plain");intent.putExtra(Intent.EXTRA_SUBJECT, "Subject of email");intent.putExtr

  • Android_Intent_note

    时间:2023-11-13 10:04:31

    Activity间传递参数的方法方法1. 通过putExtra()传递基本数据类型方法2. 通过putExtras()传递Bundle数据类型方法3. 通过Application读写全局变量方法4. 把基本的数据类型封装到一个对象中,然后通过intent传递该对象需要考虑对Person对象进行序列化...

  • 常见的Activity Action Intent常量

    时间:2023-11-12 16:00:29

    Intent的中文意思是“意图,目的”的意思,可以理解为不同组件之间通信的“媒介”或者“信使”。目标组件一般要通过Intent来声明自己的条件,一般通过组件中的<intent-filter>元素来过滤。Intent在由以下几个部分组成:动作(action),数据(data),分类(Cat...

  • android学习之路--------intent

    时间:2023-10-25 16:14:44

    正式开始学习android,没有看书和视频,所以没有系统的学,只是看到哪个知识点就去学习,今天学习界面之间的跳转,以及传值,主要的知识点是intent,@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreat...

  • Android中,利用Intent传递对象值

    时间:2023-09-10 23:30:20

    在很多情况下,调用startActivity(Intent) 方法,跳转到另外一个Activity或其他component,需要传递一个对象给它。可以让这个要传递的对象所属类实现Serializable或者Parcelable接口。然后利用onCreate函数中的Bundle参数作为载体,传递这个对...

  • Android高手进阶教程(十七)之---Android中Intent传递对象的两种方法(Serializable,Parcelable)!

    时间:2023-09-09 18:02:32

    [转]【原文】大家好,好久不见,今天要给大家讲一下Android中Intent中如何传递对象,就我目前所知道的有两种方法,一种是Bundle.putSerializable(Key,Object);另一种是Bundle.putParcelable(Key, Object);当然这些Object是有一...

  • Android组件的通讯——Intent

    时间:2023-09-07 10:23:32

    转载:Android组件的通讯-Intent1、概述一个应用程序的三个核心组件——activities、services、broadcast receivers,都是通过叫做intents的消息激活。Intent消息是一种同一或不同应用程序中的组件之间延迟运行时绑定的机制。intent本身(是一个I...

  • 显示intent和隐示intent有什么区别

    时间:2023-08-28 10:54:32

    显式Intent定义:对于明确指出了目标组件名称的Intent,我们称之为显式Intent。隐式Intent定义:对于没有明确指出目标组件名称的Intent,则称之为隐式Intent。说明:Android系统使用IntentFilter  来寻找与隐式Intent相关的对象。<intent-f...

  • 【转】Android理解:显式和隐式Intent---- try catch

    时间:2023-08-27 21:54:51

    原文网址:http://blog.csdn.net/xiao__gui/article/details/11392987Intent是Android初学者比较难理解的一个东西。我这里以通俗易懂的语言和通俗易懂的代码,让初学者简单感受一下Intent。intent就是意图的意思。Intent分两种:显...

  • 【转】Android中intent传递对象和Bundle的用法

    时间:2023-08-18 18:33:26

    原文网址:http://blog.csdn.net/lixiang0522/article/details/8642202android中的组件间传递的对象一般实现Parcelable接口,当然也可以使用java的Serializable接口,前者是android专门设计的,效率更高,下面我们就来实...

  • 使用Intent在活动之间穿梭

    时间:2023-07-12 18:33:08

    使用Intent在活动之间穿梭1.在com.example.activitytest中创建第二个活动SecondActivity:/** * 第二个活动 */public class SecondActivity extends AppCompatActivity { @Override ...

  • Understand User's Intent from Speech and Text

    时间:2023-07-02 17:25:25

    http://research.microsoft.com/en-us/projects/IntentUnderstanding/Understanding what users like to do/need to get is critical in human computer interac...

  • Android开发之通过Intent启动其他App的Service

    时间:2023-06-05 12:09:50

    在Android5.0以前可以通过隐式Intent方式启动其他App的Service,就跟Activity启动隐式Intent一样的。但是在5.0以后,只能使用显示的Intent方式启动了。启动其他App的Service,需要用到Intent的setComponent()方法。该方法需要传入Comp...

  • Android 消息广播Intent传递数据

    时间:2023-04-21 22:01:56

    1.创建布局文件activity_broadcast.xml<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com...

  • Android学习笔记(三)——初探Intent

    时间:2023-03-26 23:54:26

    //此系列博文是《第一行Android代码》的学习笔记,如有错漏,欢迎指正!Intent 是 Android 程序中各组件之间进行交互的一种重要方式,它不仅可以指明当前组件想要执行的动作,还可以在不同组件之间传递数据。Intent 一般可被用于启动活动、启动服务、以及发送广播等场景。Intent的用...

  • Android开发之Intent跳转到系统应用中的拨号界面、联系人界面、短信界面

    时间:2023-03-14 21:03:08

    现在开发中的功能需要直接跳转到拨号、联系人、短信界面等等,查找了很多资料,自己整理了一下。1、跳转到拨号界面,代码如下:1)直接拨打IntentintentPhone = new Intent(Intent.ACTION_CALL,Uri.parse("tel:" +phoneNumber));st...