[SalesForce] Navigate to Lightning Component from Visualforce in Salesforce1

I have this scenario where I have overridden Account New button with a Visualforce page which redirects users to a Lightning App when the user is in Lightning Experience or else redirects to another Visualforce page when the user is in Classic. This works fine!

Now when I open the same in Salesforce1, I want the control to go to the Lightning App which is not happening. Getting the following error:

You can't view this page, either because you don't have permission or
because the page isn't supported on mobile devices.

Is there any way to navigate to custom Lightning App in Salesforce1 or at least navigate to Lightning Components?

Best Answer

This have been a puzzle for a long time for me.The fact that you cannot from a visualforce page go to a component, the only way i got it to work is by a little hack :

 window.parent.location = '/one/one.app#ew0KICAgICJjb21wb25lbnREZWYiIDogImM6TEMyOF9HZXN0aW9uQ29tcHRlIiwNCiAgICAiYXR0cmlidXRlcyIgOiB7fQ0KICB9';

from your visualforce page redirect to the parent location where the base64 encoding part represent the json component in base64 :

{"componentDef" : "c:LC28_GestionCompte","attributes" : {}}

from the above code, I am redirecting to the LC28_GestionCompte component. For sure this is not the recommended way, but it is the best option i found so far. And even salesforce said that there is no way for now. I serach for every possible post to be able to do it the nice way, but found none. So think this can help someone.