Emulator setup in Android Studio - Clover Developer Docs

文章推薦指數: 80 %
投票人數:10人

Emulator setup in Android Studio · Downloading Clover hardware profiles · Creating a new emulator profile · Updating device settings for production testing. INTRODUCTIONHomeGetstartedGeneratingatestAPItokenMakingaRESTAPIcallContinueBuildingMonetizeyourappsMeetourmerchantsBuildingformerchantneedsTextformattingconventionsPLATFORMOVERVIEWCloverarchitectureSDKs&samplecodeCloverdatamodelSettingupasandboxaccountTransactiondataCloverdevicesCloverDevKitsDevKitFAQsDevicediagnosticsCloverenvironmentsDevelopandpublishappsProductiondeveloperaccountsManagingdeveloperaccountsDeveloperaccountrolesManagingtestmerchantsDeveloperaccountapprovalAppapprovalBillinginformationapprovalFunctionalreviewplaybookforCloverappsBasicappconfigurationApponboardingformerchantsAppdesignrequirementsFullappfunctionalitytestsAppadministrationchecklistManagingyourappsCreatinganappManagingappsettingsSettingapppermissionsSettingmodulesformerchantplansCustomizingreceiptsManagingAndroidappreleasesSettingAppMarketlistingsSettinguppricingtiersHandlingappbillingRegion-specificfeaturesandlimitationsArgentinemerchantsCanadianmerchantsGerman/AustrianmerchantsNetherlandsmerchantsUK/IrelandmerchantsUSmerchantsSupportingregionalpaymentflowsProvidingsupportresourcesBUILDWITHANDROIDCloverdevelopmentbasicsEmulatorsetupinAndroidStudioEmulatorhardwareprofilesCloverdevelopmentAPKsTroubleshootingemulatorsWorkingwithAPKsSettingAndroidSDKversionsGeneratingasignedAPKUploadinganAPKtoyourappInstallingyourapptoyourtestmerchantSubmittinganAPKforapprovalSideloadinganAPKIntegratingwithCloverAndroidSDKAdvancedtopicsQueryingwebservicesOAuthforwebviews&non-CloverdevicesSettingbroadcasts&intentsSendingappnotificationsUsingexternalUSBdevicesTestingwithprinterreceiptimagesBuildingwithAndroidNFCBuildingappsforStationDuo(previouslyStationPro)BuildingappsforStationSoloBuildpaymentsolutionsCustomtendersCreatingcustomtenderappsUsingPaymentConnectorExpandmerchantbusinessUsingOrderConnectorUsingMerchantConnectorWorkingwithtransactiondata(CloverAndroidSDK)BUILDWITHRESTAPICloverdevelopmentbasicsNavigatingmerchantstoappsTestmerchantIDs&APItokensSettingappURL&CORSUsingOAuth2.0UsingCloverRESTAPIUsingAPItokensAPIusage&ratelimitsSortingcollectionsApplyingfiltersUsingfilterstoretrievemultipleresultsfromanendpointPaginatingrequestsExpandingfieldsQueryinginventoryUsingobjectassociationsDisplayingnullfieldsCustomersAPIEUpermissionsWorkingwithinventoryImportinginventoryManagingitemsanditemgroupsManagingitemavailabilityManagingcategoriesManagingmodifiergroupsandmodifiersManagingtagsWorkingwithordersCreatingcustomordersCalculatingordertotalsTaxReports:ExamplesPrintingorderswiththeRESTAPIUsingwebhooksWorkingwithtransactiondata(RESTAPI)ExportingmerchantdataTroubleshootingAPIerrors400BadRequest401Unauthorized404NotFound429TooManyRequests500InternalServerErrorDeprecatedAPIsSEMI-INTEGRATEWITHCLOVERDEVICESCloverdevelopmentbasicsPayments-as-a-ServiceintegrationoptionsExamplesoftransactionflowsPayDisplayappsPayDisplayappssupportmatrixbydevicesandregionsConfiguringSecureNetworkPayDisplayConnectingCloverExamplePOSYourRemoteAppIDExampleappsInstallingaPayDisplayappCloverdeviceconfigurationsIntegrationdevelopmentandapprovalprocessApplicationEducationDevelopmentApprovalMaintenanceSupporttimelines(RemotePaySDKs)UsingCloverConnectorOnWindowsusing.NETOnWindowsusingRESTOnWindowsusingWebSocketsIntheCloudOnAndroidOniOSWorkingwithUIstatemessagesUIstatereferencePaymentresponsereferenceRefundresponsereferenceCreditresponsereferenceRemotePaySDKbestpracticesDeviceconnectionanddisposalMonitoringdeviceconnectionstatusPaymentreconciliationandrecoveryRetrievingthedevicestateTrackingtransactionswithexternalIDsCustomertransactionsTransactiontypesPer-transactionsettingsVoidsandrefundsWorkingwithchallengesWorkingwithtransactiondata(RemotePaySDKs)Workingwithtransactiondata(PaymentConnector)CreatingcustomreceiptswithCloverConnectorReprintingtransactionreceiptsVaultingcardsforfuturetransactionsAlipaytransactionsElectronicBenefitTransfer(EBT)transactionsEBToverviewCloversupportforEBTUsingCustomer-FacingPlatformTestingandvalidationTestingpaymentflowsTestingUSpaymentflowsTestingCanadianpaymentflowsTakingapaymentwithPaymentConnectorSupportedmethodsbydevicePaymentConnectorexampleactivityIntegrationrepositoriesSemi-IntegrationglossaryIntegratingyourPOSwithCloverGoCloverGoandCloverGoSDKGointegrationprocessoverviewIntegratingwiththeCloverGoSDKsampleappRunningtheCloverGoAndroidSDKsampleappRunningtheCloverGoiOSSDKsampleappLeveragingtheCloverGoAndroidSDKinyourappLeveragingtheCloverGoiOSSDKinyourappZVTECRinterfaceonCloverterminal(Beta)BuildwithRESTPayAPIRESTPayDisplayAPIcontents(Beta)RESTPayDisplayoverviewGettingstartedusingRESTPayDisplayCreatingasandboxappObtaininganOAuthtokenConnectionconfigurationoverviewConfiguringacloudconnectionConfiguringalocalconnectionSecurityRESTPayarchitectureUsingPostmanwiththeRESTPayAPIWorkflowsandbestpracticesTransactiontypesRESTPaypaymentflowsInteroperabilitywithEcommerceAPITrackingtransactionswithidempotencykeysPaymentreconciliationandrecoveryIssuesanderrorsCheckingforduplicatepaymentsHandlingofflinepaymentsHandlingpartialpaymentissuesHandlingsignatureissuesHandlingcommunicationissuesStatuscodesanderrorsreferenceAPItutorialsVerifyingconnectivityDisplayingamessagetothecustomerDisplayingthewelcomescreenDisplayingthethankyouscreenCancelingthecurrentactionGettingasignatureGettingcustomerconfirmationGettingcustomerinputRequestingatipPrintingareceiptOpeningthecashdrawerResettingthedeviceMakingasaleAuthorizingandcapturingatip-adjustedpaymentonpaperAuthorizingandcapturingatippedpaymentonscreenCapturingpreauthpaymentsRefundingachargeIssuingacreditCreatingandusingacardtokenGettingacustomer'scarddataAssigningcolorcodetoitemsandcategoriesAppreviewandapprovalCreatingaproductionappTestingRESTPayflows(Canada)TestingRESTPayflows(US)BuildwithEcommerceAPICloverdevelopmentbasicsEcommercedatamodelIntegrationtypesEcommerceapppermissionsEcommercepermissionsetsConfiguringEcommhostedcheckoutwebhooksCloveriframeintegrationsUsingtheClover-hostediframeCustomizingiframeelementswithCSSCloveriframefeaturesEcommerceAPItutorialsGeneratingacardtokenAcceptingpaymentsandtipsRefundingpaymentsSavingacardforfuturetransactionsPaginatingrequestsConfirmingcustomerinformationwithfraudtoolsSettingsoftdescriptorsAcceptingpurchasecardsRecurringPaymentsandSubscriptionsAPIsRecurringPaymentsAPIs-ConfiguringPlansRecurringPaymentAPIs-ConfiguringSubscriptionsEcommerceSoftwareDevelopmentKits(SDKs)SettinguptheSDKMakingsimplecharges(SDK)Creatingandpayingfororders(SDK)Workingwithcustomers(SDK)Refundingcharges(SDK)PythonSDKNodeSDKMigratingfromDeveloperPaytoEcommerceErrorcodesHostedCheckoutAPIMakingacheckoutrequestRequiredpermissionsCreatingahostedcheckoutsessionRedirectingcustomersTestingyourhostedcheckoutintegration(macOS/Linux)Testingyourhostedcheckoutintegration(Windows)LAUNCHINGAPPSLaunchoverviewReviewingappinstallsBillinglifecycleUsingratings&reviewsGaininsightsintoyourapp'sperformanceManageYourAPKsManagingreleasegroupsLaunchinginmultiplemarketsAddingreleasenotesInternationalAppMarketreadinessShowcasingappsCloverpoliciesCloverCreditCardSurchargingPolicyCloverAppMarketRatings&ReviewsPolicyLegaltemplatesCloverPrivacyPolicyTemplateCloverEULA/TermsofServiceTemplateReleaseNotesWhat'snewBugfixesRESOURCESDesignresourcesSupportedbarcodeformatsTestcardnumbersCountrycodereferenceDevelopermailinglistDeveloperDashboardRESTAPIReferenceSDKs&samplecodeCloverDevelopmentAPKsAnnouncementsPostponed–EMEADRreadinessdatacenterswitchCloverAndroidSDKv284ReleaseNotesMini1secureprocessorROMrolloutSandboxscheduledmaintenance-Jan.24th.2022Introducing:RecurringPaymentsandSubscriptionsAPIsRecommendnotusingdeprecatedAndroidframeworkFragmentsonAndroidLatestinformationaboutROMupdatesforCloverStationDuo,Flex2andMini2APIauthenticationchanges:access_tokenqueryparametersunsetDevPayAPIcallswillfailstartingonJan.31,2022ApacheLog4jVulnerability|CVE-2021-44228Sandboxservermaintenancenotification-December20th,2021NewinformationaboutROMupdatesforCloverStationDuo,Flex2andMini2Android10ROM—NotesforCloverDevelopers2021Clovercodefreezeds-1438AnnouncingnewserviceplansformerchantsStationDuochanges|IssueswithAndroidNFC-March22,2021AnnouncingStationDuo(PreviouslyPro)launchinCanadaWorkingwithsurchargedata-November13th,2020CloverCodeFreeze2020CloverFlex(2ndGeneration)intheUK&IrelandCloverAndroidSDKv262.2ReleaseNotesUSDevDisbursementStatementUpdatedJuly2020July2020Disbursements-FollowupJuly2020DisbursementsUS:HIPAAAppImpacts(July2020)AnnouncingabetatestforCloverRESTPayAnnouncinganewchannelpartnerintheUK!New!AppmetricsonyourdashboardRemindertoCategorizeYourApps&UseRatingsandReviewsAnnouncingournewCloverdevice-Flex(2ndGeneration)Weareinthistogether|Clover+DeveloperPartnersAnnouncingournewCloverdevice-StationPro.NETSDKv4.0.3ReleaseNotes-18February2020ReleaseSummaryReleaseNotes-June20th,2019CloverAndroidSDKv248.4ReleaseNotes.NETSDKv5.0ReleaseNotes-TBDCashdiscountpolicyupdatesUSBPayDisplayonCloverFlex-EndofSupportReleaseNotes-November12th,2019Introducingstatus.clover.comMoreInformationonHandlingMerchantAppChargesFlex(2ndGeneration)ReleaseReviewingupdatesforApprovedandPublishedappsWhat'snewontheDeveloperDashboardReleaseNotes-October14th,2019CloverCodeFreeze2019DatesReleaseNotes-September30th,2019ReleaseNotes-September16th,2019ReleaseNotes-September6th,2019.NETSDKv4.0.2ReleaseNotes-August14th,2019ReleaseNotes-August2nd,2019iOSSDKv3.0.3-August1st,2019ReleaseNotes-July19th,2019ReleaseNotes-July5th,2019ReleaseNotes-June26th,2019JavaScriptSDKv3.1-June4th,2019ReleaseNotes-May23rd,2019ReleaseNotes-May16th,2019CustomersAPIpermissionchanges-May13th,2019ReleaseNotes-April25th,2019ReleaseNotes-April15th,2019ReleaseNotes-April10th,2019ReleaseNotes-April2nd,2019ReleaseNotes-March27th,2019.NETSDKv4.0ReleaseNotes-March20th,2019iOSSDKv3.0.2ReleaseNotes-March19th,2019ReleaseNotes-March5th,2019DeprecationNotice-hrefvalueinJSONresponses-February28th,2019ReleaseNotes-February15th,2019JavaScriptSDKReleaseNotes-February14th,2019ReleaseNotes-February4th,2019.NETSDKv3.0.2ReleaseNotes-January28th,2019iOSSDKv3.0.1ReleaseNotes-February8th,2019JavaSDKv3.0ReleaseNotes-January23rd,2019.NETSDKv3.0.1ReleaseNotes-December10th,2018AndroidSDKv3.0ReleaseNotes-November26th,2018iOSSDKv3.0ReleaseNotes-November5th,2018.NETSDKv3.0ReleaseNotes-November2nd,2018ReleaseNotes-November1st,2018ReleaseNotes-October12th,2018ReleaseNotes-October1st,2018CloverAppMarketApp&APKApprovalFreezeSchedule2018ReleaseNotes-September28th,2018ReleaseNotes-September25th,2018ReleaseNotes-September11th,2018ImprovementstoCloverAndroidSDK-September6th,2018ReleaseNotes-September4th,2018ReleaseNotes-August24th,2018ReleaseNotes-August20th,2018ReleaseNotes-August3rd,2018AdditionalSecurityforPairingSemi-IntegratedPOSwithCloverDevices-July30th,2018ReleaseNotes-July24th,2018UpdatesaboutCloverSandboxinCanada&Germany-July24th,2018CloverDeveloperDocsisBackLive-July18th,2018ReleaseNotes-July9th,2018RatingsandReviewsisLiveonCloverAppMarket-July3rd,2018ReleaseNotes-June29th,2018ReleaseNotes-June20th,2018IntroducingNewWebDashboardforMerchants-June11th,2018ReleaseNotes-June5th,2018ReleaseNotes-June1st,2018ChangestotheRESTAPI-May30th,2018ReleaseNotes-May16th,2018IntroducingRatingsandReviewsonCloverAppMarket-May9th,2018ReleaseNotes-May4th,2018ReleaseNotes-May2nd,2018ReleaseNotes-April4th,2018Improved429ResponseHeaders-April2nd,2018ReleaseNotes-March24th,2018ReleaseNotes-March19th,2018SecureNetworkPayDisplayReleased-January30,2018UpdateforInactiveMerchantAccounts-October31,2017ChangestoExportAPIUSAvailableHours-September20,20172017HolidayApp&APKReviewSchedule-September11,2017DevAskwillbetemporarilyread-onlystartingMay10,2017DeprecationNotice-BarcodescanningusingintentsinCloverAndroidSDK-April20,2017MerchantGeneratedAPITokenChanges-April11,2017USProductionSupportforCloverFlex-April10,2017IntroducingCloverFlex-March31,201730Min.PlannedEUCloverMaintenanceonApril4,201730Min.PlannedEUCloverMaintenanceonMarch30,2017ChangestoAndroidSDKAuthTokenGeneration-March24,201730Min.PlannedCloverMaintenancePeriodsonMarch27&29,2017NewPlanAvailabletoMerchants-March17,201730Min.PlannedCloverMaintenancePeriodsonMarch21&23,2017Postponed-30min.PlannedCloverMaintenancePeriodsonMarch14&15,201730Min.PlannedCloverMaintenancePeriodsonMarch7&8,2017UnplannedDevAskOutage-Feb.28,2017SandboxServerMaintenanceNotification-February9th2017PlannedCloverMaintenance-UpdatedSSLCertificateforEU-Feb.8,2017UpdatedSSLCertificate-January18,2017Maintenance-January17,2017DeprecationNotice-V2GetInventoryItems-Jan.11,2017UpcomingIPAddressChangeforCloverAPIServicesDeprecationNotice-SomeExpansions-Jan.9,20172016HolidayAppReviewSchedulePlannedoutageformaintenanceofSandboxEnvironmentOctober7th,2016Offline/MerchantErroronSandboxDevices-September20,2016ChangestoMerchantGroups-September15,2016ReleaseNotes-September1,2016CloverDeveloperMeetup@NYCSept28,2016DeprecationNotice-WebhooksrequireHTTPSCloverStationDeveloperKits-AvailableforOrder-July5,2016UpdateonInactiveMerchantAccounts-July1,2016ReleaseNotes-June21,2016ReleaseNotes-June3,2016CloverStationTLS1.0DeprecationUpdatetoPaymentKeyCertificateReleaseNotes-April15,2016IssueonProductionEmulatorsWhat'sNewwiththe5April2015ReleaseIdentifyingRealandTestMerchantAccountsChargesACHInformationNewSizingRequirementsforCloverAndroidAppLogosUPCOMINGnewper-appratelimitingIMPORTANTSecurityChangestoWebResourcesonCloverDevicesHolidayAppReviewSchedule2015CloverCommunityLaunch2015ReleaseNotes-October7,2015Read-OnlyDatabase2015ReleaseNotes-September1,2015ReleaseNotes-August12,2015CloverDeveloperKitsAvailableforPre-OrderReleaseNotes-June30toJuly22,2015ChangestoAPIratelimiting2015ReleaseNotes-June1,2015What'sNewwiththe12May2015ReleaseWhat'sNewwiththe27April2015ReleaseWhat'sNewwiththe22April2015ReleasePermissionsVersusModulesOrderAPINoticeWhat'sNewwiththe22March2015ReleaseWhat'sNewwiththe9March2015ReleaseWhat'sNewwiththe24February2015ReleaseWhat'sNewwiththe3February2015ReleaseIntroducingCloverMobileOrderandPayfromTableatBierhaus,poweredbyApplePay,Clover,andEstimote'siBeaconSmartTablesistheDisruptSF2014CloverSponsorwinner!TechcrunchDisrupt2014HackathonFunUpdatedprocessforreviewingchangestoapproved/publishedappsIntroducingRESTPayDisplayTemplateforReleasenotes-monthday,yearFAQsThispageexplainsthesetupofanAndroidStudioemulatoryoucanusetodevelopappsontheCloverplatform.ThestepsarewrittenforAndroidOreo(APIlevel27),theoperatingsystemusedbyCloverFlex(2ndgeneration)andCloverMini(2ndgeneration).IfyouarebuildinganemulatorforadeviceusinganearlierAPIlevel,theremaybeminorAndroid-specificdifferencesinconfiguration. Whenpossible,werecommendusingaCloverDeveloperKit(orDevKit)tofullytestyouruserexperience.WithDevKits,youhaveaccesstohardware-specificfunctionalitiessuchas: NFCandBluetoothLowEnergy(BLE) Securepayments Printing Scanning AnAndroidemulatorcanhelpyouquicklyprototype,develop,andtestyourCloverapplications.Whileusinganemulatoriscost-effective,youwillnothaveaccesstohardware-specificfunctionalitiesthatDevKitsprovide. 🚧IMPORTANTYoucannotemulatetheStationDuo(previouslyStationPro)asitisacombinationoftwodevices-TerminalandDisplay. DownloadingCloverhardwareprofiles Clovermaintainsaprofileofeachdevicethatyoucanimportintotheemulator. Downloadtheclover-device-profiles.ziparchive. Extractthefilestoalocationofyourchoosing. 📘NOTEThehardwareprofilesfortheCloverMini,Mini2ndGen,andMobilerequireaspecificDPIthatmaybeoverriddenifyoumakechangestotheprofile.Toverifythesettingiscorrect: InAndroidStudio,selectTools>DeviceManager. IntheActionscolumnforthedevice,selectViewDetailsfromthelist. Inthedetailsmodalthatappears,ensurethatthehw.lcd.densityvalueissetto213. Youcanalsoverifythisbyopeningthe[user_home]/.android/avd/[virtual-device-name].avd/config.inifile. Creatinganewemulatorprofile Bycreatinganemulatorprofile,youremulatorissetwiththerequiredhardwareconfiguration. LaunchAndroidStudioandopenyourapp'sprojectifitdoesnotloadautomatically. SelectTools>DeviceManager.TheAndroiddevicemanagerwindowappears. ClicktheVirtualtabandthenclickCreatedevice. OntheVirtualDeviceConfigurationwindow,clickImportHardwareProfiles. NavigatetotheCloverhardwareprofilesyoudownloaded,selectoneormorefiles,andthenclickOK. Inthesearchbox,typeClover. SelectthedeviceprofileyouwanttouseandthenclickNext. OntheSystemImagepage,selecttheimagefortheAPILevelsupportedontheCloverdeviceyouareemulating(basedonthefollowingtable),andthenclickNext. CloverdeviceReleasenameAPIlevelABITargetStationJellyBean17x86Android4.2Mobile/Mini(1stgen)KitKat19x86Android4.4FlexLollipop22x86Android5.1Station2018Nougat25x86Android7.1.1StationSolo/Flex(2ndgen)/Mini(2ndgen)Q/1029x86Android10.0 📘NOTEYoumayneedtoclickthex86ImagestabtofindtheAndroidreleaseversionneededforyouremulator.Ifthesystemimageisnotalreadyavailablelocally,clickDownloadandinstalltheimage.DownloadasystemimagewithouttheGoogleAPIs.CloverdevicesarenotGooglePlaycertifiedandthereforedonotcomewithGooglePlayServices. 📘NOTEWithAndroid6.0(APIlevel23),grantatruntimepermissionshavebeenintroduced,whichenablesuserstograntpermissionstoappswhiletheappisrunning,notwhentheyinstalltheapp.Cloverdevicesfollowthegrantatinstallapppermissionmodel.ThismodelenablesClovermerchantstograntdevicepermissionstoappsaspartoftheinstallation.Tousethegrantatinstallapppermissionmodelontheemulator,setthetargetSDKlevelto22orlower.IfyourapprequirestargetSDKlevel23,24,or25,implementthegrantatruntimemodeltohaveyourappruncorrectlyontheemulator.OnCloverdevices,thismodelisoverriddenandyourappfollowsthegrantatinstallmodel. OntheVerifyConfigurationpage,verifythatthecorrectStartuporientationisselected: CloverdeviceStartuporientationStationLandscapeMobile/Mini(1stgen)LandscapeFlexPortraitStation2018LandscapeMini(2ndgen)LandscapeFlex(2ndgen)PortraitStationSoloLandscape ClickShowAdvancedSettings. SettheRAMvaluetotheamountforthedeviceyouareemulating: CloverdeviceRAM(GB)Station2Mobile/Mini(1stgen)2Flex1Station20183Mini(2ndgen)2Flex(2ndgen)2StationSolo2 SettheInternalStoragevaluetotheamountforthedeviceyouareemulating: CloverDeviceInternalstorage(GB)Station5Mobile/Mini(1stgen)6Flex5Station201810Mini(2ndgen)7Flex(2ndgen)16StationSolo16 📘NOTEAndroidStudiomayresettheInternalStoragevalueto800MB.VerifythatthevalueissetcorrectlyoryouwillrunoutofstoragespacewheninstallingtheCloverapps. ClickFinish.Anewvirtualdeviceisadded. IntheActionscolumnforthedevice,clicktheLaunchicon.Theemulatorislaunched. 📘NOTEThehardwareprofilesfortheCloverMini,Mini2ndGen,andMobilerequireaspecificDPIthatmaybeoverriddenifyoumakechangestotheprofile.Toverifythesettingiscorrect: InAndroidStudio,selectTools>DeviceManager. IntheActionscolumnforthedevice,selectViewDetailsfromthelist. Inthedetailsmodalthatappears,ensurethatthehw.lcd.densityvalueissetto213. Youcanalsoverifythisbyopeningthe{user_home}/.android/avd/{virtual-device-name}.avd/config.inifile. Updatingdevicesettingsforproductiontesting IfyouaretestingyourappagainsttheUSorEUproductionenvironment,youmustchangetheAndroiddeviceconfigurationbeforeproceeding.EachofthefollowingstepsprovidesseparatecommandsfortheUSandEU. Intheterminalwindow,runoneofthefollowingcommandstosettheclover_cloud_url: US:adbshellsettingsputsecureclover_cloud_url"https://www.clover.com" EU:adbshellsettingsputsecureclover_cloud_url"https://www.eu.clover.com" Intheterminalwindow,runoneofthefollowingcommandstosettheclover_target: US:adbshellsettingsputsecureclover_target"prod_us" EU:adbshellsettingsputsecureclover_target"prod_eu" SideloadingtherequiredCloverAPKusingADB Withyouremulatorprofileset,installtheCloverAPKneededtoconfiguretheemulator. OpentheCloverDevelopmentAPKspagefortheCloverenvironmentyouwanttotestagainst: Sandbox Production(US) Production(EU) DownloadtheCloverEngineAPK(com.clover.engine-{version}.apk). InAndroidStudio,selectView>ToolWindows>Terminal(Alt+F12/Option+F12). ToverifythatADBisconnectedtotheemulator,runthefollowingcommand:adbdevices.Aresponselikethefollowingappears: `adbdevices`responseListofdevicesattached emulator-5554device ToinstalltheCloverEngineAPK,runadbinstall{download_folder}/com.clover.engine-{version}.apk. ASuccessmessageappears.Leavetheterminalwindowopen. 📘NOTEADBmustbeabletorunasroot.Toverifythis,completethefollowingsteps. Intheterminalwindow,runadbroot. ADBisrestartedtoallowcommandsasroot. Runadbshellid. AlistofsystemIDsappears. Verifythattheuidvalueis0(root). 📘NOTEThenexttimeyousideloadanapp,openaCloverappandthenclickthesyncbuttonatthetop-leftoftheapp.Thisensuresthatyouhavethelatestversionofyoursideloadedappontheemulator. InstallingrequiredClovermerchantapps Inthissetupstep,allCloverappsformerchants(suchasRegister,Orders,andInventory)areinstalledbyrunningaPythonscript.Anyofyourappsinstalledtothetestmerchantyouselectwillalsobeinstalled. 📘NOTEPython3.5orlaterisrequiredtorunthePythonscript. Ontheemulator,openSettings. ClickUsers&accounts. OntheUsers&accountspage,clickAddAccount. OntheAddanaccountpage,clickClover. OntheLOGINpage,enteryourowneraccountcredentials,andclickLogIn.Ifyouhavecreatedmultipletestmerchantsforyourdeveloperaccount,selectthemerchantyouwanttotestwithfromthewindowthatappears. Intheterminalwindow,runthefollowingcommandtodownloadtheappinstallscripttothecurrentdirectory:curlhttps://raw.githubusercontent.com/clover/clover-android-sdk/master/scripts/install_apps.py-O.Notethatthisstepisnotnecessaryifyouaresettingupasecondorsubsequentemulatorandhavealreadydownloadedthescript. Runtheinstallscript(./install_apps.py)andwaitforalloftheappstobeinstalled.Youmayneedtochangetheaccesspermissionstomakethefileexecutableforyouruser. 📘NOTEIfyourmachinefallsbackonPython2asadefault,youmayneedtouse thepip3 and python3 commandstoinstalltherequiredmodulesandrunthescript.urllib3 isarequiredmoduleforthescript. Intheterminalwindow,runadbreboot. TheemulatorrebootsandtheSelectaHomeappdialogappears. SelecttheCloverLauncheroptionandthenclickAlways. TheCloverhomescreenappears. InstallingyourtestAndroidapp Onceyourinitialemulatorsetupiscomplete,youcaninstallyourtestAndroidapps. OntheDeveloperDashboard,clickMarketListingontheside-nav. OntheMarketListingpage,clickPREVIEWINAPPMARKET.YouareredirectedtotheMerchantDashboardforyourtestmerchantaccountwithanAppMarketpreviewofyourapp. ClickConnect. OntheInstallappdialog,selectapricingtieroracceptthedefault,andthenclickAccept. Intheterminalwindow,runtheinstallscript(./install_apps.py). Yourappisdownloadedandinstalledontheemulator. Installtestappwithscript$./install_apps.py Gettinginstalledversions... Gettingcurrentappdata... Updatingpackage:your.package.namefromversion:?,toversion:1... Installingnewversionsofyourapp EmulatorsdonotfunctionexactlylikeCloverdevices,sotheappupdateprocessisnotautomatic.Afteryou'veuploadedanewAPKonthedeveloperdashboard,completethefollowingstepstoupdatetheAPKinstalledontheemulator. InAndroidStudio,selectView>ToolWindows>Terminal(Alt+F12/Option+F12). IftheemulatorhasnotbeenrestartedsincethepreviousversionoftheAPKwasinstalled,runadbreboot. Theemulatorisrestarted. Runtheinstallscript(./install_apps.py). ThenewAPKisdownloadedandinstalledontheemulator. UpdateAPKfromversion1to2$./install_apps.py Gettinginstalledversions... Gettingcurrentappdata... Updatingpackage:your.package.namefromversion:1,toversion:2... SideloadingAPKs YoucanalsosideloadAPKstoyouremulator,butyoumustfirstuninstallthepreviousversionmanuallywithadbuninstallyour.package.name.Whenupdatingtoanewversionofyourapp,thenewversionmustbeinstalledusingthesamemethod(theinstallscriptorsideloading)asthepreviousversion.Ifyoutrytousetheothermethod,Android'ssignatureverificationwillreturnanerror: InstallfailedFailure[INSTALL_FAILED_UPDATE_INCOMPATIBLE: Packageyour.package.namesignaturesdonotmatch thepreviouslyinstalledversion;ignoring!] Updated10daysagoDidthispagehelpyou?YesNoTableofContents DownloadingCloverhardwareprofiles Creatinganewemulatorprofile Updatingdevicesettingsforproductiontesting SideloadingtherequiredCloverAPKusingADB InstallingrequiredClovermerchantapps InstallingyourtestAndroidapp Installingnewversionsofyourapp SideloadingAPKs



請為這篇文章評分?