is there is any way to build hybrid app (Ionic, AngularJs, Cordova) in android studio - angularjs

I am native android application developer working on java and android api's with android studio, recently i got a requirement to build a hybrid app with ionic, cordova and angularJs, i spent 5-6 hours and dig google to get some tutorail to setup a project structure of hybrid app in andorid studio, but haven't found anything.
I know how to use ionic, angular and cordova but don't know about the project structure and setup compiling and how to run.
so, i want you guys to post links of such tutorails (If you have any).

Have a look over cordova CLI mode. In this see specific for Android Platform for that you first need following pre-requirement to use:
Android Studio.
Android SDK.
Node.js
Git Client
After installing Node.js Open it's terminal and follow command to create Cordova project with different platform. These steps are already mentioned in official documentation.
Once you have created executed cordova build androidcommand then browse to your project directory. In that you will find that there's a directory named platforms in that you will see Android, now open your Android Studio in that select Select Import Project (Eclipse ADT, Gradle, etc). when you create a new project from there browse to Android directory. That's all you need to do for cordova
Official documentation and referrals links:
http://ionicframework.com/docs/overview/#download
https://cordova.apache.org/docs/en/5.1.1/guide/platforms/android/index.html
https://cordova.apache.org/docs/en/5.1.1/guide/cli/index.html
https://docs.angularjs.org/misc/started

Hello try to reefer this articles on mcgivery blog.
http://mcgivery.com/100-ionic-framework-resources/
I'm ionic dev and if you want to use good IDE use WebStorm :)
I'm using it on EAP version.

first of all you have to install 1)node.js 2)apache ANT 3) Java JDK &
JRE 4) Android SDk & Eclipse and then after all installation you have
to set this all software path into environmental- variable. and then
fire your npm install -g ionic. without this all software
installation and there path setup your ionic application will not
created. and still you have any confusion and any question related
software installation and there path setup then again tell me i will
help you.

Related

AIDE - Android IDE - SQLiteOpenHelper - Database

Can anybody help me how to create database use sqlite on android app (AIDE), i have try any source code and when i running the project, the project always force close,
You have to have the newest version of AIDEpro. Then clone https://github.com/mobilesiri/Android-Sqlite-Database-Tutorial
It is passing the build on my android device with AIDE pro. There is also a tutorial you are looking for in the github project mentioned above.

How to convert an existing AngularJS 2 web app to a Cordova app?

I have a webapp which I build with Angularjs 2.0, I want to convert it to android apk and install it on android phone and test.
I dont have any experience in building mobile native app or converting webapp to native app.
I have gone through How to convert an existing AngularJS web app to a Cordova app?
Any suggestion/guidance will be helpful.
The most simple explanation is you will need to put your angular files in the www folder, setup your configuration file, make sure the android platform is installed, then run the Android emulate and/or build command to see if it works. That's a very oversimplified version.
Once you've got it working there's a process to go through to prepare the apk to be uploaded to the Google Play Store. You have to be a registered developer for the play store, which is $25/year.
https://scotch.io/#vijayk036/building-hybrid-mobile-apps-using-cordova-and-angularjs-for-android
https://thebhwgroup.com/blog/converting-angularjs-website-cordova-app-ios-and-android

How to add Scandit barcode plugin to custom build of Phonegap developer ios app?

