<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1615223394975271454</id><updated>2025-08-14T19:30:39.605-07:00</updated><category term="SISTEMAS"/><category term="NUEVAS TECNOLOGIAS"/><category term="DESARROLLO"/><category term="ADMINISTRACION"/><category term="ADMINISTRATION"/><category term="TENDENCIAS"/><category term="JAVA"/><category term="NODE"/><category term="NODEJS"/><category term="MEJORES PRÁCTICAS"/><category term="MONGO"/><category term="CONSOLA"/><category term="JAVASCRIPT"/><category term="DISEÑO"/><category term="LINUX"/><category term="TEST"/><category term="UNIX"/><category term="AUTOMATIZACION"/><category term="BEST PRACTICES"/><category term="SERVER"/><category term="SERVIDOR"/><category term="UBUNTU"/><category term="WEB"/><category term="BASE DE DATOS"/><category term="CSS PREPROCESSOR"/><category term="DATABASE"/><category term="MIGRANDO A CHILE"/><category term="NPM"/><category term="PRINCIPIOS"/><category term="STYLUS"/><category term="TESTING"/><category term="BOOT"/><category term="CANCER"/><category term="COMANDOS OS"/><category term="CONNECT"/><category term="CURA"/><category term="DB"/><category term="DEVELOPMENT"/><category term="INSTALL"/><category term="JS"/><category term="LOG4J"/><category term="MEMORIA"/><category term="MEMORY"/><category term="MOBILE"/><category term="MONGOD"/><category term="PAQUETES"/><category term="PATRON DE DISEÑO"/><category term="PROXY"/><category term="PRUEBA"/><category term="PRUEBAS"/><category term="REACT"/><category term="REACT NATIVE"/><category term="REPOSITORIO"/><category term="SALUD"/><category term="SCRIPT"/><category term="SISTEMA OPERATIVO"/><category term="STARTUP"/><category term="TIPS"/><category term="TRABAJO"/><category term="TRATAMIENTO"/><category term="VIDA"/><category term="ACTIVIDAD ECONOMICA"/><category term="ADMINISTRADOR DE VERSIONES"/><category term="AFP"/><category term="APACHE"/><category term="APACHE2"/><category term="ATOM"/><category term="AUTOMATIZATION"/><category term="AVAILABLES"/><category term="BACKUP"/><category term="BOLETA"/><category term="BROWSER"/><category term="CHILE"/><category term="COMANDOS"/><category term="CONEXION"/><category term="CONFIGURAR"/><category term="CONFLUENCE"/><category term="CONSULTAS"/><category term="CONTRASEÑA"/><category term="CONTRATO"/><category term="DAEMON"/><category term="DATOS"/><category term="DEFAULT"/><category term="DEVICE"/><category term="DOCUMENTACION"/><category term="DOCUMENTOS"/><category term="DOMAIN"/><category term="DOMINIO"/><category term="DOS"/><category term="DOWNLOAD"/><category term="EDITAR"/><category term="EMPRESA"/><category term="EMULADOR"/><category term="EN CALIENTE"/><category term="ENFERMEDAD"/><category term="ENVIRONMENT"/><category term="ERROR"/><category term="ETC"/><category term="EXCEPCIONES"/><category term="EXP"/><category term="EXPO"/><category term="EXPORT"/><category term="EXPORTAR"/><category term="EXPRESS"/><category term="EXTRANJEROS"/><category term="FACEBOOK"/><category term="FACTURA"/><category term="GIT"/><category term="GITHUB"/><category term="GOBIERNO"/><category term="HONORARIOS"/><category term="HOST"/><category term="HTML"/><category term="HTML5"/><category term="IMPUESTOS"/><category term="INICIAR"/><category term="INSTALACION"/><category term="INTEGRATED SERVER"/><category term="INTERNET"/><category term="JDEVELOPER"/><category term="JVM"/><category term="LIBRARIES"/><category term="LIBRERIAS"/><category term="LIQUIDACION"/><category term="MACRO"/><category term="MODULE"/><category term="MODULOS"/><category term="MOVIL"/><category term="MVC"/><category term="MÓVIL"/><category term="NAVEGADOR"/><category term="NIB"/><category term="OS"/><category term="OSTICKET"/><category term="PACKAGES"/><category term="PAGINA"/><category term="PASSWORD"/><category term="PORTAL"/><category term="PRIMERA"/><category term="PROPIEDADES"/><category term="PUBLICAR"/><category term="PUBLISH"/><category term="QUERIES"/><category term="RECOVER"/><category term="RECUPERAR"/><category term="REMEDY"/><category term="REMOTE"/><category term="REMOTO"/><category term="RUTINAS"/><category term="SELF_SIGNED_CERT_IN_CHAIN"/><category term="SHELL"/><category term="SII"/><category term="SINGLETON"/><category term="SITES"/><category term="SOPORTE"/><category term="SSL"/><category term="TECHNOLOGY"/><category term="UPSTART"/><category term="VERSION"/><category term="VEZ"/><category term="VIRTUAL"/><category term="VISA"/><category term="WIKI"/><category term="WINDOWS"/><title type='text'>Blog de Luiseliberal</title><subtitle type='html'>Banco de datos y mejores prácticas, ayudando la memoria.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default?start-index=26&amp;max-results=25'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>46</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-1918230478361566537</id><published>2024-12-17T02:47:00.000-08:00</published><updated>2024-12-24T07:07:56.064-08:00</updated><title type='text'>REACT WITH REDUX 2024</title><content type='html'>&lt;BR/&gt;&lt;BR/&gt;
REACT WITH REDUX 2024
&lt;BR/&gt;&lt;BR/&gt;

PARA CREAR UN PROYECTO REACT DESDE EL 06 / 12 / 24

&lt;BR/&gt;&lt;b&gt;USANDO VITE REACT 19&lt;/b&gt;&lt;BR/&gt;
npm create vite jsx -- --template=react
&lt;BR/&gt;
cd jsx
&lt;BR/&gt;
npm install
&lt;BR/&gt;
Iniciar el proyecto 
&lt;BR/&gt;
npm run dev
&lt;BR/&gt;
Vite comenzará en el puerto 5173 por defecto, en vez del acostumbrado 3000. Si necesitas cambiar el puerto esto lo puedes hacer en el archivo de configuración vite.config.js
&lt;BR/&gt;
Otro punto notorio es que el index.js , con vite es el main.js




&lt;BR/&gt;&lt;b&gt;USANDO REACT 18&lt;/b&gt;&lt;BR/&gt;
npm create-react-app
&lt;BR/&gt;
cd jsx
&lt;BR/&gt;
npm install
&lt;BR/&gt;
Iniciar el proyecto 
&lt;BR/&gt;
npm start
&lt;BR/&gt;
Si nos da error relacionado con webVitals: instalar la librería faltante .
&lt;BR /&gt;
npm install --save-dev web-vitals
&lt;BR/&gt;


</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/1918230478361566537/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2024/12/react-with-redux-2024.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/1918230478361566537'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/1918230478361566537'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2024/12/react-with-redux-2024.html' title='REACT WITH REDUX 2024'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-6651033029227079369</id><published>2019-04-25T13:21:00.001-07:00</published><updated>2019-04-25T13:21:55.403-07:00</updated><title type='text'>ReactJS desde cero</title><content type='html'>&lt;b&gt;Requerimientos:&lt;/b&gt;
&lt;br&gt;&lt;br&gt;

- Google Chrome.&lt;br&gt;
- React Developer tools, JsonView, redux dev tools y react performance development para chrome.&lt;br&gt;
- Un editor de texto entre sublimetext, atom o visualcode. Instalar plugins del editor para snippets, shortcuts y potenciadores.&lt;br&gt;

&lt;br&gt;&lt;br&gt;
&lt;b&gt;Consola: &lt;/b&gt;
&lt;br&gt;&lt;br&gt;
- npm install -g create-react-app.&lt;br&gt;
- crear carpeta de workspace y seguidamente en la consola ingresar create-react-app + nombre proyecto.&lt;br&gt;
- Ingresar a la carpeta del proyecto desde consola e ingresar npm run start
&lt;br&gt;&lt;br&gt;
Si fuese el caso de clonar repositorios seguir los siguientes pasos: 
&lt;br&gt;
- En consola escribir git clone + repositorio.&lt;br&gt;
- Ingresar en carpeta de proyecto clonada y ejecutar npm install para tener las dependencias.&lt;br&gt;
- Probar este todo ok con npm run start.&lt;br&gt;
&lt;br&gt;&lt;br&gt;

Sugerencias:
&lt;br&gt;
- npm install bootstrap



</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/6651033029227079369/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2019/04/reactjs-desde-cero.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6651033029227079369'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6651033029227079369'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2019/04/reactjs-desde-cero.html' title='ReactJS desde cero'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-5387730806327534</id><published>2018-04-21T15:33:00.004-07:00</published><updated>2018-04-21T19:35:04.850-07:00</updated><title type='text'>REACT NATIVE PROJECT ARCHITECURE AND DEVELOPMENT STEPS BY LUIS LIBERAL</title><content type='html'>&lt;BR/&gt;&lt;BR/&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftYSIH-614JGJtq9VQhv_3ymA1QFGzsA8zmGeC56kZXf18oM8vuzw7GvcuX0bt-NEpcshX7zd4e8E-QQReaUssBmjc2AFOtCy60AGsFgkyO3PriHVn5-bpnKLUaCdA7yDPcXdRDeCBiQ/s1600/react_native-dev.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftYSIH-614JGJtq9VQhv_3ymA1QFGzsA8zmGeC56kZXf18oM8vuzw7GvcuX0bt-NEpcshX7zd4e8E-QQReaUssBmjc2AFOtCy60AGsFgkyO3PriHVn5-bpnKLUaCdA7yDPcXdRDeCBiQ/s1600/react_native-dev.jpg&quot; data-original-width=&quot;1024&quot; data-original-height=&quot;576&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;BR/&gt;&lt;BR/&gt;

This is my way to mockup and build/write react native applications.
&lt;BR/&gt;
Steps:
&lt;BR/&gt;&lt;BR/&gt;
1) PLEASE THINK AGAIN AND AGAIN ON YOUR IDEA.

&lt;BR/&gt;&lt;BR/&gt;
2) Make a basic mokup of your app. You can use &lt;a href=&quot;https://www.mockplus.com/download&quot;&gt;MOCKUP PLUS PROTOTYPER&lt;/a&gt; or you can use &lt;a href=&quot;https://www.justinmind.com/&quot;&gt;JUST IN MIND PROTOTYPER&lt;/a&gt;
&lt;BR/&gt;&lt;BR/&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkydCofOejwP682-4USR1CN4O-Y6XSn9aIPhnlKQ0Sx4T_RwnNWgRVcgMGREkX8UrT0w9-5X1oH5g0WhgxMv-ZYG3_ltCxDqKYxFlADvNpr3Bo8h_pw0YfZv2YdiiDXgftDmdSfOduZOw/s1600/mockupplus.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkydCofOejwP682-4USR1CN4O-Y6XSn9aIPhnlKQ0Sx4T_RwnNWgRVcgMGREkX8UrT0w9-5X1oH5g0WhgxMv-ZYG3_ltCxDqKYxFlADvNpr3Bo8h_pw0YfZv2YdiiDXgftDmdSfOduZOw/s1600/mockupplus.png&quot; data-original-width=&quot;624&quot; data-original-height=&quot;302&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;

3)Go into your project folder and install the following libraries: 
&lt;BR/&gt;&lt;BR/&gt;

&lt;b&gt;npm install redux@3.7.2 --save&lt;/b&gt; . It&#39;s a model layer for react
&lt;BR/&gt;
&lt;b&gt;npm install react-redux@5.0.7 --save&lt;/b&gt; . It&#39;s a model layer for react
&lt;BR/&gt;
&lt;b&gt;npm install redux-thunk@2.2.0 --save&lt;/b&gt; . For asynchronous transactions. Make your actions can return functions... Dispatch.
&lt;BR/&gt;
&lt;b&gt;npm install react-native-router-flux@3.35.0 --save&lt;/b&gt; . Deal with navigation.
&lt;BR/&gt;
Optional for maps install: &lt;b&gt;npm react-native-maps --save&lt;/b&gt;
&lt;BR/&gt;
If you got any problem with a library you can delete it from package.json and use the command &lt;b&gt;npm prune&lt;/b&gt;.
&lt;BR/&gt;

4) Open your folder app with Atom IDE to start work on code. Each time you save your files, the project will reload and show changes by default. 

&lt;BR/&gt;&lt;BR/&gt;
5) Install Nuclide package atom for many development features including debug.

&lt;BR/&gt;&lt;BR/&gt;

6) Create a components folder into your root app folder, go inside this one, and create another folder called common.

&lt;BR/&gt;&lt;BR/&gt;

7) Import or create into common folder all .js files that you must have to reuse, like Buttons, Inputs, Header, Footer, Spinners, etc..., Those must have an index.js file that make export * to your project.

&lt;BR/&gt;&lt;BR/&gt;

8) Create an action folder into your root folder, then inside create an index.js, for each operation or module you must create a new file and import to index. 

&lt;BR/&gt;&lt;BR/&gt;

9) Create a reducers folder into your root folder, then inside create an index.js, for each operation or module you must create a new file and import to index. 

&lt;BR/&gt;&lt;BR/&gt;

5) Open your App.js file and add the following lines: 
&lt;BR/&gt;
import { Provider } from &#39;react-redux&#39;;
&lt;BR/&gt;
import { createStore } from &#39;redux&#39;;
&lt;BR/&gt;
import reducers from &#39;./reducers&#39;;
&lt;BR/&gt;
import LoginForm from &#39;./components/LoginForm&#39;;
&lt;BR/&gt;&lt;BR/&gt;
Add This new render, return lines to work with redux:
&lt;BR/&gt;&lt;BR/&gt;
render() {
    return (
      &lt;i&gt;&lt;Provider store={createStore(reducers)}&gt;
        &lt;LoginForm /&gt;
      &lt;/Provider&gt;&lt;/i&gt;
    );
  }
&lt;BR/&gt;&lt;BR/&gt;




</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/5387730806327534/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2018/04/react-native-project-architecure-and.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/5387730806327534'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/5387730806327534'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2018/04/react-native-project-architecure-and.html' title='REACT NATIVE PROJECT ARCHITECURE AND DEVELOPMENT STEPS BY LUIS LIBERAL'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgftYSIH-614JGJtq9VQhv_3ymA1QFGzsA8zmGeC56kZXf18oM8vuzw7GvcuX0bt-NEpcshX7zd4e8E-QQReaUssBmjc2AFOtCy60AGsFgkyO3PriHVn5-bpnKLUaCdA7yDPcXdRDeCBiQ/s72-c/react_native-dev.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-7482029245894604195</id><published>2018-04-21T08:25:00.001-07:00</published><updated>2018-04-21T08:34:23.225-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ATOM"/><category scheme="http://www.blogger.com/atom/ns#" term="CONSOLA"/><category scheme="http://www.blogger.com/atom/ns#" term="DESARROLLO"/><category scheme="http://www.blogger.com/atom/ns#" term="DEVELOPMENT"/><category scheme="http://www.blogger.com/atom/ns#" term="DEVICE"/><category scheme="http://www.blogger.com/atom/ns#" term="ENVIRONMENT"/><category scheme="http://www.blogger.com/atom/ns#" term="EXP"/><category scheme="http://www.blogger.com/atom/ns#" term="EXPO"/><category scheme="http://www.blogger.com/atom/ns#" term="INTERNET"/><category scheme="http://www.blogger.com/atom/ns#" term="MOBILE"/><category scheme="http://www.blogger.com/atom/ns#" term="MOVIL"/><category scheme="http://www.blogger.com/atom/ns#" term="NODE"/><category scheme="http://www.blogger.com/atom/ns#" term="NODEJS"/><category scheme="http://www.blogger.com/atom/ns#" term="NPM"/><category scheme="http://www.blogger.com/atom/ns#" term="PROXY"/><category scheme="http://www.blogger.com/atom/ns#" term="REACT"/><category scheme="http://www.blogger.com/atom/ns#" term="REACT NATIVE"/><category scheme="http://www.blogger.com/atom/ns#" term="WINDOWS"/><title type='text'>REACT NATIVE WITH EXPO HELLO WORLD ON A WINDOWS ENVIRONMENT</title><content type='html'>&lt;BR&gt;&lt;BR/&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrszi3PjrgHKDb9fStX_08WaQ-hkt-G-Z0vrXYymY2AMduJ-QtGFgyJ7MvVONLYPMjY6bR463dV8Vglb8h1muy6WI_oJRNhGL-7zEin0QYwSgVKTEd1bOOLiBfer3RY4ZLqTQsOpGOIIw/s1600/expodev.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrszi3PjrgHKDb9fStX_08WaQ-hkt-G-Z0vrXYymY2AMduJ-QtGFgyJ7MvVONLYPMjY6bR463dV8Vglb8h1muy6WI_oJRNhGL-7zEin0QYwSgVKTEd1bOOLiBfer3RY4ZLqTQsOpGOIIw/s1600/expodev.png&quot; data-original-width=&quot;895&quot; data-original-height=&quot;456&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;BR&gt;&lt;BR/&gt;

