ফোরগ্রাউন্ড পরিষেবার প্রকারগুলি প্রয়োজন৷

ব্যবহারকারী-মুখী ফোরগ্রাউন্ড পরিষেবাগুলি সংজ্ঞায়িত করার সাথে বিকাশকারীদের আরও ইচ্ছাকৃত হতে সাহায্য করার জন্য, Android 10 <service> উপাদানের মধ্যে android:foregroundServiceType বৈশিষ্ট্যটি চালু করেছে।

আপনার অ্যাপ যদি Android 14 কে টার্গেট করে, তাহলে এটিকে অবশ্যই উপযুক্ত ফোরগ্রাউন্ড পরিষেবার ধরন নির্দিষ্ট করতে হবে। অ্যান্ড্রয়েডের পূর্ববর্তী সংস্করণগুলির মতো, একাধিক প্রকার একত্রিত করা যেতে পারে। এই তালিকাটি ফোরগ্রাউন্ড পরিষেবার প্রকারগুলি থেকে বেছে নেওয়ার জন্য দেখায়:

যদি আপনার অ্যাপে ব্যবহারের ক্ষেত্রে এই ধরনের কোনোটির সাথে যুক্ত না থাকে, তাহলে আমরা দৃঢ়ভাবে সুপারিশ করছি যে আপনি WorkManager বা ব্যবহারকারী-সূচিত ডেটা স্থানান্তর কাজগুলি ব্যবহার করতে আপনার যুক্তি স্থানান্তর করুন৷

health, remoteMessaging, shortService, specialUse এবং systemExempted প্রকারগুলি Android 14-এ নতুন।

নিম্নলিখিত কোড স্নিপেটটি ম্যানিফেস্টে একটি ফোরগ্রাউন্ড পরিষেবা প্রকার ঘোষণার একটি উদাহরণ প্রদান করে:

<manifest ...>
  <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
  <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
    <application ...>
      <service
          android:name=".MyMediaPlaybackService"
          android:foregroundServiceType="mediaPlayback"
          android:exported="false">
      </service>
    </application>
</manifest>

যদি Android 14 কে লক্ষ্য করে এমন একটি অ্যাপ ম্যানিফেস্টে একটি প্রদত্ত পরিষেবার প্রকারগুলিকে সংজ্ঞায়িত না করে, তাহলে সেই পরিষেবাটির জন্য startForeground() কল করার পরে সিস্টেমটি MissingForegroundServiceTypeException বাড়াবে৷

ফোরগ্রাউন্ড পরিষেবার প্রকারগুলি ব্যবহার করার জন্য নতুন অনুমতি ঘোষণা করুন৷

If apps that target Android 14 use a foreground service, they must declare a specific permission, based on the foreground service type, that Android 14 introduces. These permissions appear in the sections labeled "permission that you must declare in your manifest file" in the intended use cases and enforcement for each foreground service type section on this page.

All of the permissions are defined as normal permissions and are granted by default. Users cannot revoke these permissions.

রানটাইমে অগ্রভাগের পরিষেবার ধরন অন্তর্ভুক্ত করুন

The best practice for applications starting foreground services is to use the ServiceCompat version of startForeground() (available in androidx-core 1.12 and higher) where you pass in a bitwise integer of foreground service types. You can choose to pass one or more type values.

Usually, you should declare only the types required for a particular use case. This makes it easier to meet the system's expectations for each foreground service type. In cases where a foreground service is started with multiple types, then the foreground service must adhere to the platform enforcement requirements of all types.

ServiceCompat.startForeground(0, notification, FOREGROUND_SERVICE_TYPE_LOCATION)

If the foreground service type is not specified in the call, the type defaults to the values defined in the manifest. If you didn't specify the service type in the manifest, the system throws MissingForegroundServiceTypeException.

If the foreground service needs new permissions after you launch it, you should call startForeground() again and add the new service types. For example, suppose a fitness app runs a running-tracker service that always needs location information, but might or might not need media permissions. You would need to declare both location and mediaPlayback in the manifest. If a user starts a run and just wants their location tracked, your app should call startForeground() and pass just the location service type. Then, if the user wants to start playing audio, call startForeground() again and pass location|mediaPlayback.

সিস্টেম রানটাইম চেক

