Git Product home page Git Product logo

cobalt's Introduction

Cobalt

First, have a look on this brief technical introduction to Cobalt to understand basic principles of the framework.

The full documentation Wiki is here.

Prerequisites

1) Install Android Studio or XCode

This step can take some time. If you already have them on your computer, be sure to have latest XCode version and lastest SDK and JDK for Android Studio.

2) Install Git if not already on your system

Try the samples

Choose a sample between HelloWorld, SideMenu, Catalog and git clone it for your platform :

git clone https://github.com/Cobaltians-Samples/Samples-HelloWorld-Android.git
//or
git clone https://github.com/Cobaltians-Samples/Samples-HelloWorld-iOS.git

Then go to the cloned folder and don't forget to init git submodules :

git submodule update --init

Then, open the iOS or Android project and enjoy !

Alternatively you can add Cobalt to an existing project :

Something not clear ?

Read the FAQ or ask us in the issues tracker. We will be glad to help !

Where to go from here ?

Dive in, jump to the documentation wiki, there is great guides to help you :

Follow @cobaltians on Twitter or check out the blog for updates.

cobalt's People

Contributors

baptistejamin avatar bryant1410 avatar doc1faux avatar ggendre avatar myrdhinn avatar qdequelen avatar zefcorsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cobalt's Issues

webwiew minimal height?

On iOS, if you set a simple web page with a simple content, a body height of 100% and a dark background, the webview is not entirely shown and you can scroll down to reveal the missing part.

not sure if it is related to a minimal webview height, a css bug or related to the Cobalt library.

Launch pages with arguments

It's could be awesome to launch a cobalt view with arguments, like intents with Extra options on Android.

I think it can be done. You are experts, alright?

enhance InfiniteScroll

I think we should enhance InfiniteScroll to work the same as the pullToRefresh

Cobalt webview should show a native small view at the bottom of the page with the native loader icon spinning. When event is released with its callback, this native small view should disapear.

For the moment, the event system works but it is the web side role to show the spinning stuff and hide it

The actual systems allow the user to customise the loader, set a button instead. We must try not to loose this flexibility.

what do you think?

it's empty

there is nothing in your repo dudes !

:P

Remove Modals

Current Modals are not perfect, especially on Android.
Remove it from sources

HelloWorld PullToRefresh iOS visual bug

In the iOS HelloWorld Sample, when a user starts making a pullToRefresh gesture, a space appears as soon as he starts to pull, between the top of the screen and the webview.

This is not related to the navBar, because if I comment the line containing [self.navigationController setNavigationBarHidden:YES];, the bug is still here, between the navBar and the content.

This bug only appears on iphone devices, not ipads. It does not exist in the other sample, the Catalog app.

Probably a small xib bug that you may not reproduce in your projects.

Hello World failed to run on Android Studio 1.4.1

Hi,

Newbie here ;)
I just succesfully built Hello World Android sample:

$ sudo cobaltians create cobalt-helloworld HelloWorld
Password:
Would you like to create an iOS app y/n (default: y): n
Would you like to create an Android app y/n (default: y):
Info creating path cobalt-helloworld
Info creating path cobalt-helloworld/Android
Info Cloning https://github.com/Cobaltians-Samples/Samples-HelloWorld-Android.git
Success repository https://github.com/Cobaltians-Samples/Samples-HelloWorld-Android.git cloned
Success getting submodules for cobalt-helloworld/Android/cobalt-helloworld
Success Fetching submodules from .gitmodules
Success got submodule 'cobalt'
Success submodule init worked
Success submodule update worked
Success got submodule 'HelloWorld/src/main/assets/www/common'
Success submodule init worked
Success submodule update worked
Success got submodule 'HelloWorld/src/main/assets/www/platform'
Success submodule init worked
Success submodule update worked
Success submodule init ended
Info making the template for Android
Info Create cobaltians file
Success Finished

But when imported to Android Studio 1.4.1 on Mac OS X El Capitan, it failed to run with these messages:

screen shot 2015-11-12 at 4 10 19 pm

Any help appreciated.

Thanks

provide a way to access shown webview from anywhere

On the native side, if we receive an external event like a notification or something else, we will often have to notify the currently openned and shown webview to handle this event on the web side.

It could be great if we had a way to access currently visible webview(s) from the cobalt class.

Crash on Android KitKat with an input type Date

I have a crash under Android 4.4 only.

I use the HelloWorld and I add in the index.html an input type "date".
When I click in the input, I have a crash :