Que me disculpe el español pero prefiero escribir en inglés todo el artículo... 
&lt;BR&gt;&lt;BR/&gt;
Follow this steps to get a hello world project fastly, running on a windows os.

&lt;BR/&gt;&lt;BR/&gt;
&lt;b&gt;REQUERIMENTS:&lt;/b&gt;
&lt;BR&gt;
- Windows OS.
&lt;BR&gt;
- Free internet without proxies (if not installation packages must fail).

&lt;BR/&gt;&lt;BR/&gt;
&lt;B&gt;INSTALLATION STEPS: &lt;/B&gt;
&lt;BR/&gt;&lt;BR/&gt;

1) Get a good windows console program like &lt;a href=&quot;http://cmder.net/&quot;&gt;CMDER&lt;/a&gt; full with Github. Rememember to open Cmder as admin.

&lt;BR/&gt;&lt;BR/&gt;
2) Install &lt;a href=&quot;https://nodejs.org/es/&quot;&gt;NODEJS&lt;/a&gt; last version. Verify it after installation by console with: &lt;b&gt;node -v&lt;/b&gt;
&lt;BR/&gt;&lt;BR/&gt;

3) Install NPM version 4 (it must be compatible with expo, so just install 4 for now) by console: 
&lt;BR/&gt;
&lt;b&gt;npm install -g npm@4 &lt;/b&gt;
&lt;BR/&gt;
Verify it after installation with: &lt;b&gt;npm -v&lt;/b&gt;
&lt;BR/&gt;&lt;BR/&gt;

4) Install Expo from Facebook by console with: 
&lt;BR/&gt;&lt;BR/&gt;
&lt;b&gt;npm install exp --global&lt;/b&gt;
&lt;BR/&gt;&lt;BR/&gt;

Remember to check node or nodejs, npm and exp to be included into your PATH variable.

&lt;BR/&gt;&lt;BR/&gt;
If all ok you should be allowed to type exp on console with this result: 
&lt;BR/&gt;&lt;BR/&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidH0ag1t1yZ-9JpzDzk8CH3LigSERW-AGMS_chWES-tmIcXcJBPcLMwPNRqsU2nBAYVgDMo8MBR3SN0EH4bXxWPKDE3pNMVIJi6VCVK8cgT_wJCzoyFf3WeYCaB0s05r_pWSkb5X_d1VY/s1600/expo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidH0ag1t1yZ-9JpzDzk8CH3LigSERW-AGMS_chWES-tmIcXcJBPcLMwPNRqsU2nBAYVgDMo8MBR3SN0EH4bXxWPKDE3pNMVIJi6VCVK8cgT_wJCzoyFf3WeYCaB0s05r_pWSkb5X_d1VY/s1600/expo.png&quot; data-original-width=&quot;699&quot; data-original-height=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;BR/&gt;&lt;BR/&gt;&lt;BR&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR&gt;&lt;BR/&gt;

5) Create an &lt;a href=&quot;https://expo.io/signup&quot;&gt;EXPO ACCOUNT&lt;/a&gt;. You must have internet without proxies or this registration could fail.
&lt;BR/&gt;&lt;BR/&gt;

6) Install &lt;a href=&quot;https://expo.io/tools#client&quot;&gt;EXPO CLIENT&lt;/a&gt; into your mobile device.

&lt;BR/&gt;&lt;BR/&gt;

7) For write code get a good IDE like &lt;a href=&quot;https://atom.io/&quot;&gt;ATOM IDE&lt;/a&gt;, then install react, react-redux and other atom packages if you like.
&lt;BR/&gt;&lt;BR/&gt;

8) On your explorer create a workspace folder, then go to your Cmder console and type: 
&lt;BR/&gt;&lt;BR/&gt;
&lt;b&gt;exp init MY-APP&lt;/b&gt;
&lt;BR/&gt;&lt;BR/&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ9Odvetk11e_K5eiUb7Z8w4Wm_DYnb8iDov-ULqpmN_D3GameRvbp3fLwEWY4UweHCVJwNNGPKQ4_s0MIju9P28-UZOeN_jnzMbG8NVP47BG8NGBiiyYsgwwHdCwnvJdQuDdVvFdLJrM/s1600/expoinit.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ9Odvetk11e_K5eiUb7Z8w4Wm_DYnb8iDov-ULqpmN_D3GameRvbp3fLwEWY4UweHCVJwNNGPKQ4_s0MIju9P28-UZOeN_jnzMbG8NVP47BG8NGBiiyYsgwwHdCwnvJdQuDdVvFdLJrM/s1600/expoinit.png&quot; data-original-width=&quot;696&quot; data-original-height=&quot;173&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;BR/&gt;&lt;BR/&gt;&lt;BR&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR&gt;&lt;BR/&gt;&lt;BR/&gt;&lt;BR/&gt;

9) Preview your React Native App typing on your console (inside your app folder): 
&lt;BR/&gt;&lt;BR/&gt;
&lt;b&gt;exp start&lt;/b&gt;
&lt;BR/&gt;&lt;BR/&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis6KKl-_P_3fafSv7lRsra8ThLXVwiTHblezi8k9aR815bK5pMCvbLmbNjFun8ruJjh2jRuLzwFvTHSMsbh2wG3US_lSQSxCpOdDFMZ6JW3nvPCOS55R8NLDBNKbbJajokSoSSm0MB3Yk/s1600/previewExpo.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis6KKl-_P_3fafSv7lRsra8ThLXVwiTHblezi8k9aR815bK5pMCvbLmbNjFun8ruJjh2jRuLzwFvTHSMsbh2wG3US_lSQSxCpOdDFMZ6JW3nvPCOS55R8NLDBNKbbJajokSoSSm0MB3Yk/s1600/previewExpo.png&quot; data-original-width=&quot;300&quot; data-original-height=&quot;295&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;BR/&gt;&lt;BR/&gt;

Then you must open your expo android/ios application on your device, then select scan QR, and just get that code on your pc... then it will start automatically if you have done all steps ok.

&lt;BR/&gt;&lt;BR/&gt;

</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/7482029245894604195/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2018/04/react-native-with-expo-hello-world-on.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/7482029245894604195'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/7482029245894604195'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2018/04/react-native-with-expo-hello-world-on.html' title='REACT NATIVE WITH EXPO HELLO WORLD ON A WINDOWS ENVIRONMENT'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrszi3PjrgHKDb9fStX_08WaQ-hkt-G-Z0vrXYymY2AMduJ-QtGFgyJ7MvVONLYPMjY6bR463dV8Vglb8h1muy6WI_oJRNhGL-7zEin0QYwSgVKTEd1bOOLiBfer3RY4ZLqTQsOpGOIIw/s72-c/expodev.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-2193446799535596007</id><published>2017-11-04T11:11:00.000-07:00</published><updated>2017-11-04T11:13:32.858-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DEVELOPMENT"/><category scheme="http://www.blogger.com/atom/ns#" term="EMULADOR"/><category scheme="http://www.blogger.com/atom/ns#" term="FACEBOOK"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVASCRIPT"/><category scheme="http://www.blogger.com/atom/ns#" term="JS"/><category scheme="http://www.blogger.com/atom/ns#" term="MOBILE"/><category scheme="http://www.blogger.com/atom/ns#" term="MÓVIL"/><category scheme="http://www.blogger.com/atom/ns#" term="NPM"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="PAQUETES"/><category scheme="http://www.blogger.com/atom/ns#" term="PRINCIPIOS"/><category scheme="http://www.blogger.com/atom/ns#" term="REACT"/><category scheme="http://www.blogger.com/atom/ns#" term="REACT NATIVE"/><category scheme="http://www.blogger.com/atom/ns#" term="SISTEMAS"/><category scheme="http://www.blogger.com/atom/ns#" term="TECHNOLOGY"/><category scheme="http://www.blogger.com/atom/ns#" term="TENDENCIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRABAJO"/><title type='text'>REACT NATIVE WINDOWS SETUP HELLO WORLD</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6sPofnWYkpf0-gzBlO-QyFmiScT6mSMJ_erMG4IQJ1ST7gX1q28I71afqLFF9Ubg8pUD_cMKOyZoyHr3oyq5v_0FnAyCqHLksBeF5PPUJjVo6K7Ppk95F9M1idYQzomtNX6JeVCOQXQU/s1600/react_native.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6sPofnWYkpf0-gzBlO-QyFmiScT6mSMJ_erMG4IQJ1ST7gX1q28I71afqLFF9Ubg8pUD_cMKOyZoyHr3oyq5v_0FnAyCqHLksBeF5PPUJjVo6K7Ppk95F9M1idYQzomtNX6JeVCOQXQU/s1600/react_native.png&quot; data-original-width=&quot;480&quot; data-original-height=&quot;276&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br&gt;&lt;br&gt;
React-Native es una plataforma desarrollada por Facebook, open source para el desarrollo de aplicaciones móviles cross-platform completamente nativas utilizando React y por lo tanto nuestro amado JavaScript ;).

&lt;br&gt;&lt;br&gt;
&lt;b&gt; Para instalar react native en un entorno windows por favor sigue los siguientes pasos: &lt;/b&gt;

&lt;br&gt;&lt;br&gt;
1) Instalar Nodejs 6+
&lt;br&gt;
2) Instalar python 2.7+
&lt;br&gt;
3) Instalar JDK java 8+
&lt;br&gt;
4) Instalar Android studio, versión compatible con jdk.
&lt;br&gt;
5) npm install -g react-native-cli
&lt;br&gt;
6) react-native init &quot;NOMBRE APP&quot;
&lt;br&gt;
7) Install emulator device avd android, con api 23 o el que pide react-native al abrir el proyecto en AndroidStudio.
&lt;br&gt;
8) Iniciar el emulador desde android studio.
&lt;br&gt;
9) System settings, environment variables.
&lt;br&gt;
 - Add JAVA_HOME (arriba)
&lt;br&gt;
 - Add a Path -&gt; C:\Users\Laptop\AppData\Local\Android\sdk\platform-tools (DEBES REESCRIBIR LAPTOP POR TU USUARIO EN EL PC)
&lt;br&gt;
10) En la carpeta de tu proyecto ejecutar: react-native run-android</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/2193446799535596007/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2017/11/react-native-windows-setup-hello-world.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/2193446799535596007'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/2193446799535596007'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2017/11/react-native-windows-setup-hello-world.html' title='REACT NATIVE WINDOWS SETUP HELLO WORLD'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6sPofnWYkpf0-gzBlO-QyFmiScT6mSMJ_erMG4IQJ1ST7gX1q28I71afqLFF9Ubg8pUD_cMKOyZoyHr3oyq5v_0FnAyCqHLksBeF5PPUJjVo6K7Ppk95F9M1idYQzomtNX6JeVCOQXQU/s72-c/react_native.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-1688951267006186352</id><published>2017-09-27T18:36:00.000-07:00</published><updated>2017-09-27T18:45:50.571-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="APACHE"/><category scheme="http://www.blogger.com/atom/ns#" term="APACHE2"/><category scheme="http://www.blogger.com/atom/ns#" term="AVAILABLES"/><category scheme="http://www.blogger.com/atom/ns#" term="CONFIGURAR"/><category scheme="http://www.blogger.com/atom/ns#" term="DEFAULT"/><category scheme="http://www.blogger.com/atom/ns#" term="ETC"/><category scheme="http://www.blogger.com/atom/ns#" term="HOST"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="PAGINA"/><category scheme="http://www.blogger.com/atom/ns#" term="PORTAL"/><category scheme="http://www.blogger.com/atom/ns#" term="SITES"/><category scheme="http://www.blogger.com/atom/ns#" term="UBUNTU"/><category scheme="http://www.blogger.com/atom/ns#" term="VIRTUAL"/><category scheme="http://www.blogger.com/atom/ns#" term="WEB"/><title type='text'>CONFIGURA TU PAGINA WEB EN APACHE2 UBUNTU</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxmyeUZjg0306ZfZhcDdH0NSiYDMMbXonan_-Y2ClY0IClt7JZ8lcdbu7ckBz7t0i44r8gMwsYhRkdi9ryfcrr2eTaiUFy0hBmGQrjv_R0foV37MxNn54keazg_0gppJz6ZW7_5DtXPdc/s1600/apache2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;212&quot; data-original-width=&quot;750&quot; height=&quot;90&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxmyeUZjg0306ZfZhcDdH0NSiYDMMbXonan_-Y2ClY0IClt7JZ8lcdbu7ckBz7t0i44r8gMwsYhRkdi9ryfcrr2eTaiUFy0hBmGQrjv_R0foV37MxNn54keazg_0gppJz6ZW7_5DtXPdc/s320/apache2.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;El mejor tutorial para configurar la página web en tu apache2 de ubuntu se encuentra en el siguiente enlace:&lt;/b&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://julienrenaux.fr/2015/04/06/changing-apache2-document-root-in-ubuntu-14-x/&quot;&gt;VER TUTORIAL&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Referencias personales de utilidad&lt;/b&gt;
&lt;br /&gt;
Agregar al archivo etc/apache2/apache2.conf tu carpeta contenedora de la página web como lo muestra el ejemplo:
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&amp;lt;Directory home=&quot;&quot; ites=&quot;&quot; iweb=&quot;&quot; workspace=&quot;&quot;&amp;gt;&lt;br /&gt;
Options Indexes FollowSymLinks&lt;br /&gt;
AllowOverride All&lt;br /&gt;
Require all granted&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Al archivo /etc/apache2/sites-available/000-default.conf modificar parametros, ejemplo:
&lt;br /&gt;
&lt;blockquote&gt;
&amp;lt;Virtualhost&amp;gt;&lt;br /&gt;
 ServerName www.javadoh.com&lt;br /&gt;
 ServerAlias *.javadoh.com&lt;br /&gt;
 ServerAdmin webmaster@localhost&lt;br /&gt;
 DocumentRoot /home/workspace/Sites/MiWeb&lt;br /&gt;
 ErrorLog ${APACHE_LOG_DIR}/error.log&lt;br /&gt;
 CustomLog ${APACHE_LOG_DIR}/access.log combined&lt;br /&gt;
&amp;lt;/Virtualhost&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;

&lt;br /&gt;
Recomiendo seguir el tutorial del enlace paso a paso y será muy fácil configurar tu web.</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/1688951267006186352/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2017/09/configura-tu-pagina-web-en-apache2.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/1688951267006186352'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/1688951267006186352'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2017/09/configura-tu-pagina-web-en-apache2.html' title='CONFIGURA TU PAGINA WEB EN APACHE2 UBUNTU'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxmyeUZjg0306ZfZhcDdH0NSiYDMMbXonan_-Y2ClY0IClt7JZ8lcdbu7ckBz7t0i44r8gMwsYhRkdi9ryfcrr2eTaiUFy0hBmGQrjv_R0foV37MxNn54keazg_0gppJz6ZW7_5DtXPdc/s72-c/apache2.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-247718149154357608</id><published>2017-07-05T12:15:00.000-07:00</published><updated>2017-07-05T12:15:44.483-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CONSOLA"/><category scheme="http://www.blogger.com/atom/ns#" term="DESARROLLO"/><category scheme="http://www.blogger.com/atom/ns#" term="DOWNLOAD"/><category scheme="http://www.blogger.com/atom/ns#" term="ERROR"/><category scheme="http://www.blogger.com/atom/ns#" term="INSTALL"/><category scheme="http://www.blogger.com/atom/ns#" term="LIBRARIES"/><category scheme="http://www.blogger.com/atom/ns#" term="LIBRERIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="NODE"/><category scheme="http://www.blogger.com/atom/ns#" term="NODEJS"/><category scheme="http://www.blogger.com/atom/ns#" term="NPM"/><category scheme="http://www.blogger.com/atom/ns#" term="PACKAGES"/><category scheme="http://www.blogger.com/atom/ns#" term="PAQUETES"/><category scheme="http://www.blogger.com/atom/ns#" term="PROXY"/><category scheme="http://www.blogger.com/atom/ns#" term="SELF_SIGNED_CERT_IN_CHAIN"/><category scheme="http://www.blogger.com/atom/ns#" term="SSL"/><title type='text'>PROBLEMAS CON NPM NODEJS BAJO PROXY EMPRESARIAL</title><content type='html'>Si te encuentras con errores al instalar paquetes (librerías) npm en tu pc y visualizas mensajes de este tipo: self_signed_cert_in_chain...

&lt;br&gt;&lt;br&gt;
Debes ejecutar el siguiente código en tu consola: 
&lt;br&gt;&lt;br&gt;
npm config set registry=&quot;http://registry.npmjs.org/&quot;