সিস্টেমটি ফোরগ্রাউন্ড পরিষেবার ধরনগুলির সঠিক ব্যবহারের জন্য পরীক্ষা করে এবং নিশ্চিত করে যে অ্যাপটি সঠিক রানটাইম অনুমতির জন্য অনুরোধ করেছে বা প্রয়োজনীয় API ব্যবহার করেছে৷ উদাহরণস্বরূপ, সিস্টেম আশা করে যে অ্যাপগুলি ফোরগ্রাউন্ড পরিষেবার প্রকার FOREGROUND_SERVICE_TYPE_LOCATION ব্যবহার করে ACCESS_COARSE_LOCATION বা ACCESS_FINE_LOCATION এর জন্য অনুরোধ করবে৷

এটি বোঝায় যে ব্যবহারকারীর কাছ থেকে অনুমতির অনুরোধ করার সময় এবং ফোরগ্রাউন্ড পরিষেবাগুলি শুরু করার সময় অ্যাপগুলিকে অবশ্যই একটি নির্দিষ্ট ক্রিয়াকলাপ অনুসরণ করতে হবে৷ অ্যাপটি startForeground() কে কল করার চেষ্টা করার আগে অনুমতির অনুরোধ করতে হবে এবং মঞ্জুর করতে হবে। যে অ্যাপগুলি ফোরগ্রাউন্ড পরিষেবা শুরু হওয়ার পরে উপযুক্ত অনুমতিগুলির জন্য অনুরোধ করে তাদের অবশ্যই এই ক্রিয়াকলাপের ক্রম পরিবর্তন করতে হবে এবং ফোরগ্রাউন্ড পরিষেবা শুরু করার আগে অনুমতির অনুরোধ করতে হবে৷

প্ল্যাটফর্ম প্রয়োগের সুনির্দিষ্ট বৈশিষ্ট্যগুলি এই পৃষ্ঠার প্রতিটি ফোরগ্রাউন্ড পরিষেবা প্রকার বিভাগের জন্য উদ্দেশ্যমূলক ব্যবহারের ক্ষেত্রে এবং প্রয়োগের ক্ষেত্রে "রানটাইম প্রয়োজনীয়তা" লেবেলযুক্ত বিভাগগুলিতে প্রদর্শিত হয়।

প্রতিটি ফোরগ্রাউন্ড পরিষেবার প্রকারের জন্য উদ্দেশ্যযুক্ত ব্যবহারের ক্ষেত্রে এবং প্রয়োগ

In order to use a given foreground service type, you must declare a particular permission in your manifest file, you must fulfill specific runtime requirements, and your app must fulfill one of the intended sets of use cases for that type. The following sections explain the permission that you must declare, the runtime prerequisites, and the intended use cases for each type.

ক্যামেরা

android:foregroundServiceType অধীনে ম্যানিফেস্টে ঘোষণা করার জন্য ফোরগ্রাউন্ড পরিষেবার ধরন
camera
আপনার ম্যানিফেস্টে ঘোষণা করার অনুমতি
FOREGROUND_SERVICE_CAMERA
startForeground() এ পাস করার জন্য ধ্রুবক
FOREGROUND_SERVICE_TYPE_CAMERA
রানটাইম পূর্বশর্ত

অনুরোধ করুন এবং CAMERA রানটাইম অনুমতি মঞ্জুর করুন৷

দ্রষ্টব্য: CAMERA রানটাইম অনুমতি ব্যবহারের সময় বিধিনিষেধ সাপেক্ষে। এই কারণে, কিছু ব্যতিক্রম ছাড়া আপনার অ্যাপটি ব্যাকগ্রাউন্ডে থাকাকালীন আপনি একটি camera ফোরগ্রাউন্ড পরিষেবা তৈরি করতে পারবেন না৷ আরও তথ্যের জন্য, ফোরগ্রাউন্ড পরিষেবাগুলি শুরু করার বিধিনিষেধগুলি দেখুন যার ব্যবহারের সময় অনুমতি প্রয়োজন ৷

বর্ণনা

পটভূমি থেকে ক্যামেরা অ্যাক্সেস করা চালিয়ে যান, যেমন ভিডিও চ্যাট অ্যাপ যা মাল্টিটাস্কিংয়ের অনুমতি দেয়।

সংযুক্ত ডিভাইস

