One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; | |
// Manually authenticate user in controller | |
$token = new UsernamePasswordToken($user, null, 'main', $user->getRoles()); | |
$this->get('security.token_storage')->setToken($token); | |
$this->get('session')->set('_security_main', serialize($token)); |
/** | |
* A little workaround to proper handle resume and paused events on Android | |
*/ | |
var platformTools = require('bencoding.android.tools').createPlatform(); | |
var wasInForeGround = true; | |
//to be executed on every activity staus change | |
//check if it's passing from foreground to background or viceversa | |
function checkStatusSwitch() { | |
var isInForeground = platformTools.isInForeground(); |
This is a quick example of how to create a fading actionbar effect like this in Appcelerator Titanium
This is actually very simple. The trick is putting the Actionbar in overlay mode by configuring the theme with windowActionBarOverlay:true
. Then all you need to do is updating the color of the Actionbar, in this case by scrolling a ScrollView.
The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
This guide has been updated for Titanium SDK 3.3.0 which uses AppCompat to bring the ActionBar to Android 2.3.x
Android has a build-in theming system. Using this feature you can easily change the base color Android uses for its controls across your app, allowing you to provide better branding and personalization, while maintaining Android's UI and UX.
Android built-in themes are:
<?php | |
namespace Infun\HttpFoundation\File; | |
use Symfony\Component\HttpFoundation\File\File; | |
class ApiUploadedFile extends File | |
{ | |
public function __construct($base64Content) |
var rootWin = Ti.UI.createWindow(); | |
var navGroup = Ti.UI.iPhone.createNavigationGroup({ | |
window: rootWin | |
}); | |
var button = Ti.UI.createButton({ | |
title: 'Open ListView Tests' | |
}); | |
button.addEventListener('click', function() { | |
openTestsWindow(); | |
}); |
I have managed to install this… and make it work. I implemented it for Facebook and Google, but you can extend it. My solution it is mostly as described in #116, with a bit of more code presented. The key aspects that lack in the #116 presentation (IMO) are:
oauth_user_provider
in the security.yml
with your custom created serviceHere are the steps:
routing.yml
I have added all the routes for both bundles.config.yml
mostly as it is presented in the HWIOAuthBundle.security.yml
mostly as it is presented in the HWIOAuthBundle (though my routes are using /login
pattern, not /connect
). Also, the oauth_user_provider
is set for my custom service.