본문 바로가기
Android

Android Shortcut / iOS 3D touch

by _dreamgirl 2021. 1. 4.
반응형

 

안드로이드 App Shortcuts

https://developer.android.com/guide/topics/ui/shortcuts/creating-shortcuts

 

Create shortcuts  |  Android 개발자  |  Android Developers

Shortcuts deliver specific types of content to your users by helping them quickly access parts of your app. How you deliver content with shortcuts depends on your use case and whether the shortcut's context is app-driven or user-driven. Although a static s

developer.android.com

정적 바로가기를 만들었다. 처음에 안드로이드 3.6.1 버전에서 리소스 xml이 안먹혀서 안되는 줄 알았는데
실제로는 매니페스트에 호출할 Activity 하단에 넣지 않아서 안된 것 같았다.  다시 하나씩 가이드대로 코딩을 해 보니까 성공!

우리 앱에서는 하나의  Activity를 사용하고 있기 때문에 기능별로 ShortCut을 만들고 id를 Intent data로 넘겨서 처리했다.

* 참고 사이트

https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive

 

적응형 아이콘  |  Android 개발자  |  Android Developers

Android 8.0(API 수준 26)에는 다양한 기기 모델에서 여러 가지 형태로 표시되는 적응형 런처 아이콘이 도입되었습니다. 예를 들어 적응형 런처 아이콘은 한 OEM 기기에서는 원형으로 표시되고 다른

developer.android.com

 

https://medium.com/@futureofdev/making-android-static-appshortcuts-a2afc43702c4

 

안드로이드 AppShortcuts 으로 바로가기 만들기

안드로이드 7.1(API level 25)부터 shortcuts의 기능이 지원된다. 해당 기능은 런처아이콘을 길게 누르면 보여지면서 홈스크린에서 빠르게 기능을 실행할 수 있다. Shortcuts은 static과 dynamic 두가지로 나

medium.com

 

아이폰 App ShortCuts

static Home Screen quick Actions

pList에 UIApplicationShortcutItems 추가하기

(UIApplicationShortcutItemType/ UIApplicationShortcutItemTitle 필수)

메뉴 클릭시 AppDelegate 의 아래와 같이 호출이 됨

- (void) application:(UIApplication *)application performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem completionHandler:(void(^)(BOOL))completionHandler

{

}

  func application(_ application: UIApplication, performActionFor shortcutItem: UIApplicationShortcutItem, completionHandler: @escaping (Bool) -> Void) {

        //code

    }

 

* 참고사이트

출처: https://zeddios.tistory.com/312 [ZeddiOS]

https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622935-application

 

Apple Developer Documentation

 

developer.apple.com


(벤치마킹 앱 농협)

 

반응형

'Android' 카테고리의 다른 글

Dynamic Links  (0) 2021.04.13
DownloadManager  (0) 2021.03.16
Firebase Crashlytics Sdk 적용(deprecated Fabric)  (0) 2020.10.14
예약 게시  (0) 2020.09.01
안드로이드, 구글 라이브러리 AAC 따르기 [1]  (0) 2020.04.09

댓글