Foreground service type to declare in manifest under
android:foregroundServiceType
connectedDevice
Permission to declare in your manifest
FOREGROUND_SERVICE_CONNECTED_DEVICE
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE
Runtime prerequisites

At least one of the following conditions must be true:

Description

Interactions with external devices that require a Bluetooth, NFC, IR, USB, or network connection.

Alternatives

If your app needs to do continuous data transfer to an external device, consider using the companion device manager instead. Use the companion device presence API to help your app stay running while the companion device is in range.

If your app needs to scan for bluetooth devices, consider using the Bluetooth scan API instead.

ডেটা সিঙ্ক

Foreground service type to declare in manifest under
android:foregroundServiceType
dataSync
Permission to declare in your manifest
FOREGROUND_SERVICE_DATA_SYNC
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_DATA_SYNC
Runtime prerequisites
None
Description

Data transfer operations, such as the following:

  • Data upload or download
  • Backup-and-restore operations
  • Import or export operations
  • Fetch data
  • Local file processing
  • Transfer data between a device and the cloud over a network
Alternatives

See Alternatives to data sync foreground services for detailed information.

স্বাস্থ্য

Foreground service type to declare in manifest under
android:foregroundServiceType
health
Permission to declare in your manifest
FOREGROUND_SERVICE_HEALTH
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_HEALTH
Runtime prerequisites

At least one of the following conditions must be true:

Note: The BODY_SENSORS and sensor-based READ runtime permissions are subject to while-in-use restrictions. For this reason, you cannot create a health foreground service that uses body sensors while your app is in the background unless you've been granted the BODY_SENSORS_BACKGROUND (API level 33 to 35) or READ_HEALTH_DATA_IN_BACKGROUND (API level 36 and higher) permissions. For more information, see Restrictions on starting foreground services that need while-in-use permissions.

Description

Any long-running use cases to support apps in the fitness category such as exercise trackers.

অবস্থান

Foreground service type to declare in manifest under
android:foregroundServiceType
location
Permission to declare in your manifest
FOREGROUND_SERVICE_LOCATION
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_LOCATION
Runtime prerequisites

The user must have enabled location services and the app must be granted at least one of the following runtime permissions:

Note: In order to check that the user has enabled location services as well as granted access to the runtime permissions, use PermissionChecker#checkSelfPermission()

Note: The location runtime permissions are subject to while-in-use restrictions. For this reason, you cannot create a location foreground service while your app is in the background, unless you've been granted the ACCESS_BACKGROUND_LOCATION runtime permission. For more information, see Restrictions on starting foreground services that need while-in-use permissions.

Description

Long-running use cases that require location access, such as navigation and location sharing.

Alternatives

If your app needs to be triggered when the user reaches specific locations, consider using the geofence API instead.

মিডিয়া

Foreground service type to declare in manifest under
android:foregroundServiceType
mediaPlayback
Permission to declare in your manifest
FOREGROUND_SERVICE_MEDIA_PLAYBACK
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
Runtime prerequisites
None
Description
Continue audio or video playback from the background. Support Digital Video Recording (DVR) functionality on Android TV.
Alternatives
If you're showing picture-in-picture video, use Picture-in-Picture mode.

মিডিয়া অভিক্ষেপ

ফোরগ্রাউন্ড পরিষেবার ধরন যা ম্যানিফেস্টের অধীনে ঘোষণা করতে হবে
android:foregroundServiceType
mediaProjection
আপনার ম্যানিফেস্টে ঘোষণা করার অনুমতি
FOREGROUND_SERVICE_MEDIA_PROJECTION
startForeground() এ পাস করার জন্য ধ্রুবক
FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
রানটাইম পূর্বশর্ত

ফোরগ্রাউন্ড পরিষেবা শুরু করার আগে createScreenCaptureIntent() পদ্ধতিতে কল করুন। এটি করা ব্যবহারকারীকে একটি অনুমতি বিজ্ঞপ্তি দেখায়; আপনি পরিষেবা তৈরি করার আগে ব্যবহারকারীকে অবশ্যই অনুমতি দিতে হবে।

আপনি ফোরগ্রাউন্ড পরিষেবা তৈরি করার পরে, আপনি MediaProjectionManager.getMediaProjection() কল করতে পারেন।

বর্ণনা

MediaProjection APIs ব্যবহার করে নন-প্রাথমিক ডিসপ্লে বা বাহ্যিক ডিভাইসে প্রজেক্ট কন্টেন্ট। এই বিষয়বস্তু একচেটিয়াভাবে মিডিয়া বিষয়বস্তু হতে হবে না.