&lt;br&gt;&lt;br&gt; 
Inmediatamente vuelve a ejecutar tu npm install y verás que corre sin problemas...
</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/247718149154357608/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2017/07/problemas-con-npm-nodejs-bajo-proxy.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/247718149154357608'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/247718149154357608'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2017/07/problemas-con-npm-nodejs-bajo-proxy.html' title='PROBLEMAS CON NPM NODEJS BAJO PROXY EMPRESARIAL'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-8246478965970389415</id><published>2016-07-01T20:45:00.002-07:00</published><updated>2016-07-01T20:45:43.050-07:00</updated><title type='text'>INSTALANDO GOOGLE PLAY SERVICES EN EMULADOR GENYMOTION</title><content type='html'>&lt;!DOCTYPE html&gt;
&lt;html&gt;

  &lt;head&gt;
  &lt;meta charset=&quot;utf-8&quot;&gt;
  &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot;&gt;
  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot;&gt;

  &lt;title&gt;Google Play Services with Android 6.0 Marshmallow and Genymotion&lt;/title&gt;
  &lt;meta name=&quot;description&quot; content=&quot;So, I think you want to install the Google Play Store &amp;amp; Services with an Android 6.0 Marshmallow Emulator?&quot;&gt;

  &lt;link rel=&quot;stylesheet&quot; href=&quot;/css/main.css&quot;&gt;
  &lt;link rel=&quot;canonical&quot; href=&quot;https://z3ntu.github.io/2015/12/10/play-services-with-genymotion.html&quot;&gt;
  &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;z3ntu&quot; href=&quot;https://z3ntu.github.io/feed.xml&quot;&gt;
  &lt;meta name=&quot;google-site-verification&quot; content=&quot;lRwe0qGfXZl9HSQKeG0NkNrOAlJFdNqGtyzs6FLRs9k&quot; /&gt;
  
&lt;/head&gt;


  &lt;body&gt;

    &lt;h1 class=&quot;post-title&quot; itemprop=&quot;name headline&quot;&gt;Google Play Services with Android 6.0 Marshmallow and Genymotion&lt;/h1&gt;
    &lt;p class=&quot;post-meta&quot;&gt;&lt;time datetime=&quot;2015-12-10T12:24:00+01:00&quot; itemprop=&quot;datePublished&quot;&gt;Dec 10, 2015&lt;/time&gt;&lt;/p&gt;
  &lt;/header&gt;

    &lt;p&gt;So, I think you want to install the Google Play Store &amp;amp; Services with an Android 6.0 Marshmallow Emulator?&lt;/p&gt;

&lt;p&gt;To do that, follow either the long or the short version.&lt;/p&gt;

&lt;p&gt;You need the following three files:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links&quot;&gt;Genymotion-ARM-Translation_v1.1.zip&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.androidfilehost.com/?fid=96042739161891406&quot;&gt;gapps-L-4-21-15.zip&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.androidfilehost.com/?fid=24052804347835438&quot;&gt;benzo-gapps-M-20151011-signed-chroma-r3.zip&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Short version:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Download all three files.&lt;/li&gt;
  &lt;li&gt;Create an emulator with the &lt;code class=&quot;highlighter-rouge&quot;&gt;Nexus 5X&lt;/code&gt; image and start it.&lt;/li&gt;
  &lt;li&gt;Flash &lt;code class=&quot;highlighter-rouge&quot;&gt;Genymotion-ARM-Translation_v1.1.zip&lt;/code&gt; and reboot.&lt;/li&gt;
  &lt;li&gt;Flash &lt;code class=&quot;highlighter-rouge&quot;&gt;gapps-L-4-21-15.zip&lt;/code&gt; and reboot.&lt;/li&gt;
  &lt;li&gt;Sign into your Google Account.&lt;/li&gt;
  &lt;li&gt;Flash &lt;code class=&quot;highlighter-rouge&quot;&gt;benzo-gapps-M-20151011-signed-chroma-r3.zip&lt;/code&gt; and reboot.&lt;/li&gt;
  &lt;li&gt;You are finished!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Long version:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Then start GenyMotion and add an emulator with the preset &lt;code class=&quot;highlighter-rouge&quot;&gt;!! PREVIEW - Google Nexus 5X - 6.0.0 - API 23 - 1080x1920&lt;/code&gt;. Start it and wait until you see the homescreen.&lt;/p&gt;

&lt;p&gt;The next step is to flash the &lt;code class=&quot;highlighter-rouge&quot;&gt;Genymotion-ARM-Translation_v1.1.zip&lt;/code&gt;. To do that, just drap &amp;amp; drop the .zip file onto the emulator.&lt;/p&gt;

&lt;p&gt;Turn the emulator off with the power button and wait until it is powered off. Then turn it on again.&lt;/p&gt;

&lt;p&gt;Now repeat the last two steps with &lt;code class=&quot;highlighter-rouge&quot;&gt;gapps-L-4-21-15.zip&lt;/code&gt; (flash, reboot).&lt;/p&gt;

&lt;p&gt;If you are finished with that, sign into your Google account (you can do that when opening the Play Store). If you are successfully logged in, flash the &lt;code class=&quot;highlighter-rouge&quot;&gt;benzo-gapps-M-20151011-signed-chroma-r3.zip&lt;/code&gt; file and reboot again.&lt;/p&gt;

&lt;p&gt;Have fun with your working Google Play Store!&lt;/p&gt;

&lt;p&gt;Source: &lt;a href=&quot;https://gist.github.com/wbroek/9321145&quot;&gt;gist.github.com&lt;/a&gt;&lt;/p&gt;

 &lt;/body&gt;
