[JAVA] I want to var_dump the contents of the intent

Thing you want to do

You may receive results from apps elsewhere. The result of reading QR and NFC.

In such a case, most write the process in ╩╗onNewIntent (Intent intent)`.

By the way, there was a situation where I wanted to check the contents of this Intent.

I decided to do my best thinking that PHP could be issued with var_dump.

answer

public var_dump(Intent intent) {
    Bundle extras = intent.getExtras();
    if (extras != null && !extras.isEmpty()) {
        System.out.println("+ Bundle.toString: " + extras.toString() + "");

        for (final String key : extras.keySet()) {
            System.out.println("+ Key Name: " + key + "");
            System.out.println("+ toString: " + extras.get(key).toString() + "");
        }
    }
}

Recommended Posts

I want to var_dump the contents of the intent
I want to be aware of the contents of variables!
I want to output the day of the week
I want to know the answer of the rock-paper-scissors app
I want to display the name of the poster of the comment
I want to return the scroll position of UITableView!
I want to see the contents of Request without saying four or five
I want to change the log output settings of UtilLoggingJdbcLogger
I want to narrow down the display of docker ps
[Ruby] I want to reverse the order of the hash table
I want to temporarily disable the swipe gesture of UIPageViewController
I want to understand the flow of Spring processing request parameters
The story of Collectors.groupingBy that I want to keep for posterity
I want to limit the input by narrowing the range of numbers
I want to control the default error message of Spring Boot
I want to change the value of Attribute in Selenium of Ruby
I want to get a list of the contents of a zip file and its uncompressed size
I want to recreate the contents of assets from scratch in the environment built with capistrano
Customize how to divide the contents of Recyclerview
I want to display the number of orders for today using datetime.
I want to know the JSP of the open portlet when developing Liferay
[Ruby] I want to extract only the value of the hash and only the key
I want to pass the argument of Annotation and the argument of the calling method to aspect
I want to truncate after the decimal point
I want to get the field name of the [Java] field. (Old tale tone)
I want you to use Enum # name () for the Key of SharedPreference
After all I wanted to preview the contents of mysql with Docker ...
I want to get the value in Ruby
I want to get the value of Cell transparently regardless of CellType (Apache POI)
I want to control the start / stop of servers and databases with Alexa
I want to separate the handling of call results according to the API caller (call trigger)
I managed to get a blank when I brought the contents of Beans to the textarea
I want to recursively get the superclass and interface of a certain class
I want to call a method of another class
[Java] I want to calculate the difference from the date
I want to embed any TraceId in the log
I was addicted to the record of the associated model
I tried to summarize the state transition of docker
05. I tried to stub the source of Spring Boot
I want to judge the range using the monthly degree
I tried to reduce the capacity of Spring Boot
I want to dark mode with the SWT app
I want to call the main method using reflection
[Rails] How to get the contents of strong parameters
Java: Use Stream to sort the contents of the collection
[Rough commentary] I want to marry the pluck method
I want to simplify the log output on Android
I want to add a delete function to the comment function
I want to convert characters ...
[Ruby] I want to make a program that displays today's day of the week!
Rails The concept of view componentization of Rails that I want to convey to those who want to quit
Understand while reading the article! Summary of contents that Elasticsearch beginners want to suppress
[Active Admin] I want to specify the scope of the collection to be displayed in select_box
[Rails] I want to display the link destination of link_to in a separate tab
I want to reduce the number of unnecessary queries. From considering counter_cache to introducing counter_culture.
[Beginner] I want to modify the migration file-How to use rollback-
I took a peek at the contents of Java's HashMap
I want to set the conditions to be displayed in collection_check_boxes
[Rails] [bootstrap] I want to change the font size responsively
I tried to summarize the basics of kotlin and java
(┬┤-`) .. oO (I want to easily find the standard output "Hello".