বিকল্প

অন্য ডিভাইসে মিডিয়া স্ট্রিম করতে, Google Cast SDK ব্যবহার করুন৷

,
ফোরগ্রাউন্ড পরিষেবার ধরন যা ম্যানিফেস্টের অধীনে ঘোষণা করতে হবে
android:foregroundServiceType
mediaProjection
আপনার ম্যানিফেস্টে ঘোষণা করার অনুমতি
FOREGROUND_SERVICE_MEDIA_PROJECTION
startForeground() এ পাস করার জন্য ধ্রুবক
FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
রানটাইম পূর্বশর্ত

ফোরগ্রাউন্ড পরিষেবা শুরু করার আগে createScreenCaptureIntent() পদ্ধতিতে কল করুন। এটি করা ব্যবহারকারীকে একটি অনুমতি বিজ্ঞপ্তি দেখায়; আপনি পরিষেবা তৈরি করার আগে ব্যবহারকারীকে অবশ্যই অনুমতি দিতে হবে।

আপনি ফোরগ্রাউন্ড পরিষেবা তৈরি করার পরে, আপনি MediaProjectionManager.getMediaProjection() কল করতে পারেন।

বর্ণনা

MediaProjection APIs ব্যবহার করে নন-প্রাথমিক ডিসপ্লে বা বাহ্যিক ডিভাইসে প্রজেক্ট কন্টেন্ট। এই বিষয়বস্তু একচেটিয়াভাবে মিডিয়া বিষয়বস্তু হতে হবে না.

বিকল্প

অন্য ডিভাইসে মিডিয়া স্ট্রিম করতে, Google Cast SDK ব্যবহার করুন৷

,
ফোরগ্রাউন্ড পরিষেবার ধরন যা ম্যানিফেস্টের অধীনে ঘোষণা করতে হবে
android:foregroundServiceType
mediaProjection
আপনার ম্যানিফেস্টে ঘোষণা করার অনুমতি
FOREGROUND_SERVICE_MEDIA_PROJECTION
startForeground() এ পাস করার জন্য ধ্রুবক
FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
রানটাইম পূর্বশর্ত

ফোরগ্রাউন্ড পরিষেবা শুরু করার আগে createScreenCaptureIntent() পদ্ধতিতে কল করুন। এটি করা ব্যবহারকারীকে একটি অনুমতি বিজ্ঞপ্তি দেখায়; আপনি পরিষেবা তৈরি করার আগে ব্যবহারকারীকে অবশ্যই অনুমতি দিতে হবে।

আপনি ফোরগ্রাউন্ড পরিষেবা তৈরি করার পরে, আপনি MediaProjectionManager.getMediaProjection() কল করতে পারেন।

বর্ণনা

MediaProjection APIs ব্যবহার করে নন-প্রাথমিক ডিসপ্লে বা বাহ্যিক ডিভাইসে প্রজেক্ট কন্টেন্ট। এই বিষয়বস্তু একচেটিয়াভাবে মিডিয়া বিষয়বস্তু হতে হবে না.

বিকল্প

অন্য ডিভাইসে মিডিয়া স্ট্রিম করতে, Google Cast SDK ব্যবহার করুন৷

,
ফোরগ্রাউন্ড পরিষেবার ধরন যা ম্যানিফেস্টের অধীনে ঘোষণা করতে হবে
android:foregroundServiceType
mediaProjection
আপনার ম্যানিফেস্টে ঘোষণা করার অনুমতি
FOREGROUND_SERVICE_MEDIA_PROJECTION
startForeground() এ পাস করার জন্য ধ্রুবক
FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
রানটাইম পূর্বশর্ত

ফোরগ্রাউন্ড পরিষেবা শুরু করার আগে createScreenCaptureIntent() পদ্ধতিতে কল করুন। এটি করা ব্যবহারকারীকে একটি অনুমতি বিজ্ঞপ্তি দেখায়; আপনি পরিষেবা তৈরি করার আগে ব্যবহারকারীকে অবশ্যই অনুমতি দিতে হবে।

আপনি ফোরগ্রাউন্ড পরিষেবা তৈরি করার পরে, আপনি MediaProjectionManager.getMediaProjection() কল করতে পারেন।

