Saturday, November 21, 2015

IOS application using 3D Framework

IOS application using 3D Framework

This blog today I am going to show you guys how to create an IOS application using 3D Framework using GLKVIew.

Please watch this video below:


Or Youtube link(sometimes have better HD definition):
   https://www.youtube.com/watch?v=Nj-sgYrLX44

I hope it helps,
Thiago Leoncio.

---------------------------------------
Other great IOS articles:

IOS Exceptions:
http://thiagoleoncio.blogspot.com/2016/03/ios-exceptions.html

IOS - 3 big reasons why start coding in swift instead of Objective-C
http://thiagoleoncio.blogspot.com/2015/11/3-big-reasons-why-start-coding-in-swift.html

IOS - IOS App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.
http://thiagoleoncio.blogspot.com/2016/01/ios-app-transport-security-has-blocked.html

IOS - Video Application with Json and Mysql connection
http://thiagoleoncio.blogspot.com/2015/09/ios-application-with-mysql-database.html

IOS - How to create Multiple views
http://thiagoleoncio.blogspot.com/2015/08/ios-how-to-create-multiple-views-in.html


Saturday, November 7, 2015

[IOS Swift] Unknown class ImageViewController in Interface Builder file - Terminating app due to uncaught exception

Hello guys,

   So today I would like to just provide a quick troubleshooting session on this common error that can make you waste long time trying to find the real reason.

Error:

2015-11-07 19:05:20.900 ThiagoLeoncioTracker[2549:65044] Unknown class ImageTableViewController in Interface Builder file.
2015-11-07 19:05:22.326 ThiagoLeoncioTracker[2549:65044] Unknown class ImageViewController in Interface Builder file.
2015-11-07 19:05:22.333 ThiagoLeoncioTracker[2549:65044] *** Terminating app due to uncaught exception

Solution to fix the issue:
Click inside of Module field and press enter.




Happy coding,
Thiago Leoncio.

Saturday, October 10, 2015

Apache Cordova - debugging tools using Visual Studio

Hello everyone,

   Today I would like to show you at one of the great frameworks we have - Apache Cordova -  how to debug, emulate or run based on device using the framework in Visual Studio.

We have three classes of debug targets:

Ripple - Browser base simulator to simulate any application.

Emulators / simulators – it is based on each platform to help on Windows, IOS and Android.

Physical Devices – that speaks by itself. But giving more details is just having your device connected to your computer in order to run it there directly.

So, let's see what we have there.


Ripple example - 



Then it runs in a browser:




Emulator – Selecting IOS Simulator then IOS 6





Next step is Install MDA – remote build agent to allow the tests to be done emulating IOS screen.

So, install it running the commands provided at this link: https://www.npmjs.com/package/vs-mda-remote/tutorial


Eg:
Installing it:
sudo npm install –g vs-mda-remote –user=$USER

Creating a package.json in root:

npm init

Running the agent:

vs-mda-remote

Then when you click and play Simulator –Iphone 6 button you will see the emulator being processed to launch your IOS app using Apache Cordova.







Device – 
1-Having any device setup in your computer





2- Selecting the device option into VS Studio.




Then just run it and have fun.


Please, find more about Apache Cordova here:




I hope it helps, happy coding and talk to you soon,
Thiago Leoncio.

Saturday, September 12, 2015

IOS application with MYSQL Database connection




This blog today I am going to show you guys how to create an IOS application using PHP WebService and MYSQL Database.

Please watch this video below:
 
 


Or Youtube link(sometimes have better HD definition):
https://www.youtube.com/watch?v=NpSkX_8V68E

Please, let me know if you need the source code of it.

I hope it helps,
Thiago Leoncio.


---------------------------------------
Other great IOS articles:

IOS Exceptions:
http://thiagoleoncio.blogspot.com/2016/03/ios-exceptions.html

IOS - 3 big reasons why start coding in swift instead of Objective-C
http://thiagoleoncio.blogspot.com/2015/11/3-big-reasons-why-start-coding-in-swift.html

IOS - IOS App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.
http://thiagoleoncio.blogspot.com/2016/01/ios-app-transport-security-has-blocked.html