I use Phonegap Desktop and Phonegap Developer app for a while now. This is really interesting for quickly testing my development.
But I'm facing a limitation with the embedded barcode scanner which is displaying the camera display in full screen.
I need to embed the camera display into a container so I have space for displaying information in the same time.
After searching for a while, I've discovered the Scandit SDK for PhoneGap was the only plugin which allows cropping the camera display.
I spent a lot of time trying to implement Scandit, but no success. At least I can build the app, but when using it, scanner is not working...
Here are the steps I've followed:
clone the PhoneGap Developer project from Git
Install using npm
add ios platform
open the xcode project file
build the application and run it on device
=> At this time the PG Dev is running well and my application is working fine
Then, i continued:
remove all reference to the default barcode scanner plugin
build the application and run it on device
==> PG Dev still working fine and my application is working fine
Next steps:
clone the Scandit phonegap plugin from Git
download the Scandit SDK from my scandit account
put the SDK into the cloned scandit phonegap plugin
modify the plugin.xml to change the path to the bundle and framework (mismatch of version name in the path)
<resource-file src="src/ios/scanditsdk-community-ios_4.16.1/ScanditBarcodeScanner.bundle"/>
<framework src="src/ios/scanditsdk-community-ios_4.16.1/ScanditBarcodeScanner.framework" custom="true"/>
copy bundle and framework into the correct folder of scandit
modify the config.xml to include reference to Scandit and set the spec attribut to the version of the SDK
build the application and run it on device
==> PG Dev still working fine and my application is working fine (it doesn't use scandit for the moment)
Next steps:
Remove my project from PhoneGap desktop
add Scandit Sample project to PG Desktop
I used the "Continuous Scaled/Cropped" example from there: http://docs.scandit.com/4.12/phonegap/cordova-examples.html
add my App Key for the license
launch my PG Dev app on my device and download the project files
==> PG Dev is running fine and download the Scandit Sample App.
But the app doesn't work. When clicking on the scan button, nothing happends..
After some investigation, I found that I ran through an exception on Scandit class.
Adding a try on the command 'Scandit.License.setAppKey' allowed me to report in the PG Desktop log the following error:
ReferenceError: Can't find variable: Scandit
Adding this try/catch made the app raising an exception at the next line:
var settings = new Scandit.ScanSettings();
After searching the web about my error, and some posts were suggesting to manually add the framework and bundle into xcode.
So I did it by drag&droping the framework and bundle into the framework folder of the xcode project.
But when I try building my project, it is failing with many errors...
To solve it, I had to had manually all the scandit plugin files (*.h and *.m) into my xcode project.
All previous errors have been solved, but new ones appeared.
This was due to some other missing native ios frameworks...
Once these framework added, all errors were solved and I managed to successfully build the application.
But when running it, I'm still having the error: "ReferenceError: Can't find variable: Scandit"
I'm now running out of idea..
What did I do wrong?
Is there anyone having managed to build a PG Desktop with Scandit embedded?
Thanks.
Sorry for this long post, just tried to be the more precise I could be.
The issue here is two fold. First you need to be aware that the Scandit Barcode Scanner plugin makes use of native code and can therefore not be used in the Phonegap Developer app, as the only thing transmitted to it is your html/css/javascript and the javascript part of the plugin. To also include the native parts of the plugin you have to build and deploy the project yourself. As you are trying to build the XCode project it seems like you are now doing this.
The second part is that you are way overcomplicating the adding of the plugin. There is no need for you to manually clone the git repo, add our libraries, adjust paths in the plugin.xml etc. You can directly download the entire plugin as a zip from your account at scandit.com where the library is contained and the plugin.xml is correct. After that you can simply add the plugin to your project through the CLI (also see our documentation for this at http://docs.scandit.com/stable/phonegap/cordova-integrate.html) and there is no need to do anything manually unless you are using a very outdated Phonegap version that fails to properly handle the plugin.xml. Doing it the automated way with our properly prepared plugin zip will remove most error sources, please try it that way.
Thanks #moritzha. It helped me finding the solution.
I followed this doc at the beginning but it was not working.
After adding the plugin and building the application, I never managed to see it in my xcode project.
I took the opportunity of changing my mac to restart everything from scratch, and after many tries I found where I was wrong.
In fact, the documentation provided by scandit is missing one step.
The command ' phonegap plugin add < path to downloaded and unzipped plugin > ' is doing half of the job.
The command is correctly copying the plugin files to my project but it is not updating the config.xml.
So before building your application, you have to edit the config.xml located at the root of your project folder.
You need to manually reference the plugin with the following:
and replace the x by the version of the sdk you will use.
Once the config.xml updated, you will be able to build the app for your targeted platform.
I now have my own version of the Phonegap Developer App with the Scandit plugin in place of the default barcode scanner plugin. And it works perfectly.
This plugin is awesome!
PhoneGap Developer App version: 1.7.2 (taken on Github)

can't create a New Web Application Project in eclipse indigo?

can anyone help me.I cant create a new web application.I mean i cant find the menu option for it. I downloaded eclipse indigo (java) extracted it any started using it, I also downloaded google app engine SDK,google plugin and GWT.and installed them but i can't find create new web application project option in toolbar nor in menu options.
File -> New -> Web Application Project
You've a problem with the installation of these plugins if you don't have this option. Try to restart the Eclipse.
Execute all the steps of the official installation instruction.
Just resolved this exact same problem myself. Highly recommend you download the plugin package to your machine and install it locally. You can download it here:
https://developers.google.com/eclipse/docs/install-from-zip
There are instructions to follow and it worked flawlessly. Hope it helps anyone else who is lost on the plugin install.
Once you installed Google App Engine SDK, you should be able to see web application by following this
select File > New > Web Application Project from the Eclipse menu.
if not, follow this
select File > New > Other > Google > Web Application Project
Official Instructions
Depend what you are using i have eclipse kepler and i can't find "web app prject" butthere is a little google icon that is google plug in for eclipse when u go there and start using plug in you could find web app and all options of google app engine also can find "web app" create project and deploy app.

Google App Engine - recompile GWT module

I've created Google App Engine project in Java using Eclipse following the book Beginning Java Google App Engine
Before I bought this book I had created projects with unchecked option 'Use Google Web Toolkit' but for this project I checked it (following the book)
Eclipse generated several files for me and I run my applications, copy link to Web Browser (http://localhost:8888) and it gives me an error:
GWT module name_of_my_project may need to be (re)complied
I work on Ubuntu 10.04 (I was testing my application using Firefox and Chromium) and I was trying run my application on Windows XP (using the same Web Browsers) with the same effect (just one difference - Google Chrome made me install Web Toolkit...so I did it but it still gives the same error)
Thanks in advance :)
I get the same error message at unexpected times using development on IntelliJ with Chrome. The message still appears when I stop and start development mode. The problem is fixed after I delete the compiled files (class files, js files) in the out folder. On eclipse, you can try deleting files and folders generated in the war folder (delete the folder that has the project name, if it exists, and the classes folder under /war/WEB-INF/classes). Hope this helps.
Check in your "Java Build Path" if you have the correct Default output folder (something like /target/project-name/WEB-INF/classes).
In Eclipse, do a "Clean Build".
Click on the google blue button in the Eclipse menu and select "GWT Compile Project..."
Make sure the GWT plugin is compiling your project by checking the compiler output. The GWT compiler outputs lots of things, for example you will always see something like "Compiling 6 permutations.... Compiling permutation 0..."
If you still have problems, try this page on setting up Eclipse with GWT: http://code.google.com/webtoolkit/usingeclipse.html
Thanks for your comments and suggestions. I re-installed Eclipse on Ubuntu and I installed plugin one more time and it works :)
So, be careful which version of Eclipse you use - Eclipse 3.4 has problem with GWT.

Resources