বর্ণনা

MediaProjection APIs ব্যবহার করে নন-প্রাথমিক ডিসপ্লে বা বাহ্যিক ডিভাইসে প্রজেক্ট কন্টেন্ট। এই বিষয়বস্তু একচেটিয়াভাবে মিডিয়া বিষয়বস্তু হতে হবে না.

বিকল্প

অন্য ডিভাইসে মিডিয়া স্ট্রিম করতে, Google Cast SDK ব্যবহার করুন৷

মাইক্রোফোন

Foreground service type to declare in manifest under
android:foregroundServiceType
microphone
Permission to declare in your manifest
FOREGROUND_SERVICE_MICROPHONE
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_MICROPHONE
Runtime prerequisites

Request and be granted the RECORD_AUDIO runtime permission.

Note: The RECORD_AUDIO runtime permission is subject to while-in-use restrictions. For this reason, you cannot create a microphone foreground service while your app is in the background, with a few exceptions. For more information, see Restrictions on starting foreground services that need while-in-use permissions.

Description

Continue microphone capture from the background, such as voice recorders or communication apps.

ফোন কল

Foreground service type to declare in manifest under
android:foregroundServiceType
phoneCall
Permission to declare in your manifest
FOREGROUND_SERVICE_PHONE_CALL
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_PHONE_CALL
Runtime prerequisites

At least one of these conditions must be true:

  • App is the default dialer app through the ROLE_DIALER role.
Description

Continue an ongoing call using the ConnectionService APIs.

Alternatives

If you need to make phone, video, or VoIP calls, consider using the android.telecom library.

Consider using CallScreeningService to screen calls.

রিমোট মেসেজিং

Foreground service type to declare in manifest under
android:foregroundServiceType
remoteMessaging
Permission to declare in your manifest
FOREGROUND_SERVICE_REMOTE_MESSAGING
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING
Runtime prerequisites
None
Description
Transfer text messages from one device to another. Assists with continuity of a user's messaging tasks when they switch devices.

সংক্ষিপ্ত পরিষেবা

Foreground service type to declare in manifest under
android:foregroundServiceType
shortService
Permission to declare in your manifest
None
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_SHORT_SERVICE
Runtime prerequisites
None
Description

Quickly finish critical work that cannot be interrupted or postponed.

This type has some unique characteristics:

  • Can only run for a short period of time (about 3 minutes).
  • No support for sticky foreground services.
  • Cannot start other foreground services.
  • Doesn't require a type-specific permission, though it still requires the FOREGROUND_SERVICE permission.
  • A shortService can only change to another service type if the app is currently eligible to start a new foreground service.
  • A foreground service can change its type to shortService at any time, at which point the timeout period begins.

The timeout for shortService begins from the moment that Service.startForeground() is called. The app is expected to call Service.stopSelf() or Service.stopForeground() before the timeout occurs. Otherwise, the new Service.onTimeout() is called, giving apps a brief opportunity to call stopSelf() or stopForeground() to stop their service.

A short time after Service.onTimeout() is called, the app enters a cached state and is no longer considered to be in the foreground, unless the user is actively interacting with the app. A short time after the app is cached and the service has not stopped, the app receives an ANR. The ANR message mentions FOREGROUND_SERVICE_TYPE_SHORT_SERVICE. For these reasons, it's considered best practice to implement the Service.onTimeout() callback.

The Service.onTimeout() callback doesn't exist on Android 13 and lower. If the same service runs on such devices, it doesn't receive a timeout, nor does it ANR. Make sure that your service stops as soon as it finishes the processing task, even if it hasn't received the Service.onTimeout() callback yet.

It's important to note that if the timeout of the shortService is not respected, the app will ANR even if it has other valid foreground services or other app lifecycle processes running.

If an app is visible to the user or satisfies one of the exemptions that allow foreground services to be started from the background, calling Service.StartForeground() again with the FOREGROUND_SERVICE_TYPE_SHORT_SERVICE parameter extends the timeout by another 3 minutes. If the app isn't visible to the user and doesn't satisfy one of the exemptions, any attempt to start another foreground service, regardless of type, causes a ForegroundServiceStartNotAllowedException.

If a user disables battery optimization for your app, it's still affected by the timeout of shortService FGS.