01-06 08:07:12.992: W/System.err(1095): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
01-06 08:07:13.002: W/System.err(1095): at android.view.ViewRootImpl.setView(ViewRootImpl.java:538)
01-06 08:07:13.002: W/System.err(1095): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:259)
01-06 08:07:13.002: W/System.err(1095): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
01-06 08:07:13.002: W/System.err(1095): at android.app.Dialog.show(Dialog.java:286)
01-06 08:07:13.002: W/System.err(1095): at com.android.org.chromium.content.browser.input.InputDialogContainer.showDialog(InputDialogContainer.java:180)
01-06 08:07:13.002: W/System.err(1095): at com.android.org.chromium.content.browser.input.DateTimeChooserAndroid.showDialog(DateTimeChooserAndroid.java:46)
01-06 08:07:13.022: W/System.err(1095): at com.android.org.chromium.content.browser.input.DateTimeChooserAndroid.createDateTimeChooser(DateTimeChooserAndroid.java:59)
01-06 08:07:13.022: W/System.err(1095): at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
01-06 08:07:13.022: W/System.err(1095): at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:27)
01-06 08:07:13.022: W/System.err(1095): at android.os.Handler.dispatchMessage(Handler.java:102)
01-06 08:07:13.032: W/System.err(1095): at android.os.Looper.loop(Looper.java:137)
01-06 08:07:13.032: W/System.err(1095): at android.app.ActivityThread.main(ActivityThread.java:4998)
01-06 08:07:13.032: W/System.err(1095): at java.lang.reflect.Method.invokeNative(Native Method)
01-06 08:07:13.032: W/System.err(1095): at java.lang.reflect.Method.invoke(Method.java:515)
01-06 08:07:13.032: W/System.err(1095): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
01-06 08:07:13.042: W/System.err(1095): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
01-06 08:07:13.042: W/System.err(1095): at dalvik.system.NativeStart.main(Native Method)
01-06 08:07:13.092: A/libc(1095): Fatal signal 6 (SIGABRT) at 0x00000447 (code=-6), thread 1095 (m.example.hello)

Under Android 4.3, when I click in the input, the keyboard appears.

android core : JS / Android exchanges encoding issue

When sending an url encoded string to the web like this one :

something%20uri%3A:encoded

If the web is sending it back without any change, Android receive "something uri:encoded" instead of the original string.

that's wrooong

Cocoapod

Cocoapods for iOS would simplify a lot the way we use Cobalt in a project.

  • create pod
  • local test
  • publish pod
  • public test
  • update all samples to use the new pod
  • update doc, simplified version of how to add Cobalt as a lib with pods

Camera access for IOS and Android?

Hi,

I'm a developer for classifieds/ads posting website at http://www.pasarindo.com
I have tried unsuccessfully using appgeyser and como to convert to IOS/Android mobile app, since they are unable to access mobile camera for taking pictures.
Any step-by-step guide to convert to Cobalt and be able to use mobile camera will be greatly appreciated.

TIA

Notifications

Bonjour,

Est-il possible de mettre en place des notifications avec Cobalt ou faut t'il utiliser du code android ?

Merci d'avance.

Cordialement,
Geoffrey

Add android webviewDebugable options

On Android 4.4 (KitKat) or later, you can use DevTools to debug WebView content in native Android applications.

But for this, cobalt should enable it on the webview object with this kind of code :

 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
      WebView.setWebContentsDebuggingEnabled(true);
  }

More about this in the Android documentation

Bower

Use Bower for distributing web sources

  • create bower package for cobalt web
  • Doc Web, simplified version of how to add Cobalt as a lib with Bower

Cannot install...

Hello

I'll try to install Cobalt, but...

sudo npm install -g cobaltians 

--> OK

cobaltians create cobaltiansApp cobaltiansHelloWorld
Would you like to create an iOS app y/n  (default: y): 
Would you like to create an Android app y/n  (default: y): n
Info cloning https://github.com/cobaltians/cobalt.git
Success repository https://github.com/cobaltians/cobalt.git cloned
Info cloning https://github.com/cobaltians/Samples-cobaltiansHelloWorld-ios.git
Username for 'https://github.com': richnourichnou
Password for 'https://[email protected]': 
Error cannot clone the repository at https://github.com/cobaltians/Samples-cobaltiansHelloWorld-ios.git

What can I do ?
Tks...

queue navigation calls on ios

if we chain push and pop calls too fast on ios and if the page transitions animations are not finished, the navigation controller can fall into an unstable state complaining like this

