Hello,
this may be a weird question for this forum (if moderators think it is wrongly placed, please push it to the correct section).
I'm a developer but have never developed anything for android. I wonder if what I want to achieve is possible or not.
My problem:
I want to use VSCO cam as my default camera (e.g. on my lockscreen I can specify a default camera to be launched by clicking on an icon)
VSCO cam has for some reason decided not to "register" as a camera app if that makes sense (in the selection screen of camera apps it doesn't show up)
So my questions are:
What does an app need to do to be recognised as a camera app by other apps? Is it as simple as an entry in a config file? Or is it a java routine? Please name all modifications that would have to occur.
I downloaded the VSCO apk and unzipped it - I should be able to modify it and then still install without problems right?
Just to state the obvious - I don't want to offer this modified app to anybody besides myself. I don't want to add it to google play or even offer it as a download somewhere. This would be just a personal project of mine.
Need Android intent filter
001mic said:
So my questions are:
What does an app need to do to be recognised as a camera app by other apps? Is it as simple as an entry in a config file? Or is it a java routine? Please name all modifications that would have to occur.
I downloaded the VSCO apk and unzipped it - I should be able to modify it and then still install without problems right?
Just to state the obvious - I don't want to offer this modified app to anybody besides myself. I don't want to add it to google play or even offer it as a download somewhere. This would be just a personal project of mine.
Click to expand...
Click to collapse
To be recognized as a camera app and be able to respond the incoming request, the Android intent filter has to be specified.
Foxbrush said:
To be recognized as a camera app and be able to respond the incoming request, the Android intent filter has to be specified.
Click to expand...
Click to collapse
Can you be a little bit more specific? Is it just a change of the Android Manifest xml file?
The file looks weirdly compressed. Can you have a look at it and tell me if you think it's possible to do the required changes...
https://dl.dropboxusercontent.com/u/6568643/AndroidManifest.xml
Cool it worked! Thanks a lot!
I had to add this intend as well to the other in order for my lockscreen app to detect it:
<intent-filter>
<action android:name="android.media.action.STILL_IMAGE_CAMERA"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
Related
Is there a way to change the order of the options under the SHARE button while viewing pictures? I don't use twitter or picasa or even Goggles to share pictures. I mostly use Dropbox and facebook and k-9 mail. Isn't there a way to move those options to the top and leave the others off or on the second page?
Thanks.
I've been researching this and what I've found out is:
Inside each App's APK is an AndroidManifest.xml that describes its intent to be in the SHARE menu.
That intent is managed by the system and so far that hasn't been any ability to modify the SHARE menu once it is populated.
The only moderate success has been by a few developers to modify the app's APK and edit the xml and then recompile the APK... very hit or miss depending on the app.
Therefore it is reasonable to say there is nothing yet available that can do this function... I'd like it also BTW.
blargh. :-(
Sent from my Dell Streak using XDA App
Could anyone point me to the directory on the Kindle Fire where the icons for the apps are stored, sideloaded apps have blurry icons, for example Worms, has a blurry icon, and I was wondering if I could replace it with this one: https://lh5.ggpht.com/SVGmuCTroV4NwMeZfsX-DfdhzTVdwp9PGGi3BHTrbEV04rDJLMBykdyRdNEo3hqXCA=w124
Found it, /data/app then open the apk with an archive viewer then res/drawable/icon.png
georgeos said:
Found it, /data/app then open the apk with an archive viewer then res/drawable/icon.png
Click to expand...
Click to collapse
Can you tell me wich viewer you have used for this. And maybe you have a source for some high resolution icons?
LilaLurch said:
Can you tell me wich viewer you have used for this. And maybe you have a source for some high resolution icons?
Click to expand...
Click to collapse
Just use 7-Zip
...mhhh it does´nt work in my case. I will try to change the icon from Real Racing 2 but it doesnt work.
LilaLurch said:
...mhhh it does´nt work in my case. I will try to change the icon from Real Racing 2 but it doesnt work.
Click to expand...
Click to collapse
Double check your compression settings. When replacing files I think it's supposed to be "Store" or "None". If it's anything other than that, I don't think it will work correctly. Someone please correct me if I am wrong.
I can´t find the location of the Icon and the apk file of Real Racing 2, so can somebody give me some hint in this case?
The same with some other Apps, where are the APK Files normaly located after the installation?
Which drawable directory
I'm also experiencing the blurry carousel images from a sideloaded app. But this is an app that I'm writing myself.
In my res/ directory, I have drawable, drawable-hdpi, drawable-mdpi, and drawable-ldpi.
I've tried putting a very high res image in drawable and drawable-hdpi for the carousel image, but I'm still getting a very blown up, really low res image being used on the Fire.
<application android:label="@string/app_name"
android:icon="@drawable/ic_launcher">
is what I'm using to specify...
Which image do I need to actually be making hi res to make this work?
Thanks!
Ninjamorph Pro (paid app on market by Stericson) is an awesome utility to use for this type of thing. You can unpack, modify (including image replacement), and repack any system or market apk from your device without the need for a computer. Works well on my CDMA shooter and KF (cm7). You may recieve an error message saying you have no SD Card when you first run the app. Just run again.
Sent from my PG86100 using xda premium
APK Icon Editor
Check out the free and open-source APK editor: APK Icon Editor.
You can easily change APK icons, particularly for Kindle Fire (there are profiles for these Amazon devices).
I have poked and prodded in all sorts of config files, but how is Google hiding the Camera Icon/App/Launcher? Yes, I know the camera is still technically there, and can be accessed with one of many apps in the Play Store. But how is it being hidden? Here are the things I have tried, with no success:
Used Gallery.apk from another device (Nexus 4). Right after reboot, camera app was there for a few seconds, then went away.
Looked in the build.prop file. Don't see anything.
In "/system/etc/media_profiles.xml", I added <!ATTLIST EncoderProfile cameraId (0) #REQUIRED> after line 27.
In "/system/etc/permissions/android.hardware.camera.autofocus.xml", I added <feature name="android.hardware.camera" /> and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
In "/system/etc/permissions/", I added a file called "android.hardware.camera.autofocus.xml" with <feature name="android.hardware.camera.any" />, <feature name="android.hardware.camera" />, and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
Is it hardcoded in the gallery.apk, like "if device=grouper, then hide camera"? Does anyone know how the camera icon is being hidden?
Forget about it. Just use the app from the play store and forget about it.
Sent from my Nexus 4 using Tapatalk 2
scream4cheese said:
Forget about it. Just use the app from the play store and forget about it.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
Clearly you did not read my post thoroughly.
Is there a rear-facing camera on your device? If not, GoogleGallery will disable camera app.
briankoko said:
Is there a rear-facing camera on your device? If not, GoogleGallery will disable camera app.
Click to expand...
Click to collapse
But how does it know that? Which config file is it looking at?
Sent from my Nexus 4 using Tapatalk 2
I'm guessing it's based on if the actual hardware is there. Noting to do with a configuration file.
That's just a guess though.
The Google shoppers app actually uses the camera and works
Sent from my HTC Raider X710e using xda app-developers app
rmkilc said:
I have poked and prodded in all sorts of config files, but how is Google hiding the Camera Icon/App/Launcher? Yes, I know the camera is still technically there, and can be accessed with one of many apps in the Play Store. But how is it being hidden? Here are the things I have tried, with no success:
Used Gallery.apk from another device (Nexus 4). Right after reboot, camera app was there for a few seconds, then went away.
Looked in the build.prop file. Don't see anything.
In "/system/etc/media_profiles.xml", I added <!ATTLIST EncoderProfile cameraId (0) #REQUIRED> after line 27.
In "/system/etc/permissions/android.hardware.camera.autofocus.xml", I added <feature name="android.hardware.camera" /> and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
In "/system/etc/permissions/", I added a file called "android.hardware.camera.autofocus.xml" with <feature name="android.hardware.camera.any" />, <feature name="android.hardware.camera" />, and <feature name="android.hardware.camera.autofocus" /> between the permissions tags.
Is it hardcoded in the gallery.apk, like "if device=grouper, then hide camera"? Does anyone know how the camera icon is being hidden?
Click to expand...
Click to collapse
Hi, rmkilc...
I'm going to go out on a huge speculative limb here (because I'm not a developer), but if I understand Android correctly, before we can directly interact with something in Android, it has to be defined as an 'Activity'...
http://developer.android.com/reference/android/app/Activity.html
http://www.mkyong.com/android/android-activity-from-one-screen-to-another-screen
---------------------
An 'activity', essentially, is just a 'window' through which we manipulate and use the app.
Many widgets (for example) don't have an 'activity'... they are just placed on the homescreen(s)... and cannot be opened directly from PlayStore once installed.
Such an example would be the Month Calendar Widget - http://play.google.com/store/apps/details?id=com.josegd.monthcalwidget&hl=en.
It cannot be opened directly as an app, in the way we would, say Angry Birds or Temple Run, because it has no defined 'activity'.
---------------------
Similarly, the camera, as a piece of hardware, has no software in the FACTORY/STOCK ROM that defines an 'activity' for it's use.
The MoDaCo Camera Launcher for Nexus 7 - http://play.google.com/store/apps/details?id=com.modaco.cameralauncher&hl=en accesses the camera via software that DOES define an 'activity' or 'window' through which we might interact with it.
---------------------
So, to conclude... and to summarise... And to answer your question...
It's not that the camera is hidden... it's just that there is no defined 'activity' via any app available in the FACTORY/STOCK ROM through which we might access it.
Rgrds,
Ged.
GedBlake said:
Hi, rmkilc...
I'm going to go out on a huge speculative limb here (because I'm not a developer), but if I understand Android correctly, before we can directly interact with something in Android, it has to be defined as an 'Activity'...
http://developer.android.com/reference/android/app/Activity.html
http://www.mkyong.com/android/android-activity-from-one-screen-to-another-screen
---------------------
An 'activity', essentially, is just a 'window' through which we manipulate and use the app.
Many widgets (for example) don't have an 'activity'... they are just placed on the homescreen(s)... and cannot be opened directly from PlayStore once installed.
Such an example would be the Month Calendar Widget - http://play.google.com/store/apps/details?id=com.josegd.monthcalwidget&hl=en.
It cannot be opened directly as an app, in the way we would, say Angry Birds or Temple Run, because it has no defined 'activity'.
---------------------
Similarly, the camera, as a piece of hardware, has no software in the FACTORY/STOCK ROM that defines an 'activity' for it's use.
The MoDaCo Camera Launcher for Nexus 7 - http://play.google.com/store/apps/details?id=com.modaco.cameralauncher&hl=en accesses the camera via software that DOES define an 'activity' or 'window' through which we might interact with it.
---------------------
So, to conclude... and to summarise... And to answer your question...
It's not that the camera is hidden... it's just that there is no defined 'activity' via any app available in the FACTORY/STOCK ROM through which we might access it.
Rgrds,
Ged.
Click to expand...
Click to collapse
Good points. The camera app or icon is part of the gallery (GalleryGoogle.apk on stock Android, Gallery2.apk on CM). Using the same gallery apk on a Nexus 4 and on a Nexus 7 results in the Nexus 4 showing the camera icon and the Nexus 7 not showing the camera icon. What I am trying to figure out is what part of the ROM is gallery looking at and deciding to hide the camera?
Code:
# am start -n com.google.android.gallery3d/com.android.camera.CameraActivity
seems to work, so it is certainly "in there" (the gallery app).
I suppose you could use baksmali to decompile /system/app/GalleryGoogle.{apk,odex} and poke around to find "why it is hidden".
there is something in there called
DisableCameraReceiver.smali
with a private method hasBackCamera() and (to the extent I understand .smali output) it disables the camera receiver based on whether or not the back camera is detected.
good luck
Hello. I'm working on a custom device that is not on the market yet, and I am having issues getting it to work with Google Play. I have root access, so I was able to sideload GooglePlay.apk and GoogleServicesFramework.apk. However, I am forced to use Market Helper in order to download apps. I would like to bake in compatibility to the ROM itself, but am having issues.
I've tried modifying the build.prop to have dummy values for ro.product.{model,device,manufacturer}, as well as ro.hardware and ro.com.google.clientidbase. I feel like I'm close, but the device still fails to be accepted by Play without marker helper.
Any hints or advice are tremendously appreciated!
Sorry, can't help you with the problem.
But I am really interested in your custom device. Could you please tell us more about it?
Cool.
For those who encounter a similar problem, I will post the answer. Credit to (xkcd: Wisdom of the Ancients) for the idea.
edit: the policy of not posting outside links is really annoying. All links have the base: http: slash slash developer dot android dotcom , just add the relevant url and glue it together.
Anyway, here goes. Turns out the build.prop was not the limiting factor.
Explanation of the overall process:
- Developers create an app, and list certain features it depends on in the manifest.xml file located in the root of the apk. ( /guide/topics/manifest/uses-feature-element.html)
- When the Play Store is opened, a call is made to getSystemAvailableFeatures()
- This call is handled by an internal app called PackageManager - (/reference/android/content/pm/PackageManager.html)
-This app looks in /system/etc/permissions and parses the xml files to determine what hardware and software features the phone has. it then sends this list back to the play store. - see( /guide/practices/compatibility.html) and ( /google/play/filters.html )
- The play store then filters the apps, as per the links above.
How to modify this:
- What I’ve done is taken the files from /system/etc/permissions on a galaxy S2 Skyrocket (my personal device), and copied in all of them, without overwriting the already existing files. Now, google play works and allows the download of the same subset of apps as on the Skyrocket.
For those wondering how to include these files at compile time, here is the answer:
http://forum.xda-developers.com/showthread.php?t=2356046
Hello,
I'm editing an app using APKGUI, mostly to modify the look to conform more to holo style. I would, however, like to modify it a little. It is a messaging app and i want to put pictures of those who sent the message next to the message (line in hangouts) but I can't get it to work by editing the XML. Is there any way to do this through APKGUI modifications or not?
Thanks.
Nickcu13 said:
Hello,
I'm editing an app using APKGUI, mostly to modify the look to conform more to holo style. I would, however, like to modify it a little. It is a messaging app and i want to put pictures of those who sent the message next to the message (line in hangouts) but I can't get it to work by editing the XML. Is there any way to do this through APKGUI modifications or not?
Thanks.
Click to expand...
Click to collapse
depends on the app but I would suspect not as you would need code to resolve from a content provider to then populate the item (ImageView) in the row. So that would be in the adapter code powering the listView in the app
deanwray said:
depends on the app but I would suspect not as you would need code to resolve from a content provider to then populate the item (ImageView) in the row. So that would be in the adapter code powering the listView in the app
Click to expand...
Click to collapse
is there any way to get into the code?
Nickcu13 said:
is there any way to get into the code?
Click to expand...
Click to collapse
yeah if it's not too obfuscated when decompiled and you know how to query a content provider and load images, maybe not doing said actions on the ui thread but on another thread.. use smart messenger instead when I'm done you will be able to create a UI to your own needs </shamelessplug>
deanwray said:
yeah if it's not too obfuscated when decompiled and you know how to query a content provider and load images, maybe not doing said actions on the ui thread but on another thread.. use smart messenger instead when I'm done you will be able to create a UI to your own needs </shamelessplug>
Click to expand...
Click to collapse
basically all i need to do is get to the coding of one section where the profile image is displayed, and copy the query into the new section. but i don't know how to do that or where to find it in the decompiled part. It's not a normal messaging app, it's more of a people discovery app with messaging haha.
Nickcu13 said:
basically all i need to do is get to the coding of one section where the profile image is displayed, and copy the query into the new section. but i don't know how to do that or where to find it in the decompiled part. It's not a normal messaging app, it's more of a people discovery app with messaging haha.
Click to expand...
Click to collapse
it is not really a copy paste and work job Or that would be like, 0.0001% probability of working
deanwray said:
it is not really a copy paste and work job Or that would be like, 0.0001% probability of working
Click to expand...
Click to collapse
and why is that?
Nickcu13 said:
and why is that?
Click to expand...
Click to collapse
cause you would possibly need the following, get the contact id from the row from xxx variable/data, construct the now unique uri to pass to a content resolver to lookup the image uri and or path, then get an instance of the row imageView (or whatever view was going to hold the image) then pass that to a loader/async/new thread along with the uri for that then to load in the background, then check that when loaded the imageView instance is still the same (due to the way android recycles views) before setting it back on the main ui thread.
So a recap on the variable/s
imageView
contact id source (of that row)
the instance and data tracking in a thread
so these things are not something you can find in one app or even from the same app and "paste" into another section.
hope that, well, makes enough sense to know it's not a copy paste thing
deanwray said:
cause you would possibly need the following, get the contact id from the row from xxx variable/data, construct the now unique uri to pass to a content resolver to lookup the image uri and or path, then get an instance of the row imageView (or whatever view was going to hold the image) then pass that to a loader/async/new thread along with the uri for that then to load in the background, then check that when loaded the imageView instance is still the same (due to the way android recycles views) before setting it back on the main ui thread.
So a recap on the variable/s
imageView
contact id source (of that row)
the instance and data tracking in a thread
so these things are not something you can find in one app or even from the same app and "paste" into another section.
hope that, well, makes enough sense to know it's not a copy paste thing
Click to expand...
Click to collapse
so if it does all that once, all i need to to is copy and paste it, then change the variables to be unique.
Nickcu13 said:
so if it does all that once, all i need to to is copy and paste it, then change the variables to be unique.
Click to expand...
Click to collapse
well no, each one of those happens for every row, also you would have to "find" the data and instances to make it happen. example would be simply finding the resource ident (integer) for the imageView and grabbing an instance of it. findViewById(R.id.someIDofImageView) but then to avoid constant findViewById lookups on recycled views you would use a viewholder pattern, that then you would create a new object class that would hold this (cause lookups for the same ident on the same row many times when scrolling would not be great)... and more stuff, and thats just for the imageView instance part... clearer ?
I guess my point would be it's more involved that you perhaps think it is. Specially if you know little or no android/java
deanwray said:
I guess my point would be it's more involved that you perhaps think it is. Specially if you know little or no android/java
Click to expand...
Click to collapse
Another thing not to forget is the APK signature. If you unpack, edit and repack an APK you must sign it, othewise the installation will fail.