If you start a foreground service that includes the shortService type and another foreground service type, the system ignores the shortService type declaration. However, the service must still adhere to the prerequisites of the other declared types. For more information, see the Foreground services documentation.

বিশেষ ব্যবহার

Foreground service type to declare in manifest under
android:foregroundServiceType
specialUse
Permission to declare in your manifest
FOREGROUND_SERVICE_SPECIAL_USE
Constant to pass to startForeground()
FOREGROUND_SERVICE_TYPE_SPECIAL_USE
Runtime prerequisites
None
Description

Covers any valid foreground service use cases that aren't covered by the other foreground service types.

In addition to declaring the FOREGROUND_SERVICE_TYPE_SPECIAL_USE foreground service type, developers should declare use cases in the manifest. To do so, they specify the <property> element within the <service> element. These values and corresponding use cases are reviewed when you submit your app in the Google Play Console. The use cases you provide are free-form, and you should make sure to provide enough information to let the reviewer see why you need to use the specialUse type.

<service android:name="fooService" android:foregroundServiceType="specialUse">
  <property android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
      android:value="explanation_for_special_use"/>
</service>

সিস্টেম অব্যাহতি

ফোরগ্রাউন্ড সার্ভিস টাইপ যা ম্যানিফেস্টের অধীনে ঘোষণা করতে হবে
android:foregroundServiceType
systemExempted
আপনার ম্যানিফেস্টে ঘোষণা করার অনুমতি
FOREGROUND_SERVICE_SYSTEM_EXEMPTED
startForeground() এ পাস করার জন্য ধ্রুবক
FOREGROUND_SERVICE_TYPE_SYSTEM_EXEMPTED
রানটাইম পূর্বশর্ত
কোনোটিই নয়
বর্ণনা

ফোরগ্রাউন্ড পরিষেবাগুলি ব্যবহার করা চালিয়ে যাওয়ার জন্য সিস্টেম অ্যাপ্লিকেশন এবং নির্দিষ্ট সিস্টেম ইন্টিগ্রেশনের জন্য সংরক্ষিত।

এই ধরনের ব্যবহার করার জন্য, একটি অ্যাপকে অবশ্যই নিম্নলিখিত মানদণ্ডগুলির মধ্যে একটি পূরণ করতে হবে:

  • ডিভাইস ডেমো মোড অবস্থায় আছে
  • অ্যাপটি একটি ডিভাইসের মালিক
  • অ্যাপ একজন প্রোফাইলার মালিক
  • ROLE_EMERGENCY ভূমিকা আছে এমন নিরাপত্তা অ্যাপ
  • ডিভাইস অ্যাডমিন অ্যাপস
  • SCHEDULE_EXACT_ALARM বা USE_EXACT_ALARM অনুমতি ধারণ করা অ্যাপগুলি এবং পটভূমিতে অ্যালার্ম চালিয়ে যেতে ফোরগ্রাউন্ড পরিষেবা ব্যবহার করছে, যার মধ্যে হ্যাপটিক্স-শুধু অ্যালার্ম রয়েছে৷
  • ভিপিএন অ্যাপস ( সেটিংস > নেটওয়ার্ক এবং ইন্টারনেট > ভিপিএন ব্যবহার করে কনফিগার করা হয়েছে)

    অন্যথায়, এই ধরনের ঘোষণা করার ফলে সিস্টেম একটি ForegroundServiceTypeNotAllowedException নিক্ষেপ করে।

ফোরগ্রাউন্ড পরিষেবার প্রকারগুলি ব্যবহার করার জন্য Google Play নীতি প্রয়োগ

যদি আপনার অ্যাপটি Android 14 বা তার উচ্চতরকে টার্গেট করে, তাহলে আপনাকে Play Console-এর অ্যাপ কন্টেন্ট পৃষ্ঠায় ( নীতি > অ্যাপ সামগ্রী ) আপনার অ্যাপের ফোরগ্রাউন্ড পরিষেবার ধরন ঘোষণা করতে হবে। Play Console-এ আপনার ফোরগ্রাউন্ড পরিষেবার প্রকারগুলি কীভাবে ঘোষণা করবেন সে সম্পর্কে আরও তথ্যের জন্য, ফোরগ্রাউন্ড পরিষেবা এবং পূর্ণ-স্ক্রীনের অভিপ্রায়ের প্রয়োজনীয়তা বোঝা দেখুন।