Giter VIP home page Giter VIP logo

memeify's Introduction

Memeify

A RayWenderlich Android Project for practicing Intent with Kotlin

Implicit Intents

  • informs Android taht it needs an app to handle the intent's actoin when it starts. - The Android system then compares the given intent against all apps installed on the device to see which ones can handle that action,
  • process the intent (if more than one can handle the intent, the user is prompt to choose one)

Implicit Intent: MediaStore.ACTION_IMAGE_CAPTURE

It's used to retrieve image data captured from camera.

Explicit Intents

Compared to implicit intents, explicit intents are a lot more conservative.

  • describes a specific component that will be created and used
  • typically used for transferring 'explicit' data to another activity

Handling Intents

  • For Uri, uses intent.getParcelable<Uri>(TAG)
  • For Int, uses intent.getIntExtra(TAG, defaultValue)

Broadcast Intents

val mediaScanIntent = Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE)
mediaScanIntent.data = Uri.fromFile(imageFile)
sendBroadcast(mediaScanIntent)
  • uses ACTION_MEDIA_SCANNER_SCAN_FILE action to attach data (in a form of a Uri) to save image files to your local Android file system

Intent Filtering

  • Add intent-filter tag into your AndroidManifest.xml for Android to be able to do different ACTION outside of App.
  • For instance, this app uses ACTION_SEND action to get images directly from Photo/Gallery app

memeify's People

Contributors

chanhi2000 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.