IOS - Video using 3D framework
http://thiagoleoncio.blogspot.com/2015/11/ios-application-using-3d-framework.html

IOS - How to create Multiple views
http://thiagoleoncio.blogspot.com/2015/08/ios-how-to-create-multiple-views-in.html


Saturday, August 22, 2015

IOS SOAP BOX - How to create multiple views in XCODE - The easiest way

Hello all,

    Today I would like to share with you the easiest way to create a multiple views using your Xcode. Don't need any coding for that.


 

  Link: https://www.youtube.com/watch?v=SSmdG2WdXic&feature=youtu.be



Happy coding,
Thiago

---------------------------------------
Other great IOS articles:

IOS Exceptions:
http://thiagoleoncio.blogspot.com/2016/03/ios-exceptions.html

IOS - 3 big reasons why start coding in swift instead of Objective-C
http://thiagoleoncio.blogspot.com/2015/11/3-big-reasons-why-start-coding-in-swift.html

IOS - IOS App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.
http://thiagoleoncio.blogspot.com/2016/01/ios-app-transport-security-has-blocked.html

IOS - Video using 3D framework
http://thiagoleoncio.blogspot.com/2015/11/ios-application-using-3d-framework.html

IOS - Video Application with Json and Mysql connection
http://thiagoleoncio.blogspot.com/2015/09/ios-application-with-mysql-database.html

IOS SOAP BOX Series- How to populate UITableView with NSArray
http://thiagoleoncio.blogspot.com/2014/11/ios-soap-box-how-to-populate.html









Sunday, July 12, 2015

Using SQLLite for Android

What is SQLite for Android?

It is an implementation of SQL language that is presented in all devices. It is a very simple version, but it also have a lot of features to be used.

·      First of all, you will need to add on your code the android.database.sqllite package.
·      You should implement methods that create and maintain the database and tables:



·      In apps, we interact with a SQLite database using the SQLiteOpenHelper class and the SQLiteDatabase class. SQLiteOpenHelper is like a ‘Portal’ into SQLiteDatabase, it allows you to create statements into SQLiteDatabase class.
·      We use OnCreate() method to be called by the system if the database does not exist.
·      OnUpgrade() is called when the version number changes.
·      getReadlableDatabase access database in read-only mode. So, only use this method for select statements.
·      getWritableDatabase is used for Insert and Update statements.
·      Definition for column names and table names:


·      SQLiteOpenHelper creates a subclass that overrides onCreate(), onUpgrade() and onOpen() callback methods. Here it is an implementation of SQLiteOpenHelper:

·      To access your database you just need to instantiate your DB class as below:

·      Put information/ Read / Delete and Update information on database:



I hope these help you in your android implementation. Happy coding! See you next month.

Thiago Leoncio.

Sunday, June 28, 2015

Android Coding: How to manage your Android fields using LinearLayout,TableLayout and TableRow

Hello everyone,

    Today I am going to show thru screenshots and video how to create a structure for your layout in your Android application. This will allow you to align your fields, buttons and tables.


NOTE: Please use these screenshots below with the video explanation, so you can have a better understanding on this mobile article:

1) This first picture is displaying the behavior of  LinearLayout,TableLayout and TableRow.  
2)Java code of the actions that we will be using.



3) Please watch the video with all details on this layout structure.

AndroidSoapBox by ThiagoLeoncio - Layouts


Happy coding!

I hope it helps you,
Thiago Leoncio.

Saturday, June 20, 2015

How to change cn=orcladmin PW for OVD without EM

Here they are the steps that you must take, if your EM is not working to change OVD super user password:

1-You must set ORACLE_HOME before running this script.

2-Locate ovdcred.pl in $ORACLE_HOME/ovd/bin/directory.

3-Run the ovdcred.pl script using the following syntax:

ovdcred.pl -componentName  ovd-component-name -instancePath ovd-instance-path  -option username/password option

For example:

ovdcred.pl –componentName ovd1 –instancePath /scratch/aime1/asinst_1 –option Password
ovdcred.pl –componentName ovd1 –instancePath /scratch/aime1/asinst_1 –option Username


