본문으로 바로가기
@capgo/capacitor-인텐트 런처 장치 API 오픈 소스

Intent Launcher Capacitor 플러그인

Android 의도 실행, 시스템 설정 열기 및 다른 앱과 상호 작용하기 위해 Intent 시스템 사용

설치

bun add @capgo/capacitor-intent-launcher bunx cap sync
npm, pnpm 또는 yarn
  • npm install @capgo/capacitor-intent-launcher
  • pnpm add @capgo/capacitor-intent-launcher
  • yarn add @capgo/capacitor-intent-launcher

인텐트 런처 사용 방법

How to use Intent Launcher in Capacitor

__CAPGO_KEEP_0__ 앱을 다운로드한 후 QR __CAPGO_KEEP_1__를 스캔하세요.

다운로드하여 Capgo 앱을 설치한 후 QR code 코드를 스캔하세요.

인텐트 런처 플러그인 미리보기 QR code

@capgo/capacitor-인텐트-런처 플러그인을 사용합니다.

Capacitor 인텐트 런처 플러그인은 안드로이드와 iOS에서 안드로이드 인텐트를 실행하고 시스템 설정을 열 수 있습니다.

설치

bun add @capgo/capacitor-intent-launcher
bunx cap sync

bunx cap sync code의 네이티브 코드를 프로젝트에 복사합니다. 플러그인 업그레이드 후 다시 실행하세요.

수입

import { IntentLauncher } from '@capgo/capacitor-intent-launcher';

API를 한눈에

방법 설명
startActivityAsync Android 액션에 대한 활동을 시작합니다.
openIOSSettings iOS 설정 화면을 엽니다.
openApplication 패키지 이름으로 애플리케이션을 엽니다.
getApplicationIconAsync 애플리케이션 아이콘을 base64로 인코딩된 PNG 문자열로 가져옵니다.

예시

startActivityAsync()

Android 액션에 대한 활동을 시작합니다.

import { IntentLauncher, ActivityAction } from '@capgo/capacitor-intent-launcher';

// Open location settings
const result = await IntentLauncher.startActivityAsync({
  action: ActivityAction.LOCATION_SOURCE_SETTINGS
});

// Open a specific app settings
const result = await IntentLauncher.startActivityAsync({
  action: ActivityAction.APPLICATION_DETAILS_SETTINGS,
  data: 'package:com.example.app'
});

openIOSSettings()

iOS 설정 화면을 엽니다.

import { IntentLauncher, IOSSettings } from '@capgo/capacitor-intent-launcher';

// Open app settings (recommended - officially supported by Apple)
await IntentLauncher.openIOSSettings({ option: IOSSettings.App });

// Open WiFi settings (may not work in all iOS versions)
await IntentLauncher.openIOSSettings({ option: IOSSettings.WiFi });

openApplication()

패키지 이름으로 애플리케이션을 엽니다.

import { IntentLauncher } from '@capgo/capacitor-intent-launcher';

// Open Gmail app
await IntentLauncher.openApplication({ packageName: 'com.google.android.gm' });

getApplicationIconAsync()

애플리케이션 아이콘을 base64로 인코딩된 PNG 문자열로 가져옵니다.

import { IntentLauncher } from '@capgo/capacitor-intent-launcher';

const { icon } = await IntentLauncher.getApplicationIconAsync({
  packageName: 'com.google.android.gm'
});
if (icon) {
  const img = document.createElement('img');
  img.src = icon;
}

__CAPGO_KEEP_0__ 저장소

capgo를 계속 사용하세요. @capgo/capacitor-intent-launcher

__CAPGO_KEEP_0__를 사용 중이시면 @capgo/capacitor-인텐트 런처 사용 API를 사용하여 대시보드와 API 작업을 계획하고 싶으시면 @API/__CAPGO_KEEP_1__-intent-launcher와 연결하세요. @capgo/capacitor-intent-launcher의 구현 세부 정보를 참조하세요. for the implementation detail in @capgo/capacitor-intent-launcher, __CAPGO_KEEP_0__ Overview의 구현 세부 정보를 참조하세요. Introduction API API __CAPGO_KEEP_0__ Capacitor Intent Launcher에 대한 구현 세부 사항은 Introduction에서 확인할 수 있습니다. API 키 Capacitor Intent Launcher에 대한 구현 세부 사항은 API 키에서 확인할 수 있습니다.

FAQ

Intent Launcher 플러그인 FAQ

Intent Launcher 플러그인을 Capacitor 앱에 설치하는 방법은 무엇인가요?

1. "bun add @capgo/capacitor-intent-launcher" (또는 "npm install @capgo/capacitor-intent-launcher") 명령어를 실행합니다. 그리고 "bunx cap sync" 명령어를 실행하여 iOS와 Android 프로젝트가 네이티브 code를 인식하도록 합니다. 그리고 "@capgo/capacitor-intent-launcher"를 앱의 code에서 임포트합니다.

React, Vue 및 Angular과 함께 @capgo/capacitor-intent-launcher가 작동합니까?

네. Intent Launcher는 Capacitor 패키지이므로, Capacitor 내부에서 실행되는 모든 웹 프레임워크와 함께 작동합니다. 예를 들어 Ionic, React, Vue, Angular, Svelte 및 plain JavaScript.

Capacitor 버전은 @capgo/capacitor-intent-launcher가 지원합니까?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

@capgo/capacitor-intent-launcher는 무료이며 오픈 소스인가요?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-intent-launcher/ and the package is free to install from npm. Bug reports and pull requests are welcome.

code가 Intent Launcher를 사용하는 경우 App Store 리뷰 없이 업데이트할 수 있나요?

code 플러그인을 설치하거나 업그레이드하면 네이티브 code이 변경되므로, 새로운 스토어 빌드를 생성해야 합니다. 그 후에 JavaScript, HTML 및 CSS 변경 사항이 플러그인을 호출하는 경우 Capgo의 라이브 업데이트를 통해 즉시 배포할 수 있습니다.

앱 리뷰 기다리지 않고 Intent Launcher 변경을 배포하세요.

플러그인이 스토어 빌드에 포함된 후, Capgo 라이브 업데이트 통해 사용자에게 JavaScript, HTML 및 CSS 변경을 몇 분만에 푸시합니다.

Capgo로 시작하세요.