Setting android permissions in Icenium - android

I've developed an android app using Icenium Graphite. When I install my app onto my phone, it always displays a long list of permissions that my app supposedly needs approval for prior to installation. The only thing my app needs are the camera and sound recorder. When I add these permissions in via the Properties page in Graphite and remove all other permissions, my app still keeps asking for permission for everything in creation (location, contacts, etc.) upon installation to a device. What am I doing wrong?
Thanks,
Dave

You are probably using the Cordova 3.0.0 framework that comes with a set of core plugins. The core plugins let you access native system functionality such as the accelerometer, camera, compass etc. By default Icenium includes all of those core plugins. They require some additional Android permissions so when you build your project, the build process adds these permissions by default.
The next Icenium version would let you disable the core plugins that are not required by your application and this would eliminate the need of the additional Android permissions.

Related

Elegant classes loading and updating system

In the current state of the project I'm currently working on, I have a classic Android Studio project with a classic app on it.
For some good reasons (it's an embedded app), I would like to include an auto-update feature in the app, which doesn't require to exit it (I must stay inside the app or another app and never show the underlying Android system).
I have two solutions to do this :
Create another "updater" app which updates the app using the package manager command. It requires a rooted device to work, but it would suit my needs : when an update is available, the main app closes itself and opens the updater app which updates the main app and starts it back
Have the actual code of the application stored to the external storage and turn the APK into a bootstraper which downloads and runs the app
The later solution is the better one since it doesn't require a rooted device.
This is why I would like to write an elegant system to achieve this ; the development of the app should not be crippled by this (e.g. I don't have to upload the new classes at each build, I don't need to do extra voodoo work to add activities or permissions to the manifest...).
I thought of using the build variants of Android Studio :
Debug variant : build the app like usual, don't use the bootstraper
Release variant : don't include all the classes in the APK, build an external JAR which contains them and use the boostraper in launcher intent
I saw how to load external classes from the external storage, but I couldn't find anything on how to externalize the whole app code, including activities. I have the feeling that we just can't.
Would such a system be possible to develop ?

alt beacon cordova not detecting beacons

I have a native Android SDK that uses the latest AltBeacon library.
I use my SDK within several Apps to detect beacons and perform business logic.
I now need to include my SDK within a Android Cordova app but it does not detect any beacons. (It does work within an iOS Cordova app). This is probably due to the Bluetooth management being controlled by Cordova and hence not allowing the Altbeacon lib to do it's thing.
Should the Altbeacon lib work within the Android Cordova environment and if so can someone point me in the right direction to get this to work.
I suspect the main issues are:
You need to set up the Android AppManifest.xml to enable Bluetooth LE permissions, and declare the scanning service. The native library AAR file gets this into your native app's manifest via manifest merging. You probably need to copy the entries manually from here.
On Android 5+ you need to request location permissions at runtime to scan for BLE beacons, otherwise you will get no results. I have not configured a Cordova app to request location permissions on Android, but you may get some hints from this answer.
If you do both these things and still have trouble, I would capture a LogCat excerpt and look for anything bluetooth related coming frin your app, and post the results in your question.

Doubts about Cordova 3.6 webviews, events & updating application

I am using PhoneGap / Cordova 3.6 to build my first Android Application. I have successfully created a static application however I still have a few conceptual doubts, I am listing them below it will be great if someone can help me out with these.
PhoneGap events: Do I require installing any plug-in to access or make use of these events?
Ref: https://cordova.apache.org/docs/en/3.6.0/cordova_events_events.md.html#backbutton
Embedding WebViews: How important is this for creating an application using PhoneGap. Does it improve the performance of the application in any way?
Ref: https://cordova.apache.org/docs/en/3.6.0/guide_hybrid_webviews_index.md.html#Embedding%20WebViews
How can I change the version of Android Application created using PhoneGap: I read that the application version requires to be changed in order to update the application. To do so I went into my /application folder/platforms/android/ in AndroidManifest.xml & edited the android:versionCode & android:versionName to a higher number. However after doing so when I re-build the app using "cordova build" in CLI; the default version number is restored. So am I doing the right thing by updating the version number? or is there any other method to do so using CLI
EDIT: Hi Kerri, as per your advise I changed the version identifier in the config.xml. However when I download the apk file on my phone & run it; it asks me to re-install the entire application & not the updates.
Thanks for your time.
Thanks,
Utpal
No. If you look at the top of that page, it does list a few events added by other plugins, but back button and the like are built in.
Ignore this. It's only useful if you are trying to embed a bit of PhoneGap into a native app. For example, you might have an existing native app that you want to add new functionality to, but you want to do that portion in PhoenGap. You can embed PG in your native app and get the benefits of both worlds.
Check out config.xml in your project root -- there's a version identifier in there.

How to remove android permissions when wrapping html5 app using Cocoonjs

Every time when I use Cocoonjs Cloud services to convert a HTML5 app to Android app, it automatically adds all the unnecessary android permissions. It makes users confused when downloading app. In fact, all unnecessary permissions such as access to phone book, access the internet, wifi access, location, etc. will be added to the manifest file.
Is there any way I can remove those permissions. Actually, I am using Construct 2 to build the application, then wrap it using ludei cloud services. After that, I received an unsigned apk file.
Thanks in advance.
This may not be a proper answer but the official doc recommends crosswalk instead of Cocoonjs and it seems that crosswalk will let you choose which permissions to use.

How to run application without activity in android version 4.X

Actually my application is running a service only when boot completed. it runs fine in android 2.2.
But when i install 4.0 android supported device it does not work. even after installation application is not running. I know after 3.X android have a change that application is not running when installed.
So how only service oriented application run in > 3.x android version ?
any help is appreciable.
How to run application without activity in android version 4.X
You don't.
First, you pretty much always need an activity:
You need to have your copyright notice somewhere
You need to have your license agreement somewhere
You need to have your disclosures of other open source components that you are using somewhere
You need to provide access to technical support, even if it is just a link to your Web site, somewhere
You need to allow the user to configure the behavior of the service somewhere
You need to give the user access to online help somewhere
You want to avoid the one-star ratings that come from apps that do not have a launcher activity, when the user installs the app, then cannot figure out how to run the app, and thinks that you are a complete moron as a result
This is above and beyond the technical requirement for a component of your app to be manually started before any manifest-registered BroadcastReceivers will work.

Categories

Resources