When you run a help or anything wrong you can see these:

perl ovdcred.pl –componentName ovd1 –instancePath /u01/app/idm/config/instances/oid1/OVD –option Password
 -componentName VAL : OVD Component Name
 -instancePath VAL  : OVD Instance Path
 -option VAL        : Password/Username
 -userType VAL      : ROOT/EMADMIN. Defaults to ROOT when this option is not spe
                      cified


If you type it properly then you will see the result:


perl /u01/app/idm/products/dir/oid/ovd/bin/ovdcred.pl  –componentName ovd1 –instancePath /u01/app/idm/config/instances/oid1/config/OVD/ovd1 –option Password
Enter password:
Confirm password:




Check this article also:

I hope it helps you,
Thiago Leoncio.



Saturday, May 16, 2015

Android Coding: How to get Location/Sensors information from your Android

Hello everyone,

   Today I would like to show you how to use the LocationManager classes to collect the exact location of your mobile during the execution of your application. As part of the content, I would like to talk a little bit about sensors as well. Please note: there is one video published on youtube that is related of this article that I wrote, find below more details below:

Summary:
The Use LocationManager object using getSystemService(Context.LOCATION_SERVICE), then instantiate LocationListenet , and this listener needs to override some methods, such as OnLocationEnableb, OnStatusChanged or OnProviderEnable and Disable.

How to get Location Updates:

1-Call requestLocationUpdates(provider, minTime,minDistance, Listener)

2-Call removeUpdates(Listener) to stop getting Location.

It works the same way that you call some other methods, as for example the Hardware Sensors. But a very important information here is:

Any service or activity that will ask for a listener on sensor data should implement the SensorEventListener interface.

The java class SensorEventListener has two required methods:

onAccuracyChanged() -> when accuracy of the sensor changes

onSensorChanged() -> when sensor reports new values.


So, when the sensor values change on mobile system, the values array(in the event that goes using onSensorChanged method) will change.

The Event Values:

The value here is an array of values returned from the sensor.

Each type of sensor has a different array of values, such as X,y,z axis(math).TYPE_proximity has only one element in its values array(eg: values[0]).

Warning: Preserve the battery! When you are dealing with location, the hardware that works for sensor is highly consumed, per user action, delays parameters
and others.

Example of delays parameters:

SENSOR_DELAY_NORMAL: sampling rate for screen orientation changes.

SENSOR_DELAY_UI: For monitoring changes that will be applied to the user(interface).

SENSOR_DELAY_FASTEST: a zero microsecond delay.

SENSOR_DELAY_GAME: for monitoring changes for a use in a typical game.


Saying that, let's go to the main coding of this article:


1) Creating your android project you will see the 3 main files we are going to work with:
LocationThiagoLeoncioActivity.java, activity_location_thiago_leoncio.xml and AndroidManifest.xml

1.1) On activity_location_thiago_leoncio.xml I will drag and drop all TextViews that I am going to use as a display.



1.2)On LocationThiagoLeoncioActivity.java we will write our methods that are going to be displayed(called) by the main onCreate method.
In this case is calling a method setupLocation() that is provided below, and the embedded method showLocationofThiago():



1.3) Last but not least the AndroidManifest.xml that allows the mobile emulator user to get the location:





2) The way that I developed when you run your emulator and launch your Android Device Monitor sending the location it will show you something similar to this below:

To help you better understand this, please watch this video that I've published: https://youtu.be/9Q0w71dUsys


I hope it helps you,
Thiago Leoncio.




Sunday, April 26, 2015

Android Coding: How to start coding for Android

Hello everyone,

   Today I am going to show on simple steps how to start coding using Android app.

1) First of all you need to download the Android studio that is basically the Eclipse( modified for it) at https://developer.android.com/sdk/installing/index.html?pkg=studio

2) Run the file  android-studio-bundle-141.1980579-windows.exe


3) Install the SDK from Oracle to allow you use java.sh or .exe





4) Choose components that you are going to use.

5) Define where you are going to install them