nested push animation can result in corrupted navigation bar
Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.
Unbalanced calls to begin/end appearance transitions for <FCMyViewController: 0x17dac270>.

use IOS8 new WKWebView

IOS8 introduce WKWebView : a webview that run javascript faster than the good old UIWebView.

We should use this !

More infos here

Plantage de l'application

Bonjour,

Je viens de creer un projet avec votre framework mais lors du lancement de l'application sur un terminal ou un émulateur l'application se plante à l'ouverture.

J'ai aussi testé avec votre HelloWorld mais même résultat...

Lors de l'exécution de l'application, le LogCat me reporte les erreurs ci-dessous

capture

Merci d'avance pour votre réponse

Erreur Cobalt

Hi All,
meme apres un npm update -g cobaltians j'ai toujours des erreurs lors de la creation d'une application avec cobalt
erreurcobalt

plugin section rework

plugin section should be rewritten. it needs to be light, clear, concise and full of examples

A chrome plugin to simulate cobalt events!

It's cool be cool to develop faster to simulate cobalt event like does Ripple.

It could simulate console.log to cobalt.log, it could create pulltorefresh events, ...

Problems with node v4

Hi All,
I have a error when i want to create my app with cobalt.this is the error message :

Error { [Error: Cannot find module '../build/Debug/nodegit.node'] code: 'MODULE_
NOT_FOUND' }

document webLayer fragment overriding

to catch events in a webLayer you can use a getWebLayerFragment method to override the cobalt fragment and catch your own events

we have to document this :)

Problème LocalStorage

Bonjour,

J'essaie d'utiliser les fonctions de stockage que vous mettez à dispositions pour garder mes données sous forme JSON dans l'application lors de la navigation.

Mon problème est lors du test de l'existance de ses données cela me revoie null à chaque changement de page.

Mon code de test :
if(cobalt.storage.getItem('eventsDataJson', 'json') == null){
cobalt.sendEvent("getEvents");
}
else{
var eventsDataJson = cobalt.storage.getItem('eventsDataJson', 'json');
displayEvents(eventsDataJson);
}

Custom transitions support

We should be able to set a default transition animation somewhere and custom them on each push.
Web could be able to choose in a list of animations direction, timing and easing.
A hook to a custom native transition/animation could be set

WebLayers v2

Old weblayers are ugly. remove them from the cobalt source and use a normal push with a custom animation or theme (for android).
This way, weblayers will benefit from ability to push and pop with data, pubsub and so on.

  • Cleanup iOS
  • Cleanup Android
  • Cleanup Web
  • weblayer boolean in push option support for iOS
  • weblayer boolean in push option support for Android
  • weblayer boolean in push option support for web
  • Documentation update

better cobalt.platform

  • cobalt.platform.name should contain "Android" or "iOS"

also add two booleans :

  • cobalt.platform.isiOS
  • cobalt.platform.isAndroid
  • update doc on develop

AAR

AAR for Android would simplify a lot the way we use Cobalt in a project.

  • create aar locally
  • local tests
  • publish AAR or remote repo
  • public test
  • update All samples to use it
  • update doc, simplified version of how to add Cobalt as a lib with AAR

iOS alert collision

Hi guys!

There's is a collison beetween cobalt alerts & native alerts on iOS.

How to reproduce:

Create a native alert with a delegate on your native part.
Create a cobalt alert on your web part.

Your callback on your web part should be never called

Gulp

Use Gulp for minifying web sources

Menu sidebar pour application Android

Bonjour,

J'essaye de mettre en place un menu du même type que celui utilisé dans l'application "CodeDArmor" (appli utilisable après l'avoir mise à jour avec la version actuelle de Cobalt) mais je ne comprends pas tout...

Ce que pense avoir compris (et encore...) :

  • La page "sideMenu.html" génére le menu et le script permet d'envoyer l'événement qui permet le changement de fragment du côté natif de l'application,
  • Le fragment "SideMenuFragment.java" reçoit l'événement de la page "sideMenu.html" pour mettre à jour le fragment à afficher.

Ce que je n'ai pas compris :

  • Comment les pages html appellent la page "sideMenu.html",

  • Dans "SideMenuFragment.java", quelle est l'utilité de la fonction getpage().

    protected String getPage() {
    return "sideMenu.html";
    }

Je suis débutant en Android et donc par conséquent aussi avec Cobalt. J'ai saisi les principes du framework avec les événements pour passer du web au natif et inversement mais je suis perdu pour la réalisation du menu...

Merci pour votre aide,

JB

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.