If I build a Phonegap Android app, how do I deploy it to an iPhone and Blackberry? Is it as simple as clicking a button or do I need the Phone and Blackberry SDKs and have to move the webview files manually?
You don't need to rewrite the app another time, you just install the iOS SDK and create a new project then add the .jar files of Phonegap. Then you copy and paste your app files (the HTML, Javascript and CSS files to the new project which you built).
It is simple indeed. But not as simple as that of clicking a button !
If you have developed it for android you will have an www directory which contains your index.html files with your js and images etc.
For android you would have used a js ( cordova.js / phonegap-android.js /similar ) through which you can access your android device specific things ( like buttons, camera, gps, etc ) .
If you are developing the same app for Blackberry , you need to replace the cordova.js with the same for blackberry ( which you can download from phonegap website )
And you need to setup a few things. It is pretty easy. See this link
And for iOs , you need a mac machine as only through Xcode you can develop.
Related
I have an Android App I downloaded and installed, I have also extracted the APK,
Is there some way from the apk file to tell what programming language was used to write the program?
Are there any tools are available to help with this?
What languages can be determined and which ones cannot?
Normally most android app is build using the following texhnologies:---
React Native app
Cordova app
Native java/kotlin app
To determine the technology, you need to decompile the app first using this link
Then look for "assets" folder. Normally, asset folder should be present at the very top of application hierarchy.
Then you can determine the app technology by the following prediction:--
If asset folder is present and there have any file with the extension ".bundle"(mainly the file name is "index.android.bundle") then the app is build using React Native.
If the assets folder contain a folder name "www" and "assets/www" contain the following file/folder structure then it is a cordova app.
If neighter 1 or 2 is true then the app may be written using native code, i.e using java/kotlin
You can do a reverse engineering : (https://www.apkdecompilers.com/ or http://www.javadecompilers.com/apk) decompile the apk and see the code and its programming language.
Not an accurate way to get the specific technology, but through adb, you could check the activity name of an app.
Usually when you open different activities or pages, with native technology the ActivityName will be different like below (Playstore app):
whereas in hybrid apps such as Ionic e.g, it is usually bundled up into one, hence the only activity will be MainActivity... like the Hamilton app made with flutter:
Is there a way we can pull updates for the web app folder in our hybrid iOS/Android app without taking the pain of releasing a new app each time.
Basically I'm looking for a way to update the "www" folder in my hybrid iOS/android app via some web service (May be we can zip the folder and again unzip it inside our iOS app on successful update).
Thanks in Advance.
There is an answer right in stackoverflow:
Serving cordova app www folder remotely
Also, you can check this out for sample code of Cordova Dynamic Loader:
https://github.com/markmarijnissen/cordova-app-loader
I have developed android app using phonegap. Now I want to develop same app for windows phone.
I have downloaded windows sdk in my windows 7 and did the require setup to create cordova app. After that I created sample app. To run my android asset code , just copying its files into www folder is enough...?
Or
What more I need to do for getting this to be worked ...?
Guide me on this to proceed further.
Best thing to do is to try it and see what happens!
But yes, you just need to copy the contents of the www folder of the Android app to the www folder of a new Windows Phone PhoneGap project.
You might find you might have to make minor modifications to things like CSS because of the differences in how the mobile browsers render the web pages (since the Android app will run on a webkit browser frame whilst the Windows app will run on an Internet Explorer browser frame).
You might need to set the 'Build Action' property for any image resources you copy across to the Windows Phone using Visual Studio to get the images to render.
Yes copy the files but be careful not to overwrite existing files. The Cordova.js file is platform specific, as are other .js files that are created in the new project.
You also need to 'include in project' in Visual Studio otherwise the files copied to www are ignored. Do this in the solution browser on the right pane in VS.
Remember the browser is IE as compared with WebKit in Android so some CSS, HTML and Javascript may need to be changed. If you have used a propagation stop to prevent scrolling in WebKit, this may not work in IE and the touch event model is completely different. This MS guide might help:
http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10.aspx
Looking for some help building an Android app using PhoneGap with Meteor.
I've seen answers here on how one can essentially build a "thin-client" PhoneGap app that points to a meteor server and renders it and that essentially works for me.
However, I'd like to do this a little more client-side ("thick-client") and therefore would like to bring the Meteor client side code (js,css) into PhoneGap and have that code call the Meteor server remotely. I've seen some approaches to hack in a hardcoded URL in places but they aren't working for me (app.html comes up blank in the emulator - I don't think any/all of the referenced js files are loading properly).
I've also attempted to change my meteor client code to use Meteor.connect, but I don't know how to authenticate the user with the remote server. I'm using the accounts- packages and it always authenticates with my local machine server.
So my questions:
(A) Has anyone pulled something like this off? (esp. for Android using a Windows dev machine)
(B) If this is possible, what files need to be pulled from the meteor bundle into the phonegap folders and where exactly do they go? What other tweaks are necessary?
(C) If using Meteor.connect is the way to go (for remote data), how does one tell the auth packages to talk to the remote server?
Thanks mucho..
It would require some manual editing but it should be possible:
Make sure that all your images/resources are referenced such that they can be available locally (/ use relative paths)
In your project directory use meteor bundle to create a tarball of your project http://docs.meteor.com/#meteorbundle
Extract your tarball and use the index.html file in your PhoneGap or Cordova project www folder, perhaps after a network check or something as the meteor project
Copy the stuff in the static (which come from the public directory of your meteor project such as images) to your www too
Publish your bundle onto a server
Edit your index.html file so that the referenced javascript loads from your server instead
That should get all the stuff to run locally on the phone but only fetch the collections, subscriptions, meteor calls & stuff via websocket/long polling from your server
I have built an Android App, using a jQuery Mobile index.html file "wrapped" inside Java using the Android SDK on Eclipse.
However, although the images appear OK within the Dreamweaver "Live" view for jQuery mobile,
they don't appear in the emulator in Android SDK after successful build.
I have added the image files within an image folder in the RES/mpdi folder of the project, and within the index.html file they are referenced as images/"...png" etc
Should I have changed the path in any way in the index.html file?
Also, they are 290x381 pixels - should I have had a different size for the AVD?
Thanks in advance!
David
I will assume you are using something like phonegap
phonegap has a whitelist that tells the app which URLs it's allowed to access. You can also add a * to it, as described http://www.anujgakhar.com/2011/11/22/phonegap-gotcha-error-whitelist-rejection/ found in in the /res/xml/phonegap.xml file