GithubHelp home page GithubHelp logo

mdpauley / titanium-carplay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hansemannn/titanium-carplay

0.0 3.0 0.0 23 KB

Use the iOS 12+ CarPlay framework in Appcelerator Titanium.

License: MIT License

Objective-C 89.61% JavaScript 10.39%

titanium-carplay's Introduction

Titanium CarPlay

Use the iOS 12+ CarPlay framework in Appcelerator Titanium.

Requirements

  • Titanium SDK 7.3.0+
  • iOS 12+
  • Xcode 10+

Features

  • Receive events from your CarPlay instance
  • Present CarPlay-specific user-interfaces
    • Use Map templates to start a trip from CarPlay
    • Use List- and Grid-templates for selections
    • Use Alerts and Dialogs

Example

import CarPlay from 'ti.carplay';

CarPlay.addEventListener('didConnect', (event) => {
  // The CarPlay screen has connected and is ready to present content.
  const controller = event.interfaceController;
  const mapTemplate = CarPlay.createMapTemplate();
  controller.setRootTemplate(mapTemplate);
  
  // Start a new navigation session!
  mapTemplate.startNavigationSession({
    origin: { latitude: 0.0, longitude: 0.0 },
    destination: { latitude: 0.0, longitude: 0.0 },
    routeChoices: [{
      summaryVariants: ['Via I-280 S'],
      additionalInformationVariants: ['Fastest Route', 'Avoids Tolls'],
      selectionSummaryVariants: ['Turn left']
    }]
  });
});

CarPlay.addEventListener('didDisconnect', () => {
  // The CarPlay screen has disconnected.
});

CarPlay.addEventListener('didSelectNavigationAlert', () => {
  // If your application posts a `NavigationAlert` while backgrounded, 
  // a notification banner may be presented to the user.
});

CarPlay.addEventListener('didSelectManeuver', () => {
  // If your application posts a `Maneuver` while backgrounded, 
  // a notification banner may be presented to the user.
});

Author

Hans Knöchel (@hansemannnn / Web)

License

MIT

Contributing

Code contributions are greatly appreciated, please submit a new Pull-Request!

titanium-carplay's People

Contributors

hansemannn avatar

Watchers

Michael Pauley avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.