I have created basic Application using Sencha Touch 2. Now I want to create .apk file. I tried using AndroidSDK Tool but couldn't get it done.
Can anyone tell me step by step process how I can create .apk file using eclipse. I already have installed ADT plugins.
How to generate .apk file for my sencha touch 2 application using eclipse.
Check out: http://docs.sencha.com/touch/2-0/#!/guide/native_android
It explains how to package a native android application through commandline.
Seems quite simple. Haven't tried it out yet my self. It requires the Sencha SDK Tools.
Related
I want to create an apk for my android device.
How I'm going to do this ?
I could not find anything about this.
I tried file/ export project,
but I did not set android sdk directory, java directory,vs..
Do I have to set these properties?
http://giderosmobile.com/DevCenter/index.php/Installing_Gideros_Studio
Did you install it properly? (I'm not aware of any Android .apk build process working without core Android SDK from Google, all the alternative builders use the chain tool from the original SDK, gideros looks to be the same case).
After installation, here are some Android deployment instructions:
http://giderosmobile.com/DevCenter/index.php/Deployment#Android_deployment
I have developed a Sencha Touch Application. My platform is Linux. I have done the following steps from developing to deploying it on Android:
1) Downloaded Sencha Touch and Sencha CMD.
2) After running the command
sencha generate app appname ../appname
My project was created. With the help of eclipse plugin I was able to open the project in Eclipse and make changes to it.
3) Built the project using
sencha app build production
4) Downloaded cordova for native packaging
5) Created a project in cordova using cordova create appname
6) Copied contents of sencha production to www folder of cordova application
7) Ran the following commands
cordova prepare android
cordova compile android
cordova run android
After going through all these steps, I was able to run my application on my mobile.
But I have the following doubts.
1) Is this approach the best? Or is there any other way which is more efficient. Any tutorial or links will be of great help.
2) Is Cordova really necessary in my case? Because I am not using any of phone native features like camera, accerelometer etc.
I tried using sencha native packaging for android. But when I run the following command,
sencha app package build packager.json,
it shows the following error. Sencha Native Package (stbuild) is currently unsupported on linux
So, is there a way not to use cordova or phonegap and directly build using sencha native packaging.
3) How can I debug my application in Eclipse while deploying it on Android as I can debug my normal android application.
4) If I want to deploy it on ios, then is it possible to deploy it without using Mac?
Follow the instructions about using Sencha Touch with Cordova/Phonegap from Sencha themselves. Make sure to download Sencha Cmd 4.0 or higher.
Their recommended way is to create a project with Sencha Cmd
sencha -sdk /path/to/SenchaTouch generate app MyApp /path/to/MyApp
initialize Cordova
sencha cordova init [AppID]
configure the config.xml at the root level of your project where your index.html file resides and build/run with
sencha app build -run native
This has worked great for me. Unfortunately you need a Mac in order to develop for iOS. Even with Sencha Touch and Cordova, Xcode is a requirement.
If you want your web app to be distributed through the app stores, to be natively installed on iPhones or Android devices then yes, you need some kind of wrapper around it. There are certainly other ways but Cordova/Phonegap is an easy starting point and since version 3.0 quite light weight in its core.
I'm still struggling away with how to deploy my app directly to my phone via command-line. But when I used eclipse I could easily deploy and build directly to my device.
But android studio is meant to be all in one development software.
So far all I have been able to is either create a new project, unsuccessfully or try and import my phonegap project which then only displays:
So nothing really has been imported. In my mind I'm going to have to get eclipse back up and running, which seems counter productive.
All I'd like to be able to do is, work from within android studio and deploy the complied app, again from within android studio directly to my phone.
I am using Android Studio and it's pretty complete. You can very easily import any PhoneGap project. You just have to open Android Studio, Use import and follow the instructions. From there you can sign your apk and other tasks.
It is really easy to work with PhoneGap and Android Studio. Here is what I am doing:
Creating Phonegap project: phonegap create testproject com.testproject.name Name;
Enter Project directory: testproject;
Add Android platform: phonegap build android;
You have your phonegap project ready. Now open Android Studio. Select Import project and follow instructions. If you don't have any plugins added in your project it's preaty pushing NEXT till you get to the end.
That's all. If you need more information tell me will be happy to help you. Have in mind that as for phonegap <3.0 you had to import android sub directory of your phonegap progect, as for phonegap 3.0+ you include the main directory. In the example above will be directory TESTPROJECT, not /testproject/platform/android/ ...
If you prefer snapshot you can find a very easy to follow tutorial here: Phonegap and Android studio
I'm using 0.5.4 Android Studio on Mac OS and not sure about Windows one.
Select [Build] then [Generate Signed APK] from drop down menu.
Please make sure you set android:debuggable to "false" in AndroidManifest.xml.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#string/AppTheme"
android:debuggable="false"
>
</application>
The guide to generate key store ishere.
If you are unfamiliar with Google Play, please refer here.
I have been tasked with developing an Android and iOS application with PhoneGap (http://phonegap.com/)
However, as I read, things start to get really complicated: Some people say Cordova (http://cordova.apache.org/) is now PhoneGap, others say PhoneGap is just a distribution of PhoneGap.I lost 3 days and still can't find a proper way or a guide to install a fully functional PhoneGap plugin either in Eclipse or Netbeans running Ubuntu 12.04 64-bit.
What I tried:
1. Installing Eclipse, installing MDS AppLaud Phonegap Plugin (http://marketplace.eclipse.org/content/applaud-phonegap-android-jslintjshint#.Utf1JPiSTh8). This one actually installed at once, and it actually lets me create a new PhoneGap project in Eclipse, however, the I cannot select any SDK different than 4.4. (?!)
2. Installed NetBeans and after I tried to install phonegap and cordove through nodeJS it failed, again.
My question is:
Which one I should install and how to do it in Ubuntu, using either Eclipse of NetBeans?!
Edit:
OK guys, I just found out how to install nodeJS and PhoneGap on Ubuntu 12.04: http://paste2.org/1OnX6M6F . Still trying to integrate it in some IDE for the real thing, though!
If you want to basically start developing an app, I suggest this for PhoneGap:
These are the steps I used to install PhoneGap on Ubuntu. Take note, this is for PhoneGap version 2.8.1. Personally I was not able to get nodeJS to install the latest. If you need the latest to be installed, check around on google. Referencing This tutorial.
Step 1
Install Java 7 JDK
Step 2
Install ANT
Step 3
Download & Extract PG v2.8.1
Step 4
Download Android SDK
Step 5
Set up environment variables
Step 6
Create base project
./create location/to/put/project package_name project_name
Step 7
Import Project into Eclipse
File->New->Android->Android Project From Existing Code
Browse to where you placed the project and select it
Now you can start developing.
Reminder: This is the way to do it for v2.8.1 of PhoneGap. Different versions(especially 3.*) will be different (nodeJS)
Look at http://docs.phonegap.com. Read the "Overview chapter, then "Platform Guides" and "The Command-Line Interface". Follow the steps and in the end you should be able to build your app. It takes a while but it's worth it.
I havn't integrated cordova/phonegap in my IDE. I just created the app with the command line interface. In netbeans I created a HTML5 project and linked the app-root/www directory into this project. I'm programming with Netbeans and building and running the app with the command line interface. That's all.
In order to have some code completion, I have written an extra class (facade) which encapsulates the phonegap code. It just delegates its calls to the phonegap API. That is especially nice if the phonegap API changes as it only affects my code in that particular facade class.
The last thing I want to share: I found out that the build and run process with the command line interface is pretty slow. Executing cordova prepare android and then running the android project in Eclipse/ADT is a lot faster.
OK, to put it simple:
PhoneGap - The original project developed by volunteers
Cordova - The Apache's version of Phonegap, which has exactly the same documentation and functionality as the original PhoneGap but is integrated in NetBeans 7.4.
I download the android source, changed the framework layer such that I added new methods to it.
I compiled the code ( using make command ), and compiled the sdk using: make sdk.
After that I followed google's instructions here here
and successfully build the zip file containing the eclipse plugins. I am lost know and dont know how to exactly continue.
My final goal is to create an android application which uses the new methods I added to the sdk.
I'm no expert in modifying the Android source itself, but if you're hoping to create an app that uses methods that you've added to the SDK, then at the very least beyond compiling the SDK and Eclipse plugins, you're going to have to:
Actually install the Eclipse plugins in Eclipse
Create a ROM for your device that uses your version of the SDK
Actually install that ROM on your device
Write and install your app