কার্যকলাপ
সর্বশেষ আপডেট | স্থিতিশীল রিলিজ | রিলিজ প্রার্থী | বিটা রিলিজ | আলফা রিলিজ |
---|---|---|---|---|
২২ অক্টোবর, ২০২৫ | ১.১১.০ | - | ১.১২.০-বিটা০১ | - |
নির্ভরতা ঘোষণা করা
Activity-এর উপর নির্ভরতা যোগ করতে, আপনার প্রোজেক্টে Google Maven রিপোজিটরি যোগ করতে হবে। আরও তথ্যের জন্য Google-এর Maven রিপোজিটরি পড়ুন।
আপনার অ্যাপ বা মডিউলের জন্য build.gradle
ফাইলে আপনার প্রয়োজনীয় আর্টিফ্যাক্টের জন্য নির্ভরতা যোগ করুন:
গ্রোভি
dependencies { def activity_version = "1.11.0" // Java language implementation implementation "androidx.activity:activity:$activity_version" // Kotlin implementation "androidx.activity:activity-ktx:$activity_version" }
কোটলিন
dependencies { val activity_version = "1.11.0" // Java language implementation implementation("androidx.activity:activity:$activity_version") // Kotlin implementation("androidx.activity:activity-ktx:$activity_version") }
নির্ভরতা সম্পর্কে আরও তথ্যের জন্য, বিল্ড নির্ভরতা যোগ করুন দেখুন।
প্রতিক্রিয়া
আপনার মতামত জেটপ্যাককে আরও উন্নত করতে সাহায্য করবে। আপনি যদি নতুন সমস্যা আবিষ্কার করেন অথবা এই লাইব্রেরি উন্নত করার জন্য কোন ধারণা থাকে তাহলে আমাদের জানান। নতুন একটি তৈরি করার আগে দয়া করে এই লাইব্রেরিতে বিদ্যমান সমস্যাগুলি একবার দেখে নিন। আপনি তারকা বোতামে ক্লিক করে বিদ্যমান সমস্যাটিতে আপনার ভোট যোগ করতে পারেন।
আরও তথ্যের জন্য ইস্যু ট্র্যাকার ডকুমেন্টেশন দেখুন।
সংস্করণ 1.12
সংস্করণ 1.12.0-beta01
২২ অক্টোবর, ২০২৫
androidx.activity:activity:1.12.0-beta01
, androidx.activity:activity-compose:1.12.0-beta01
, এবং androidx.activity:activity-ktx:1.12.0-beta01
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-beta01-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
- রানটাইম আচরণ পরিবর্তন এবং মাইগ্রেশন পরিচালনার জন্য পরীক্ষামূলক
ActivityFlags
API চালু করুন। প্রথম ফ্ল্যাগটিOnBackPressedCallback
জন্য স্থিতিশীল ক্রম সক্ষম করে, যা জীবনচক্রের পরিবর্তনগুলিতে ব্যাক নেভিগেশনকে আরও পূর্বাভাসযোগ্য করে তোলে। ডেভেলপাররাActivityFlags.isOnBackPressedLifecycleOrderMaintained = false
সেট করে অপ্ট আউট করতে পারেন। ( I06bdf , Id08bb , I439aa , b/422730945 , b/450533622 )
নির্ভরতা আপডেট
- জীবনচক্র নির্ভরতা 2.9.4 ( Ic9fb2 ) তে আপডেট করুন
সংস্করণ 1.12.0-alpha09
২৪ সেপ্টেম্বর, ২০২৫
androidx.activity:activity:1.12.0-alpha09
, androidx.activity:activity-compose:1.12.0-alpha09
, এবং androidx.activity:activity-ktx:1.12.0-alpha09
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha09-এ এই কমিটগুলি রয়েছে।
নির্ভরতা পরিবর্তন
- কার্যকলাপ এখন নেভিগেশন ইভেন্ট 1.0.0-alpha08 এর উপর নির্ভর করে।
সংস্করণ 1.12.0-alpha08
১০ সেপ্টেম্বর, ২০২৫
androidx.activity:activity:1.12.0-alpha08
, androidx.activity:activity-compose:1.12.0-alpha08
, এবং androidx.activity:activity-ktx:1.12.0-alpha08
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha08-এ এই কমিটগুলি রয়েছে।
নির্ভরতা আপডেট
- কার্যকলাপ এখন নেভিগেশন ইভেন্ট 1.0.0-alpha08 এর উপর নির্ভর করে।
সংস্করণ 1.12.0-alpha07
২৭ আগস্ট, ২০২৫
androidx.activity:activity:1.12.0-alpha07
, androidx.activity:activity-compose:1.12.0-alpha07
, এবং androidx.activity:activity-ktx:1.12.0-alpha07
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha07-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- API 35-এ
EdgeToEdge
সাথে একটি সমস্যা সমাধান করা হয়েছে যেখানে অদৃশ্য দৃশ্যের কারণে অপ্রত্যাশিত পরিমাপ ইনসেট তৈরি হয়েছিল। ( If49ff )
নির্ভরতা আপডেট
- কার্যকলাপ এখন নেভিগেশন ইভেন্ট
1.0.0-alpha07
উপর নির্ভর করে।
সংস্করণ 1.12.0-alpha06
১৩ আগস্ট, ২০২৫
androidx.activity:activity:1.12.0-alpha06
, androidx.activity:activity-compose:1.12.0-alpha06
, এবং androidx.activity:activity-ktx:1.12.0-alpha06
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha06-এ এই কমিটগুলি রয়েছে।
MinSdk আপডেট
- AndroidX এর জন্য ডিফল্ট
minSdk
API 21 থেকে API 23 তে স্থানান্তরিত হয়েছে ( Ibdfca , b/380448311 , b/435705964 , b/435705223 )
ডকুমেন্টেশন আপডেট
-
PredictiveBackHandler
জন্য KDocs আপডেট করা হয়েছে যাতে একটি পরিচিত টাইমিং সমস্যা সমাধান করা যায় যেখানে এটি একই ফ্রেমে একটি অঙ্গভঙ্গি প্রক্রিয়া করতে পারে যেখানে এটি অক্ষম করা আছে। ( I5be5c , b/431534103 ) -
BackHandler
এবংPredictiveBackHandler
জন্য KDocs আপডেট করা হয়েছে যাতে 'শেষ কম্পোজ করা জয়' আচরণ স্পষ্টভাবে উল্লেখ করা যায় এবংenabled
ফ্ল্যাগের সাথে নিঃশর্ত রচনার সুপারিশ করা হয়। ( I7ab94 )
নির্ভরতা আপডেট
- কার্যকলাপ এখন নেভিগেশন ইভেন্ট
1.0.0-alpha06
উপর নির্ভর করে।
সংস্করণ 1.12.0-alpha05
৩০ জুলাই, ২০২৫
androidx.activity:activity:1.12.0-alpha05
, androidx.activity:activity-compose:1.12.0-alpha05
, এবং androidx.activity:activity-ktx:1.12.0-alpha05
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha05-এ এই কমিটগুলি রয়েছে।
নির্ভরতা আপডেট
- কার্যকলাপ এখন নেভিগেশন ইভেন্ট
1.0.0-alpha05
উপর নির্ভর করে।
সংস্করণ 1.12.0-alpha04
২ জুলাই, ২০২৫
androidx.activity:activity:1.12.0-alpha04
, androidx.activity:activity-compose:1.12.0-alpha04
, এবং androidx.activity:activity-ktx:1.12.0-alpha04
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha04-এ এই কমিটগুলি রয়েছে।
নির্ভরতা পরিবর্তন
- কার্যকলাপ এখন NavigationEvent Alpha04 এর উপর নির্ভর করে
সংস্করণ 1.12.0-alpha03
১৮ জুন, ২০২৫
androidx.activity:activity:1.12.0-alpha03
, androidx.activity:activity-compose:1.12.0-alpha03
, এবং androidx.activity:activity-ktx:1.12.0-alpha03
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha03-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
ComponentActivity
তেOnBackPressedDispatcher
এবংNavigationEventDispatcher
উভয়ই এখন অলসভাবে শুরু করা হয়েছে। ( I710e6 )OnBackPressedDistpatcher
এর সাথে নিম্নলিখিত সমস্যাগুলির সমাধান করা হয়েছে:- শুধুমাত্র সর্বশেষ ডিসপ্যাচার একটি
OnBackPressedCallback
যোগ করা হয়েছে যাতে এটির সক্রিয় অবস্থা সম্পর্কে অবহিত করা হয় ( b/418715930 ) -
OnBackPressedDispatcher
addCallback
ফাংশন ব্যবহার করার সময় ভুল কলব্যাকটি সরিয়ে দেয় যা একটি জীবনচক্র নেয়। ( b/422714753 ) -
OnBackPressedDispatcher.remove()
একটি নিবন্ধিতOnBackPressedCallback
এর সমস্ত উদাহরণ মুছে ফেলে না। ( b/423024414 )
- শুধুমাত্র সর্বশেষ ডিসপ্যাচার একটি
সংস্করণ 1.12.0-alpha02
৪ জুন, ২০২৫
androidx.activity:activity:1.12.0-alpha02
, androidx.activity:activity-compose:1.12.0-alpha02
, এবং androidx.activity:activity-ktx:1.12.0-alpha02
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha02-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- NavigationEvent
1.0.0-alpha02
থেকে:NavigationEventCallback.remove()
কল করার সময় ক্লোজেবলের অভ্যন্তরীণ তালিকা একই সাথে পরিবর্তন করার কারণে ঘটতে পারে এমন একটিConcurrentModificationException
ঠিক করা হয়েছে। ( I63066 )
সংস্করণ 1.12.0-alpha01
২০ মে, ২০২৫
androidx.activity:activity:1.12.0-alpha01
, androidx.activity:activity-compose:1.12.0-alpha01
, এবং androidx.activity:activity-ktx:1.12.0-alpha01
প্রকাশিত হয়েছে। সংস্করণ 1.12.0-alpha01-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
-
ComponentActivity
এবংComponentDialog
NavigationEventDispatcherOwner
API এর মাধ্যমে NavigationEvent1.0.0-alpha01
এর সাথে একীভূত করা হয়েছে। আপনি এখনnavigationEventDispatcher
ক্ষেত্রের মাধ্যমে আপনারComponentActivity
থেকে একটিNavigationEventDispatcher
পুনরুদ্ধার করতে পারেন। যেহেতুOnBackPressedDispatcher
নতুন লাইব্রেরির উপরে পুনরায় লেখা হয়েছে, তাই পূর্ববর্তী সমস্ত ব্যবহার সঠিকভাবে কাজ করা চালিয়ে যাওয়া উচিত। আপনারNavigationEventDispatcher
এবংNavigationEventCallback
ব্যবহার করা উচিত। ( Ib8eed , I6cc44 , Ib7724 , I9a0f7 , b/412597031 , b/415028038 , b/412596729 , b/412597140 , b/412596012 )
সংস্করণ 1.11
সংস্করণ 1.11.0
১০ সেপ্টেম্বর, ২০২৫
androidx.activity:activity:1.11.0
, androidx.activity:activity-compose:1.11.0
, এবং androidx.activity:activity-ktx:1.11.0
প্রকাশিত হয়েছে। সংস্করণ 1.11.0-এ এই কমিটগুলি রয়েছে।
১.১০.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি:
-
PickVisualMediaRequest
এMediaCapabilities
API যোগ করা হয়েছে যাতে অ্যাপ্লিকেশনগুলিকে তাদের মিডিয়া ক্ষমতা, যেমন সমর্থিত HDR প্রকারগুলি নির্দিষ্ট করতে দেওয়া যায়। - কার্যকলাপ এখন API 36 দিয়ে কম্পাইল করা হয়েছে।
সংস্করণ 1.11.0-rc01
২৩ এপ্রিল, ২০২৫
androidx.activity:activity:1.11.0-rc01
, androidx.activity:activity-compose:1.11.0-rc01
, এবং androidx.activity:activity-ktx:1.11.0-rc01
প্রকাশিত হয়েছে। সংস্করণ 1.11.0-rc01-এ এই কমিটগুলি রয়েছে।
সংস্করণ 1.11.0-beta01
৯ এপ্রিল, ২০২৫
androidx.activity:activity:1.11.0-beta01
, androidx.activity:activity-compose:1.11.0-beta01
, এবং androidx.activity:activity-ktx:1.11.0-beta01
প্রকাশিত হয়েছে। সংস্করণ 1.11.0-beta01-এ এই কমিটগুলি রয়েছে।
সংস্করণ 1.11.0-alpha02
২৬ মার্চ, ২০২৫
androidx.activity:activity:1.11.0-alpha02
, androidx.activity:activity-compose:1.11.0-alpha02
, এবং androidx.activity:activity-ktx:1.11.0-alpha02
প্রকাশিত হয়েছে। সংস্করণ 1.11.0-alpha02-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
-
OnBackPressedCallback
এরhandleOnBackStarted
এবংhandleOnBackProgressed
ফাংশন দ্বারা প্রদত্তBackEventCompat
এ Android 16 Beta03 থেকে নতুনEDGE_NONE
এবংframeTimeMillis
ইন্টিগ্রেটেড করা হয়েছে।
নির্ভরতা আপডেট
- কার্যকলাপ এখন API 36 দিয়ে কম্পাইল করা হয়েছে। ( I510e8 , b/301910674 )
সংস্করণ 1.11.0-alpha01
১২ মার্চ, ২০২৫
androidx.activity:activity:1.11.0-alpha01
, androidx.activity:activity-compose:1.11.0-alpha01
, এবং androidx.activity:activity-ktx:1.11.0-alpha01
প্রকাশিত হয়েছে। সংস্করণ 1.11.0-alpha01-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
-
PickVisualMediaRequest
এMediaCapabilities
API যোগ করা হয়েছে যাতে অ্যাপ্লিকেশনগুলিকে তাদের মিডিয়া ক্ষমতা, যেমন সমর্থিত HDR প্রকারগুলি নির্দিষ্ট করতে দেওয়া যায়। ( Ic3ee7 )
সংস্করণ 1.10
সংস্করণ 1.10.1
২৬ ফেব্রুয়ারী, ২০২৫
androidx.activity:activity:1.10.1
, androidx.activity:activity-compose:1.10.1
, এবং androidx.activity:activity-ktx:1.10.1
প্রকাশিত হয়েছে। সংস্করণ 1.10.1-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
ViewTree
OnBackPressedDispatcherOwners
এবংFullyDrawnReporterOwners
এখনViewOverlay
এর মতো ভিউয়ের ডিসজয়েন্ট প্যারেন্টের মাধ্যমে সমাধান করা যেতে পারে। ডিসজয়েন্ট ভিউ প্যারেন্ট সম্পর্কে আরও তথ্যের জন্য core এর রিলিজ নোট অথবাViewTree.setViewTreeDisjointParent
এর ডকুমেন্টেশন দেখুন। ( Ie7750 )
সংস্করণ 1.10.0
১৫ জানুয়ারী, ২০২৫
androidx.activity:activity:1.10.0
, androidx.activity:activity-compose:1.10.0
, এবং androidx.activity:activity-ktx:1.10.0
প্রকাশিত হয়েছে। সংস্করণ 1.10.0-এ এই কমিটগুলি রয়েছে।
১.৯.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
-
PhotoPicker
এখন ছবিগুলিকে ক্রমানুসারে বাছাই করার এবং কোন ট্যাবটি (অ্যালবাম অথবা ছবি) প্রাথমিকভাবে দৃশ্যমান হবে তা বেছে নেওয়ার অনুমতি দেয়। -
PickVisualMedia
এবংPickMultipleVisualMedia
Activity Result চুক্তি যা ফটো পিকারকে ট্রিগার করে, সেগুলি আর সরাসরি Google Play পরিষেবাগুলিতে অর্পণ করে না যদি সিস্টেম ফটো পিকার উপলব্ধ না থাকে, বরং OEM এবং সিস্টেম অ্যাপগুলিকে একটি ধারাবাহিক ফটো পিকার অভিজ্ঞতা প্রদানের জন্য সর্বজনীনACTION_SYSTEM_FALLBACK_PICK_IMAGES
অ্যাকশন এবং সম্পর্কিত অতিরিক্ত বৈশিষ্ট্যগুলি ব্যবহার করে। - নতুন
LocalActivity
কম্পোজিশন local যা বর্তমান স্কোপের জন্যActivity
প্রদান করে, ডেভেলপারদেরLocalContext
থেকেActivity
পাওয়ার প্রয়োজন দূর করে।
সংস্করণ 1.10.0-rc01
১১ ডিসেম্বর, ২০২৪
androidx.activity:activity:1.10.0-rc01
, androidx.activity:activity-compose:1.10.0-rc01
, এবং androidx.activity:activity-ktx:1.10.0-rc01
প্রকাশিত হয়েছে। সংস্করণ 1.10.0-rc01-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
PredictiveBackHandler
বর্তমানে সক্রিয় থাকাকালীন সক্রিয় অবস্থা পরিবর্তন করলে কলব্যাকটি তাৎক্ষণিকভাবে শর্ট সার্কিট হতে পারে এমন একটি সমস্যা সমাধান করা হয়েছে। সক্রিয় অবস্থা পরিবর্তন না করেই এটি এখন বর্তমান কলব্যাকটি শেষ করবে। ( Ib8719 )
সংস্করণ 1.10.0-beta01
১৩ নভেম্বর, ২০২৪
androidx.activity:activity:1.10.0-beta01
, androidx.activity:activity-compose:1.10.0-beta01
, এবং androidx.activity:activity-ktx:1.10.0-beta01
শেষ আলফা থেকে কোনও পরিবর্তন ছাড়াই প্রকাশিত হয়েছে। সংস্করণ 1.10.0-beta01-এ এই কমিটগুলি রয়েছে।
সংস্করণ 1.10.0-alpha03
৩০ অক্টোবর, ২০২৪
androidx.activity:activity:1.10.0-alpha03
, androidx.activity:activity-compose:1.10.0-alpha03
, এবং androidx.activity:activity-ktx:1.10.0-alpha03
প্রকাশিত হয়েছে। সংস্করণ 1.10.0-alpha03-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
- একটি নতুন
LocalActivity
কম্পোজিশন local যোগ করা হয়েছে যা বর্তমান স্কোপের জন্যActivity
প্রদান করে, যার ফলে ডেভেলপারদেরLocalContext
থেকেActivity
নেওয়ার প্রয়োজন হয় না। এটি একটি নতুন লিন্ট নিয়মের সাথেও আসে যাLocalContext
ভুলভাবেActivity
তে কাস্ট করা হচ্ছে কিনা তা পরীক্ষা করে। ( I7746a , b/283009666 )
বাগ ফিক্স
- অ্যাক্টিভিটি
1.9.3
থেকে: হ্যান্ডলারটি নিষ্ক্রিয় করার পরেPredictiveBackHandler
আর তার কলব্যাক চালু করবে না। এটি একটি সমস্যার সমাধান করবে যেখানে Navigation Compose থেকেNavHost
একটিIndexOutOfBoundsException
নিক্ষেপ করবে। ( I3f75e , b/365027664 , b/340202286 )
নির্ভরতা আপডেট
- অ্যাক্টিভিটি কম্পোজ এখন কম্পোজ রানটাইম 1.7.0 ( I7746a , b/283009666 ) এর উপর নির্ভর করে।
সংস্করণ 1.10.0-alpha02
৪ সেপ্টেম্বর, ২০২৪
androidx.activity:activity:1.10.0-alpha02
, androidx.activity:activity-compose:1.10.0-alpha02
, এবং androidx.activity:activity-ktx:1.10.0-alpha02
প্রকাশিত হয়েছে। সংস্করণ 1.10.0-alpha02-এ এই কমিটগুলি রয়েছে।
আচরণগত পরিবর্তন
-
PickVisualMedia
এবংPickMultipleVisualMedia
Activity Result চুক্তি যা ফটো পিকারকে ট্রিগার করে, সেগুলি আর সরাসরি Google Play পরিষেবাগুলিতে অর্পণ করে না যদি সিস্টেম ফটো পিকার উপলব্ধ না থাকে, বরং OEM এবং সিস্টেম অ্যাপগুলিকে একটি ধারাবাহিক ফটো পিকার অভিজ্ঞতা প্রদানের জন্য সর্বজনীনACTION_SYSTEM_FALLBACK_PICK_IMAGES
অ্যাকশন এবং সম্পর্কিত অতিরিক্ত বৈশিষ্ট্যগুলি ব্যবহার করে। Google Play পরিষেবার সাম্প্রতিক সংস্করণ রয়েছে এমন ডিভাইসগুলির ব্যবহারকারীর অভিজ্ঞতার উপর এর কোনও প্রভাব পড়ার কথা নয়। ( I3513d )
বাগ ফিক্স
- নতুন প্ল্যাটফর্ম API-তে অ্যাক্সেসের ম্যানুয়াল রূপরেখা সরানো হয়েছে কারণ এটি AGP 7.3 বা তার পরবর্তী সংস্করণ (যেমন R8 সংস্করণ 3.3) ব্যবহার করার সময় এবং AGP 8.1 বা তার পরবর্তী সংস্করণ (যেমন D8 সংস্করণ 8.1) ব্যবহার করার সময় সমস্ত বিল্ডের জন্য API মডেলিংয়ের মাধ্যমে স্বয়ংক্রিয়ভাবে ঘটে। AGP ব্যবহার না করা ক্লায়েন্টদের D8 সংস্করণ 8.1 বা তার পরবর্তী সংস্করণে আপডেট করার পরামর্শ দেওয়া হচ্ছে। আরও বিস্তারিত জানার জন্য এই নিবন্ধটি দেখুন। ( I9496c , b/345472586 )
- অ্যাক্টিভিটি
1.9.2
থেকে: অ্যাক্টিভিটি কম্পোজPredictiveBackHandler
API যে ফ্রেমটি অক্ষম ছিল সেখানে সিস্টেম ব্যাক জেসচার পরিচালনা করতে পারত এমন একটি সমস্যা সমাধান করা হয়েছে, যার ফলে নেভিগেশন কম্পোজের মতো লাইব্রেরিগুলি খালি ব্যাক স্ট্যাক থাকা সত্ত্বেও পরিচালনা করতে পারত, যার ফলে এটি একটিIndexOutOfBoundsException
ফেলে দিতে পারে। ( Ie3301 , b/340202286 ) - অ্যাক্টিভিটি
1.9.1
থেকে:PredictiveBackHandler
একটি সমস্যা সমাধান করা হয়েছে যেখানে সিস্টেম ব্যাক করার পরে,OnBackPressedDispatcher
থেকেonBackPressed
করার চেষ্টা ব্যর্থ হত। ( I5f1f8 )
সংস্করণ 1.10.0-alpha01
২৬ জুন, ২০২৪
androidx.activity:activity:1.10.0-alpha01
, androidx.activity:activity-compose:1.10.0-alpha01
, এবং androidx.activity:activity-ktx:1.10.0-alpha01
প্রকাশিত হয়েছে। এই সংস্করণটি একটি অভ্যন্তরীণ শাখায় তৈরি করা হয়েছে।
নতুন বৈশিষ্ট্য
- অ্যান্ড্রয়েড ভি-তে নতুন
PhotoPicker
বৈশিষ্ট্যগুলির জন্য সমর্থন যোগ করা হয়েছে যার মধ্যে রয়েছে ক্রমানুসারে ছবি বাছাই করা এবং কোন ট্যাব (অ্যালবাম বা ছবি) প্রাথমিকভাবে দৃশ্যমান হবে তা বেছে নেওয়া।
সংস্করণ 1.9
সংস্করণ 1.9.3
১৬ অক্টোবর, ২০২৪
androidx.activity:activity:1.9.3
, androidx.activity:activity-compose:1.9.3
, এবং androidx.activity:activity-ktx:1.9.3
প্রকাশিত হয়েছে। সংস্করণ 1.9.3-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- হ্যান্ডলারটি নিষ্ক্রিয় করার পরে
PredictiveBackHandler
আর তার কলব্যাক চালু করবে না। এটি Navigation Compose থেকেNavHost
এরIndexOutOfBoundsException
নিক্ষেপের সমস্যা সমাধান করবে। ( I3f75e , b/340202286 )
সংস্করণ 1.9.2
৪ সেপ্টেম্বর, ২০২৪
androidx.activity:activity:1.9.2
, androidx.activity:activity-compose:1.9.2
, এবং androidx.activity:activity-ktx:1.9.2
প্রকাশিত হয়েছে। সংস্করণ 1.9.2-এ এই lthcocommits রয়েছে।
বাগ ফিক্স
- একটি সমস্যা সমাধান করা হয়েছে যেখানে Activity Compose
PredictiveBackHandler
API অক্ষম করা ফ্রেমে সিস্টেম ব্যাক জেসচার পরিচালনা করতে থাকবে, যার ফলে Navigation Compose এর মতো লাইব্রেরিগুলি খালি ব্যাক স্ট্যাক থাকা সত্ত্বেও পরিচালনা করতে পারে, যার ফলে এটিIndexOutOfBoundsException
নিক্ষেপ করতে পারে। ( Ie3301 , b/340202286 )
সংস্করণ 1.9.1
২৪ জুলাই, ২০২৪
androidx.activity:activity:1.9.1
, androidx.activity:activity-compose:1.9.1
, এবং androidx.activity:activity-ktx:1.9.1
প্রকাশিত হয়েছে। সংস্করণ 1.9.1-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
PredictiveBackHandler
এর সাথে একটি সমস্যা সমাধান করা হয়েছে যেখানে সিস্টেম ব্যাক করার পরে,OnBackPressedDispatcher
থেকেonBackPressed
করার চেষ্টা ব্যর্থ হত। ( I5f1f8 )
সংস্করণ 1.9.0
১৭ এপ্রিল, ২০২৪
androidx.activity:activity:1.9.0
, androidx.activity:activity-compose:1.9.0
, এবং androidx.activity:activity-ktx:1.9.0
প্রকাশিত হয়েছে। সংস্করণ 1.9.0-এ এই কমিটগুলি রয়েছে।
১.৮.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
-
ComponentActivity
এখনOnUserLeaveHintProvider
প্রয়োগ করে যাতেonUserLeaveHint
ইভেন্টের জন্য কম্পোনেন্টগুলিকে কলব্যাক করার অনুমতি দেওয়া হয়। -
OnBackPressedCallback
,BackHandler
, এবংPredictiveBackHandler
API গুলি এখনonBackPressedDispatcher.onBackPressed()
কল করার সময় সতর্ক করে, কারণ এটি সর্বদা Predictev Back অ্যানিমেশন ভঙ্গ করবে। আরও বিস্তারিত জানার জন্য সেরা অনুশীলন নির্দেশিকা দেখুন। - বাকি Activity API গুলি Kotlin-এ পুনর্লিখন করা হয়েছে এবং
activity-ktx
এ পূর্বে উপলব্ধ সমস্ত এক্সটেনশনactivity
এ স্থানান্তরিত করা হয়েছে।activity-ktx
এখন সম্পূর্ণ খালি।-
ActivityResultLauncher
কে Kotlin এ রূপান্তরের অংশ হিসেবে,getContract
পদ্ধতিটি এখন একটি বিমূর্ত Kotlin সম্পত্তি। এটি একটি বাইনারি সামঞ্জস্যপূর্ণ পরিবর্তন, তবে যদি আপনারActivityResultLauncher
বাস্তবায়ন Kotlin এ লেখা থাকে তবে এটি সোর্স ব্রেকিং।
-
সংস্করণ 1.9.0-rc01
৩ এপ্রিল, ২০২৪
androidx.activity:activity:1.9.0-rc01
, androidx.activity:activity-compose:1.9.0-rc01
, এবং androidx.activity:activity-ktx:1.9.0-rc01
প্রকাশিত হয়েছে। সংস্করণ 1.9.0-rc01-এ এই কমিটগুলি রয়েছে।
নির্ভরতা আপডেট
- কার্যকলাপ এখন প্রোফাইল ইনস্টলার 1.3.1 এর উপর নির্ভর করে।
সংস্করণ 1.9.0-beta01
২০ মার্চ, ২০২৪
androidx.activity:activity:1.9.0-beta01
, androidx.activity:activity-compose:1.9.0-beta01
, এবং androidx.activity:activity-ktx:1.9.0-beta01
প্রকাশিত হয়েছে। সংস্করণ 1.9.0-beta01-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
- Activity
1.9.0-alpha02
এ Activity তৈরির সময়OnBackPressedDispatcher
কল করার ফলে সৃষ্ট একটি Activity স্টার্টআপ পারফরম্যান্স রিগ্রেশন ঠিক করা হয়েছে। ( Ie75e3 )
সংস্করণ 1.9.0-alpha03
৭ ফেব্রুয়ারী, ২০২৪
androidx.activity:activity:1.9.0-alpha03
, androidx.activity:activity-compose:1.9.0-alpha03
, এবং androidx.activity:activity-ktx:1.9.0-alpha03
প্রকাশিত হয়েছে। সংস্করণ 1.9.0-alpha03-এ এই কমিটগুলি রয়েছে।
লিন্ট সতর্কতা
-
OnBackPressedCallback
,BackHandler
, এবংPredictiveBackHandler
API গুলি এখনonBackPressedDispatcher.onBackPressed()
কল করার সময় ব্যাক হ্যান্ডেল করার সময় সতর্ক করে কারণ এটি সর্বদা Predictev Back অ্যানিমেশন ভঙ্গ করবে। আরও বিস্তারিত জানার জন্য সেরা অনুশীলন নির্দেশিকা দেখুন। ( 1e4222 , 2c950d , b/287505200 )
বাগ ফিক্স
- যদি একটি চলমান প্রেডিক্টিভ ব্যাক জেসচারের সময় শুরু হওয়া সিস্টেম থেকে একটি ব্যাক ইভেন্ট পাঠানো হয়, তাহলে বর্তমানে চলমান প্রেডিক্টিভ ব্যাক জেসচার বাতিল হয়ে যায় এবং নতুন ব্যাক ইভেন্টটি একটি নতুন প্রেডিক্টিভ ব্যাক জেসচার শুরু করার দায়িত্ব নেয়। ( I3482e )
- প্রথমবারের মতো ব্যাকগ্রাউন্ড থ্রেড থেকে
ComponentActivity
থেকেonBackPressedDispatcher
অ্যাক্সেস করার সময় ক্র্যাশ ঠিক করা হয়েছে। এখন যেকোনো থ্রেডেonBackPressedDispatcher
অ্যাক্সেস করা নিরাপদ। ( I79955 )
সংস্করণ 1.9.0-alpha02
২৪ জানুয়ারী, ২০২৪
androidx.activity:activity:1.9.0-alpha02
, androidx.activity:activity-compose:1.9.0-alpha02
, এবং androidx.activity:activity-ktx:1.9.0-alpha02
প্রকাশিত হয়েছে। সংস্করণ 1.9.0-alpha02-এ এই কমিটগুলি রয়েছে।
কোটলিন রূপান্তর
- Kotlin-এ
ActivityResultRegistry
পুনর্লিখন করা হয়েছে। এটি নিশ্চিত করে যেregister
জন্য পাস করা চুক্তিতে জেনেরিকের বাতিলযোগ্যতা সঠিকভাবে আপনার কাছে ফেরত পাঠানোActivityResultLauncher
এ পাঠানো হবে। ( I121f0 ) -
ActivityResult
কে Kotlin এ পুনর্লিখন করা হয়েছে।ActivityResult
Kotlin এক্সটেনশনগুলি যাresultCode
এবংdata
ফিল্ডে ধ্বংসাত্মককরণ সমর্থন করে সেগুলিকেactivity-ktx
থেকেactivity
এ স্থানান্তরিত করা হয়েছে। ( I0565a ) -
ComponentActivity
এবংtrackPipAnimationHintView
এর জন্যby viewModels()
এর Kotlin এক্সটেনশনগুলিactivity-ktx
থেকেactivity
এ স্থানান্তরিত করা হয়েছে।activity-ktx
আর্টিফ্যাক্টটি এখন সম্পূর্ণ খালি। ( I0a444 )
বাগ ফিক্স
-
enableEdgeToEdge
API এখন যেকোনো ডিসপ্লে কাটআউটের চারপাশে কাজ করে। ( a3644b , b/311173461 ) - অ্যাক্টিভিটি
1.8.2
থেকে: ফটো পিকার অ্যাক্টিভিটি কন্ট্রাক্টেরACTION_SYSTEM_FALLBACK_PICK_IMAGES
এ পাস করা অতিরিক্ত সংশোধন করা হয়েছে যাতে এটিEXTRA_SYSTEM_FALLBACK_PICK_IMAGES_MAX
কী সঠিকভাবে পাস করতে পারে,"com.google.android.gms.provider.extra.PICK_IMAGES_MAX"
কী দিয়ে অতিরিক্ত ব্যবহার না করে। যদি আপনি এমন একজন OEM হন যিনি একটি সিস্টেম ফলব্যাক ফটো পিকার প্রয়োগ করেন তবে সর্বাধিক সামঞ্জস্য নিশ্চিত করার জন্য উভয় অতিরিক্ত সমর্থন করার জন্য এটি দৃঢ়ভাবে সুপারিশ করা হয়। ( I96a00 )
সংস্করণ 1.9.0-alpha01
২৯ নভেম্বর, ২০২৩
androidx.activity:activity:1.9.0-alpha01
, androidx.activity:activity-compose:1.9.0-alpha01
, এবং androidx.activity:activity-ktx:1.9.0-alpha01
প্রকাশিত হয়েছে। সংস্করণ 1.9.0-alpha01-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
-
ComponentActivity
এখনOnUserLeaveHintProvider
প্রয়োগ করে যাতেonUserLeaveHint
ইভেন্টের জন্য কম্পোনেন্টগুলিকে কলব্যাক করার অনুমতি দেওয়া হয়। ( I54892 )
API পরিবর্তনগুলি
-
ComponentActivity
কোটলিনে পুনর্লিখন করা হয়েছে। ( I14f31 ) -
ActivityResultCaller
কোটলিনে পুনর্লিখন করা হয়েছে। ( Ib02e4 ) -
ActivityResultLauncher
Kotlin এ পুনঃলিখন করা হয়েছে। সেই রূপান্তরের অংশ হিসেবে,getContract
পদ্ধতিটি এখন একটি বিমূর্ত Kotlin সম্পত্তি। এটি একটি বাইনারি সামঞ্জস্যপূর্ণ পরিবর্তন, তবে যদি আপনারActivityResultLauncher
বাস্তবায়ন Kotlin এ লেখা থাকে তবে এটি সোর্স ব্রেকিং হবে। ( Id4615 ) -
PickVisualMediaRequest
এখনPickVisualMedia
Activity Result চুক্তির মতোই ন্যূনতম API স্তর 19। ( Id6e21 )
নির্ভরতা আপডেট
- কার্যকলাপ এখন কোর
1.13.0-alpha01
এর উপর নির্ভর করে। ( I14f31 )
সংস্করণ 1.8
সংস্করণ 1.8.2
১৩ ডিসেম্বর, ২০২৩
androidx.activity:activity:1.8.2
, androidx.activity:activity-compose:1.8.2
, এবং androidx.activity:activity-ktx:1.8.2
প্রকাশিত হয়েছে। সংস্করণ 1.8.2-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
"com.google.android.gms.provider.extra.PICK_IMAGES_MAX"
কী দিয়ে অতিরিক্ত ব্যবহার না করে, ফটো পিকার অ্যাক্টিভিটি চুক্তিরACTION_SYSTEM_FALLBACK_PICK_IMAGES
এ পাস করা অতিরিক্তটি ঠিক করা হয়েছে যাতে এটি সঠিকভাবেEXTRA_SYSTEM_FALLBACK_PICK_IMAGES_MAX
কী পাস করতে পারে। যদি আপনি এমন একজন OEM হন যিনি একটি সিস্টেম ফলব্যাক ফটো পিকার প্রয়োগ করেন যা সর্বাধিক সামঞ্জস্য নিশ্চিত করার জন্য উভয় অতিরিক্ত সমর্থন করে, তাহলে এটি দৃঢ়ভাবে সুপারিশ করা হয়। ( I96a00 )
সংস্করণ 1.8.1
১৫ নভেম্বর, ২০২৩
androidx.activity:activity:1.8.1
, androidx.activity:activity-compose:1.8.1
, এবং androidx.activity:activity-ktx:1.8.1
প্রকাশিত হয়েছে। সংস্করণ 1.8.1-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
OnBackPressedDispatcher
এখন সঠিকOnBackPressedCallback
এ প্রেরণ করা চালিয়ে যাচ্ছে, এমনকি যখন ব্যাক জেসচার পরিচালনা করা হচ্ছে তখন একটি নতুনOnBackPressedCallback
যোগ করা হয়েছে। ( Id0ff6 )
সংস্করণ 1.8.0
৪ অক্টোবর, ২০২৩
androidx.activity:activity:1.8.0
, androidx.activity:activity-compose:1.8.0
, এবং androidx.activity:activity-ktx:1.8.0
প্রকাশিত হয়েছে। সংস্করণ 1.8.0-এ এই কমিটগুলি রয়েছে।
১.৭.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
- ভবিষ্যদ্বাণীমূলক ব্যাক -
OnBackPressedCallback
এখন ব্যাক জেসচার শুরু করার জন্য, পুরো জেসচার জুড়ে অগ্রগতি এবং ব্যাক জেসচার বাতিল করার জন্য নতুনPredictiveBackHandler
ব্যাক কলব্যাক অফার করে, যা পূর্ববর্তীhandleOnBackPressed()
কলব্যাকের পাশাপাশি অ্যাক্টিভিটি কম্পোজে ভবিষ্যদ্বাণীমূলক ব্যাক জেসচার ইভেন্টগুলি পরিচালনা করার জন্যও ব্যবহৃত হয়। এটি BackEventCompat অবজেক্টের একটি প্রবাহ প্রদান করে যা আপনার প্রদত্ত সাসপেন্ডিং ল্যাম্বায় সংগ্রহ করতে হবে:
PredictiveBackHandler { progress: Flow<BackEventCompat> ->
// code for gesture back started
try {
progress.collect { backEvent ->
// code for progress
}
// code for completion
} catch (e: CancellationException) {
// code for cancellation
}
}
ComponentActivity.onBackPressed()
এখন API গুলিকে হ্যান্ডেল করার জন্য অবচিত করা হয়েছে। ডেভেলপারদের এখন এই পদ্ধতিটি অগ্রাহ্য করার পরিবর্তে OnBackPressedDispatcher
ব্যবহার করা উচিত।
- EdgeToEdge -
ComponentActivity.enableEdgeToEdge()
যোগ করা হয়েছে যাতে সহজেই এজ-টু-এজ ডিসপ্লেকে ব্যাকওয়ার্ড-সামঞ্জস্যপূর্ণ পদ্ধতিতে সেট আপ করা যায়।
সংস্করণ 1.8.0-rc01
২০ সেপ্টেম্বর, ২০২৩
androidx.activity:activity:1.8.0-rc01
, androidx.activity:activity-compose:1.8.0-rc01
, এবং androidx.activity:activity-ktx:1.8.0-rc01
প্রকাশিত হয়েছে। সংস্করণ 1.8.0-rc01-এ এই কমিটগুলি রয়েছে।
সংস্করণ 1.8.0-beta01
৬ সেপ্টেম্বর, ২০২৩
androidx.activity:activity:1.8.0-beta01
, androidx.activity:activity-compose:1.8.0-beta01
, এবং androidx.activity:activity-ktx:1.8.0-beta01
প্রকাশিত হয়েছে। সংস্করণ 1.8.0-beta01-এ এই কমিটগুলি রয়েছে।
ডকুমেন্টেশন উন্নতি
-
BackEventCompat
এর ডকুমেন্টেশন উন্নত করা হয়েছে। ( aosp/2722254 )
সংস্করণ 1.8.0-alpha07
২৩ আগস্ট, ২০২৩
androidx.activity:activity:1.8.0-alpha07
, androidx.activity:activity-compose:1.8.0-alpha07
, এবং androidx.activity:activity-ktx:1.8.0-alpha07
প্রকাশিত হয়েছে। সংস্করণ 1.8.0-alpha07-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
অ্যাক্টিভিটি কম্পোজ ভবিষ্যদ্বাণীমূলক ব্যাক জেসচার ইভেন্টগুলি পরিচালনা করার জন্য একটি নতুন
PredictiveBackHandler
কম্পোজেবল যুক্ত করেছে। এটিBackEventCompat
অবজেক্টের একটিFlow
প্রদান করে যা আপনার প্রদত্ত সাসপেন্ডিং ল্যাম্বাতে সংগ্রহ করতে হবে:PredictiveBackHandler { progress: Flow<BackEventCompat> -> // code for gesture back started try { progress.collect { backEvent -> // code for progress } // code for completion } catch (e: CancellationException) { // code for cancellation } }
এটিতে
Flow
কলcollect()
নিশ্চিত করার জন্য লিন্ট রুলের মাধ্যমে একটি কম্পাইল টাইম ওয়ার্নিংও রয়েছে। ( Id2773 , b/294884345 )ComponentActivity
তেonBackPressedDispatcher
এখন অলসভাবে শুরু করা হয়েছে যাতে এটি শুধুমাত্র প্রয়োজনের সময় তৈরি করা যায়। ( I0bf8e )
বাগ ফিক্স
-
ComponentActivity
অ্যান্ড্রয়েড ১৩-তে আর NPE দেখাবে না যখন এটিonBackPressed()
কলব্যাক পাবে এবং অ্যাক্টিভিটি ইতিমধ্যেইDESTROYED
যাবে। ( Idb055 , b/291869278 ) - পরীক্ষামূলক
isAtLeastU()
API ( Ie9117 , b/289269026 ) এর ব্যবহারগুলি সরানো হয়েছে
সংস্করণ 1.8.0-alpha06
২১ জুন, ২০২৩
androidx.activity:activity:1.8.0-alpha06
, androidx.activity:activity-compose:1.8.0-alpha06
, এবং androidx.activity:activity-ktx:1.8.0-alpha06
প্রকাশিত হয়েছে। সংস্করণ 1.8.0-alpha06-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
-
OnBackPressedDispatcher
এখন সঠিকভাবে ভবিষ্যদ্বাণীমূলক ব্যাক জেসচারের সময় সরানো যেকোনো কলব্যাক বাতিল করে। ( I3f90f )
API পরিবর্তনগুলি
-
SystemBarStyle.auto
enableEdgeToEdge
API তে পাস করার সময়, আপনি এখনdetectDarkMode
lambda প্যারামিটারটি ওভাররাইড করতে পারেন যাতে নাইট মোড সনাক্ত করার জন্য কাস্টম লজিক প্রদান করা যায়। ( aosp/2546393 , b/278263793 )
সংস্করণ 1.8.0-alpha05
৭ জুন, ২০২৩
androidx.activity:activity:1.8.0-alpha05
, androidx.activity:activity-compose:1.8.0-alpha05
, এবং androidx.activity:activity-ktx:1.8.0-alpha05
প্রকাশিত হয়েছে। এই সংস্করণটি একটি অভ্যন্তরীণ শাখায় তৈরি করা হয়েছে।
API পরিবর্তনগুলি
- Activity এখন একটি
BackEventCompat
ক্লাস প্রদান করে যাBackEvent
এর একটি ব্যাকওয়ার্ড সামঞ্জস্যপূর্ণ সংস্করণ হিসেবে কাজ করে যা ফ্রেমওয়ার্কBackEvent
ক্লাস থেকে আলাদা করা হয়েছে। - ব্রেকিং পরিবর্তন:
OnBackPressedCallback
এরhandleOnBackStarted
এবংhandleOnBackProgressed
পদ্ধতিগুলি এখন একটি ফ্রেমওয়ার্কandroid.window.BackEvent
ক্লাসের পরিবর্তে একটিandroidx.activity.BackEventCompat
ইনস্ট্যান্স গ্রহণ করে।OnBackPressedDispatcher
এর সমতুল্য@VisibleForTesting
API গুলিও আপডেট করা হয়েছে। -
OnBackPressedDispatcher
এর কনস্ট্রাক্টর এখন একটি ঐচ্ছিকConsumer<Boolean>
উদাহরণ গ্রহণ করে যা ডিসপ্যাচারের মালিকদের কলব্যাক গ্রহণ করার অনুমতি দেয় যখনই সক্রিয় কলব্যাকের সংখ্যা শূন্য থেকে অ-শূন্যে পরিবর্তিত হয় বা বিপরীতভাবে পরিবর্তিত হয়।
বাগ ফিক্স
- অ্যাক্টিভিটি
1.7.2
থেকে:report
কল করার আগে স্ক্রিন থেকে দূরে নেভিগেট করার সময়ReportDrawn
ক্র্যাশ হওয়া ঠিক করুন। ( Ic46f1 , b/260506820 )
সংস্করণ 1.8.0-alpha04
১০ মে, ২০২৩
androidx.activity:activity:1.8.0-alpha04
, androidx.activity:activity-compose:1.8.0-alpha04
, এবং androidx.activity:activity-ktx:1.8.0-alpha04
প্রকাশিত হয়েছে। এটি একটি অভ্যন্তরীণ শাখা থেকে প্রকাশিত হয়েছে।
বাগ ফিক্স
- অ্যাক্টিভিটি ১.৭.১ থেকে: -
ActivityScenario
এর সাথেComponentActivity
ব্যবহার করার সময়ReportFullyDrawExecuter
আর লিক হয় না। ( Id2ff2 , b/277434271 )
সংস্করণ 1.8.0-alpha03
১২ এপ্রিল, ২০২৩
androidx.activity:activity:1.8.0-alpha03
, androidx.activity:activity-compose:1.8.0-alpha03
, এবং androidx.activity:activity-ktx:1.8.0-alpha03
প্রকাশিত হয়েছে। এটি একটি অভ্যন্তরীণ শাখা থেকে প্রকাশিত হয়েছে।
নতুন বৈশিষ্ট্য
- এজ-টু-এজ ডিসপ্লেকে সহজেই ব্যাকওয়ার্ড-সামঞ্জস্যপূর্ণ পদ্ধতিতে সেট আপ করার জন্য
ComponentActivity.setUpEdgeToEdge()
যোগ করা হয়েছে।
API পরিবর্তনগুলি
-
ComponentActivity.onBackPressed()
এখন API গুলিকে হ্যান্ডেল করার জন্য ব্যবহার করা বন্ধ করে দেওয়া হয়েছে। ডেভেলপারদের এখন এই পদ্ধতিটি ওভাররাইড করার পরিবর্তেOnBackPressedDispatcher
ব্যবহার করা উচিত। ( Ibce2f , b/271596918 ) -
ComponentDialog
এবংComponentActivity
এখন পাবলিক APIinitViewTreeOwners()
রয়েছে যা কন্টেন্ট ভিউ সেট করার আগে সমস্ত ভিউ ট্রি মালিকদের ইনিশিয়ালাইজ করতে ব্যবহার করা হয়। ( Ibdce0 , b/261314581 )
বাগ ফিক্স
- Fragments ভুলভাবে MenuHosts কে অবৈধ করে দিচ্ছিল এবং কার্যকলাপের অন্যান্য মেনুতে অপ্রত্যাশিত আচরণ দেখাচ্ছিল এমন একটি সমস্যা সমাধান করা হয়েছে। ( I9404e , b/244336571 )
অন্যান্য পরিবর্তন
-
ActivityResultRegister
এখন Java এর পরিবর্তে KotlinRandom
ব্যবহার করে। ( I4d98f , b/272096025 )
সংস্করণ 1.8.0-alpha02
৮ মার্চ, ২০২৩
androidx.activity:activity:1.8.0-alpha02
, androidx.activity:activity-compose:1.8.0-alpha02
, এবং androidx.activity:activity-ktx:1.8.0-alpha02
প্রকাশিত হয়েছে। একটি অভ্যন্তরীণ শাখা থেকে তৈরি।
নির্ভরতা আপডেট
- অ্যাক্টিভিটি
1.7.0-rc01
থেকে: অ্যাক্টিভিটি এখনLifecycle 2.6.0
এর উপর নির্ভর করে।
সংস্করণ 1.8.0-alpha01
৮ ফেব্রুয়ারী, ২০২৩
androidx.activity:activity:1.8.0-alpha01
, androidx.activity:activity-compose:1.8.0-alpha01
, এবং androidx.activity:activity-ktx:1.8.0-alpha01
প্রকাশিত হয়েছে। এটি একটি অভ্যন্তরীণ শাখা থেকে তৈরি করা হয়েছে।
নতুন বৈশিষ্ট্য
-
OnBackPressedCallback
ক্লাসে এখন নতুন Predictiv Back progress কলব্যাক রয়েছে যা ব্যাক জেসচার শুরু করার সময়, পুরো জেসচার জুড়ে অগ্রগতি এবং বাতিল হওয়া ব্যাক জেসচার পরিচালনা করার জন্য পূর্ববর্তীhandleOnBackPressed()
কলব্যাকের পাশাপাশি ব্যাক জেসচার কমিট করার সময় ব্যবহার করা হয়।
সংস্করণ 1.7
সংস্করণ 1.7.2
২৪ মে, ২০২৩
androidx.activity:activity:1.7.2
, androidx.activity:activity-compose:1.7.2
, এবং androidx.activity:activity-ktx:1.7.2
প্রকাশিত হয়েছে। সংস্করণ 1.7.2-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
report
কল করার আগে স্ক্রিন থেকে দূরে নেভিগেট করার সময়ReportDrawn
ক্র্যাশ হওয়ার সমস্যাটি ঠিক করুন। ( Ic46f1 , b/260506820 )
সংস্করণ 1.7.1
১৯ এপ্রিল, ২০২৩
androidx.activity:activity:1.7.1
, androidx.activity:activity-compose:1.7.1
, এবং androidx.activity:activity-ktx:1.7.1
প্রকাশিত হয়েছে। সংস্করণ 1.7.1-এ এই কমিটগুলি রয়েছে।
বাগ ফিক্স
-
ActivityScenario
এর সাথেComponentActivity
ব্যবহার করার সময়ReportFullyDrawExecuter
আর লিক হয় না। ( Id2ff2 , b/277434271 )
সংস্করণ 1.7.0
২২ মার্চ, ২০২৩
androidx.activity:activity:1.7.0
, androidx.activity:activity-compose:1.7.0
, এবং androidx.activity:activity-ktx:1.7.0
প্রকাশিত হয়েছে। সংস্করণ 1.7.0-এ এই কমিটগুলি রয়েছে।
১.৬.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
-
PickVisualMedia
এবংPickMultipleVisualMedia
তে Photo Picker কার্যকলাপ চুক্তিগুলি আপডেট করা হয়েছে যাতেMediaStore.ACTION_PICK_IMAGES
অনুপলব্ধ থাকলে অতিরিক্ত ফলব্যাক থাকে যা OEM এবং সিস্টেম অ্যাপগুলিকে, যেমন Google Play পরিষেবাগুলিকে, Fallback অ্যাকশন বাস্তবায়নের মাধ্যমে বিস্তৃত Android ডিভাইস এবং API স্তরে একটি সামঞ্জস্যপূর্ণ ফটো পিকার অভিজ্ঞতা প্রদান করতে দেয়।Intent.ACTION_OPEN_DOCUMENT
ব্যবহার শুরু করার আগে যদি এটি উপলব্ধ থাকে তবে ফটো পিকার এই ফলব্যাকটি ব্যবহার করবে, যা সমস্ত API 19 এবং উচ্চতর ডিভাইসগুলিকে সমর্থন করে। -
ComponentDialog
এখনSavedStateRegistryOwner
প্রয়োগ করে এবং এর নিজস্বSavedStateRegistry
অ্যাক্সেস করে এবং এরViewTree
এর জন্যSavedStateRegistryOwner
সেট করে। এখনComponentDialog
এর মধ্যে Jetpack Compose ব্যবহার করা সম্ভব কারণ এটিViewTree
API এর প্রয়োজনীয়তার মাধ্যমে উইন্ডোর সাথে সংযুক্তLifecycleOwner
এবংSavedStateRegistryOwner
উভয়ই পূরণ করে। -
IntentSenderRequest.Builder.setFlags()
এখন আপনাকেIntent
থেকে একাধিক পতাকা সেট করার অনুমতি দেয়, শুধুমাত্র একটি পতাকার পরিবর্তে।
কোটলিন রূপান্তর
বেশ কিছু অ্যাক্টিভিটি ক্লাস কোটলিনে রূপান্তরিত হয়েছে। সমস্ত রূপান্তরিত ক্লাস এখনও পূর্ববর্তী সংস্করণগুলির সাথে তাদের বাইনারি সামঞ্জস্য বজায় রেখেছে। কোটলিনে লেখা ক্লাসগুলির জন্য নিম্নলিখিত ক্লাসগুলিতে সোর্স অসঙ্গতিপূর্ণ পরিবর্তন রয়েছে: ActivityResultRegistryOwner
, OnBackPressedDispatcherOwner
.
নিচের টেবিলে Activity-এর নতুন সংস্করণের উৎস রূপান্তরগুলি দেওয়া হল:
কার্যকলাপ ১.৫ | কার্যকলাপ ১.৬ |
---|---|
override fun getActivityResultRegistry() = activityResultRegistry | override val activityResultRegistry = activityResultRegistry |
override fun getOnBackPressedDispatcher() = onBackPressedDispatcher | override val onBackPressedDispatcher = onBackPressedDispatcher |
এই ক্লাসগুলিও কোটলিনে রূপান্তরিত হয়েছিল, কিন্তু উৎসের সাথে সামঞ্জস্যপূর্ণ রয়ে গেছে: ContextAware
, ContextAwareHelper
, OnContextAvailableListener
, IntentSenderRequest
, এবং OnBackPressedDispatcher
FullyDrawnReporter API গুলি
ComponentActivity
এখন একটি FullyDrawnReporter
ইনস্ট্যান্স প্রদান করে যা একাধিক উপাদানকে ইন্টারঅ্যাকশনের জন্য প্রস্তুত হলে রিপোর্ট করার অনুমতি দেয়। ComponentActivity
আপনার পক্ষ থেকে reportFullyDrawn()
কল করার আগে সমস্ত উপাদান সম্পূর্ণ হওয়ার জন্য অপেক্ষা করবে। এই API গুলি আপনার জন্য সময়ের প্রয়োজনীয়তাগুলি যত্ন নেয় এবং onDraw
কলের অংশ হিসাবে কল করার প্রয়োজন হয় না।
এই API গুলিকে নিম্নলিখিতগুলি সক্ষম করতে উৎসাহিত করা হচ্ছে:
- স্টার্টআপ সম্পূর্ণ হলে অ্যান্ড্রয়েড রানটাইম সিগন্যাল করা, যাতে মাল্টি-ফ্রেম স্টার্টআপ সিকোয়েন্সের সময় চালানো সমস্ত কোড অন্তর্ভুক্ত করা হয় এবং ব্যাকগ্রাউন্ড সংকলনের জন্য অগ্রাধিকার দেওয়া হয়।
- আপনার অ্যাপ্লিকেশনটি স্টার্টআপ মেট্রিক্সের জন্য সম্পূর্ণরূপে অঙ্কিত বলে বিবেচিত হলে ম্যাক্রোবেঞ্চমার্ক এবং প্লে ভাইটালসকে সংকেত দেওয়া, যাতে আপনি কর্মক্ষমতা ট্র্যাক করতে পারেন।
পৃথক কম্পোজেবল থেকে FullyDrawnReporter
ব্যবহার করা আরও সুবিধাজনক করার জন্য তিনটি অ্যাক্টিভিটি কম্পোজ API যোগ করা হয়েছে:
-
ReportDrawn
নির্দেশ করে যে আপনার কম্পোজেবল অবিলম্বে ইন্টারঅ্যাকশনের জন্য প্রস্তুত। -
ReportDrawnWhen
আপনার কম্পোজেবল কখন ইন্টারঅ্যাকশনের জন্য প্রস্তুত তা নির্দেশ করার জন্য একটি predicate (অর্থাৎ,list.count > 0
) নেয়। -
ReportDrawnAfter
একটি সাসপেন্ডিং পদ্ধতি গ্রহণ করে যা সম্পূর্ণ হলে, নির্দেশ করে যে আপনি ইন্টারঅ্যাকশনের জন্য প্রস্তুত।
নির্ভরতা আপডেট
- কার্যকলাপ এখন জীবনচক্র
2.6.1
এর উপর নির্ভর করে। ( 8fc31d ) - কার্যকলাপ এখন প্রোফাইল ইনস্টলার
1.3.0
এর উপর নির্ভর করে। ( 83d3b1 )
সংস্করণ 1.7.0-rc01
৮ মার্চ, ২০২৩
androidx.activity:activity:1.7.0-rc01
, androidx.activity:activity-compose:1.7.0-rc01
, এবং androidx.activity:activity-ktx:1.7.0-rc01
প্রকাশিত হয়েছে। 1.7.0-rc01 সংস্করণে এই কমিটগুলি রয়েছে।
নির্ভরতা আপডেট
- কার্যকলাপ এখন
Lifecycle 2.6.0
এর উপর নির্ভর করে।
সংস্করণ 1.7.0-beta02
২২ ফেব্রুয়ারী, ২০২৩
androidx.activity:activity:1.7.0-beta02
, androidx.activity:activity-compose:1.7.0-beta02
, এবং androidx.activity:activity-ktx:1.7.0-beta02
প্রকাশিত হয়েছে। সংস্করণ 1.7.0-beta02-এ এই কমিটগুলি রয়েছে।
API পরিবর্তনগুলি
-
MediaStore.ACTION_PICK_IMAGES
অনুপলব্ধ থাকাকালীনPickVisualMedia
এবংPickMultipleVisualMedia
দ্বারা ব্যবহৃত অ্যাকশন এবং অতিরিক্তগুলি এখন পাবলিক কনস্ট্যান্ট যা OEM এবং সিস্টেম অ্যাপগুলিকে API স্থিতিশীলতা প্রদান করে যারা একটি সামঞ্জস্যপূর্ণ ফটো পিকার অভিজ্ঞতা প্রদান করতে চায়। এই ফলব্যাকের বাস্তবায়ন এখনও শুধুমাত্র সিস্টেম অ্যাপগুলিতে সীমাবদ্ধ। ( Icd320 )
সংস্করণ 1.7.0-beta01
৮ ফেব্রুয়ারী, ২০২৩
androidx.activity:activity:1.7.0-beta01
, androidx.activity:activity-compose:1.7.0-beta01
, এবং androidx.activity:activity-ktx:1.7.0-beta01
প্রকাশিত হয়েছে। সংস্করণ 1.7.0-beta01-এ এই কমিটগুলি রয়েছে।
নতুন বৈশিষ্ট্য
-
IntentSenderRequest.Builder.setFlags()
now allows you to set multiple flags fromIntent
, rather than only a single flag. ( Iac04c )
বাগ ফিক্স
- The fallback for
PickVisualMedia
for when the framework Photo Picker is unavailable now correctly limits the handling to apps installed in the device's system image. ( If8ae6 )
Kotlin Conversions
-
ActivityResultRegistryOwner
is now written in Kotlin. This is a source incompatible change for those classes written in Kotlin - you must now override theactivityResultRegistry
property rather than implementing the previousgetActivityResultRegistry()
function. ( I0b00e ) -
OnBackPressedDispatcherOwner
is now written in Kotlin. This is a source incompatible change for those classes written in Kotlin - you must now override theonBackPressedDispatcher
property rather than implementing the previousgetOnBackPressedDispatcher
function. ( Ia277d ) -
ContextAware
,ContextAwareHelper
,OnContextAvailableListener
,IntentSenderRequest
andOnBackPressedDispatcher
are now written in Kotlin. ( I1a73e , Iada92 , aosp/2410754 , I18ac7 , b/257291701 )
Version 1.7.0-alpha04
২৫ জানুয়ারী, ২০২৩
androidx.activity:activity:1.7.0-alpha04
, androidx.activity:activity-compose:1.7.0-alpha04
, and androidx.activity:activity-ktx:1.7.0-alpha04
are released. Version 1.7.0-alpha04 contains these commits.
নতুন বৈশিষ্ট্য
- The
PickVisualMedia
andPickMultipleVisualMedia
Activity Result contracts will now use a Google Play services provided Photo Picker where available in cases where the Android system provided Photo Picker (eg,MediaStore.ACTION_PICK_IMAGES
) is not available. TheisPhotoPickerAvailable()
API that only detects the Android system provided Photo Picker has been deprecated. It is recommended to use the newisPhotoPickerAvailable(Context)
API, which will return if either Photo Picker is available. ( I55be6 )
Version 1.7.0-alpha03
১১ জানুয়ারী, ২০২৩
androidx.activity:activity:1.7.0-alpha03
, androidx.activity:activity-compose:1.7.0-alpha03
, and androidx.activity:activity-ktx:1.7.0-alpha03
are released. Version 1.7.0-alpha03 contains these commits.
নতুন বৈশিষ্ট্য
-
ComponentDialog
now implementsSavedStateRegistryOwner
and has access to its ownSavedStateRegistry
and sets theSavedStateRegistryOwner
for its ViewTree. It is now possible to use Jetpack Compose within aComponentDialog
as it meets both theLifecycleOwner
andSavedStateRegistryOwner
attached to the Window via the ViewTree APIs requirements. ( Idca17 , I73468 b/261162296 )
API পরিবর্তনগুলি
- Added a
ReportDrawn
composable that immediately marks the activity as ready to callreportFullyDrawn
. ( Ic5b14 , b/259687964 )
Kotlin Conversions
- The
ActvitiyResultCallback
andOnBackPressedCallback
classes have both been converted to Kotlin while maintaining source and binary compatibility. ( Ifc5e5 , Ide1b0 , b/257291701 )
Version 1.7.0-alpha02
২৪ অক্টোবর, ২০২২
androidx.activity:activity:1.7.0-alpha02
, androidx.activity:activity-compose:1.7.0-alpha02
, and androidx.activity:activity-ktx:1.7.0-alpha02
are released. Version 1.7.0-alpha02 contains these commits.
বাগ ফিক্স
- From Activity
1.6.1
: Fixed an issue with thePickMultipleVisualMedia
Activity Result contract not launching on Android R devices when using the default value formaxItems
. ( Ie2776 , b/249182130 )
Version 1.7.0-alpha01
৫ অক্টোবর, ২০২২
androidx.activity:activity:1.7.0-alpha01
, androidx.activity:activity-compose:1.7.0-alpha01
, and androidx.activity:activity-ktx:1.7.0-alpha01
are released. Version 1.7.0-alpha01 contains these commits.
FullyDrawnReporter APIs
ComponentActivity
now provides a FullyDrawnReporter
instance that allows multiple components to report when they are ready for interaction. ComponentActivity
will wait for all components to complete before calling reportFullyDrawn()
on your behalf. These APIs take care of the timing requirements for you and do not need to be called as part of an onDraw
call.
These APIs are encouraged to enable:
- Signaling the Android Runtime when startup completes, to ensure all of the code run during a multi-frame startup sequence is included and prioritized for background compilation.
- Signaling Macrobenchmark and Play Vitals when your application should be considered fully drawn for startup metrics, so you can track performance.
Two Activity Compose APIs have been added to make it more convenient to use the FullyDrawnReporter
from individual composables:
-
ReportDrawnWhen
takes a predicate (ie,list.count > 0
) to indicate when your composable is ready for interaction. -
ReportDrawnAfter
takes a suspending method that, when it completes, indicates that you are ready for interaction.
সংস্করণ 1.6.1
সংস্করণ 1.6.1
২৪ অক্টোবর, ২০২২
androidx.activity:activity:1.6.1
, androidx.activity:activity-compose:1.6.1
, and androidx.activity:activity-ktx:1.6.1
are released. Version 1.6.1 contains these commits.
বাগ ফিক্স
- Fixed an issue with the
PickMultipleVisualMedia
Activity Result contract not launching on Android R devices when using the default value formaxItems
. ( Ie2776 , b/249182130 )
সংস্করণ 1.6.0
সংস্করণ 1.6.0
২১ সেপ্টেম্বর, ২০২২
androidx.activity:activity:1.6.0
, androidx.activity:activity-compose:1.6.0
, and androidx.activity:activity-ktx:1.6.0
are released. Version 1.6.0 contains these commits.
১.৫.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
- Added
ActivityResultContracts.PickVisualMedia
andActivityResultContracts.PickMultipleVisualMedia
for providing a backward compatible contract that usesMediaStore.ACTION_PICK_IMAGES
when the Photo Picker is available andIntent.ACTION_OPEN_DOCUMENT
when it is not available. - Integrated the
OnBackInvokedCallback
in Android 13 into theOnBackPressedDispatchers
provided byComponentActivity
andComponentDialog
. This ensures that all APIs built onOnBackPressedDispatcher
work when enabling a predictive back gesture .
Version 1.6.0-rc02
৭ সেপ্টেম্বর, ২০২২
androidx.activity:activity:1.6.0-rc02
, androidx.activity:activity-compose:1.6.0-rc02
, and androidx.activity:activity-ktx:1.6.0-rc02
are released. Version 1.6.0-rc02 contains these commits.
বাগ ফিক্স
-
OnBackPressedDispatcher
now registers theOnBackInvokedCallback
with thePRIORITY_DEFAULT
instead ofPRIORITY_OVERLAY
. ( I3901f ) - Classes that extend
ComponentActivity
will now always have both of theironMultiWindowModeChanged()
callbacks dispatched. ( Ic4d85 ) - The
ActivityResultRegistry
will no longer return a result to theActivityResultCallback
when thelaunch
call throws anyException
and the callback was registered without aLifecycleOwner
. ( Ia7ff7 , b/238350794 ) -
ComponentActivity
will now properly dispatch menu calls without the need to call the super function in your activity. ( Ie33c5 , b/238057118 )
নির্ভরতা আপডেট
- The
Activity
library now depends on Lifecycle2.5.1
. ( If6697 )
Version 1.6.0-rc01
২৪ আগস্ট, ২০২২
androidx.activity:activity:1.6.0-rc01
, androidx.activity:activity-compose:1.6.0-rc01
, and androidx.activity:activity-ktx:1.6.0-rc01
are released. Version 1.6.0-rc01 contains these commits.
বাগ ফিক্স
- Initializing an
OnBackPressedDispatcher
will no longer causeClassVerificationError
s when using SDK versions prior to 33. ( Ic32e1 ) - Classes that override
ComponentActivity
'sonPictureInPictureModeChanged()
callback will now always have their callbacks dispatched. ( Ib7fdb )
Version 1.6.0-beta01
১০ আগস্ট, ২০২২
androidx.activity:activity:1.6.0-beta01
, androidx.activity:activity-compose:1.6.0-beta01
, and androidx.activity:activity-ktx:1.6.0-beta01
are released. Version 1.6.0-beta01 contains these commits.
API পরিবর্তনগুলি
- Marked the deprecated
startActivityForResult
andstartIntentSenderForResult
methods onComponentActivity
with@NonNull
because passingnull
has always resulted in a crash. ( Id2a25 , b/231476082 )
বাগ ফিক্স
- From Activity
1.5.1
: TheActivityResultRegistry
will no longer return a result to theActivityResultCallback
when thelaunch
call throws anyException
and the callback was registered without aLifecycleOwner
. ( Ia7ff7 , b/238350794 ) - From Activity
1.5.1
:ComponentActivity
will now properly dispatch menu calls toonPrepareOptionMenu()
,onCreateOptionsMenu()
andonOptionsItemSelected()
overrides without the need to call the super function. ( Ie33c5 , b/238057118 )
নির্ভরতা আপডেট
- From Activity
1.5.1
: TheActivity
library now depends on theLifecycle
version2.5.1
. ( If6697 )
Version 1.6.0-alpha05
১৫ জুন, ২০২২
androidx.activity:activity:1.6.0-alpha05
, androidx.activity:activity-compose:1.6.0-alpha05
, and androidx.activity:activity-ktx:1.6.0-alpha05
are released. Version 1.6.0-alpha05 was developed in a private pre-release branch and has no public commits.
API পরিবর্তনগুলি
-
minCompileSdk
is now 33 to align with Tiramisu Beta 3 SDK
বাগ ফিক্স
- Fixed crash on older devices when doing SDK extension check for the
PickVisualMedia
ActivityResultContract
so that it should now work withACTION_OPEN_DOCUMENT
on devices running Android 10 and lower.
Version 1.6.0-alpha04
১৮ মে, ২০২২
androidx.activity:activity:1.6.0-alpha04
and androidx.activity:activity-ktx:1.6.0-alpha04
are released.
বাগ ফিক্স
- Fixed an error in
PickVisualMediaRequest
where attempting to create a request, either via the Builder or the top level Kotlin function, would result in a stack overflow. - Integrated the
OnBackInvokedCallback
in Android 13 Dev Beta 2 into theOnBackPressedDispatcher
provided byComponentDialog
. This ensures that all APIs built onOnBackPressedDispatcher
work when enabling a predictive back gesture .
Version 1.6.0-alpha03
২৭ এপ্রিল, ২০২২
androidx.activity:activity:1.6.0-alpha03
, androidx.activity:activity-compose:1.6.0-alpha03
, and androidx.activity:activity-ktx:1.6.0-alpha03
are released.
- Note: This version will only compile against the Android 13 Developer Beta 1 SDK.
নতুন বৈশিষ্ট্য
- Added
ActivityResultContracts.PickVisualMedia
andActivityResultContracts.PickMultipleVisualMedia
for providing a backward compatible contract that usesMediaStore.ACTION_PICK_IMAGES
when the Photo Picker is available andIntent.ACTION_OPEN_DOCUMENT
when it is not available. - Integrated the
OnBackInvokedCallback
in Android 13 Dev Beta 1 into theOnBackPressedDispatcher
provided byComponentActivity
. This ensures that all APIs built onOnBackPressedDispatcher
work when enabling a predictive back gesture .
Version 1.6.0-alpha01
২৩ মার্চ, ২০২২
androidx.activity:activity:1.6.0-alpha01
, androidx.activity:activity-compose:1.6.0-alpha01
, and androidx.activity:activity-ktx:1.6.0-alpha01
are released.
- Note: This version will only compile against the Android 13 Developer Preview 2 SDK.
নতুন বৈশিষ্ট্য
- Integrated changes in Android 13 Dev Preview 2 into
ComponentActivity
.
সংস্করণ 1.5.1
সংস্করণ 1.5.1
২৭ জুলাই, ২০২২
androidx.activity:activity:1.5.1
, androidx.activity:activity-compose:1.5.1
, and androidx.activity:activity-ktx:1.5.1
are released. Version 1.5.1 contains these commits.
বাগ ফিক্স
The
ActivityResultRegistry
will no longer return a result to theActivityResultCallback
when thelaunch()
call throws anyException
and the callback was registered without aLifecycleOwner
. ( Ia7ff7 , b/238350794 )ComponentActivity
will now properly dispatch menu calls toonPrepareOptionMenu()
,onCreateOptionsMenu()
andonOptionsItemSelected()
overrides without the need to call the super function. ( Ie33c5 , b/238057118 )
নির্ভরতা আপডেট
- The
Activity
library now depends on the Lifecycle2.5.1
. ( If6697 )
সংস্করণ 1.5.0
সংস্করণ 1.5.0
২৯ জুন, ২০২২
androidx.activity:activity:1.5.0
, androidx.activity:activity-compose:1.5.0
, and androidx.activity:activity-ktx:1.5.0
are released. Version 1.5.0 contains these commits.
১.৪.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
- ComponentDialog -
ComponentDialog
is a subclass ofDialog
that includes anOnBackPressedDispatcher
that will be called when the system back button is pressed and the dialog is visible. Importantly, this subclass also sets theViewTreeOnBackPressedDispatcherOwner
, allowing views a generic way to retrieve the correct dispatcher whether it exists in aComponentActivity
or aComponentDialog
. - Callback Interfaces -
ComponentActivity
now implements a set of modular callback interfaces that can be used instead of theActivity
callbacks. These interfaces include the following:OnNewIntentProvider
,OnConfigurationChangedProvider
,OnTrimMemoryProvider
,OnPictureInPictureModeChangedProvider
,OnMultiWindowModeChangedProvider
- CreationExtras Integration -
ComponentActivity
now has the ability to provide a statelessViewModelProvider.Factory
via Lifecycle2.5.0
'sCreationExtras
.
Other changes
- The no parameter constructor for
ActivityResultContracts.CreateDocument
has been deprecated and replaced with a new constructor that takes a concrete mime type (eg, "image/png") as is required byIntent.ACTION_CREATE_DOCUMENT
.
সংস্করণ 1.5.0-rc01
১১ মে, ২০২২
androidx.activity:activity:1.5.0-rc01
, androidx.activity:activity-compose:1.5.0-rc01
, and androidx.activity:activity-ktx:1.5.0-rc01
are released with no changes from 1.5.0-beta01. Version 1.5.0-rc01 contains these commits.
সংস্করণ 1.5.0-beta01
২০ এপ্রিল, ২০২২
androidx.activity:activity:1.5.0-beta01
, androidx.activity:activity-compose:1.5.0-beta01
, and androidx.activity:activity-ktx:1.5.0-beta01
are released. Version 1.5.0-beta01 contains these commits.
Dependency updates
- Activity now depends on Lifecycle
2.4.0-beta01
.
Version 1.5.0-alpha05
৬ এপ্রিল, ২০২২
androidx.activity:activity:1.5.0-alpha05
, androidx.activity:activity-compose:1.5.0-alpha05
, and androidx.activity:activity-ktx:1.5.0-alpha05
are released. Version 1.5.0-alpha05 contains these commits.
বাগ ফিক্স
-
ComponentActivity
'sonPanelClosed()
now calls the superonPanelClosed()
as well, fixing an issue where theonContextMenuClosed
method would not be called. ( Ib6f77 )
Version 1.5.0-alpha04
২৩ মার্চ, ২০২২
androidx.activity:activity:1.5.0-alpha04
, androidx.activity:activity-compose:1.5.0-alpha04
, and androidx.activity:activity-ktx:1.5.0-alpha04
are released. Version 1.5.0-alpha04 contains these commits.
বাগ ফিক্স
-
SavedStateViewFactory
now supports usingCreationExtras
even when it was initialized with aSavedStateRegistryOwner
. If extras are provided, the initialized arguments are ignored. ( I6c43b , b/224844583 )
Version 1.5.0-alpha03
২৩ ফেব্রুয়ারী, ২০২২
androidx.activity:activity:1.5.0-alpha03
, androidx.activity:activity-compose:1.5.0-alpha03
, and androidx.activity:activity-ktx:1.5.0-alpha03
are released. Version 1.5.0-alpha03 contains these commits.
API পরিবর্তনগুলি
- You can now pass
CreationExtras
to the activityby viewModels()
function ( I6a3e6 , b/217600303 )
Version 1.5.0-alpha02
৯ ফেব্রুয়ারী, ২০২২
androidx.activity:activity:1.5.0-alpha02
, androidx.activity:activity-compose:1.5.0-alpha02
, and androidx.activity:activity-ktx:1.5.0-alpha02
are released. Version 1.5.0-alpha02 contains these commits.
নতুন বৈশিষ্ট্য
-
ComponentActivity
now implements theOnPictureInPictureModeChangedProvider
interface to allow any component to receive picture-in-picture mode change events. ( I9f567 ) -
ComponentActivity
now implements theOnMultiWindowModeChangedProvider
interface to allow any component to receive multi-window mode change events. ( I62d91 )
সংস্করণ 1.5.0-alpha01
২৬ জানুয়ারী, ২০২২
androidx.activity:activity:1.5.0-alpha01
, androidx.activity:activity-compose:1.5.0-alpha01
, and androidx.activity:activity-ktx:1.5.0-alpha01
are released. Version 1.5.0-alpha01 contains these commits.
নতুন বৈশিষ্ট্য
-
ComponentActivity
now integrates with ViewModel CreationExtras, introduced as part of Lifecycle2.5.0-alpha01
. ( Ie7e00 , b/207012584 ) - Added
ComponentDialog
, a subclass ofDialog
that includes anOnBackPressedDispatcher
that will be called when the system back button is pressed when the dialog is visible. Importantly, this subclass also sets theViewTreeOnBackPressedDispatcherOwner
, allowing views a generic way to retrieve the correct dispatcher whether it exists in aComponentActivity
or aComponentDialog
. ( I8a1bc ) -
ComponentActivity
now implements the newOnNewIntentProvider
interface to allow any component to receive these events. ( If1f8b ) -
ComponentActivity
now implements the newOnConfigurationChangedProvider
interface to allow any component to receive these events. ( If623b ) -
ComponentActivity
now implements the newOnTrimMemoryProvider
interface to allow any component to receive these events. ( Ia9295 )
API পরিবর্তনগুলি
- The no parameter constructor for
ActivityResultContracts.CreateDocument
has been deprecated and replaced with a new constructor that takes a concrete mime type (eg,"image/png"
) as is required byIntent.ACTION_CREATE_DOCUMENT
. ( I2bec6 ) - The
OnBackPressedDispatcherOwner
associated with a View can now be retrieved via theViewTreeOnBackPressedDispatcherOwner
, rather than relying on casting theContext
. ( I74685 )
বাগ ফিক্স
- Fixed a crash when accessing a
ViewModel
for the very first time from aregisterForActivityResult()
callback or the callbacks to aLifecycleObserver
added as part ofinit
of aComponentActivity
. ( Ife83f )
সংস্করণ 1.4.0
সংস্করণ 1.4.0
২৭ অক্টোবর, ২০২১
androidx.activity:activity:1.4.0
, androidx.activity:activity-compose:1.4.0
, and androidx.activity:activity-ktx:1.4.0
are released. Version 1.4.0 contains these commits.
Important changes since 1.3.0
- AndroidX
ComponentActivity
now implements theMenuHost
interface. This allows any component to add menu items to theActionBar
by adding aMenuProvider
instance to the activity. EachMenuProvider
can optionally be added with aLifecycle
that will automatically control the visibility of those menu items based on theLifecycle
state and handle the removal of theMenuProvider
when theLifecycle
is destroyed. - The
ActivityResultContract
class has been rewritten in Kotlin to ensure that developers writing custom contracts in Kotlin can define the correct nullability for their input and output classes. - The
ActivityResultContracts
class and its contracts have been rewritten in Kotlin to ensure the proper nullability.
Version 1.4.0-rc01
১৩ অক্টোবর, ২০২১
androidx.activity:activity:1.4.0-rc01
, androidx.activity:activity-compose:1.4.0-rc01
, and androidx.activity:activity-ktx:1.4.0-rc01
are released. Version 1.4.0-rc01 contains these commits.
বাগ ফিক্স
- The
ActivityResultRegistry
will no longer return a result to theActivityResultCallback
when thelaunch
call throws anyException
. ( If4f91 , b/200845664 )
Version 1.4.0-beta01
২৯ সেপ্টেম্বর, ২০২১
androidx.activity:activity:1.4.0-beta01
, androidx.activity:activity-compose:1.4.0-beta01
, and androidx.activity:activity-ktx:1.4.0-beta01
are released. Version 1.4.0-beta01 contains these commits.
API পরিবর্তনগুলি
- Fixed the type for the
ActivityResultContracts.OpenMultipleDocuments
andActivityResultContracts.GetMultipleContents
that caused then to use an output type ofList<? extends Uri>
when using the code from the Java programming language. ( If71de ) - Public constants within the
ActivityResultContracts.StartActivityForResult
,ActivityResultContracts.StartIntentSenderForResult
, andActivityResultContracts.RequestMultiplePermissions
classes are now accessible when using Kotlin via their now publicCompanion
objects. ( aosp/1832555 )
Documentation Updates
- The deprecation message for APIs now handled by the Activity Result APIs , namely
startActivityForResult
,startIntentSenderForResult
,onActivityResult
,requestPermissions
, andonRequestPermissionsResult
, have all been expanded with more details. ( cce80f )
Version 1.4.0-alpha02
১৫ সেপ্টেম্বর, ২০২১
androidx.activity:activity:1.4.0-alpha02
, androidx.activity:activity-compose:1.4.0-alpha02
, and androidx.activity:activity-ktx:1.4.0-alpha02
are released. Version 1.4.0-alpha02 contains these commits.
নতুন বৈশিষ্ট্য
- The
activity-compose
artifact now contains aLaunchDuringComposition
lint error that prevents you from calling thelaunch
method ofActivityResultLauncher
as part of composition as composition should be side-effect free. Use the APIs for handling side-effects . ( 7c2bbe , b/191347220 )
API পরিবর্তনগুলি
- The
ActivityResultContract
class has been rewritten in Kotlin to ensure that developers writing custom contracts in Kotlin can define the correct nullability for their input and output classes. ( I8a8f5 ) - The
ActivityResultContracts
class and its contracts have been rewritten in Kotlin to ensure the proper nullability. ( I69802 )
Version 1.4.0-alpha01
১ সেপ্টেম্বর, ২০২১
androidx.activity:activity:1.4.0-alpha01
, androidx.activity:activity-compose:1.4.0-alpha01
, and androidx.activity:activity-ktx:1.4.0-alpha01
are released. Version 1.4.0-alpha01 contains these commits.
নতুন বৈশিষ্ট্য
- AndroidX
ComponentActivity
now implements theMenuHost
interface.. This allows any component to add menu items to theActionBar
by adding aMenuProvider
instance to the activity. EachMenuProvider
can optionally be added with aLifecycle
that will automatically control the visibility of those menu items based on theLifecycle
state and handle the removal of theMenuProvider
when theLifecycle
is destroyed. ( I3b608 ):
/**
* Using the addMenuProvider() API directly in your Activity
**/
class ExampleActivity : ComponentActivity(R.layout.activity_example) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Add menu items without overriding methods in the Activity
addMenuProvider(object : MenuProvider {
override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
// Add menu items here
menuInflater.inflate(R.menu.example_menu, menu)
}
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
// Handle the menu selection
return true
}
})
}
}
/**
* Using the addMenuProvider() API in a Fragment
**/
class ExampleFragment : Fragment(R.layout.fragment_example) {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
// The usage of an interface lets you inject your own implementation
val menuHost: MenuHost = requireActivity()
// Add menu items without using the Fragment Menu APIs
// Note how we can tie the MenuProvider to the viewLifecycleOwner
// and an optional Lifecycle.State (here, RESUMED) to indicate when
// the menu should be visible
menuHost.addMenuProvider(object : MenuProvider {
override fun onCreateMenu(menu: Menu, menuInflater: MenuInflater) {
// Add menu items here
menuInflater.inflate(R.menu.example_menu, menu)
}
override fun onMenuItemSelected(menuItem: MenuItem): Boolean {
// Handle the menu selection
return true
}
}, viewLifecycleOwner, Lifecycle.State.RESUMED)
}
আচরণগত পরিবর্তন
- The
ActivityResultRegistry
will now throw anIllegalStateException
when attempting to calllaunch()
on anActivityResultLauncher
that has not be registered or that has been unregistered. ( Ida75d , b/192567522 )
বহিরাগত অবদান
Version 1.3.1
Version 1.3.1
৪ আগস্ট, ২০২১
androidx.activity:activity:1.3.1
, androidx.activity:activity-compose:1.3.1
, and androidx.activity:activity-ktx:1.3.1
are released. Version 1.3.1 contains these commits.
Dependency updates
- Activity now depends on Kotlin
1.5.21
. - Activity Compose now depends on Compose
1.0.1
.
সংস্করণ 1.3.0
সংস্করণ 1.3.0
July 28, 2021
androidx.activity:activity:1.3.0
, androidx.activity:activity-compose:1.3.0
, and androidx.activity:activity-ktx:1.3.0
are released. Version 1.3.0 contains these commits.
Important changes since 1.2.0
- Activity Compose artifact - The
activity-compose
artifact provides thesetContent
extension method for hosting your Jetpack Compose UI in an activity and Compose specific wrappers for interacting with theComponentActivity
APIs for handling the system back button and the Activity Result APIs. See the documentation for more details. - CaptureVideo contract - The
CaptureVideo
ActivityResultContract
replaces the now deprecatedTakeVideo
contract and returns a boolean denoting success that works across many camera apps. - Picture-In-Picture Hint View Tracking - Users of
activity-ktx
can now use thetrackPipAnimationHintView
extension method onActivity
to automatically rebuild thePictureInPictureParams
with the new position of the view as it changes position relative to the window.
Version 1.3.0-rc02
১৪ জুলাই, ২০২১
androidx.activity:activity:1.3.0-rc02
, androidx.activity:activity-compose:1.3.0-rc02
, and androidx.activity:activity-ktx:1.3.0-rc02
are released. Version 1.3.0-rc02 contains these commits.
বাগ ফিক্স
- The
ActivityResultRegistry
callbacks are now properly saved and restored so callbacks are not duplicated in the savedState. ( I97816 , b/191893160 )
Version 1.3.0-rc01
July 1, 2021
androidx.activity:activity:1.3.0-rc01
, androidx.activity:activity-compose:1.3.0-rc01
, and androidx.activity:activity-ktx:1.3.0-rc01
are released with no changes from 1.3.0-beta02
. Version 1.3.0-rc01 contains these commits.
Version 1.3.0-beta02
১৬ জুন, ২০২১
androidx.activity:activity:1.3.0-beta02
, androidx.activity:activity-compose:1.3.0-beta02
, and androidx.activity:activity-ktx:1.3.0-beta02
are released. Version 1.3.0-beta02 contains these commits.
Updated activity-compose
to depend on Compose 1.0.0-beta09
. androidx.compose.ui:ui-test-junit4
now has a compile time dependency on activity-compose
.
Version 1.3.0-beta01
২ জুন, ২০২১
androidx.activity:activity:1.3.0-beta01
, androidx.activity:activity-compose:1.3.0-beta01
, and androidx.activity:activity-ktx:1.3.0-beta01
are released. Version 1.3.0-beta01 contains these commits.
API পরিবর্তনগুলি
- The previously deprecated
@Composable registerForActivityResult()
method has been removed. Please userememberLauncherForActivityResult()
. ( Ic39d3 )
Version 1.3.0-alpha08
১৮ মে, ২০২১
androidx.activity:activity:1.3.0-alpha08
, androidx.activity:activity-compose:1.3.0-alpha08
, and androidx.activity:activity-ktx:1.3.0-alpha08
are released. Version 1.3.0-alpha08 contains these commits.
নতুন বৈশিষ্ট্য
- The new
CaptureVideo
ActivityResultContract
returns a boolean to yourActivityResultCallback
indicating if your video was successfully saved to the given URI. This replaces the now deprecatedTakeVideo
contract as camera apps very rarely supported returning a thumbnail bitmap, making the result unhelpful. ( Ie21f2 , b/185938070 ) - Added new API
Activity#setPipAnimationHintView
to update the PipParams' source rect hint whenever the view moves. ( I9063d )
API পরিবর্তনগুলি
- The
rememberLauncherForActivityResult
function now returns a launcher that deprecates theunregister()
function - registration and unregistering the launcher is handled automatically byrememberLauncherForActivityResult
. ( I2443e )
Compose Compatibility
-
androidx.activity:activity-compose:1.3.0-alpha08
is only compatible with Compose version1.0.0-beta07
and above.
Version 1.3.0-alpha07
২১ এপ্রিল, ২০২১
androidx.activity:activity:1.3.0-alpha07
, androidx.activity:activity-compose:1.3.0-alpha07
, and androidx.activity:activity-ktx:1.3.0-alpha07
are released. Version 1.3.0-alpha07 contains these commits.
বাগ ফিক্স
-
rememberLauncherForActivityResult
now returns a stable reference to the sameActivityResultLauncher
instance even if the contract changes due to recompositions. ( Id2d6d ) - Using unstable versions of Fragments above
1.3.0
will no longer throw a false positive lint error telling you to use1.3.0
. ( aosp/1670206 , b/184847092 )
Version 1.3.0-alpha06
৭ এপ্রিল, ২০২১
androidx.activity:activity:1.3.0-alpha06
, androidx.activity:activity-compose:1.3.0-alpha06
, and androidx.activity:activity-ktx:1.3.0-alpha06
are released. Version 1.3.0-alpha06 contains these commits.
API পরিবর্তনগুলি
- The
registerForActivityResult()
API has been renamed torememberLauncherForActivityResult()
to better indicate that the returnedActivityResultLauncher
is a managed object that is remembered on your behalf. Attempting to callunregister
the returnedActivityResultLauncher
will now throw an error. ( I2bb6d ) -
LocalOnBackPressedDispatcherOwner.current
andLocalActivityResultRegistryOwner.current
now return a nullable value to better determine whether it is available in the current composition. APIs that requires those APIs, such asBackHandler
andrememberLauncherForActivityResult()
, respectively, will now throw a more descriptive error if the underlying owner is not found.NavHost
now works even when anOnBackPressedDispatcherOwner
is not found, such is the case when previewing theNavHost
. ( I7d8b4 )
বাগ ফিক্স
- The
BackHandler
will now properly intercept back presses in the event that the Activity isSTOPPED
, thenSTARTED
again, and other callbacks were added with a LifecycleOwner. ( I71de6 , b/182284739 ) - Using the
launch()
method extension with a customActivityResultContract
that has aUnit
input will no longer cause aNullPointerException
( I76282 , b/183837954 )
Version 1.3.0-alpha05
২৪ মার্চ, ২০২১
androidx.activity:activity:1.3.0-alpha05
, androidx.activity:activity-compose:1.3.0-alpha05
, and androidx.activity:activity-ktx:1.3.0-alpha05
are released. Version 1.3.0-alpha05 contains these commits.
বাগ ফিক্স
- From Activity 1.2.2 : Fixed an issue in the
InvalidFragmentVersionForActivityResult
lint check that led to a false positive when using Fragment 1.3.1 or higher. ( I54da1 , b/182388985 ) - From Activity 1.2.2 :
ComponentActivity
now avoids aClassNotFoundException
when launching anIntent
from anActivityResultContract
that was previously held as an extra in anotherIntent
. ( Ieff05 , b/182906230 )
Dependency Updates
- From Activity 1.2.2 : Activity now depends on Lifecycle
2.3.1
.
Version 1.3.0-alpha04
১০ মার্চ, ২০২১
androidx.activity:activity:1.3.0-alpha04
, androidx.activity:activity-compose:1.3.0-alpha04
, and androidx.activity:activity-ktx:1.3.0-alpha04
are released. Version 1.3.0-alpha04 contains these commits.
বাগ ফিক্স
- From Activity
1.2.1
:RequestMultiplePermissions
now always returns results for all requested permissions instead of only permissions that weren't previously granted. ( I50bc3 , b/180884668 ) - From Activity
1.2.1
:ActivityResultRegistry
now ensures that in progresslaunch()
requests will return their results even if youunregister()
, thenregister()
again with the same key. ( I9ef34 , b/181267562 ) - Activity Compose no longer adds test dependencies to the runtime classpath. ( Ifd8b3 )
- Fixed an issue with
BackHandler
where the previously setonBack
lambda was still being used after recomposition. ( 8eb5eb )
Version 1.3.0-alpha03
২৪ ফেব্রুয়ারী, ২০২১
androidx.activity:activity:1.3.0-alpha03
, androidx.activity:activity-compose:1.3.0-alpha03
, and androidx.activity:activity-ktx:1.3.0-alpha03
are released. Version 1.3.0-alpha03 contains these commits.
নতুন বৈশিষ্ট্য
- There is a now a Composable
registerForActivityResult
function for getting results from activities within composables. ( Ia7851 , b/172690553 )
API পরিবর্তনগুলি
-
LocalOnBackPressedDispatcherOwner
now has aprovides
functions that can be used withCompositionLocalProvider
, replacing theasProvidableCompositionLocal()
API. ( I45d24 )
Version 1.3.0-alpha02
১০ ফেব্রুয়ারী, ২০২১
androidx.activity:activity:1.3.0-alpha02
, androidx.activity:activity-compose:1.3.0-alpha02
, and androidx.activity:activity-ktx:1.3.0-alpha02
are released. Version 1.3.0-alpha02 contains these commits.
বাগ ফিক্স
- Fixed an issue in Activity Compose
1.3.0-alpha01
that causes aNoSuchMethodError: No static method setContent
exception when using Compose1.0.0-alpha12
. All Compose users should depend on1.3.0-alpha02
and above. ( b/179911234 )
API পরিবর্তনগুলি
- The
BackHandler
API can be used to allow a Composable to intercept the system back button. ( I58ed5 , b/172154006 )
Version 1.3.0-alpha01
১০ ফেব্রুয়ারী, ২০২১
androidx.activity:activity:1.3.0-alpha01
, androidx.activity:activity-compose:1.3.0-alpha01
, and androidx.activity:activity-ktx:1.3.0-alpha01
are released. Version 1.3.0-alpha01 contains these commits.
নতুন বৈশিষ্ট্য
- The new
activity-compose
artifact provides Jetpack Compose specific helpers forandroidx.activity
specific APIs.-
ComponentActivity.setContent
has moved fromandroidx.compose.ui.platform.setContent
toandroidx.activity.compose.setContent
. ( Icf416 )
-
জ্ঞাত সমস্যা
- Using Activity Compose
1.3.0-alpha01
and libraries that depend on it, such asandroidx.compose.ui:ui-test-junit4:1.0.0-alpha12
, will result in aNoSuchMethodError: No static method setContent
exception. ( b/179911234 )
Version 1.2.4
Version 1.2.4
২১ জুলাই, ২০২১
androidx.activity:activity:1.2.4
and androidx.activity:activity-ktx:1.2.4
are released. Version 1.2.4 contains these commits.
বাগ ফিক্স
- From Activity
1.3.0-rc02
: The ActivityResultRegistry callbacks are now properly saved and restored so callbacks are not duplicated in the savedState. ( I97816 , b/191893160 )
Version 1.2.3
Version 1.2.3
৫ মে, ২০২১
androidx.activity:activity:1.2.3
and androidx.activity:activity-ktx:1.2.3
are released. Version 1.2.3 contains these commits.
বাগ ফিক্স
- Using the
launch()
method extension with a customActivityResultContract
that has aUnit
input will no longer cause aNullPointerException
( I76282 , b/183837954 ) - Fixed a false positive lint error telling you to use Fragment
1.3.0
when using an snapshot, alpha, beta, or RC build of a newer version of Fragments. ( f4a57e , b/184847092 )
সংস্করণ 1.2.2
সংস্করণ 1.2.2
২৪ মার্চ, ২০২১
androidx.activity:activity:1.2.2
and androidx.activity:activity-ktx:1.2.2
are released. Version 1.2.2 contains these commits.
বাগ ফিক্স
- Fixed an issue in the
InvalidFragmentVersionForActivityResult
lint check that led to a false positive when using Fragment 1.3.1 or higher. ( I54da1 , b/182388985 ) -
ComponentActivity
now avoids aClassNotFoundException
when launching anIntent
from anActivityResultContract
that was previously held as an extra in anotherIntent
. ( Ieff05 , b/182906230 )
Dependency Updates
- Activity now depends on Lifecycle
2.3.1
.
সংস্করণ 1.2.1
সংস্করণ 1.2.1
১০ মার্চ, ২০২১
androidx.activity:activity:1.2.1
and androidx.activity:activity-ktx:1.2.1
are released. Version 1.2.1 contains these commits.
বাগ ফিক্স
-
RequestMultiplePermissions
now always returns results for all requested permissions instead of only permissions that weren't previously granted. ( I50bc3 , b/180884668 ) -
ActivityResultRegistry
now ensures that in progresslaunch()
requests will return their results even if youunregister()
, thenregister()
again with the same key. ( I9ef34 , b/181267562 )
সংস্করণ 1.2.0
সংস্করণ 1.2.0
১০ ফেব্রুয়ারী, ২০২১
androidx.activity:activity:1.2.0
and androidx.activity:activity-ktx:1.2.0
are released. Version 1.2.0 contains these commits.
Major changes since 1.1.0
- Activity Result APIs :
ComponentActivity
now provides anActivityResultRegistry
that lets you handlestartActivityForResult()
+onActivityResult()
as well asrequestPermissions()
+onRequestPermissionsResult()
flows without overriding methods in your Activity or Fragment, brings increased type safety viaActivityResultContract
, and provides hooks for testing these flows. See the updated Getting a Result from an Activity .
ContextAware
:ComponentActivity
now implementsContextAware
, allowing you to add one or moreOnContextAvailableListener
instances which will receive a callback before the baseActivity.onCreate()
.- A suspending Kotlin extension
withContextAvailable()
allows you to run a non-suspending block when the Context becomes available and return a result. - This API is used by
FragmentActivity
in Fragment 1.3.0 to restore the state of theFragmentManager
. Any listeners added to subclasses ofFragmentActivity
will run after that listener. - This API is used by
AppCompatActivity
in AppCompat 1.3.0-alpha02 or higher. Any listeners added to subclasses ofAppCompatActivity
will run after that listener.
- A suspending Kotlin extension
ViewTree
Support :ComponentActivity
now supports theViewTreeLifecycleOwner.get(View)
,ViewTreeViewModelStoreOwner.get(View)
, andViewTreeSavedStateRegistryOwner
APIs added in Lifecycle2.3.0
and SavedState1.1.0
such that it will return the Activity as theLifecycleOwner
,ViewModelStoreOwner
, andSavedStateRegistryOwner
for any Views directly added to theComponentActivity
.
- reportFullyDrawn() backport - The
Activity
method ofreportFullyDrawn()
has been backported inComponentActivity
to work on all API levels, fixing a crash on API 19 and adding tracing for this method for all API levels.
Version 1.2.0-rc01
১৬ ডিসেম্বর, ২০২০
androidx.activity:activity:1.2.0-rc01
and androidx.activity:activity-ktx:1.2.0-rc01
are released. Version 1.2.0-rc01 contains these commits.
বাগ ফিক্স
- The
ActivityResultRegistry
now always restores the exact state that was saved. ( Idd56b ) - Add tracing to
ComponentActivity.reportFullyDrawn
( Ic7632 )
বহিরাগত অবদান
-
ComponentActivity
now overridesreportFullyDrawn()
, allowing it to be called on all API levels and fixing a crash when calling this method without the appropriate system permission on API 19 devices. Thanks Simon Schiller! ( b/163239764 , #103 )
Version 1.2.0-beta02
২ ডিসেম্বর, ২০২০
androidx.activity:activity:1.2.0-beta02
and androidx.activity:activity-ktx:1.2.0-beta02
are released. Version 1.2.0-beta02 contains these commits.
বাগ ফিক্স
- Fixed an issue where the Activity Result API would not wait for the Lifecycle to be
STARTED
before delivering results when registered with aLifecycle
. ( I109ea )
বহিরাগত অবদান
- Updated the documentation for
launch()
to explicitly call out that it can throw anActivityNotFoundException
. Thanks Michał Zieliński! ( aosp/1493580 )
Version 1.2.0-beta01
১ অক্টোবর, ২০২০
androidx.activity:activity:1.2.0-beta01
and androidx.activity:activity-ktx:1.2.0-beta01
are released. Version 1.2.0-beta01 contains these commits.
বাগ ফিক্স
The
ActivityResultRegistry
now randomly generates integers until it finds one that is unallocated to use as a request coderegister()
, thus preventing the possible integer overflow caused by incrementing request codes. ( b/168779518 )Lifecycle
observers are properly removed when callingunregister()
on anActivityResultLauncher
. ( b/165608393 )
আচরণগত পরিবর্তন
- The
ActivityResultRegistry
now throws anIllegalStateException
when attempting to callregister()
with aLifecycleOwner
whoseLifecycle
has already reachedSTARTED
. ( b/165435866 )
Documentation Updated
-
ContextAware
documentation links toLifecycleOwner
to highlightLifecycle
callbacks as the appropriate place for creation and destruction events. ( aosp/1414152 )
Version 1.2.0-alpha08
১৯ আগস্ট, ২০২০
androidx.activity:activity:1.2.0-alpha08
and androidx.activity:activity-ktx:1.2.0-alpha08
are released. Version 1.2.0-alpha08 contains these commits.
নতুন বৈশিষ্ট্য
-
ComponentActivity
now implementsContextAware
, allowing you to add one or moreOnContextAvailableListener
instances which will receive a callback before the baseActivity.onCreate()
. ( b/161390636 )- A suspending Kotlin extension
withContextAvailable()
allows you to run a non-suspending block when the Context becomes available and return a result. ( I8290c ) - This API is used by
FragmentActivity
in Fragment 1.3.0-alpha08 to restore the state of theFragmentManager
. Any listeners added to subclasses ofFragmentActivity
will run after that listener. ( I513da ) - This API is used by
AppCompatActivity
in AppCompat 1.3.0-alpha02 . Any listeners added to subclasses ofAppCompatActivity
will run after that listener. ( I513da )
- A suspending Kotlin extension
বাগ ফিক্স
- Fixed an issue with the
ActivityResultFragmentVersionDetector
Lint check that caused it to break when using Lint 27.1.0 or higher. ( b/162155191 )
Version 1.2.0-alpha07
জুলাই ২২, ২০২০
androidx.activity:activity:1.2.0-alpha07
and androidx.activity:activity-ktx:1.2.0-alpha07
are released. Version 1.2.0-alpha07 contains these commits.
নতুন বৈশিষ্ট্য
- Added a new
InvalidFragmentVersionForActivityResult
lint check that verifies that you are using Fragment1.3.0-alpha07
when using the Activity Result API , avoiding runtime crashes due to “invalid request code” issues and non-functioning permission requests caused by using older versions of Fragments. ( b/152554847 )
বহিরাগত অবদান
- Fixed an
ArrayIndexOutOfBoundsException
when parsing the results for theRequestPermission
Activity Result contract. ( I8f9e3 , b/161057605 )
Version 1.2.0-alpha06
১০ জুন, ২০২০
androidx.activity:activity:1.2.0-alpha06
and androidx.activity:activity-ktx:1.2.0-alpha06
are released. Version 1.2.0-alpha06 contains these commits.
নতুন বৈশিষ্ট্য
- You can now destructure the
ActivityResult
class in kotlin to directly access therequestCode
andintent
. ( b/157212935 ) -
ActivityResultLauncher
now allows you to get theActivityResultContract
that was used to register the launcher. ( b/156875743 )
API পরিবর্তনগুলি
- Breaking change : The
invoke()
method onActivityResultRegistry
has been renamed toonLaunch()
. ( b/157496491 ) - The
OpenMultipleDocuments
contract now returns an empty list instead ofnull
to the registered callback if no result is returned. ( b/157348014 )
Version 1.2.0-alpha05
২০ মে, ২০২০
androidx.activity:activity:1.2.0-alpha05
and androidx.activity:activity-ktx:1.2.0-alpha05
are released. Version 1.2.0-alpha05 contains these commits.
নতুন বৈশিষ্ট্য
- Added support for
ViewTreeViewModelStoreOwner
from Lifecycle2.3.0-alpha03
, andViewTreeSavedStateRegistryOwner
from SavedState1.1.0-alpha01
when using aView
within aComponentActivity
. ( aosp/1297993 , aosp/1300264 )
API পরিবর্তনগুলি
- The
TakePicture
contract now returns aboolean
indicating success rather than a thumbnailBitmap
as this was very rarely supported by camera apps when writing the image to the providedUri
. ( b/154302879 ) - The
invoke()
extensions onActivityResultLauncher
have been removed in favor of explicitly usinglaunch()
to better indicate that these are asynchronous operations. Kotlin extensions forlaunch
have been added to theandroidx.activity.result
package forActivityResultLauncher<Void>
andActivityResultLauncher<Unit>
that remove the need to pass innull
orUnit
, respectively, mirroring that behavior from the previouslyinvoke()
extensions. ( aosp/1304674 , aosp/1304675 ) - The
IntentSenderRequest.Builder
methods forsetFlagsMask()
andsetFlagsValues()
has been combined into a singlesetFlags()
method. ( aosp/1302111 )
বাগ ফিক্স
- When registering an
ActivityResultCallback
with aLifecycleOwner
, fixed an issue where the callback would be triggered before the state reachesSTARTED
. ( aosp/1309744 )
আচরণগত পরিবর্তন
- The
ActivityResultRegistry
now generates request codes starting at0xFFFF
rather than at0
, preventing overlap when usingstartActivityForResult()
orrequestPermissions()
in an activity. ( aosp/1302324 )
Version 1.2.0-alpha04
২৯ এপ্রিল, ২০২০
androidx.activity:activity:1.2.0-alpha04
and androidx.activity:activity-ktx:1.2.0-alpha04
are released. Version 1.2.0-alpha04 contains these commits.
নতুন বৈশিষ্ট্য
- Added a contract that can call startIntentSenderForResult to the ActivityResult APIs. ( b/153007517 )
API পরিবর্তনগুলি
- The
prepareCall()
method has been renamed toregisterForActivityResult()
, both onComponentActivity
here and in Fragment1.3.0-alpha04
. ( aosp/1278717 ) - The
GetContents
,OpenDocuments
, andRequestPermissions
contracts have been renamed toGetMultipleContents
,OpenMultipleDocuments
, andRequestMultiplePermissions
, respectively. ( aosp/1280161 ) -
ComponentActivity
now implements theActivityResultRegisteryOwner
interface. ( aosp/1290888 ) - - The
startActivityForResult()
/onActivityResult()
andonRequestPermissionsResult()
APIs onComponentActivity
have been deprecated. Please use the Activity Result APIs . ( b/154751887 )
বাগ ফিক্স
- When using the
GetMultipleContents
andOpenMultipleDocuments
contracts and selecting a single item, it is now correctly returned to your callback. ( b/152941153 )
Version 1.2.0-alpha03
১ এপ্রিল, ২০২০
androidx.activity:activity:1.2.0-alpha03
and androidx.activity:activity-ktx:1.2.0-alpha03
are released. Version 1.2.0-alpha03 contains these commits.
নতুন বৈশিষ্ট্য
- Added the
TakeVideo
,PickContact
,GetContent
,GetContents
,OpenDocument
,OpenDocuments
,OpenDocumentTree
, andCreateDocument
contracts to the set of pre-built contracts provided byActivityResultContracts
. ( aosp/1262482 , aosp/1266916 , aosp/1268960 ) - The Activity Result APIs now support launching an activity for result with an optional
ActivityOptionsCompat
. ( b/151860054 )
API পরিবর্তনগুলি
- The
TakePicture
contract now takes aUri
input for where the image should be stored. The previous contract that does not take any input has been renamed toTakePicturePreview
. ( aosp/1262482 ) - The
registerActivityResultCallback()
method onActivityResultRegistry
has been renamed toregister()
. ( aosp/1267621 ) - The
dispose()
method onActivityResultLauncher
has been renamed tounregister()
and theunregisterResultCallback()
onActivityResultRegistry
has been removed. ( aosp/1267621 ) - The
createIntent()
method ofActivityResultContact
now takes aContext
in addition to the input to make it possible to create explicit Intents. ( aosp/1238800 ) - An
ActivityResultContract
can now overridegetSynchronousResult()
to deliver a result without callingstartActivityForResult
. This is used by theRequestPermission
andRequestPermissions
contracts to correctly deliver a 'granted' status if the requested permissions are already granted. ( b/151110799 ) - The previously available
Dial
contract has been removed as thatIntent
is not meant to be used withstartActivityForResult()
. ( aosp/1266916 ) - Many of the Activity Result APIs not meant to be extended are now
final
. This includesgetActivityResultRegistry()
, theprepareCall()
methods, all methods ofActivityResultRegistry
exceptinvoke()
, and a number of the default contracts that do not support optional extras. ( b/152439361 )
বাগ ফিক্স
- Fixed a
NullPointerException
inActivityResultRegistry
when attempting to deliver results to a callback that has not yet been re-registered after a configuration change;ActivityResultRegistry
now holds onto these pending results and delivers them when the callback is re-registered. ( b/152137004 )
Version 1.2.0-alpha02
১৮ মার্চ, ২০২০
androidx.activity:activity:1.2.0-alpha02
and androidx.activity:activity-ktx:1.2.0-alpha02
are released. Version 1.2.0-alpha02 contains these commits.
নতুন বৈশিষ্ট্য
- ActivityResultRegistry :
ComponentActivity
now provides anActivityResultRegistry
that lets you handle thestartActivityForResult()
+onActivityResult()
as well asrequestPermissions()
+onRequestPermissionsResult()
flows without overriding methods in your Activity or Fragment, brings increased type safety viaActivityResultContract
, and provides hooks for testing these flows. See the updated Getting a Result from an Activity . ( b/125158199 )
Version 1.2.0-alpha01
৪ মার্চ, ২০২০
androidx.activity:activity:1.2.0-alpha01
and androidx.activity:activity-ktx:1.2.0-alpha01
are released. Version 1.2.0-alpha01 contains these commits.
নতুন বৈশিষ্ট্য
- Added support for the
ViewTreeLifecycleOwner.get(View)
API added in Lifecycle2.3.0-alpha01
such that it will return the Activity as theLifecycleOwner
for any Views directly added to the Activity. ( aosp/1182955 )
বাগ ফিক্স
- Fixed a regression introduced in Activity
1.1.0
when running on older versions of the platform whereonBackPressed()
would cause anIllegalStateException
due to a bug in theandroid.app.FragmentManager
. ( b/146290338 )
সংস্করণ 1.1.0
সংস্করণ 1.1.0
২২ জানুয়ারী, ২০২০
androidx.activity:activity:1.1.0
is released. Version 1.1.0 contains these commits .
১.০.০ থেকে গুরুত্বপূর্ণ পরিবর্তনগুলি
- Lifecycle ViewModel SavedState Integration :
SavedStateViewModelFactory
is now the default factory used when usingby viewModels()
, theViewModelProvider
constructor, orViewModelProviders.of()
with aComponentActivity
or its subclasses.
Version 1.1.0-rc03
৪ ডিসেম্বর, ২০১৯
androidx.activity:activity:1.1.0-rc03
and androidx.activity:activity-ktx:1.1.0-rc03
are released. Version 1.1.0-rc03 contains these commits .
Dependency changes
- Activity now depends on Lifecycle
2.2.0-rc03
and Lifecycle ViewModel SavedState1.0.0-rc03
.
Version 1.1.0-rc02
৭ নভেম্বর, ২০১৯
androidx.activity:activity:1.1.0-rc02
and androidx.activity:activity-ktx:1.1.0-rc02
are released. Version 1.1.0-rc02 contains these commits .
Dependency changes
- Activity now depends on lifecycle
2.2.0-rc02
.
সংস্করণ 1.1.0-rc01
October 23, 2019
androidx.activity:activity:1.1.0-rc01
and androidx.activity:activity-ktx:1.1.0-rc01
are released with no changes from 1.1.0-beta01
. Version 1.1.0-rc01 contains these commits .
সংস্করণ 1.1.0-beta01
৯ অক্টোবর, ২০১৯
androidx.activity:activity:1.1.0-beta01
and androidx.activity:activity-ktx:1.1.0-beta01
are released. Version 1.1.0-beta01 contains these commits .
Dependency changes
- Activity now depends on SavedState 1.0.0 stable.
Version 1.1.0-alpha03
৫ সেপ্টেম্বর, ২০১৯
androidx.activity:activity:1.1.0-alpha03
and androidx.activity:activity-ktx:1.1.0-alpha03
are released. The commits included in this version can be found here .
নতুন বৈশিষ্ট্য
- Activity now depends on Core 1.1.0 stable.
বাগ সংশোধন
- Activity now depends on Lifecycle
2.2.0-alpha04
.
Version 1.1.0-alpha02
৭ আগস্ট, ২০১৯
androidx.activity:activity:1.1.0-alpha02
and androidx.activity:activity-ktx:1.1.0-alpha02
are released. The commits included in this version can be found here .
নতুন বৈশিষ্ট্য
-
SavedStateViewModelFactory
is now the default factory used when usingby viewModels()
, theViewModelProvider
constructor, orViewModelProviders.of()
with aComponentActivity
( b/135716331 )
সংস্করণ 1.1.0-alpha01
২ জুলাই, ২০১৯
androidx.activity:activity:1.1.0-alpha01
and androidx.activity:activity-ktx:1.1.0-alpha01
are released. The commits included in this version can be found here .
নতুন বৈশিষ্ট্য
-
activity
now depends on Lifecycle2.2.0-alpha02
. ( aosp/1007817 ) -
activity-ktx
added a dependency onlifecycle-runtime-ktx
; you no longer need to explicitly add it to your dependencies when usingactivity-ktx
or libraries that depend onactivity-ktx
(such asfragment-ktx
). ( aosp/987162 )
সংস্করণ 1.0.0
সংস্করণ 1.0.0
৫ সেপ্টেম্বর, ২০১৯
androidx.activity:activity:1.0.0
and androidx.activity:activity-ktx:1.0.0
are released. The commits included in this version can be found here .
Major Features of 1.0.0
- ComponentActivity :
ComponentActivity
serves as the new base class forFragmentActivity
in Fragment1.1.0
and, by extension,AppCompatActivity
in AppCompat1.1.0
. - activity-ktx : The
activity-ktx
module includes aby viewModels
Kotlin property extension for accessing ViewModels. This module is automatically included when you includefragment-ktx
from Fragment1.1.0
. - OnBackPressedDispatcher : As a composable alternative to overriding
onBackPressed()
, you can now register aOnBackPressedCallback
from anyLifecycleOwner
(such as a fragment) to intercept system back button events. A lambda with receiver versionaddCallback
has been added toactivity-ktx
. See Provide custom back navigation documentation for more details. - onRetainCustomNonConfigurationInstance deprecation : the
onRetainCustomNonConfigurationInstance()
and the relatedgetLastCustomNonConfigurationInstance()
APIs have been deprecated. It is strongly recommended to use ViewModels to store non-configuration state as they offer a composable solution suitable for anyViewModelStoreOwner
that makes the ownership of the retained objects clear and provides anonCleared()
callback for cleaning up resources when the activity is finally destroyed.
সংস্করণ 1.0.0-rc01
২ জুলাই, ২০১৯
androidx.activity:activity:1.0.0-rc01
and androidx.activity:activity-ktx:1.0.0-rc01
are released with no changes from 1.0.0-beta01
. The commits included in this version can be found here .
সংস্করণ 1.0.0-beta01
৫ জুন, ২০১৯
androidx.activity::activity:1.0.0-beta01
and androidx.activity:activity-ktx:1.0.0-beta01
are released with no changes from 1.0.0-alpha08
. The commits included in this version can be found here .
সংস্করণ 1.0.0-alpha08
May 7, 2019
androidx.activity:activity:1.0.0-alpha08
and androidx.activity:activity-ktx:1.0.0-alpha08
are released. The commits included in this version can be found here .
API changes
- Breaking change: The previously deprecated
addOnBackPressedCallback
andremoveOnBackPressedCallback
methods onComponentActivity
have been removed. aosp/953857 - The
setEnabled()
andisEnabled()
methods ofOnBackPressedCallback
are now final. b/131416833 - The
remove()
method ofOnBackPressedCallback
is now final. aosp/952720 -
OnBackPressedDispatcher
now has public constructors, allowing you to construct your own instances for testing, etc. aosp/953431 -
onBackPressed()
forComponentActivity
is now explicitly marked as@MainThread
aosp/952721
বাগ সংশোধন
- Fixed a
ConcurrentModificationException
when callingremove()
from within thehandleOnBackPressed()
method of aOnBackPressedCalback
that was added with aLifecycleOwner
. b/131765095
সংস্করণ 1.0.0-alpha07
April 25th, 2019
androidx.activity:activity:1.0.0-alpha07
and androidx.activity:activity-ktx:1.0.0-alpha07
are released. The commits included in this version can be found here .
API changes
This release makes significant changes to the handling of the onBackPressed()
. See the updated custom back documentation for more details.
- The methods for
OnBackPressedCallback
andOnBackPressedDispatcher
have been marked as@MainThread
. ( aosp/943813 ) - The
handleOnBackPressed()
method no longer returns aboolean
. Instead,OnBackPressedCallback
is now an abstract class that can be enabled or disabled - only when the newisEnabled()
method returns true willhandleOnBackPressed()
be called, in which you must handle the back button. ( aosp/944518 ) - The
addCallback
methods ofOnBackPressedDispatcher
no longer return aCancellable
instance.OnBackPressedCallback
now contain aremove()
method that fulfill this functionality, allowing you to callremove()
duringhandleOnBackPressed()
. ( aosp/944519 ) ( aosp/946316 ) -
activity-ktx
now contains a receiver scoped callback foraddCallback
that accepts a lamdba that implementshandleOnBackPressed()
and has access toisEnabled
andremove()
( aosp/944520 )
সংস্করণ 1.0.0-alpha06
April 3rd, 2019
androidx.activity:activity:1.0.0-alpha06
and androidx.activity:activity-ktx:1.0.0-alpha06
are released. The commits included in this version can be found here .
API changes
- ComponentActivity now contain a second constructor that takes a
@LayoutRes int
, which replaces the previous behavior of annotating your AppCompatActivity class with@ContentView
. This approach works in both app and library modules. ( b/128352521 ) - The
OnBackPressedCallback
related APIs on ComponentActivity have been deprecated in favor of the newOnBackPressedDispatcher
, retrievable viagetOnBackPressedDispatcher()
. ( aosp/922523 ) - Methods to add a new
OnBackPressedCallback
to theOnBackPressedDispatcher
now return aCancellable
object, allowing removal of the callback without requiring an explicit reference to theOnBackPressedDispatcher
. ( aosp/922523 ) - Adding a
OnBackPressedCallback
with an associatedLifecycleOwner
now results in adding and removing theOnBackPressedCallback
as the Lifecycle is started and stopped, respectively. ( aosp/922523 )
সংস্করণ 1.0.0-alpha05
March 13th, 2019
androidx.activity:activity:1.0.0-alpha05
and androidx.activity:activity-ktx:1.0.0-alpha05
are released. The full list of commits included in this release can be found here .
নতুন বৈশিষ্ট্য
-
@ContentView
annotation lookups are now cached ( b/123709449 )
সংস্করণ 1.0.0-alpha04
৩০ জানুয়ারী, ২০১৯
androidx.activity:activity 1.0.0-alpha04
and androidx.activity:activity-ktx 1.0.0-alpha04
are released.
নতুন বৈশিষ্ট্য
- Added support for the
@ContentView
class annotation that allows you to indicate which layout XML file should be inflated as an alternative to usingsetContentView()
. ( aosp/837619 )
API changes
- Added a note that
getViewModelStore()
should not be overridden and will be made final in a future release. Please file a feature request if you are currently overriding this method. ( aosp/837619 )
বাগ সংশোধন
- The
activity
module now depends on version 2.1.0-alpha02 of ViewModel to match theactivity-ktx
module's dependency.
সংস্করণ 1.0.0-alpha03
December 17, 2018
androidx.activity 1.0.0-alpha03
is released.
নতুন বৈশিষ্ট্য
- ComponentActivity now implements
BundleSavedStateRegistryOwner
and depends on the newly released SavedState library [ aosp/815133 ] - ComponentActivity now works around an Android framework bug that would cause InputMethodManager to leak the last focused view [ b/37122102 ]
সংস্করণ 1.0.0-alpha02
December 3, 2018
API changes
- Added a note that
getLifecycle()
should not be overridden and will be madefinal
in a future release. Please file a feature request if you are currently overriding this method. ( aosp/815834 )
সংস্করণ 1.0.0-alpha01
November 5, 2018
androidx.activity 1.0.0-alpha01
introduces ComponentActivity
, a new base class of the existing FragmentActivity
and AppCompatActivity
.
নতুন বৈশিষ্ট্য
- You can now register an
OnBackPressedCallback
viaaddOnBackPressedCallback
to receiveonBackPressed()
callbacks without needing to override the method in your activity. - Added a new
by viewModels()
Kotlin property delegate for retrievingViewModel
s from aComponentActivity
. - Pending input events (such as clicks) are now canceled in
onStop()
.
API changes
- The implementation of
LifecycleOwner
andViewModelStoreOwner
have been moved fromFragmentActivity
toComponentActivity
. -
onRetainCustomNonConfigurationInstance
has been deprecated. Use aViewModel
for storing objects that need to survive configuration changes.