6) This is a very important step: You are going to define how many GB are you allowing for Android Emulator. Please note that this can affect your machine performance depending on the size of your project.




Installation completes successfully

7) Running Android Studio


8) Next step is create your own Android Java Project







Now that we have our project created, and you can start modifying it ,creating some interactions for your user.

9) On this example we are going to create one regular button that calls a textView to be displayed.

So, here it is our project screen:


10)First of all, we are going to create our button called button, and out text to be displayed called textView1. Once they are created into Android display, you should be able to see them on our main activity.xml(called activity_fullscreen_thiago_leoncio_blog.xml) as below:
  

11) This step now we are going to create the action on the java class called FullscreenThiagoLeoncioBlogActivity.java

//Please note that you should import the TextView from android.widget.TextView.


12) Now we should return to our main xml activity file called activity_fullscreen_thiago_leoncio_blog.xml, and make sure the button we added has the onClick action related properly added.




Now you can save your code and launch your Android emulator clicking on the green arrow (run button).

Choosing the type of device you want to emulate.

then click


...and if you click on this button.....


  On TOP the message that we wrote on onBtnTouch method





I hope it helps you.I am going to provide more articles related of mobile development next month.

Happy coding. Please send me an e-mail if you want this sample code.

Cheers,
Thiago Leoncio.

Saturday, March 21, 2015

Apache Cordova - Run Android app with VisuaStudio on Mac


Hello all,

    Today I am going to show you how to develop for Android using Apache Cordova on my MAC. I will also follow here all pre-requirements as well as providing the most common errors in order to help you to reach your goal - launch your Android app on Mac.

So, the first thing is install the dependencies for it:
1-Node.JS

1.1-Download and Install Node.JS for Mac:  https://nodejs.org/en/download/

1.2- Follow the steps and complete successfully your NodeJS installation.
1.3- Make sure you add the npm as well as the node paths over your .bash_profile to avoid issues.
2- Install Apache Cordova using npm.

3-Hit Command +P on your Visual Studio IDE code and run Cordova:Prepare .


4-Now the common issues you might have:

4.1- FIRST COMMON ERROR: ANDROID_HOME not defined:

The fix is make sure you have your Android-sdk installed and set as environment variable, check the next picture.



4.2- SECOND COMMON ERROR: Another very common issue is when you are developing for multiple emulators, sometime you are testing android and your environment platform is set for IOS as below - during cordova prepare command:

Error: The provided path "/blablabla/" is not a Cordova iOS project.


Fix:
The fix for this is just go to your project home folder and run these commands:
- cordova platform rm ios (to remove IOS)
- cordova platform android(to add Android)


Now your Error: THe provided path "blablabla" is not a Cordova iOS project is fixed.

4.3- THIRD COMMON ERROR:
Running command: /Users/ThiagoGuimaraes/workspace/myapp/platforms/android/cordova/build 
[Error: Please install Android target: "android-22".

Hint: Open the SDK manager by running: /Users/ThiagoGuimaraes/adt-bundle-mac/sdk/tools/android
You will require:
1. "SDK Platform" for android-22
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
ERROR building one of the platforms: Error: /Users/ThiagoGuimaraes/workspace/myapp/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/ThiagoGuimaraes/workspace/myapp/platforms/android/cordova/build: Command failed with exit code 2"
F
Fix:

   Make sure you have all required Android packages installed on your MAC running the command:

- [ANDROID-SDK-HOME]/tools/android as below:


Command +P : Cordova Build should work fine now as below:
4.4- FOURTH COMMON ERROR:
During the cordova run command you hit error related of emulator such as:

/tguimaraesMacpro/platforms/android/cordova/node_modules/q/q.js:126
                throw e;
                      ^
ERROR : No emulator images (avds) found.


Fix:
  To fix this one you must create an ADV running this command on your terminal window.
/us/local/Cellar/android-sdk.24.4.1_1/tools/android adv






Now, finally, you are good to run your cordova: run command.





Then......your app in Apache Cordova finally launched to the mobile universe!!!


Please, find more about Apache Cordova here:





Happy coding. I hope it helps you, and talk to you soon.

Thiago Leoncio.