I saw questions like this in stackoverflow but, answers not satisfied me. My main problem is i have to check how my android sencha application running at various version of android mobiles.
From starting onwards i tested the application in android 2.3.4 mobile, now i almost finished my application so i want to test my application in all the version android, so i trying to run my application in android emulator.
I ran the application but only got error, so i searched for how to run android sencha application in emulator, then i got this link Sencha Touch 2 Native Packaging for Android, i tried to follow guide in that link, i installed SenchaSDKTools 2.0 and Sencha Cmd.
and tried to run
sencha package run android.json
this what i got
Sencha Cmd v3.0.0.250
[ERR] stbuild is not yet supported on linux
I am using ubuntu 12.4.
To run sencha application on Android, you required cordova integration which will provide a bridge between sencha and android.
I have already posted details steps for such things.
Please see this link.
Integrate Phonegap/Cordova with Android Application
Follow those steps and you are done.
Just consider 5th step there, you need to place whole your sencha app code into assets/www folder and make sure index.html is in the root(www) folder.
Thanks.
Related
I have an app made in Ionic5 framework with the support of Angular, when I run ionic serve --lab, the android app works without problem but the problem is that when I export the project to Android Studio with (ionic capacitor copy android) and I run the app on my device suddenly crashes and stops.
I have been looking for information but I have not found any useful data. My question is more generic than this platform is used to. What error detecting techniques I should use (Android Studio, npm vulnerabilities) and what are some typical cases that generate this error?
I let some posible useful project data:
I use Firebase for database and back-end services.
NPM warn me due to the fact that I have 10 vulnerabilities.
Ther could be a number of reasons for this.
Try running opening chrome://inspect/#devices where you can select your device and see all console logs.
Also try syncing your gradle files in android studio
I'm trying to run a Chrome App on Android Mobile using the instructions from:
developer.chrome.com/apps/chrome_apps_on_mobile
From above URL, I could run the calculator app fine in Android Emulator 5.0.1 fine. No issues.
github.com/GoogleChrome/chrome-app-samples/tree/master/samples/calculator
Chrome App Calculator on Android Screenshot
Then I tried running the "Native Client" App on Desktop from example api directory of nacl_sdk:
developer.chrome.com/native-client/sdk/download
nacl_sdk comes with few examples including demo and core api examples. All examples works fine on Desktop. Out of them I took 'file_io' api example which runs fine after compiling (make). I took that folder and used the following command to create cca cordova app:
cca create FileApp --copy-from=/path/to/file_io/manifest.json
Then cd to FileApp and cca prepare
After that ran Android eumlate command:
cca run android --target=avd5
It processed everything fine, and I see no errors building this cordova app like calculator app. But, after 'LAUNCH SUCCESS' when the app launched the Android emulator crashed. The emulator windows closed.
I started the Android Emulator from AVD Manager, and after booting up Android I tried starting the 'File I/O' app, which in result showed me the message
"Unfortunately, File I/O has stopped." Screenshot
Does that mean the PNaCl/NaCl apps still are not supported on Android OS?
The NaCl app contains the .pexe file.
Is there any step in between I could be missing?
I'd really appreciate any help in this regard to test if I could run Native Client Apps on Android OS just like the Chrome Mobile Apps using Apache Cordova examples work.
Native Client (NaCl) isn't supported in Chrome for Android (and by implication the Chrome/Chromium based WebView).
See: http://developer.chrome.com/multidevice/faq
Q: Does Native Client work on Chrome for Android?
A: It does not, and we have no plans to announce at this time.
But then the OP read at: https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/faq.md#is-nacl--pnacl-supported
Q: Is NaCl/PNaCl supported [in Cordova]?
A: No. However, you can still compile and use native code
by writing a custom Cordova plugin.
And unfortunately the word native is an overloaded word with different meanings depending on context, so the OP started asking about the Android Native Development Kit (NDK).
The Android NDK which uses Java Native Interface (JNI) for C/C++ code to communicate with the Android Java framework. Typically Android apps only use the NDK if there is need to port existing C/C++ libraries or have a computational performance requirement like physics modeling or image processing.
When Cordova is referring to 'native code' its referring to code written in Android Java which would need to be bridged via a Cordova plugin to the JavaScript side.
And of course why to use any of the above frameworks/APIs depends on what the OP wants to do.
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 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 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.