&lt;/html&gt;
</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/8246478965970389415/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/07/instalando-google-play-services-en.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/8246478965970389415'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/8246478965970389415'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/07/instalando-google-play-services-en.html' title='INSTALANDO GOOGLE PLAY SERVICES EN EMULADOR GENYMOTION'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-1075691328887271681</id><published>2016-06-30T06:19:00.000-07:00</published><updated>2016-06-30T06:19:20.040-07:00</updated><title type='text'>FACEBOOK SDK INTEGRATION ON ANDROID</title><content type='html'>&lt;h2 id=&quot;toc_1&quot;&gt;Create Android Project&lt;/h2&gt;
&lt;p&gt;Make sure you have an up to date version of Android Studio. I am using version 1.4.1&lt;/p&gt;
&lt;p&gt;Open Android Studio and create a &lt;em&gt;New Project&lt;/em&gt;, naming it as you wish. Click &lt;em&gt;Next&lt;/em&gt;, choose &lt;em&gt;Minimum API level 17&lt;/em&gt; and click &lt;em&gt;Next&lt;/em&gt; again. Choose &lt;em&gt;Blank Activity&lt;/em&gt; as the first activity, name it &lt;em&gt;LoginActivity&lt;/em&gt; and click &lt;em&gt;Finish&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Add Internet permissions to &lt;em&gt;AndroidManifest.xml&lt;/em&gt;:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;uses-permission&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;android.permission.INTERNET&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next we add another blank activity to the project. &lt;em&gt;Right Click&lt;/em&gt; the package and select &lt;em&gt;New -&amp;gt; Activity -&amp;gt; Blank Activity&lt;/em&gt;. Leave its name as default and click &lt;em&gt;finish&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;The final project for this article can be found on &lt;a target=&quot;_blank&quot; href=&quot;https://github.com/sitepoint-editors/Android-Facebook-API&quot;&gt;Github&lt;/a&gt;. Make sure you change the Facebook API details to match you own.&lt;/p&gt;
&lt;h2 id=&quot;toc_2&quot;&gt;Creating Facebook App ID&lt;/h2&gt;
&lt;p&gt;To use the Facebook API we have to add an app entry to our &lt;a target=&quot;_blank&quot; href=&quot;https://developers.facebook.com/quickstarts/?platform=android&quot;&gt;Facebook Developer Apps dashboard&lt;/a&gt;. You will need a Facebook developer account if you don’t have one already. Choose a random category and click &lt;em&gt;Create App ID&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;On the next page, scroll down to the bottom and complete both fields with the project packages names.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/11/1447951321facebook3.png&quot; alt=&quot;Package Names&quot;&gt;&lt;/p&gt;
&lt;p&gt;Click &lt;em&gt;Next&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now we need to add a Development Key Hash. There are two ways of generating one. The first option is using the command line.&lt;/p&gt;
&lt;h3 id=&quot;toc_3&quot;&gt;Windows&lt;/h3&gt;
&lt;pre class=&quot;line-numbers language-bash&quot;&gt;&lt;code class=&quot; language-bash&quot;&gt;keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt; openssl sha1 -binary &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt; openssl base64&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;toc_4&quot;&gt;Mac&lt;/h3&gt;
&lt;pre class=&quot;line-numbers language-bash&quot;&gt;&lt;code class=&quot; language-bash&quot;&gt;keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt; openssl sha1 -binary &lt;span class=&quot;token operator&quot;&gt;|&lt;/span&gt; openssl base64&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Open Facebook’s &lt;em&gt;&lt;a target=&quot;_blank&quot; href=&quot;https://developers.facebook.com/apps/&quot;&gt;My Apps&lt;/a&gt;&lt;/em&gt; section and copy the App ID:&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/11/1447951393appid.png&quot; alt=&quot;App ID&quot;&gt;&lt;/p&gt;
&lt;p&gt;Open &lt;em&gt;strings.xml&lt;/em&gt; in your project and add this line of code:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;string&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;app_id&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;{Your App ID here}&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;toc_5&quot;&gt;Setting up Facebook SDK&lt;/h2&gt;
&lt;p&gt;Open &lt;em&gt;build.gradle (Project)&lt;/em&gt; and add &lt;code class=&quot; language-undefined&quot;&gt;mavenCentral()&lt;/code&gt; to both repository sections. Then open &lt;em&gt;build.gradle (Module)&lt;/em&gt; and add the SDK library by adding this line to `dependencies:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-gradle&quot;&gt;&lt;code class=&quot; language-gradle&quot;&gt; compile &#39;com.facebook.android:facebook-android-sdk:4.6.0&#39;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/11/1447951443mavenCentral.png&quot; alt=&quot;Adding dependencies&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now &lt;em&gt;sync&lt;/em&gt; gradle.&lt;/p&gt;
&lt;h2 id=&quot;toc_6&quot;&gt;Activities and Layouts&lt;/h2&gt;
&lt;p&gt;Open &lt;em&gt;AndroidManifest.xml&lt;/em&gt; and make these changes.&lt;/p&gt;
&lt;p&gt;Change the &lt;code class=&quot; language-undefined&quot;&gt;MainActivity&lt;/code&gt; label:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;activity&lt;/span&gt;
      &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;.MainActivity&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@string/app_name&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;            &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;theme&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@style/AppTheme.NoActionBar&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;activity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add these tags:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;meta-data&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;com.facebook.sdk.ApplicationId&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;value&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@string/app_id&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;activity&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;com.facebook.FacebookActivity&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;label&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@string/app_name&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;screenOrientation&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;portrait&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;

&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;provider&lt;/span&gt;              &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;authorities&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;com.facebook.app.FacebookContentProvider&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;                 &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;com.facebook.FacebookContentProvider&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;exported&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;true&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now we are going to work with Java classes and layouts.&lt;/p&gt;
&lt;p&gt;First we are going to work with &lt;em&gt;LoginActivity.java&lt;/em&gt;. This class opens an authenticated connection to the Facebook API and gets data from it.&lt;/p&gt;
&lt;p&gt;Add these lines before the &lt;code class=&quot; language-undefined&quot;&gt;onCreate&lt;/code&gt; method inside the class:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;private&lt;/span&gt; CallbackManager callbackManager&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;private&lt;/span&gt; AccessTokenTracker accessTokenTracker&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;private&lt;/span&gt; ProfileTracker profileTracker&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;//Facebook login button&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;private&lt;/span&gt; FacebookCallback&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;LoginResult&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt; callback &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;FacebookCallback&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;LoginResult&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onSuccess&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;LoginResult loginResult&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        Profile profile &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getCurrentProfile&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token function&quot;&gt;nextActivity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;profile&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onCancel&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onError&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;FacebookException e&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;      &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here we create a &lt;code class=&quot; language-undefined&quot;&gt;FacebookCallback&lt;/code&gt; called &lt;code class=&quot; language-undefined&quot;&gt;callback&lt;/code&gt;. This executes the next action after we get a response from the Facebook API and the method for that is &lt;code class=&quot; language-undefined&quot;&gt;onSuccess()&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Inside the &lt;code class=&quot; language-undefined&quot;&gt;onSuccess&lt;/code&gt; method we create a new Facebook Profile and get data for that profile. Later we will create a simple function called &lt;code class=&quot; language-undefined&quot;&gt;nextActivity()&lt;/code&gt; that will switch our activity.&lt;/p&gt;
&lt;p&gt;We do not need the code for the &lt;code class=&quot; language-undefined&quot;&gt;FloatingActionButton&lt;/code&gt; so we will replace it. We are going to initialize the Facebook SDK so we can use its functions and methods. Inside &lt;code class=&quot; language-undefined&quot;&gt;onCreate()&lt;/code&gt; add these lines:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;FacebookSdk&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;sdkInitialize&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
callbackManager &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; CallbackManager&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Factory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;create&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
accessTokenTracker &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;AccessTokenTracker&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onCurrentAccessTokenChanged&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;AccessToken oldToken&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; AccessToken newToken&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

profileTracker &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;ProfileTracker&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onCurrentProfileChanged&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Profile oldProfile&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Profile newProfile&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token function&quot;&gt;nextActivity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;newProfile&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
accessTokenTracker&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;startTracking&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
profileTracker&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;startTracking&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next we need to show the famous Facebook Log in button. We don’t need to make it from scratch as it exists inside the SDK’s libraries and can be called in our layout.&lt;/p&gt;
&lt;p&gt;So we will edit our LoginActivity’s layout. It’s name should be &lt;i&gt;content_login.xml&lt;/i&gt;. In fact, the latest version of Android Studio creates two default &lt;em&gt;.xml&lt;/em&gt; files for every activity we create. The other layout file is called &lt;i&gt;activity_login.xml&lt;/i&gt;.&lt;/p&gt;
&lt;p&gt;In &lt;em&gt;activity_login.xml&lt;/em&gt; delete the code for the floating button as we wont need it.&lt;/p&gt;
&lt;p&gt;In &lt;em&gt;content_login.xml&lt;/em&gt; there is only a &lt;code class=&quot; language-undefined&quot;&gt;TextView&lt;/code&gt; element. We will remove it and create a new &lt;code class=&quot; language-undefined&quot;&gt;LinearLayout&lt;/code&gt; that is horizontally oriented. Inside that layout we will add the log in button. Paste the code below to replace the current contents of &lt;em&gt;content_login.xml&lt;/em&gt;:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token prolog&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;LinearLayout&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;android&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://schemas.android.com/apk/res/android&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;match_parent&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;match_parent&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;orientation&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;horizontal&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;

&amp;lt;com.facebook.login.widget.LoginButton
    android:id=&quot;@+id/login_button&quot;
    android:layout_width=&quot;match_parent&quot;
    android:layout_height=&quot;wrap_content&quot;
    android:layout_gravity=&quot;center_vertical&quot;
    android:gravity=&quot;center&quot;
    android:layout_margin=&quot;4dp&quot;
    android:paddingTop=&quot;12dp&quot;
    android:paddingBottom=&quot;12dp&quot;/&amp;gt;

&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;LinearLayout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I added some padding at the top and bottom and centered the horizontal linear layout. Let’s return to the Login class and create the button.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/11/1447950890Screenshot_2015-11-07-19-00-13.png&quot; alt=&quot;Login with Facebook&quot;&gt;&lt;/p&gt;
&lt;p&gt;Inside the &lt;code class=&quot; language-undefined&quot;&gt;onCreate()&lt;/code&gt; method before the closing bracket, add the code below:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;LoginButton loginButton &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;LoginButton&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;R&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;login_button&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
callback &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;FacebookCallback&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;LoginResult&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onSuccess&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;LoginResult loginResult&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        AccessToken accessToken &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; loginResult&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getAccessToken&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        Profile profile &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getCurrentProfile&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token function&quot;&gt;nextActivity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;profile&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        Toast&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;makeText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot;Logging in...&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Toast&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;LENGTH_SHORT&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onCancel&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onError&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;FacebookException e&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
loginButton&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setReadPermissions&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;user_friends&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
loginButton&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;registerCallback&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;callbackManager&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; callback&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here we create a connection between the button in &lt;em&gt;content_login.xml&lt;/em&gt; and the Facebook SDK libraries.&lt;/p&gt;
&lt;p&gt;There are some &lt;code class=&quot; language-undefined&quot;&gt;@Overrided&lt;/code&gt; methods that we need inside &lt;em&gt;LoginActivity.java&lt;/em&gt;. Add the lines below:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onResume&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onResume&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;//Facebook login&lt;/span&gt;
    Profile profile &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; Profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getCurrentProfile&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;nextActivity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;profile&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onPause&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onPause&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onStop&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onStop&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;//Facebook login&lt;/span&gt;
    accessTokenTracker&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;stopTracking&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    profileTracker&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;stopTracking&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onActivityResult&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;int&lt;/span&gt; requestCode&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;int&lt;/span&gt; responseCode&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Intent intent&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onActivityResult&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;requestCode&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; responseCode&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; intent&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;//Facebook login&lt;/span&gt;
    callbackManager&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onActivityResult&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;requestCode&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; responseCode&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; intent&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The last function in this class is &lt;code class=&quot; language-undefined&quot;&gt;nextActivity()&lt;/code&gt; which will switch activities and pass data to the next activity.&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;private&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;nextActivity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Profile profile&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;profile &lt;span class=&quot;token operator&quot;&gt;!=&lt;/span&gt; null&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        Intent main &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;LoginActivity&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; MainActivity&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        main&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getFirstName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        main&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;surname&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getLastName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        main&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;putExtra&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;imageUrl&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; profile&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getProfilePictureUri&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;200&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token function&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;main&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We need the first and last name of the profile and a 200 by 200 pixel profile picture. At this stage we only get its &lt;code class=&quot; language-undefined&quot;&gt;Uri&lt;/code&gt;. These three strings will be used as extras in our next activity.&lt;/p&gt;
&lt;h2 id=&quot;toc_7&quot;&gt;MainActivity Class&lt;/h2&gt;
&lt;p&gt;First we will create a logout button on the right hand side of the app’s toolbar.&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onCreateOptionsMenu&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Menu menu&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;// Inflate the menu; this adds items to the action bar if it is present.&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;getMenuInflater&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;inflate&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;R&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;menu&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;menu_login&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; menu&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;token annotation punctuation&quot;&gt;@Override&lt;/span&gt;
&lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onOptionsItemSelected&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;MenuItem item&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;// Handle action bar item clicks here. The action bar will&lt;/span&gt;
    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;// automatically handle clicks on the Home/Up button, so long&lt;/span&gt;
    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;// as you specify a parent activity in AndroidManifest.xml.&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;int&lt;/span&gt; id &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; item&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getItemId&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token comment&quot; spellcheck=&quot;true&quot;&gt;//noinspection SimplifiableIfStatement&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;id &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; R&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;action_settings&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token function&quot;&gt;logout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;onOptionsItemSelected&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;item&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We will create the &lt;code class=&quot; language-undefined&quot;&gt;logout()&lt;/code&gt; function later. Replace the contents of &lt;em&gt;menu_login.xml&lt;/em&gt; with the following:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;menu&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;android&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://schemas.android.com/apk/res/android&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;app&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://schemas.android.com/apk/res-auto&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;xmlns:&lt;/span&gt;tools&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://schemas.android.com/tools&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;   &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;tools:&lt;/span&gt;context&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;com.example.theodhor.facebookintegration.MainActivity&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    // Replace with your package name

    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;item&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@+id/action_settings&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;title&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@string/action_settings&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;orderInCategory&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;100&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
          &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;app:&lt;/span&gt;showAsAction&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;never&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;menu&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Change the current value of &lt;code class=&quot; language-undefined&quot;&gt;action_settings&lt;/code&gt; in &lt;em&gt;strings.xml&lt;/em&gt;:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;string&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;action_settings&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;LogOut&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;string&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code class=&quot; language-undefined&quot;&gt;nextActivity()&lt;/code&gt; function in the &lt;code class=&quot; language-undefined&quot;&gt;LoginActivity&lt;/code&gt; class passed some strings to our next activity. Now we use them by creating three other strings inside the &lt;code class=&quot; language-undefined&quot;&gt;onCreate()&lt;/code&gt; method of the &lt;code class=&quot; language-undefined&quot;&gt;MainActivity&lt;/code&gt; class and storing the passed data in them:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;Bundle inBundle &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;getIntent&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getExtras&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
String name &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; inBundle&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;name&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
String surname &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; inBundle&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;surname&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
String imageUrl &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; inBundle&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;get&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;imageUrl&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;toString&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To display this data we need to change the &lt;code class=&quot; language-undefined&quot;&gt;content_main.xml&lt;/code&gt; layout. The code below adds the elements we need to display the data. Add this code inside the &lt;code class=&quot; language-undefined&quot;&gt;RelativeLayout&lt;/code&gt; tags:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;LinearLayout&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;match_parent&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;match_parent&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;orientation&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;vertical&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;TextView&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;text&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;Hello:&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;wrap_content&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;wrap_content&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_marginTop&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;10dp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;textSize&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;20dp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_gravity&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;center_horizontal&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;TextView&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;wrap_content&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;wrap_content&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@+id/nameAndSurname&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;textSize&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;22dp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;text&lt;/span&gt;&lt;span class=&quot;token style-attr language-css&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;Style&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&quot;&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;bold&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_marginTop&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;10dp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_gravity&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;center_horizontal&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;ImageView&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;200dp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;200dp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;@+id/profileImage&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_marginTop&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;10dp&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
        &lt;span class=&quot;token attr-name&quot;&gt;&lt;span class=&quot;token namespace&quot;&gt;android:&lt;/span&gt;layout_gravity&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;center_horizontal&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;LinearLayout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To display the profile name add the code below to the &lt;code class=&quot; language-undefined&quot;&gt;onCreate()&lt;/code&gt; method of the &lt;code class=&quot; language-undefined&quot;&gt;MainActivity&lt;/code&gt; class:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;TextView nameView &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;TextView&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;R&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;nameAndSurname&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
nameView&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setText&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; name &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&quot; &quot;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; surname&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next we want to display the profile picture. From the last activity we have the picture Uri as a string. We can use this Uri to download the picture as a Bitmap file.&lt;/p&gt;
&lt;p&gt;Create a new class, and add the code below:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;DownloadImage&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;AsyncTask&lt;/span&gt;&lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt;String&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Void&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; Bitmap&lt;span class=&quot;token operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    ImageView bmImage&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;DownloadImage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;ImageView bmImage&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;bmImage &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; bmImage&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; Bitmap &lt;span class=&quot;token function&quot;&gt;doInBackground&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;String&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt; urls&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        String urldisplay &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; urls&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        Bitmap mIcon11 &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; null&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;try&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            InputStream in &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;java&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;net&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;URL&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;urldisplay&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;openStream&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            mIcon11 &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; BitmapFactory&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;decodeStream&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;in&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;catch&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token class-name&quot;&gt;Exception&lt;/span&gt; e&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            Log&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;Error&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; e&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getMessage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
            e&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;printStackTrace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;return&lt;/span&gt; mIcon11&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;

    &lt;span class=&quot;token keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;onPostExecute&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;Bitmap result&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        bmImage&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;setImageBitmap&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;result&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To display the profile picture in our app, add the line below inside the &lt;code class=&quot; language-undefined&quot;&gt;onCreate()&lt;/code&gt; method of the &lt;em&gt;MainActivity&lt;/em&gt; class, after the last line added.&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;DownloadImage&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;ImageView&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;findViewById&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;R&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;profileImage&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;imageUrl&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It uses the &lt;em&gt;imageUrl&lt;/em&gt; string, downloads the image and displays it inside the &lt;code class=&quot; language-undefined&quot;&gt;content_main.xml&lt;/code&gt; layout.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/11/1447950978Screenshot_2015-11-07-23-18-06.png&quot; alt=&quot;Profile information&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now that displaying data is complete, we will add a share dialog to the floating action button so the app can post to Facebook.&lt;/p&gt;
&lt;p&gt;Open &lt;em&gt;activity_main.xml&lt;/em&gt; and change:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;android:src=&quot;@android:drawable/ic_dialog_email&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;android:src=&quot;@android:drawable/ic_menu_edit&quot;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Change the button color by editing the color values in &lt;em&gt;colors.xml&lt;/em&gt;. I used this color:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-markup&quot;&gt;&lt;code class=&quot; language-markup&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;color&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;colorAccent&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;#5694f7&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next to make the button do something.&lt;/p&gt;
&lt;p&gt;Declare a &lt;code class=&quot; language-undefined&quot;&gt;private ShareDialog&lt;/code&gt; variable in the &lt;code class=&quot; language-undefined&quot;&gt;MainActivity&lt;/code&gt; class:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;private&lt;/span&gt; ShareDialog shareDialog&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Inside the &lt;code class=&quot; language-undefined&quot;&gt;onCreate()&lt;/code&gt; method create this dialog:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;shareDialog &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;ShareDialog&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We want to show this dialog when we click the floating button. Replace the &lt;code class=&quot; language-undefined&quot;&gt;Snackbar code&lt;/code&gt;  in the &lt;code class=&quot; language-undefined&quot;&gt;OnClick&lt;/code&gt; method with the code below:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;ShareLinkContent content &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;ShareLinkContent&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;Builder&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;build&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
shareDialog&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;content&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Our app can now post to Facebook, but we are not finished yet, the Logout function is missing.&lt;/p&gt;
&lt;p&gt;First the app needs to understand if it is logged in. Initialize the Facebook SDK as we did in &lt;code class=&quot; language-undefined&quot;&gt;LoginActivity&lt;/code&gt; by adding this line of code inside the &lt;code class=&quot; language-undefined&quot;&gt;onCreate()&lt;/code&gt; method:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;FacebookSdk&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;sdkInitialize&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getApplicationContext&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add the &lt;code class=&quot; language-undefined&quot;&gt;logout()&lt;/code&gt; function:&lt;/p&gt;
&lt;pre class=&quot;line-numbers language-java&quot;&gt;&lt;code class=&quot; language-java&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;logout&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    LoginManager&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getInstance&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;logOut&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    Intent login &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;token class-name&quot;&gt;Intent&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;MainActivity&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; LoginActivity&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;startActivity&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;login&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;finish&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src=&quot;https://dab1nmslvvntp.cloudfront.net/wp-content/uploads/2015/11/1447951025Screenshot_2015-11-07-23-18-15.png&quot; alt=&quot;Share to Facebook&quot;&gt;&lt;/p&gt;
&lt;p&gt;Now you can run your app and post to Facebook! Please let me know in the comments below if you have any problems or questions.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/1075691328887271681/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/06/facebook-sdk-integration-on-android.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/1075691328887271681'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/1075691328887271681'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/06/facebook-sdk-integration-on-android.html' title='FACEBOOK SDK INTEGRATION ON ANDROID'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-668588390161861730</id><published>2016-05-05T07:39:00.000-07:00</published><updated>2016-05-05T07:39:52.772-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="INSTALACION"/><category scheme="http://www.blogger.com/atom/ns#" term="INSTALL"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="OSTICKET"/><category scheme="http://www.blogger.com/atom/ns#" term="REMEDY"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVER"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVIDOR"/><category scheme="http://www.blogger.com/atom/ns#" term="SOPORTE"/><category scheme="http://www.blogger.com/atom/ns#" term="UBUNTU"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>INSTALACION DE OSTICKET EN UBUNTU 14</title><content type='html'>

&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/qSD6V1L8rBo&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/668588390161861730/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/05/instalacion-de-osticket-en-ubuntu-14.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/668588390161861730'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/668588390161861730'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/05/instalacion-de-osticket-en-ubuntu-14.html' title='INSTALACION DE OSTICKET EN UBUNTU 14'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/qSD6V1L8rBo/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-8795116133346084652</id><published>2016-02-01T06:41:00.000-08:00</published><updated>2016-02-01T12:42:15.491-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="TENDENCIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="WEB"/><title type='text'>HTML 5 FAST REVIEW</title><content type='html'>&lt;b&gt;HTML5 Novedades: &lt;/b&gt;

&lt;/br&gt;&lt;/br&gt;

&lt;pre class=&quot;brush:html;&quot;&gt;
Doctype: &lt;!--&lt;!DOCTYPE html&gt;--&gt;

&lt;/br&gt;&lt;/br&gt;
metaset: &lt;meta charset=&quot;UTF-8&quot;&gt;

&lt;/br&gt;&lt;/br&gt;
Nueva semántica: &lt;header&gt;&lt;/header&gt;, &lt;footer&gt;&lt;/footer&gt;, &lt;article&gt;&lt;/article&gt;, &lt;section&gt;&lt;/section&gt;

&lt;/br&gt;&lt;/br&gt;
Nuevo gráfico: &lt;svg&gt;&lt;/svg&gt;, &lt;canvas&gt;&lt;/canvas&gt;

&lt;/br&gt;&lt;/br&gt;
Nueva multimedia: &lt;audio&gt;&lt;/audio&gt;, &lt;video&gt;&lt;/video&gt;

&lt;/br&gt;&lt;/br&gt;
Nuevas API de programación HTML5: 

&lt;/br&gt;&lt;/br&gt;HTML Geolocation, HTML Drag and Drop, HTML Local Storage, HTML Application Cache, HTML Web Workers, HTML SSE.

&lt;/pre&gt;
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;Elementos removidos en HTML5.&lt;/b&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgseKts620G_7crrnpGXr-LzKLfdIxpqBa1jw5s8uBDpKu_sY-l_DUaeRDFg1lPjwMpQqSD7cWCiJA4OIoDVxPdhDEzsDjzo5TDg-y1RnFGVp3Z35oqLSieH-4qPXjzNZg356UkpeU4Bc8/s1600/html5A.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgseKts620G_7crrnpGXr-LzKLfdIxpqBa1jw5s8uBDpKu_sY-l_DUaeRDFg1lPjwMpQqSD7cWCiJA4OIoDVxPdhDEzsDjzo5TDg-y1RnFGVp3Z35oqLSieH-4qPXjzNZg356UkpeU4Bc8/s400/html5A.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/8795116133346084652/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/02/html5-novedades-doctype-metaset-nueva.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/8795116133346084652'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/8795116133346084652'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/02/html5-novedades-doctype-metaset-nueva.html' title='HTML 5 FAST REVIEW'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgseKts620G_7crrnpGXr-LzKLfdIxpqBa1jw5s8uBDpKu_sY-l_DUaeRDFg1lPjwMpQqSD7cWCiJA4OIoDVxPdhDEzsDjzo5TDg-y1RnFGVp3Z35oqLSieH-4qPXjzNZg356UkpeU4Bc8/s72-c/html5A.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-3229817334044356448</id><published>2016-01-25T07:43:00.000-08:00</published><updated>2016-01-25T07:43:58.682-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="BASE DE DATOS"/><category scheme="http://www.blogger.com/atom/ns#" term="BOOT"/><category scheme="http://www.blogger.com/atom/ns#" term="DAEMON"/><category scheme="http://www.blogger.com/atom/ns#" term="DATABASE"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGO"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGOD"/><category scheme="http://www.blogger.com/atom/ns#" term="SCRIPT"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVER"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVIDOR"/><category scheme="http://www.blogger.com/atom/ns#" term="SHELL"/><category scheme="http://www.blogger.com/atom/ns#" term="STARTUP"/><category scheme="http://www.blogger.com/atom/ns#" term="TEST"/><category scheme="http://www.blogger.com/atom/ns#" term="UBUNTU"/><title type='text'>DAEMON SHELL V SCRIPT (TRADICIONAL) PARA INICIAR SERVICIOS JUNTO AL SERVIDOR UBUNTU, EJEMPLO MONGO</title><content type='html'>&lt;/br&gt;
&lt;b&gt;PRE REQUISITOS: &lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

- Pre instalación de mongo database en su versión 10gen... Si no has hecho la instalación puedes seguir esta guía: Instalar MongoDB 3.X en Ubuntu
- (Opcional) Desde windows, pre instalar el programa Vim para evitar conflictos de espacios, derivando en archivos corruptos al traspasar a Linux las ediciones. Una vez en el VIM, si copias y pegas segmentos o preferiblemente siempre antes de guardar ejecuta lo siguiente: 
:set fileformat=unix 

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;1) VERIFICACIÓN DE PERMISOS &lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

Lo primero que debemos hacer es verificar los permisos de las carpetas /var/lib/mongodb y /data/db , de las cuales usaremos /data/db en nuestro archivos de configuración que veremos a continuación; por lo tanto, debemos asegurarnos que ambas carpetas tengan el usuario requerido por mongo. En las instalaciones default por lo general se requiere que estas carpetas tengan los usuarios &quot;mongodb&quot; y &quot;root&quot; con acceso a todas las subcarpetas y archivos.

&lt;/br&gt;&lt;/br&gt;
Para equiparar permisos se puede utilizar el siguiente script: 
sudo chown -R /data/db 

&lt;/br&gt;&lt;/br&gt;

No está demás indicar un comando para buscar nombres de archivos en todo el sistema antes de continuar: 
$ find / -mount -name &#39;*&#39; 

&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;2) ARCHIVO MONGOD.CONF EN LA CARPETA /etc &lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

Este archivo posiblemente se haya creado con la instalación de mongo, de igual manera dejaré un ejemplo que está funcionando:

&lt;/br&gt;
&lt;pre class=&quot;brush:bash;&quot;&gt;
# mongod.conf
 
# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/
 
# Where and how to store data.
storage:
  dbPath: /data/db
  journal: 
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:
 
# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log
 
# network interfaces
net:
  port: 27017
  bindIp: 0.0.0.0
 
#operationProfiling:
 
#replication:
 
#sharding:
 
## Enterprise-Only Options:
 
#auditLog:
 
#snmp:

&lt;/pre&gt;
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;3) ARCHIVO MONGODB EN LA CARPETA /etc/init.d - Este archivo es el script daemon que invocará el servicio llamando a su vez al otro archivo .conf de la carpeta etc... &lt;/b&gt;

- Un ejemplo de script daemon mongo funcionando: 

&lt;pre class=&quot;brush:bash;&quot;&gt;
# !/bin/sh
### BEGIN INIT INFO
# Provides:          mongodbstartup
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start mongo database instance at boot time
# Description:       Enable service provided by mongo.
### END INIT INFO

# mongodb     Startup script for the mongodb server
#
# chkconfig: - 64 36
# description: MongoDB Database Server
#
# processname: mongodb
#
#set -e
#set -u
# Source function library
#. /etc/rc.d/init.d/functions

. /lib/lsb/init-functions

#if [ -f /etc/sysconfig/mongodb ]; then
#        . /etc/sysconfig/mongodb
#fi
prog=&quot;mongod&quot;
mongod=&quot;/usr/bin/mongod&quot;
mongodb_user=&quot;luiseliberal&quot;
RETVAL=0

start() {
        echo -n $&quot;Starting $prog: &quot;
        #daemon $mongod &quot;--fork --logpath /var/log/mongodb/mongod.log --logappend 2&gt;&amp;1 &gt;&gt; /var/log/mongodb/mongod.log&quot;
        daemon --user=$mongodb_user $mongod &quot;--config /etc/init/mongod.conf&quot;
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] &amp;&amp; touch /var/lock/subsys/$prog
        return $RETVAL
}

stop() {
        echo -n $&quot;Stopping $prog: &quot;
        killproc $prog
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] &amp;&amp; rm -f /var/lock/subsys/$prog
        return $RETVAL
}
reload() {
        echo -n $&quot;Reloading $prog: &quot;
        killproc $prog -HUP
        RETVAL=$?
        echo
        return $RETVAL
}

case &quot;$1&quot; in
        start)
                start
                ;;
        stop)
                stop
                ;;
        restart)
                stop
                start
                ;;
        condrestart)
                if [ -f /var/lock/subsys/$prog ]; then
                        stop
                        start
                fi
                ;;
        reload)
                reload
                ;;
        status)
                status $mongod
                RETVAL=$?
                ;;
        *)
                echo $&quot;Usage: $0 {start|stop|restart|condrestart|reload|status}&quot;
if [ -f /var/lib/mongodb/mongod.lock ] ; then
        rm /var/lib/mongodb/mongod.lock
fi

if [ -f /data/db/mongod.lock ] ; then
        rm /data/db/mongod.lock
fi

        mongod --repair
     mongod --auth
                RETVAL=1
esac

exit $RETVAL
&lt;/pre&gt;
&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;4) Inclusión del script daemon en las llaves del sistema ubuntu &lt;/b&gt;&lt;/br&gt;&lt;/br&gt; 

Para añadir el script: &lt;/br&gt;

&lt;pre class=&quot;brush:bash;&quot;&gt;
root@skx:~# update-rc.d &lt;NOMBRE SCRIPT&gt; defaults
 Adding system startup for /etc/init.d/blah ...
   /etc/rc0.d/K20blah -&gt; ../init.d/blah
   /etc/rc1.d/K20blah -&gt; ../init.d/blah
   /etc/rc6.d/K20blah -&gt; ../init.d/blah
   /etc/rc2.d/S20blah -&gt; ../init.d/blah
   /etc/rc3.d/S20blah -&gt; ../init.d/blah
   /etc/rc4.d/S20blah -&gt; ../init.d/blah
   /etc/rc5.d/S20blah -&gt; ../init.d/blah
&lt;/pre&gt;

&lt;/br&gt;&lt;/br&gt;
Para remover el script: &lt;/br&gt;

&lt;pre class=&quot;brush:bash;&quot;&gt;
root@skx:/etc/rc2.d# update-rc.d -f &lt;NOMBRE SCRIPT&gt; remove
update-rc.d: /etc/init.d/blah exists during rc.d purge (continuing)
 Removing any system startup links for /etc/init.d/blah ...
   /etc/rc0.d/K20blah
   /etc/rc1.d/K20blah
   /etc/rc2.d/S20blah
   /etc/rc3.d/S20blah
   /etc/rc4.d/S20blah
   /etc/rc5.d/S20blah
   /etc/rc6.d/K20blah
&lt;/pre&gt;
&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;5) EJECUCIÓN Y TEST &lt;/b&gt;

- Algo muy importante es el probar estos archivos y para ello puedes ejecutar desde la consola, ubicándote en la carpeta contenedora el siguiente comando: 

&lt;/br&gt;&lt;/br&gt;
Para iniciarlo: ./mongodb &lt;/br&gt;
Para iniciarlo y verificar la ejecución: ./mongodb &gt; mongodbtest (mongodbtest es un archivo creado en la misma carpeta)

&lt;/br&gt;&lt;/br&gt;

- El log para visualizar los errores y avances en la concreción del script estaría ubicado en la siguiente ruta de sistema: 
/var/log/boot.log y pasando este nivel el próximo log sería el que se tiene parametrizado en los scripts; en mi caso esta en la ruta: var/log/mongodb/mongodb.log 

&lt;/br&gt;&lt;/br&gt;
Es importante también no confundir Upstart (etc/init) con los tradicionales scripts Daemon (etc/init.d), partiendo de que son configuraciones distintas y se ubican en repositorios distintos.

&lt;/br&gt;&lt;/br&gt;
SHARD MONGO SERVERS (AVANZADO)
&lt;a href=&quot;
http://www.joslynesser.com/blog/archives/2010/09/28/mongodb-sharding-guide-server-setup-on-ubuntu-ec2/ &quot;&gt;
http://www.joslynesser.com/blog/archives/2010/09/28/mongodb-sharding-guide-server-setup-on-ubuntu-ec2/ &lt;/a&gt;&lt;/br&gt;&lt;/br&gt;
</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/3229817334044356448/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/daemon-shell-v-script-tradicional-para.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/3229817334044356448'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/3229817334044356448'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/daemon-shell-v-script-tradicional-para.html' title='DAEMON SHELL V SCRIPT (TRADICIONAL) PARA INICIAR SERVICIOS JUNTO AL SERVIDOR UBUNTU, EJEMPLO MONGO'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-7670965712146991018</id><published>2016-01-25T05:42:00.000-08:00</published><updated>2016-01-25T08:12:43.967-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="AUTOMATIZACION"/><category scheme="http://www.blogger.com/atom/ns#" term="AUTOMATIZATION"/><category scheme="http://www.blogger.com/atom/ns#" term="BASE DE DATOS"/><category scheme="http://www.blogger.com/atom/ns#" term="BOOT"/><category scheme="http://www.blogger.com/atom/ns#" term="DATABASE"/><category scheme="http://www.blogger.com/atom/ns#" term="INICIAR"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGO"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGOD"/><category scheme="http://www.blogger.com/atom/ns#" term="SCRIPT"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVER"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVIDOR"/><category scheme="http://www.blogger.com/atom/ns#" term="STARTUP"/><category scheme="http://www.blogger.com/atom/ns#" term="TEST"/><category scheme="http://www.blogger.com/atom/ns#" term="UBUNTU"/><category scheme="http://www.blogger.com/atom/ns#" term="UPSTART"/><title type='text'>UPSTART SCRIPT Y PASOS PARA INICIAR MONGO COMO SERVICIO JUNTO AL SERVIDOR UBUNTU.</title><content type='html'>&lt;/br&gt;

&lt;b&gt;PRE REQUISITOS: &lt;/b&gt;&lt;/br&gt;&lt;/br&gt;
- Pre instalación de mongo database en su versión 10gen... Si no has hecho la instalación puedes seguir esta guía: &lt;a href=&quot;https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/&quot;&gt;Instalar MongoDB 3.X en Ubuntu&lt;/a&gt;&lt;/br&gt;
- (Opcional) Desde windows, pre instalar el programa Vim para evitar conflictos de espacios, derivando en archivos corruptos al traspasar a Linux las ediciones. Una vez en el VIM, si copias y pegas segmentos o preferiblemente siempre antes de guardar ejecuta lo siguiente: &lt;/br&gt;
&lt;i&gt;:set fileformat=unix &lt;/i&gt;

&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;1) VERIFICACIÓN DE PERMISOS&lt;/b&gt;
&lt;/br&gt;&lt;/br&gt;
Lo primero que debemos hacer es verificar los permisos de las carpetas /var/lib/mongodb y /data/db , de las cuales usaremos /data/db en nuestro archivos de configuración que veremos a continuación; por lo tanto, debemos asegurarnos que ambas carpetas tengan el usuario requerido por mongo. En las instalaciones default por lo general se requiere que estas carpetas tengan los usuarios &quot;mongodb&quot; y &quot;root&quot; con acceso a todas las subcarpetas y archivos.&lt;/br&gt;&lt;/br&gt;

Para equiparar permisos se puede utilizar el siguiente script: &lt;/br&gt;
sudo chown -R &lt;USERNAME&gt; /data/db

&lt;/br&gt;&lt;/br&gt;
No está demás indicar un comando para buscar nombres de archivos en todo el sistema antes de continuar: &lt;/br&gt;
$ find / -mount -name &#39;&lt;NOMBRE&gt;*&#39;
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;2) ARCHIVO MONGOD.CONF EN LA CARPETA /etc &lt;/b&gt;
&lt;/br&gt;&lt;/br&gt;
Este archivo posiblemente se haya creado con la instalación de mongo, de igual manera dejaré un ejemplo que está funcionando: 

&lt;pre class=&quot;brush:bash;&quot;&gt;
# mongod.conf

# for documentation of all options, see:
#   http://docs.mongodb.org/manual/reference/configuration-options/

# Where and how to store data.
storage:
  dbPath: /data/db
  journal: 
    enabled: true
#  engine:
#  mmapv1:
#  wiredTiger:

# where to write logging data.
systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb/mongod.log

# network interfaces
net:
  port: 27017
  bindIp: 0.0.0.0

#operationProfiling:

#replication:

#sharding:

## Enterprise-Only Options:

#auditLog:

#snmp:

&lt;/pre&gt;

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;3) ARCHIVO MONGODB.CONF EN LA CARPETA /etc/init &lt;/b&gt;

- Este archivo es el script upstart que invocará el servicio llamando a su vez al otro archivo .conf de la carpeta etc... Se basa en YAML por lo cual hay que tener cuidado con la posición de los comandos, en particular separar el &quot;valor&quot; de la declaración por un espacio en blanco.&lt;/br&gt;&lt;/br&gt;

- Un ejemplo de script upstart mongo funcionando: &lt;/br&gt;&lt;/br&gt;
&lt;pre class=&quot;brush:bash;&quot;&gt;

# Ubuntu upstart file at /etc/init/mongodb.conf

pre-start script
    mkdir -p /var/lib/mongodb/
    mkdir -p /var/log/mongodb/
end script

start on runlevel [2345]
stop on runlevel [06]

script
  ENABLE_MONGODB=&quot;yes&quot;
  if [ -f /etc/default/mongodb ]; then . /etc/default/mongodb; fi
  if [ &quot;x$ENABLE_MONGODB&quot; = &quot;xyes&quot; ]; then
        if [ -f /var/lib/mongodb/mongod.lock ]; then
                rm /var/lib/mongodb/mongod.lock
                #sudo -u mongodb /usr/bin/mongod --config /etc/mongod.conf --repair
        fi

        if [ -f /data/db/mongod.lock ]; then
                rm /data/db/mongod.lock
        fi

        exec start-stop-daemon --start --quiet --chuid mongodb --exec  /usr/bin/mongod -- --config /etc/mongod.conf
  fi
end script

&lt;/pre&gt;&lt;/br&gt;&lt;/br&gt;

4) &lt;b&gt;EJECUCIÓN Y TEST &lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

- Algo muy importante es el probar estos archivos y para ello puedes ejecutar desde la consola, ubicándote en la carpeta contenedora el siguiente comando: &lt;/br&gt;&lt;/br&gt;
Para iniciarlo: sudo service mongodb start &lt;/br&gt;
Para ver el estatus: sudo service mongodb status &lt;/br&gt;
Para detenerlo: sudo service mongodb stop &lt;/br&gt;&lt;/br&gt;

- El log para visualizar los errores y avances en la concreción del script estaría ubicado en la siguiente ruta de sistema: &lt;/br&gt;
/var/log/upstart/mongodb.log y pasando este nivel el próximo log sería el que se tiene parametrizado en los scripts; en mi caso esta en la ruta: var/log/mongodb/mongodb.log

&lt;/br&gt;&lt;/br&gt;

Es importante también no confundir Upstart (etc/init) con los tradicionales scripts Daemon (etc/init.d), partiendo de que son configuraciones distintas y se ubican en repositorios distintos. Para profundizar &lt;a href=&quot;http://www.pathbreak.com/blog/ubuntu-startup-init-scripts-runlevels-upstart-jobs-explained&quot;&gt;UBUNTU STARTUP INIT SCRIPTS METHODS&lt;/a&gt;&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;SHARD MONGO SERVERS (AVANZADO)&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

&lt;a href=&quot;http://www.joslynesser.com/blog/archives/2010/09/28/mongodb-sharding-guide-server-setup-on-ubuntu-ec2/&quot;&gt;http://www.joslynesser.com/blog/archives/2010/09/28/mongodb-sharding-guide-server-setup-on-ubuntu-ec2/&lt;/a&gt;

&lt;/br&gt;&lt;/br&gt; </content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/7670965712146991018/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/upstart-script-y-pasos-para-iniciar.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/7670965712146991018'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/7670965712146991018'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/upstart-script-y-pasos-para-iniciar.html' title='UPSTART SCRIPT Y PASOS PARA INICIAR MONGO COMO SERVICIO JUNTO AL SERVIDOR UBUNTU.'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-2929354122772598661</id><published>2016-01-21T07:43:00.000-08:00</published><updated>2016-01-21T07:43:30.939-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="BACKUP"/><category scheme="http://www.blogger.com/atom/ns#" term="BASE DE DATOS"/><category scheme="http://www.blogger.com/atom/ns#" term="DATABASE"/><category scheme="http://www.blogger.com/atom/ns#" term="DATOS"/><category scheme="http://www.blogger.com/atom/ns#" term="EXPORT"/><category scheme="http://www.blogger.com/atom/ns#" term="EXPORTAR"/><category scheme="http://www.blogger.com/atom/ns#" term="LINUX"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGO"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>EXPORTAR - BACKUP DATOS DESDE MONGO (UNIX)</title><content type='html'>Ejecutar los comandos siguientes en la consola: &lt;/br&gt;&lt;/br&gt;

mongoexport --db sec_medicinales_ppal --collection hierbas --out sec_bk.json

&lt;/br&gt;&lt;/br&gt;
Donde sec_medicinales_ppal es el nombre de la base de datos, hierbas la colección(lo que se entiende en bases de dato relaciones como tablas) y sec_bk.json el archivo donde se escribirán los datos.
&lt;/br&gt;&lt;/br&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/2929354122772598661/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/exportar-backup-datos-desde-mongo-unix.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/2929354122772598661'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/2929354122772598661'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/exportar-backup-datos-desde-mongo-unix.html' title='EXPORTAR - BACKUP DATOS DESDE MONGO (UNIX)'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-5670472023288774904</id><published>2016-01-21T05:33:00.000-08:00</published><updated>2016-01-21T05:33:20.315-08:00</updated><title type='text'>REFERENCIA RÁPIDA DEL USO DEL EDITOR DE TEXTO VI LINUX UNIX </title><content type='html'>&lt;a href=&quot;http://www.linuxtotal.com.mx/?cont=info_admon_010&quot;&gt;-------&gt; REFERENCIA DE COMANDOS &lt;----------&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/5670472023288774904/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/referencia-rapida-del-uso-del-editor-de.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/5670472023288774904'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/5670472023288774904'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/referencia-rapida-del-uso-del-editor-de.html' title='REFERENCIA RÁPIDA DEL USO DEL EDITOR DE TEXTO VI LINUX UNIX '/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-5304379177494033032</id><published>2016-01-20T06:31:00.000-08:00</published><updated>2016-01-20T06:31:12.960-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="COMANDOS"/><category scheme="http://www.blogger.com/atom/ns#" term="CONSULTAS"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGO"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="QUERIES"/><category scheme="http://www.blogger.com/atom/ns#" term="RUTINAS"/><title type='text'>CONSULTAS (QUERIES) MONGODB - RUTINARIAS</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcA4VKJh7y0IWvESklkspR1MWnQzAOtoFas3N-lRiEFwnwUwdj3_vXV1pIUKAc8SH1vg_SV6MTzryY4AMDligS1PwSKLdRM7Uc1q0KtxX1MPCIyDjWYvALJnRQiClAoOL5Xf4YogG9T2Y/s1600/mongoDB_LOGO.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcA4VKJh7y0IWvESklkspR1MWnQzAOtoFas3N-lRiEFwnwUwdj3_vXV1pIUKAc8SH1vg_SV6MTzryY4AMDligS1PwSKLdRM7Uc1q0KtxX1MPCIyDjWYvALJnRQiClAoOL5Xf4YogG9T2Y/s1600/mongoDB_LOGO.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/br&gt;

&lt;b&gt;START MONGOD SERVER&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

mongod &lt;/br&gt;
mongod --port &lt;PORT&gt; &lt;/br&gt;&lt;/br&gt;

Si hay problemas al iniciar mongo, se debe verificar no exista un archivo .lock en las carpetas de mongo, de existir lo eliminamos.

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;STOP MONGOD SERVER&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

use admin
db.shutdownServer()

&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;&lt;i&gt;INSTANCIA ESPECIFICA&lt;/b&gt;&lt;/i&gt;&lt;/br&gt;&lt;/br&gt;

kill &lt;mongod process ID&gt;

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;LISTAR BASES DE DATOS&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

show dbs

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;USAR BASE DE DATOS&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

use &lt;NOMBRE_BD&gt;

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;MOSTRAR TABLAS EXISTENTES EN LA BASE DE DATOS&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

show collections &lt;/br&gt;
db.getCollectionNames() &lt;/br&gt;&lt;/br&gt;


&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;INSERT DATOS EN TABLA&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

db.herb.insert({name:&quot;Anis&quot;, descripcion:&quot;Planta de buen aroma&quot;})

&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;


&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;


&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;


&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;


&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;


&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;


&lt;b&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/5304379177494033032/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/consultas-queries-mongodb-rutinarias.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/5304379177494033032'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/5304379177494033032'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/consultas-queries-mongodb-rutinarias.html' title='CONSULTAS (QUERIES) MONGODB - RUTINARIAS'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcA4VKJh7y0IWvESklkspR1MWnQzAOtoFas3N-lRiEFwnwUwdj3_vXV1pIUKAc8SH1vg_SV6MTzryY4AMDligS1PwSKLdRM7Uc1q0KtxX1MPCIyDjWYvALJnRQiClAoOL5Xf4YogG9T2Y/s72-c/mongoDB_LOGO.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-351877111750000077</id><published>2016-01-07T07:03:00.000-08:00</published><updated>2016-01-07T07:03:03.157-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="AUTOMATIZACION"/><category scheme="http://www.blogger.com/atom/ns#" term="CONTRASEÑA"/><category scheme="http://www.blogger.com/atom/ns#" term="DESARROLLO"/><category scheme="http://www.blogger.com/atom/ns#" term="DOMAIN"/><category scheme="http://www.blogger.com/atom/ns#" term="DOMINIO"/><category scheme="http://www.blogger.com/atom/ns#" term="INTEGRATED SERVER"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="JDEVELOPER"/><category scheme="http://www.blogger.com/atom/ns#" term="PASSWORD"/><category scheme="http://www.blogger.com/atom/ns#" term="RECOVER"/><category scheme="http://www.blogger.com/atom/ns#" term="RECUPERAR"/><category scheme="http://www.blogger.com/atom/ns#" term="WEB"/><title type='text'>RECUPERACIÓN DEL INTEGRATED WEBLOGIC SERVER EN JDVELOPER 11</title><content type='html'>&lt;b&gt;JDeveloper 11gR2 - Integrado Weblogic servidor Password Reset&lt;/b&gt;


Hola a todos. Después de meses de trabajo con ADF Essentials, que necesitaba para iniciar sesión en la aplicación de la consola del servidor integrado Weblogic que viene con JDeveloper 11.1.2.3 (Weblogic servidor 10.3.5) y luego me di cuenta que se me ha olvidado la contraseña del usuario weblogic ... Así que me puse a buscar y encontré dos soluciones:
&lt;/BR&gt;&lt;/BR&gt;
Solución 1: Elimine la carpeta de dominio predeterminado creado por el servidor Weblogic Integrado.
&lt;/BR&gt;
Solución 2: Generar una nueva contraseña para el usuario weblogic.
&lt;/BR&gt;&lt;/BR&gt;
&lt;b&gt;¿Cuál es la diferencia entre una solución de 1 y 2?&lt;/b&gt;
&lt;/BR&gt;&lt;/BR&gt;
En la solución 1, perderá cualquier configuración que usted ha hecho a su servidor weblogic integrado, esto incluye: fuentes de datos, configuración de seguridad, etc.
&lt;/BR&gt;&lt;/BR&gt;
En solución 2, perderá sólo configuraciones de seguridad que ha realizado. Por ejemplo, si ha creado más usuarios o grupos, o configurar el acceso a un servicio LDAP externo, pero se mantendrá todo lo demás. Tengo que decir que esta solución es más difícil que la solución 1.
&lt;/BR&gt;&lt;/BR&gt;
Si usted no ha hecho ninguna configuración en el servidor Weblogic integrado, te sugiero que vayas con una solución de 1.

Antes de continuar con las soluciones, primero tenemos que encontrar el directorio de sistema de IDE. Con el fin de hacer eso, JDeveloper abierta, vaya al menú Ayuda y seleccione la opción Acerca de. Una ventana emergente aparece, seleccione la ficha Propiedades y desplácese hacia abajo hasta que encuentre alguna de estas: ide.pref.dir o ide.system.dir o ide.user.dir

&lt;/BR&gt;&lt;/BR&gt;
En un entorno Linux, puede encontrar algo como esto:

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaSDJxZprFDU0JX8AzZaA7Gp6BlXOfxNitF_GDg7RRx0x15h-ldh2AHLL7SJDohgerDlR9Aqda-XqvqmLM1th4kDai0-DeUNAkd9zztLDPe0e38scmL1GmK6Tvoxn8zRhOwMAaHaOtvqQ/s1600/JDev_Wls_pwd_reset_dir.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaSDJxZprFDU0JX8AzZaA7Gp6BlXOfxNitF_GDg7RRx0x15h-ldh2AHLL7SJDohgerDlR9Aqda-XqvqmLM1th4kDai0-DeUNAkd9zztLDPe0e38scmL1GmK6Tvoxn8zRhOwMAaHaOtvqQ/s1600/JDev_Wls_pwd_reset_dir.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/BR&gt;&lt;/BR&gt;
En un entorno de ventanas, puede encontrar algo como esto:

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgywqs_Ctk2dJa053jdic8NNwDIv_NhqNTYEWa8kO8wh8BLNJ2-9Cl2sKZ1B83DsrbSsaLDUZ9vYQZu6u0qm_vF5uVe8eru3Y-7rxN4DVGEjgHNvFgH2Ri5T-knuYyLWOc9zIFFOMbw-eg/s400/JDev_Wls_pwd_reset_dir_win.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgywqs_Ctk2dJa053jdic8NNwDIv_NhqNTYEWa8kO8wh8BLNJ2-9Cl2sKZ1B83DsrbSsaLDUZ9vYQZu6u0qm_vF5uVe8eru3Y-7rxN4DVGEjgHNvFgH2Ri5T-knuYyLWOc9zIFFOMbw-eg/s1600/JDev_Wls_pwd_reset_dir_win.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/BR&gt;&lt;/BR&gt;
En realidad, el directorio que estamos buscando es la ide.system.dir por lo que permite anótelo para que podamos utilizarlo más tarde:

&lt;/BR&gt;&lt;/BR&gt;
Linux (mi caso, la suya puede ser diferente)&lt;/BR&gt;
SYS_DIR = / home / aalopez / .jdeveloper / system.11.1.2.3.39.62.76.1
&lt;/BR&gt;&lt;/BR&gt;
De Windows (mi caso, la suya puede ser diferente)&lt;/BR&gt;
SYS_DIR = C: \ Users \ CVDESA \ AppData \ Roaming \ JDeveloper \ system11.1.2.3.39.62.76.1

&lt;/BR&gt;&lt;/BR&gt;
Hacer servidor Weblogic seguro se apaga antes de continuar.


&lt;/BR&gt;&lt;/BR&gt;
Solución 1: Extracción de la carpeta DefaultDomain.&lt;/BR&gt;
La primera y más fácil solución es quitar la carpeta siguiente (DefaultDomain):&lt;/BR&gt;
SYS_DIR / DefaultDomain

&lt;/BR&gt;&lt;/BR&gt;
La carpeta obtendrá re-creado para usted la próxima vez que inicie el servidor Weblogic. El problema es que usted perderá cualquier configuración que pueda haber hecho que incluye: usuarios, contraseñas, fuentes de datos, etc. Todo eso.
Una vez que se quita la carpeta, JDeveloper abierta ir al menú Ejecutar, y seleccione la opción Start Server Instancia (IntegratedWeblogicServer). Una ventana emergente aparece pidiéndole que establezca las credenciales de usuario weblogic. ¡Eso es!

&lt;/BR&gt;&lt;/BR&gt;
Solución 2: Cambiar la contraseña de usuario weblogic
Por favor, siga los pasos a seguir con el fin restablecer la contraseña en un sistema Linux (Ubuntu 12.1), también se presentan los pasos para el sistema de Windows:

&lt;/BR&gt;&lt;/BR&gt;
&lt;b&gt;Linux&lt;/b&gt;&lt;/BR&gt;
Ir a esta ruta: SYS_DIR / DefaultDomain / bin, donde SYS_DIR es el camino que hemos definido anteriormente.
Ejecute el setDomainEnvironment.sh
Ir a esta ruta: SYS_DIR / DefaultDomain / seguridad
Cambie el nombre del archivo DefaultAuthenticatorInit.ldift a algo como oldDefaultAuthenticatorInit.ldift
Exportar el archivo weblogic.jar a la ruta de clases, para que podamos crear una nueva contraseña para el usuario weblogic (en mi caso, el directorio de instalación de JDeveloper es / home / aalopez / Oracle):
export CLASSPATH = $ CLASSPATH: /home/aalopez/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar
Ejecute el siguiente comando para crear la nueva contraseña. Observe que el comando tiene un punto al final, esto es necesario para que se cree la nueva contraseña en el directorio actual. Cambie NEW_PASSSWORD para la nueva contraseña del usuario weblogic:
java weblogic.security.utils.AdminAccount weblogic new_password.
Ir a esta ruta: SYS_DIR / DefaultDomain / servidores / DefaultServer
Cambie el nombre del directorio de datos a algo como data_old
Ir a esta ruta: SYS_DIR / DefaultDomain / servidores / DefaultServer / seguridad
Cambie el nombre del archivo boot.properties a algo como oldboot.properties
Crear un nuevo archivo boot.properties en el mismo directorio. Esto es necesario si se quiere autoconectarse al iniciar el servidor Weblogic desde dentro de JDeveloper. El contenido del archivo debe ser algo como lo siguiente (cambiar new_password la contraseña que ha definido en los pasos anteriores):
nombre de usuario = weblogic
password = new_password
Es hora de probar nuestros cambios. Ir a esta ruta: SYS_DIR / DefaultDomain / bin
Ejecute el archivo startWeblogic.sh y verifique que el servidor Weblogic inicia sin excepciones.
Abra un navegador y escriba la siguiente dirección URL (el puerto puede ser diferente para usted):
http: // localhost: 7101 / console
La aplicación de consola del servidor Weblogic debe mostrar y se puede iniciar sesión con sus credenciales nuevas.
Cuando esté listo para detener el servidor Weblogic, ir a esta ruta: SYS_DIR / DefaultDomain / bin
Ejecute el archivo stopWeblogic.sh con el fin de detener el servidor.

&lt;/BR&gt;&lt;/BR&gt;
Hay un paso extra que vamos a cubrir después comprobamos los pasos de Windows:

&lt;/BR&gt;&lt;/BR&gt;
&lt;b&gt;Ventanas&lt;/b&gt;&lt;/BR&gt;

Ir a esta ruta: SYS_DIR \ DefaultDomain \ bin, donde SYS_DIR es el camino que hemos definido anteriormente.
Ejecute el setDomainEnvironment.cmd
Ir a esta ruta: SYS_DIR \ DefaultDomain \ security
Cambie el nombre del archivo DefaultAuthenticatorInit.ldift a algo como oldDefaultAuthenticatorInit.ldift
Ejecute el siguiente comando para crear la nueva contraseña. Observe que el comando tiene un punto al final, esto es necesario para que se cree la nueva contraseña en el directorio actual. Cambie NEW_PASSSWORD para la nueva contraseña del usuario weblogic:
java weblogic.security.utils.AdminAccount weblogic new_password.
Ir a esta ruta: SYS_DIR \ DefaultDomain \ servers \ DefaultServer
Cambie el nombre del directorio de datos a algo como data_old
Ir a esta ruta: SYS_DIR \ DefaultDomain \ servers \ DefaultServer \ security
Cambie el nombre del archivo boot.properties a algo como oldboot.properties
Crear un nuevo archivo boot.properties en el mismo directorio. Esto es necesario si se quiere autoconectarse al iniciar el servidor Weblogic desde dentro de JDeveloper. El contenido del archivo debe ser algo como lo siguiente (cambiar new_password la contraseña que ha definido en los pasos anteriores):
nombre de usuario = weblogic
password = new_password
Es hora de probar nuestros cambios. Ir a esta ruta: SYS_DIR \ DefaultDomain \ bin
Ejecute el archivo startWeblogic.cmd y verifique que el servidor Weblogic inicia sin excepciones.
Abra un navegador y escriba la siguiente dirección URL (el puerto puede ser diferente para usted):
http: // localhost: 7101 / console
La aplicación de consola del servidor Weblogic debe mostrar y se puede iniciar sesión con sus credenciales nuevas.
Cuando esté listo para detener el servidor Weblogic, ir a esta ruta: SYS_DIR \ DefaultDomain \ bin
Ejecute el archivo stopWeblogic.cmd con el fin de detener el servidor.


&lt;/BR&gt;&lt;/BR&gt;
Una vez que haya cambiado y puesto a prueba la nueva contraseña para el usuario weblogic, es hora de actualizar la información de JDeveloper. Abra JDeveloper e ir a la paleta de recursos, si no lo encuentra, vaya al menú Ver y selecciona la opción Paleta de recursos:


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLWQNsfuMt9_-ruF5OoUO2ootWWB2gvn86wc61Kh0fItruHk0GrErDX4lITfxjziuPuFg5gjQO-ky8_JxD4CSFDDV5chcUXzPwjfft0CGz3kF5RlfWBjxbmVeHR23QY3hBjGWixw4fZ8s/s1600/JDev_Wls_pwd_reset_jdev.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLWQNsfuMt9_-ruF5OoUO2ootWWB2gvn86wc61Kh0fItruHk0GrErDX4lITfxjziuPuFg5gjQO-ky8_JxD4CSFDDV5chcUXzPwjfft0CGz3kF5RlfWBjxbmVeHR23QY3hBjGWixw4fZ8s/s1600/JDev_Wls_pwd_reset_jdev.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/BR&gt;&lt;/BR&gt;
Allí, seleccione la categoría Application Server y el IntegratedWebLogicServer. Haga clic derecho y seleccione la opción Propiedades. Una nueva ventana emergente aparece, seleccione la ficha Autenticación:


&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO_N9qdK_tYIGr74lu51_bA9vBb7a-sr3r-ayB2PxCNA-Hjsykw8IR3BM6yIP8awcA48WHJk59wGJIYg5T5oVPiLwJa04w3yLUQnc9AJnyweOmGOVcjaFP65DXa_RiM_SNgZv1i6cYfdg/s400/JDev_Wls_pwd_reset_wls_auth.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO_N9qdK_tYIGr74lu51_bA9vBb7a-sr3r-ayB2PxCNA-Hjsykw8IR3BM6yIP8awcA48WHJk59wGJIYg5T5oVPiLwJa04w3yLUQnc9AJnyweOmGOVcjaFP65DXa_RiM_SNgZv1i6cYfdg/s1600/JDev_Wls_pwd_reset_wls_auth.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/BR&gt;&lt;/BR&gt;
No se puede establecer la nueva contraseña de usuario weblogic que acaba de definir pasos anteriores. Aplicar cambios y eso es todo!</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/351877111750000077/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/recuperacion-del-integrated-weblogic.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/351877111750000077'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/351877111750000077'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2016/01/recuperacion-del-integrated-weblogic.html' title='RECUPERACIÓN DEL INTEGRATED WEBLOGIC SERVER EN JDVELOPER 11'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaSDJxZprFDU0JX8AzZaA7Gp6BlXOfxNitF_GDg7RRx0x15h-ldh2AHLL7SJDohgerDlR9Aqda-XqvqmLM1th4kDai0-DeUNAkd9zztLDPe0e38scmL1GmK6Tvoxn8zRhOwMAaHaOtvqQ/s72-c/JDev_Wls_pwd_reset_dir.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-3621734321032755524</id><published>2015-11-05T11:29:00.002-08:00</published><updated>2015-11-05T11:31:17.581-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="AUTOMATIZACION"/><category scheme="http://www.blogger.com/atom/ns#" term="CONSOLA"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>INICIAR APLICACIONES CUANDO SE INICIA EL SERVIDOR (UBUNTU)</title><content type='html'>&lt;b&gt;PASOS PARA INICIAR APLICACIONES AL MOMENTO QUE SE INICIA EL SERVIDOR UBUNTU&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

First of all, you&#39;re going to need root access.
&lt;/br&gt;&lt;/br&gt;
1. Find the location of the program you wish to run at bootup. For example, MyProgram is located in
/home/me/programs/MyProgram

&lt;/br&gt;&lt;/br&gt;
2. We need to create a script file in the init.d folder and we need superuser privileges for that.
2a. Run the command
sudo touch /etc/init.d/RunMyProgram
It&#39;ll prompt you for the root password, enter it. Make sure the file has been created in that directory.
2b. Make the file executable.
sudo chmod +x /etc/init.d/RunMyprogram

&lt;/br&gt;&lt;/br&gt;
3. Open that file in a text editor (nano /etc/init.d/RunMyProgram)

&lt;/br&gt;&lt;/br&gt;
4. We&#39;re going to create a simple script that will simply call our program. Type this bit of code in that text file. Replace the second line with the file path for your program. That is all that should be in the text file. 
&lt;/br&gt;&lt;/br&gt;
#!/bin/bash
&lt;/br&gt;&lt;/br&gt;
/home/me/programs/MyProgram &amp;


&lt;/br&gt;&lt;/br&gt;
4a. This script will automatically run as root. If you want your program to run as a standard unprivileged user, put in a &#39;su &#39; before the second line.

&lt;/br&gt;&lt;/br&gt;
5. We need to assign our script to a certain runlevel (at what state in Linux&#39;s bootup you wish to run the program).

&lt;/br&gt;&lt;/br&gt;
5a. Simply run
&lt;/br&gt;&lt;/br&gt;
sudo update-rc.d /etc/init.d/RunMyProgram defaults
and that will put you at the appropriate runlevels.</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/3621734321032755524/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/11/iniciar-aplicaciones-cuando-se-inicia.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/3621734321032755524'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/3621734321032755524'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/11/iniciar-aplicaciones-cuando-se-inicia.html' title='INICIAR APLICACIONES CUANDO SE INICIA EL SERVIDOR (UBUNTU)'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-6403675895176462841</id><published>2015-11-03T10:43:00.001-08:00</published><updated>2016-01-20T06:30:31.531-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="CONEXION"/><category scheme="http://www.blogger.com/atom/ns#" term="CONNECT"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGO"/><category scheme="http://www.blogger.com/atom/ns#" term="REMOTE"/><category scheme="http://www.blogger.com/atom/ns#" term="REMOTO"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVER"/><category scheme="http://www.blogger.com/atom/ns#" term="SERVIDOR"/><title type='text'>CONECTAR A UN SERVIDOR REMOTO MONGO</title><content type='html'>http://www.litixsoft.de/english/connect-remote-db-using-ssh-mongo-management-studio-community-edition/</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/6403675895176462841/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/11/conectar-un-servidor-remoto-mongo.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6403675895176462841'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6403675895176462841'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/11/conectar-un-servidor-remoto-mongo.html' title='CONECTAR A UN SERVIDOR REMOTO MONGO'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-6751230898954900217</id><published>2015-11-02T07:41:00.000-08:00</published><updated>2015-11-02T13:22:59.940-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CANCER"/><category scheme="http://www.blogger.com/atom/ns#" term="CURA"/><category scheme="http://www.blogger.com/atom/ns#" term="SALUD"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRATAMIENTO"/><category scheme="http://www.blogger.com/atom/ns#" term="VIDA"/><title type='text'>EL CANCER, ANALISIS PERSONAL PARTE II</title><content type='html'>En esta oportunidad, continúo con el tema del análisis del cáncer motivado a eventos ocurridos este fin de semana, que me hicieron continuar pensando y analizando la enfermedad del cáncer.
&lt;/br&gt;&lt;/br&gt;

Como una manifestación fuera del mundo material, recibí una llamada el día Sábado pasado, de un buen amigo que la verdad no veo desde hace unos diez meses, y de manera muy seria (poco habitual en él, ya que suele ser bueno para los chistes y las tallas) me comenta que me llama para recomendarme un video, resaltando que este había cambiado su manera de pensar y sus hábitos cotidianos, insistiendome que la verdad no sabía para que me llamaba para esa tontería(tontera, webada), pero que algo lo impulso a transmitirme ese conocimiento.
&lt;/br&gt;&lt;/br&gt;

Sabiendo yo, que para hablar con más propiedad de algún tema en particular, acercarnos a lo más lógico y verdadero es necesario dedicarle tiempo al hecho de investigar, indagar, analizar, concluir sobre el tema; dada la curiosidad y rebeldía que siempre me ha caracterizado, decidí ver el video.
&lt;/br&gt;&lt;/br&gt;

Oscar, no me recomendo otra cosa que la espectacular cátedra del Dr. Alberto Marti Bosch sobre las enfermedades y en particular el Cáncer. El enlace es el siguiente: 
&lt;/br&gt;
&lt;a href=&quot;http://www.youtube.com/watch?v=EK-qgRGeOrQ&quot;&gt;Pulsa Aquí para ver&lt;/a&gt; la Cátedra del Dr. Marti Bosch sobre el Cáncer.
&lt;/br&gt;&lt;b&gt;(Por tí y por tu familia, no dejes de verlo)&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

&lt;img src=&quot;http://www.vivirfeliz.co/images/vivirfelizco1.jpg&quot; width=&quot;400&quot; height=&quot;250&quot; alt=&quot;Busca más información! no te quedes con lo que te dicen o parezca normal.&quot;&gt;&lt;/br&gt;&lt;/br&gt;
Luego de escuchar las palabras de tan consciente doctor, no llego a otra explicación que &lt;b&gt;estamos bajo la bota de una conspiración capital de la industria farmacéutica, que defiende tratamientos poco efectivos, paliativos no curativos, por los cuales cobran excesivamente, sus resultados en la gran mayoría de los casos son el empeoramiento de la enfermedad y por lo tanto la reactivación del ciclo del tratamiento inicial, así como de sus costos... La industria esconde e interfiere en la difusión de métodos alternativos de tratamiento, se lucra con tu desgracia, lamentablemente así es el mundo en el que vivimos y no todos son capaces de abrir los ojos ante esta realidad desdichada.&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

Resumiendo lo dicho por el Dr. Marti Bosch en este vídeo, resalto lo siguiente, en contraste con lo escrito anteriormente por mi persona de manera monótona:

&lt;/br&gt;&lt;/br&gt;
- El Dr. Marti Bosch sugiere que &lt;b&gt;el cáncer prolifera en ambientes hostiles alrededor de la célula, dado el exceso de acidez provocado por los residuos en exceso de nuestros filtros corporales (hígado, pulmones, riñones) obligando a la célula a actuar de tres formas&lt;/b&gt;: 

&lt;/br&gt;&lt;/br&gt;
1) Morir, dando como resultado piel muerta, partes de órganos muertos, entre otras manifestaciones.
&lt;/br&gt;
2) Sobrevivir, absorbiendo minerales de partes del cuerpo (cosa que da pie a otras enfermedades) para defenderse y contrarrestar químicamente los ataques permanentes en contra de su hábitat.
&lt;/br&gt;
3) Mutar, dando origen a una célula cancerígena que no es otra cosa que una célula que cambia su forma de vida dada la falta de suministros provocado por el ambiente hostil en su entorno, adaptándose al nuevo entorno ácido, viviendo y creciendo de ello.

&lt;/br&gt;&lt;/br&gt;

- &lt;b&gt;El Dr. Marti Bosch también habla de los métodos de la medicina moderna para atacar la enfermedad y los compara con metodologías de siglos pre-medievales utilizadas para destruir al enemigo, haciendo una analogía muy ilustrativa, comparando de la siguiente forma:&lt;/b&gt;
&lt;/br&gt;&lt;/br&gt;

1) La cirugía o extirpación del tumor es análogo al corte de cabeza.
&lt;/br&gt;
2) La Radioterapia es análoga a la hoguera (la quema).

&lt;/br&gt;
3) La Quimioterapia es análoga al envenenamiento.

&lt;/br&gt;&lt;/br&gt;

&lt;img src=&quot;http://s1.e-monsite.com/2009/10/16/04/68497230farmaceuticas-jpg.jpg&quot; width=&quot;400&quot; height=&quot;250&quot; alt=&quot;Busca más información! no te quedes con lo que te dicen o parezca normal.&quot;/&gt;
&lt;img src=&quot;https://uraniaenberlin.files.wordpress.com/2014/01/drug-mafia-1361863768_45.jpg&quot; width=&quot;400&quot; height=&quot;250&quot; alt=&quot;Busca más información! no te quedes con lo que te dicen o parezca normal.&quot;/&gt;&lt;/br&gt;&lt;/br&gt;

El problema de estos tres métodos es que no solo afectan a las células cancerígenas, sino que también a las saludables, impactando negativamente en el sistema inmunológico, debilitándolo, dejando al cuerpo indefenzo vulnerable a cualquier ataque, así como dejando abierta la posibilidad (con un alto porcentaje) de una reproducción del tumor, que en esta oportunidad sería más severo y agresivo; en síntesis, estos métodos no ayudan, empeoran!!, no son una cura definitiva para aquellos casos en los cuales se ha deducido su eficacia dado que no se atacó el origen, la causa y esta permanece allí.

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;Existe un cuarto método histórico de destrucción enemiga como lo comenta el Dr. Bosch más eficaz que los tres anteriores, el ASEDIO, el cual se traduce en dejar sin suministros al enemigo, atacar su comida, su fuente de energía, su agua, para contrarrestar su crecimiento e induciendolo a replegarse hasta morir o posiblemente mutar en una célula sana nuevamente.&lt;/b&gt;

&lt;/br&gt;&lt;/br&gt;

Enlaces recomendados: &lt;/br&gt;
&lt;a href=&quot;https://aseretselene.wordpress.com/2012/04/25/porque-no-se-hizo-publico-este-conocimiento/&quot;&gt;Causa y cura del Cáncer&lt;/a&gt;
&lt;/br&gt;
&lt;a href=&quot;http://circuloesceptico.com.ar/2013/05/mito-dietas-acidas-alcalinas&quot;&gt;Mito dietas alcalinas&lt;/a&gt;
 </content><link rel='enclosure' type='application/mp4' href='http://www.youtube.com/watch?v=EK-qgRGeOrQ' length='0'/><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/6751230898954900217/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/11/el-cancer-analisis-personal-parte-ii.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6751230898954900217'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6751230898954900217'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/11/el-cancer-analisis-personal-parte-ii.html' title='EL CANCER, ANALISIS PERSONAL PARTE II'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-2617668117050523379</id><published>2015-10-30T07:12:00.000-07:00</published><updated>2015-10-30T07:48:24.956-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CANCER"/><category scheme="http://www.blogger.com/atom/ns#" term="CURA"/><category scheme="http://www.blogger.com/atom/ns#" term="ENFERMEDAD"/><category scheme="http://www.blogger.com/atom/ns#" term="SALUD"/><category scheme="http://www.blogger.com/atom/ns#" term="TIPS"/><category scheme="http://www.blogger.com/atom/ns#" term="TRATAMIENTO"/><category scheme="http://www.blogger.com/atom/ns#" term="VIDA"/><title type='text'>EL CANCER, ANALISIS PERSONAL</title><content type='html'>Hoy, nos llego la mala noticia de que una compañera de trabajo sera operada de un tumor en el cerebro como resultado de una metastasis de un cáncer previo de pulmón.&lt;/br&gt;&lt;/br&gt;

Esto me motivó a buscar más información sobre la enfermedad dado que soy muy escéptico de los procedimientos modernos para su tratamiento como lo son las quimioterapias, radioterapias, fármacos y terapias que a mi parecer no son nada eficientes en la lucha contra esta enfermedad.&lt;/br&gt;&lt;/br&gt;

Rápidamente daré una opinión, considero que la industria farmacéutica moderna se ha alejado mucho del bienestar y la salud humana, por razones económicas (son un imperio capital) y sociales (apoyan el hecho de contrarrestar la sobre población en el mundo); siendo más importante un tratamiento excesivamente costoso, manteniendo al enfermo sin una cura definitiva, que el hecho de colaborar ética y profesionalmente con el bienestar de la población mundial.&lt;/br&gt;&lt;/br&gt;

Los fármacos se componen de elementos químicos y naturales, no son mágicos, en su mayoría contienen propiedades de alguna hierba o planta, cuyos conocimientos curativos van quedando en el pasado, en la mente de nuestros abuelos y antepasados.&lt;/br&gt;&lt;/br&gt;

--------------------------------------------------------------------------------------------------------------------
&lt;/br&gt;&lt;/br&gt;

Se que en la internet se encuentran informaciones reales y falsas, acertadas y erradas, sin embargo, creo haber encontrado dos sugerencias importantes para el tratamiento del cáncer que me gustaría compartir con ustedes, son las siguientes:&lt;/br&gt;&lt;/br&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPIfC48cxuZ1v3zj-w0wEMbJ91dfBvZBjb1LMBexsaMC2HDN0Cp4hMobYUdQq5kZEhZVHmfQYSfUghDF0E0I1vJ3C8QnjOzIDH1lu_JJpoejCYbbm-z0fTa2Nvw7fkgy13HvN8RsBBcoE/s1600/oxigeno.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPIfC48cxuZ1v3zj-w0wEMbJ91dfBvZBjb1LMBexsaMC2HDN0Cp4hMobYUdQq5kZEhZVHmfQYSfUghDF0E0I1vJ3C8QnjOzIDH1lu_JJpoejCYbbm-z0fTa2Nvw7fkgy13HvN8RsBBcoE/s1600/oxigeno.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/br&gt;&lt;/br&gt;
- Aumentar el oxígeno en el cuerpo, dado que actúa como un gran potenciador del sistema inmunológico, haciendo más fuertes a tus combatientes internos.&lt;/br&gt;&lt;/br&gt;

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzUWo68q2Sk2X8ElGDvJEwaf2Y6LXRHIoIXvfTT4JRI9klF1-8auQ1aZ4dQOY84ViAU3bGHvol2YSSpHH9iYSB3qElgl-YWCZXjHGa7yUsBIZXwH2gs5iVmJBg7aGcd68qdDFZxrW_27I/s1600/crudivegano_xl.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzUWo68q2Sk2X8ElGDvJEwaf2Y6LXRHIoIXvfTT4JRI9klF1-8auQ1aZ4dQOY84ViAU3bGHvol2YSSpHH9iYSB3qElgl-YWCZXjHGa7yUsBIZXwH2gs5iVmJBg7aGcd68qdDFZxrW_27I/s1600/crudivegano_xl.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/br&gt;&lt;/br&gt;
- Eliminar durante el diagnostico de la enfermedad todos los alimentos cocidos (ya que colaboran con la proliferación de la enfermedad) y adoptar una dieta de alimentos frescos y crudos estricta (alimentos vivos, no muertos en teoría), eliminando todo tipo de carnes, granos y grasas cocidas, como lo sugiere uno de los enlaces en el anexo.&lt;/br&gt;&lt;/br&gt;

Finalmente, me parece muy oportuno que se amplíen las posibilidades, se investigue y se profundicen las investigaciones de tratamientos alternativos a la enfermedad, dejando entre las últimas opciones las quimioterapias, radioterapias, propuestas por la industria farmacéutica multibillonaria, cuyo resultado es la destrucción del sistema inmunológico.

&lt;i&gt;Algunos enlaces sugeridos:&lt;/i&gt;&lt;/br&gt;

http://www.cancernaturalcure.com/cure.htm&lt;/br&gt;&lt;/br&gt;

http://noticias.starmedia.com/ciencia-salud/oxigeno-cura-para-enfermos-con-cancer.html&lt;/br&gt;&lt;/br&gt;

http://www.periodismo.com/2014/01/27/cancer-una-hierba-mata-el-98-de-las-celulas-malignas/&lt;/br&gt;&lt;/br&gt;

http://www.semana.com/vida-moderna/articulo/se-encontro-una-cura-para-el-cancer/430100-3&lt;/br&gt;&lt;/br&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/2617668117050523379/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/10/el-cancer-analisis-personal.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/2617668117050523379'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/2617668117050523379'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/10/el-cancer-analisis-personal.html' title='EL CANCER, ANALISIS PERSONAL'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPIfC48cxuZ1v3zj-w0wEMbJ91dfBvZBjb1LMBexsaMC2HDN0Cp4hMobYUdQq5kZEhZVHmfQYSfUghDF0E0I1vJ3C8QnjOzIDH1lu_JJpoejCYbbm-z0fTa2Nvw7fkgy13HvN8RsBBcoE/s72-c/oxigeno.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-3964505773482145919</id><published>2015-10-04T09:17:00.001-07:00</published><updated>2016-01-20T06:29:14.303-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRACION"/><category scheme="http://www.blogger.com/atom/ns#" term="ADMINISTRATION"/><category scheme="http://www.blogger.com/atom/ns#" term="CONSOLA"/><category scheme="http://www.blogger.com/atom/ns#" term="DB"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGO"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="SISTEMAS"/><category scheme="http://www.blogger.com/atom/ns#" term="UNIX"/><title type='text'>MONGO EN 5 MINUTOS</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZlgHwUkcXQ_q4_NEDM6cYWFMnod7XG1F37v2Sohj2lV4QfFauqdGtCVgeUMEHVkxjhL36AnXMvUUl3NplIdfFaKTEVyzd46gXIH7ItC-Oo2hlb8isHMy8lFoH9s8iy8dhaqAQpSEjveg/s1600/mongodb.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZlgHwUkcXQ_q4_NEDM6cYWFMnod7XG1F37v2Sohj2lV4QfFauqdGtCVgeUMEHVkxjhL36AnXMvUUl3NplIdfFaKTEVyzd46gXIH7ItC-Oo2hlb8isHMy8lFoH9s8iy8dhaqAQpSEjveg/s1600/mongodb.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;/br&gt;
&lt;/br&gt;

&lt;b&gt;MONGODB INSTALL&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Versión Ubuntu local&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
lsb_release -a

&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;&lt;i&gt;Pasos previos en ubuntu&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Importar la llave pública&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Crear una list file para MongoDB (ubuntu 14.04)&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
&lt;/br&gt;
echo &quot;deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse&quot; | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Reload local package database&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
sudo apt-get update
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Install la última versión estable de MongoDB&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
sudo apt-get install -y mongodb-org

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Mover la instalación de MongoDb a otra ruta en Ubuntu&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
sudo service mongod stop
sudo mv mongodb /new/disk/mongodb/
sudo ln -s /new/disk/mongodb/ /var/lib/mongodb
sudo chown mongodb:mongodb /new/disk/mongodb/
sudo service mongod start

# test if mongodb user can access new location:
sudo -u mongodb -s cd /new/disk/mongodb/
# resolve other permissions issues if necessary
sudo usermod -a -G &lt;newdisk_grp&gt; mongodb

&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;&lt;i&gt;Iniciar el servicio de MongoDB&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
sudo service mongod start

&lt;/br&gt;&lt;/br&gt;
&lt;b&gt;&lt;i&gt;Iniciar el servicio de MongoDB con archivo de configuración&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
mongod --config /etc/init/mongod.conf (Ejemplo unix server)

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Conexión remota a mongo&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
mongo --host &lt;ip&gt; --port 27017

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Instalar Nmap en Unix&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
apt-get install nmap
&lt;/br&gt;&lt;/br&gt;

nmap -sT -O -localhost
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Verificar puertos abiertos disponibles con nmap en Unix&lt;/i&gt;&lt;/b&gt;&lt;/br&gt;
nmap -sT -O -localhost
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;MONGODB COMANDOS RUTINARIOS&lt;/b&gt;&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;&lt;i&gt;Crear Base de datos&lt;/i&gt;&lt;/b&gt;

use Nombre_Base_Datos&lt;/br&gt;&lt;/br&gt;

&lt;i&gt;Mostrar las bases de datos existentes&lt;/i&gt;&lt;/br&gt;&lt;/br&gt;

show dbs

&lt;i&gt;Crear usuario: &lt;/i&gt;&lt;/br&gt;

use &lt;db&gt;
db.createUser( { user:&quot;luiseliberal&quot;, pwd:&quot;s1zha8to&quot;, roles: [ {role:&quot;userAdminAnyDatabase&quot;, db:&quot;admin&quot;}, &quot;readWrite&quot; ] })
&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;otro ejemplo de creación de usuario: &lt;/b&gt;&lt;/br&gt;&lt;/br&gt;
use &lt;db&gt; 
db.createUser( { &quot;user&quot; : &quot;luiseliberal&quot;,
                 &quot;pwd&quot;: &quot;xxxxxxx&quot;, 
                 &quot;roles&quot; : [ { role: &quot;clusterAdmin&quot;, db: &quot;admin&quot; },
                             { role: &quot;readAnyDatabase&quot;, db: &quot;admin&quot; },
                             &quot;readWrite&quot;
                             ] },
               { w: &quot;majority&quot; , wtimeout: 5000 } )

&lt;/br&gt;&lt;/br&gt;

&lt;b&gt;Ver usuarios existentes: &lt;/b&gt;

&lt;/br&gt;
show users

&lt;/br&gt;&lt;/br&gt;

&lt;i&gt;Otorgar autorizaciones&lt;/i&gt;&lt;/br&gt;
use db
db.auth({user:&quot;usuario&quot;,pwd:&quot;password&quot;})
&lt;/br&gt;&lt;/br&gt;

&lt;i&gt;Remover Usuarios&lt;/i&gt;&lt;/br&gt;
use db , db.dropUser(&quot;usuario&quot;)&lt;/br&gt;&lt;/br&gt;

&lt;i&gt;Crear tabla e Insertar Datos&lt;/i&gt;&lt;/br&gt;
use db&lt;/br&gt;
use table&lt;/br&gt;

db.table.insert({id:1, nombre:&quot;cualquier&quot;, propiedades:[&quot;uno&quot;, &quot;dos&quot;], arreglo:[{a:&quot;&quot;, b:&quot;&quot;, c:90}] }) &lt;/br&gt;&lt;/br&gt;

&lt;i&gt;Buscar (queries de consulta)&lt;/i&gt;&lt;/br&gt;

&lt;b&gt;Traer todos los objetos:&lt;/b&gt; db.[NOMBRE_BASE_DATOS].find() &lt;/br&gt;&lt;/br&gt;

&lt;b&gt;Búsqueda por criterio:&lt;/b&gt; db.products.find( { qty: { $gt: 25 } } )&lt;/br&gt;&lt;/br&gt;

&lt;i&gt;Búsqueda por equivalencia:&lt;/i&gt; db.bios.find( { _id: 5 } )&lt;/br&gt;&lt;/br&gt;

&lt;i&gt;Búsqueda usando operadores retornando si el id es 5 o se encuentra el object id en este caso: &lt;/i&gt; db.bios.find(
   {
      _id: { $in: [ 5,  ObjectId(&quot;507c35dd8fada716c89d0013&quot;) ] }
   }
)

&lt;i&gt;Búsqueda por rango: &lt;/i&gt;db.collection.find( { field: { $gt: value1, $lt: value2 } } );&lt;/br&gt;&lt;/br&gt;

&lt;/br&gt;&lt;/br&gt;

&lt;/br&gt;&lt;/br&gt;
&lt;i&gt;Remover la instalación de MongoDB en Ubuntu&lt;/i&gt;&lt;/br&gt;
sudo apt-get autoremove mongodb-* &lt;/br&gt;

&lt;/br&gt;&lt;/br&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/3964505773482145919/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/10/mongo-en-5-minutos.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/3964505773482145919'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/3964505773482145919'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/10/mongo-en-5-minutos.html' title='MONGO EN 5 MINUTOS'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZlgHwUkcXQ_q4_NEDM6cYWFMnod7XG1F37v2Sohj2lV4QfFauqdGtCVgeUMEHVkxjhL36AnXMvUUl3NplIdfFaKTEVyzd46gXIH7ItC-Oo2hlb8isHMy8lFoH9s8iy8dhaqAQpSEjveg/s72-c/mongodb.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-6209036789649961551</id><published>2015-06-11T13:07:00.000-07:00</published><updated>2015-06-19T08:04:08.597-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVASCRIPT"/><category scheme="http://www.blogger.com/atom/ns#" term="MODULE"/><category scheme="http://www.blogger.com/atom/ns#" term="MODULOS"/><category scheme="http://www.blogger.com/atom/ns#" term="NODE"/><category scheme="http://www.blogger.com/atom/ns#" term="NODEJS"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="PUBLICAR"/><category scheme="http://www.blogger.com/atom/ns#" term="PUBLISH"/><category scheme="http://www.blogger.com/atom/ns#" term="TENDENCIAS"/><title type='text'>PUBLICACION DE MODULOS EN NODE</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s1600/nodeJsLogo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s1600/nodeJsLogo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br /&gt;&lt;br /&gt;

&lt;b&gt;PUBLICACIÓN DE MODULOS EN NODE&lt;/b&gt;
&lt;br /&gt;&lt;br /&gt;
npm login
&lt;br /&gt;
npm publish
&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/6209036789649961551/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/06/publicacion-de-modulos-en-node.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6209036789649961551'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/6209036789649961551'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/06/publicacion-de-modulos-en-node.html' title='PUBLICACION DE MODULOS EN NODE'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s72-c/nodeJsLogo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-561441824048040428</id><published>2015-06-11T12:47:00.000-07:00</published><updated>2015-06-19T08:04:01.489-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CONNECT"/><category scheme="http://www.blogger.com/atom/ns#" term="CSS PREPROCESSOR"/><category scheme="http://www.blogger.com/atom/ns#" term="DB"/><category scheme="http://www.blogger.com/atom/ns#" term="EXPRESS"/><category scheme="http://www.blogger.com/atom/ns#" term="MONGO"/><category scheme="http://www.blogger.com/atom/ns#" term="NODE"/><category scheme="http://www.blogger.com/atom/ns#" term="NODEJS"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="SISTEMAS"/><category scheme="http://www.blogger.com/atom/ns#" term="STYLUS"/><category scheme="http://www.blogger.com/atom/ns#" term="TENDENCIAS"/><title type='text'>NODE EXPRESS , CONNECT Y MONGO</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s1600/nodeJsLogo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s1600/nodeJsLogo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br /&gt;&lt;br /&gt;

&lt;blockquote&gt;&lt;b&gt;APP DE EJEMPLO NODE EXPRESS - CONNECT - MONGO&lt;/b&gt;
&lt;/blockquote&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;b&gt;Requerimientos:&lt;i&gt;&lt;/i&gt;&lt;/b&gt;
&lt;br /&gt;
- Tener instalado nodejs/npm.
&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;

&lt;i&gt;PRIMER PASO - EXPRESS: &lt;/i&gt;
&lt;br /&gt;

- Ejecutar comando siguiente: npm i -g express
&lt;br /&gt;
- Ubicarse en la carpeta destino y ejecutar el comando:&lt;b&gt; express default&lt;/b&gt; (este crea un esqueleto de carpetas y archivos predefinidos para una app).
&lt;br /&gt;
- Ejecutar el siguiente comando: &lt;b&gt;express -c stylus -e exp-styl-ejs&lt;/b&gt; (instala el preprocesador de css)</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/561441824048040428/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/06/node-express-connect-y-mongo.html#comment-form' title='0 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/561441824048040428'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/561441824048040428'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/06/node-express-connect-y-mongo.html' title='NODE EXPRESS , CONNECT Y MONGO'/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s72-c/nodeJsLogo.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1615223394975271454.post-9010060009040952470</id><published>2015-06-11T08:33:00.001-07:00</published><updated>2015-06-11T08:34:35.514-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DESARROLLO"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVASCRIPT"/><category scheme="http://www.blogger.com/atom/ns#" term="NODE"/><category scheme="http://www.blogger.com/atom/ns#" term="NODEJS"/><category scheme="http://www.blogger.com/atom/ns#" term="NUEVAS TECNOLOGIAS"/><category scheme="http://www.blogger.com/atom/ns#" term="SISTEMAS"/><category scheme="http://www.blogger.com/atom/ns#" term="TENDENCIAS"/><title type='text'>AUTENTICACION NODE JS </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s1600/nodeJsLogo.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s1600/nodeJsLogo.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br /&gt;&lt;br /&gt;

&lt;b&gt;EJEMPLO DE AUTENTICACION EN NODE JS&lt;/b&gt;

&lt;br /&gt;&lt;br /&gt;
&lt;i&gt;/** MIDDLEWARE LOGIN 
&lt;br /&gt;
&lt;b&gt;TIP:&lt;/b&gt; Iniciar el servidor de autenticador con NODE_ENV=&#39;ambiente(desa,prod)&#39; node Autenticador 
**/&lt;/i&gt;

&lt;br /&gt;&lt;br /&gt;
var connect = require(&#39;connect&#39;);
&lt;br /&gt;
var app = connect();
&lt;br /&gt;&lt;br /&gt;

function loggerHello(req, res, next){
&lt;br /&gt;
 foo();
&lt;br /&gt;
 res.setHeader(&#39;Content-Type&#39;, &#39;text/plain&#39;);
&lt;br /&gt;
 res.end(&#39;Hello World Pana&#39;);
&lt;br /&gt;
}

&lt;br /&gt;&lt;br /&gt;
function logger(req, res, next){
&lt;br /&gt;
 //res.setHeader(&#39;Content-Type&#39;, &#39;text/plain&#39;);
&lt;br /&gt;
 //res.end(&#39;Este es el logger&#39;);
&lt;br /&gt;
 console.log(&#39;#logger en acción&#39;, req.method, req.url);
 next();
}

function logger(req, res, next){
 console.log(&#39;Iniciando... &#39;, req.method, req.url);
 next();
}

function authWithDB(user, pass, cb){
 if(pass !== &#39;luis15&#39;){
  return cb(&#39;Credenciales incorrectas.&#39;);
&lt;br /&gt;
 }
&lt;br /&gt;
 cb();
&lt;br /&gt;
}
&lt;br /&gt;&lt;br /&gt;

function restrict(req, res, next){
&lt;br /&gt;
 var authorization = req.headers.authorization;
&lt;br /&gt;
 if(!authorization){
&lt;br /&gt; 
 return next(new Error(&#39;No autorizado&#39;));
&lt;br /&gt;
 }
&lt;br /&gt;&lt;br /&gt;
 var parts = authorization.split(&#39; &#39;);
&lt;br /&gt; 
        var scheme = parts[0];
&lt;br /&gt; 
        var auth = new Buffer(parts[1], &#39;base64&#39;).toString().split(&#39;:&#39;);
&lt;br /&gt;
 var user = auth[0];
&lt;br /&gt;
 var pass = auth[1];
&lt;br /&gt;&lt;br /&gt;

 authWithDB(user, pass, function (err) {
&lt;br /&gt;

 if(err){
&lt;br /&gt;

 return next(err);
&lt;br /&gt;
 }
&lt;br /&gt;
 next();
&lt;br /&gt;
 });
&lt;br /&gt;
}
&lt;br /&gt;&lt;br /&gt;

function admin(req, res, next){
&lt;br /&gt;&lt;br /&gt;

console.log(&#39;ACCEDIENDO A: &#39;,req.url);
&lt;br /&gt;&lt;br /&gt;

 switch(req.url){
&lt;br /&gt;&lt;br /&gt;
  case &#39;/&#39;: 
&lt;br /&gt;
   res.end(&#39;try /users&#39;);
&lt;br /&gt;
   break;
&lt;br /&gt;&lt;br /&gt;
  case &#39;/users&#39;: 
&lt;br /&gt;
  res.setHeader(&#39;Content-Type&#39;, &#39;application/json&#39;);
&lt;br /&gt;
  res.end(JSON.stringify([&#39;Luis&#39;, &#39;JoseLuis&#39;, &#39;Jp&#39;]));
&lt;br /&gt;
  break;
&lt;br /&gt;
 }
&lt;br /&gt;
}
&lt;br /&gt;&lt;br /&gt;

function errorHandler() {

&lt;br /&gt;&lt;br /&gt;

 var env = process.env.NODE_ENV || &#39;desarrollo&#39;;
&lt;br /&gt;
  return function (err, req, res, next){
&lt;br /&gt;
   res.statusCode = 500;
&lt;br /&gt;&lt;br /&gt;

 switch (env){
&lt;br /&gt;&lt;br /&gt;
  case &#39;desarrollo&#39;: 
&lt;br /&gt;
  res.setHeader(&#39;Content-Type&#39;, &#39;application/json&#39;);
&lt;br /&gt;
  res.end(JSON.stringify(err));
&lt;br /&gt;
  break;
&lt;br /&gt;
  default: 
&lt;br /&gt;
  res.end(&#39;Server error&#39;);
&lt;br /&gt;
 }
&lt;br /&gt;
  };
&lt;br /&gt;
}
&lt;br /&gt;&lt;br /&gt;

app
&lt;br /&gt;
 .use(logger)
&lt;br /&gt;
 .use(&#39;/admin&#39;, restrict) 
&lt;br /&gt;
 .use(&#39;/admin&#39;, admin) 
&lt;br /&gt;
 .use(loggerHello) 
&lt;br /&gt;
 .listen(3000); 
&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='https://luiseliberal.blogspot.com/feeds/9010060009040952470/comments/default' title='Comentarios de la entrada'/><link rel='replies' type='text/html' href='https://luiseliberal.blogspot.com/2015/06/autenticacion-node-js.html#comment-form' title='1 Comentarios'/><link rel='edit' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/9010060009040952470'/><link rel='self' type='application/atom+xml' href='https://www.blogger.com/feeds/1615223394975271454/posts/default/9010060009040952470'/><link rel='alternate' type='text/html' href='https://luiseliberal.blogspot.com/2015/06/autenticacion-node-js.html' title='AUTENTICACION NODE JS '/><author><name>luiseliberal</name><uri>http://www.blogger.com/profile/08473021347142366525</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEic9rzJhL02ZyhS_wCKHmMfBlzn90i4gU7pdJWqrXKz1jB-CEavkwZLCg14hPJp9ejjxmqCgEKx2rIFpWRVyYKv-TERFKnso3YskYzqHHCkyDBMYfSddx32VdlG94m7BhLkxSjeZ53RdH4/s72-c/nodeJsLogo.png" height="72" width="72"/><thr:total>1</thr:total></entry></feed>