[Q] Where is default app info kept? - Nook Touch General

When I go to view a video from a webpage or a news app I am always presented with a list of potential players (some of which I don't even have). I check the little box at the bottom of the list that says "always use this" or whatever, and then select RockPlayer. It all works fine but the Nook doesn't seem to remember this choice. It asks each time. Very annoying.
Does anyone know where this default app information is stored? A database file I could look at perhaps? Maybe something is not being set properly. I've made other default selections for other situations and they seem to take. Or maybe it's a RockPlayer issue?

<preferred-activities> inside /data/system/packages.xml

Always in the last place I look
So... this is what is there, but it's repeated over and over (and over--like for every time I've done it):
Code:
<preferred-activities>
<item name="com.redirectin.rockplayer.android.unified/com.redirectin.rockplayer.android.OpenRockPlayerActivity" match="600000" set="5">
<set name="com.estrongs.android.pop/.app.BrowserDownloaderActivity" />
<set name="com.estrongs.android.pop/.app.PopVideoPlayerProxyActivity" />
<set name="com.opera.browser/com.opera.Opera" />
<set name="com.alensw.PicFolder/.StreamingActivity" />
<set name="com.redirectin.rockplayer.android.unified/com.redirectin.rockplayer.android.OpenRockPlayerActivity" />
<filter>
<action name="android.intent.action.VIEW" />
<cat name="android.intent.category.DEFAULT" />
<type name="video/mp4" />
</filter>
</item>
I don't see the BBC News app mentioned in a similar vein, but it behaves in exactly the same way. Nothing in the code above jumps out at me as a novice, but the fact that there are many, many entries in the file all the same does not seem good.
Ideas?

Well, the easiest solution is to just gut the preferred-activities:
Code:
<preferred-activities>
</preferred-activities>
Your Nook may ask you once about a few intents, but that should be it.
It's possible that packages.xml got corrupted.
Also, depending on how a file gets opened there may be different filters for mimetype vs. path filters.
If you are still having problems, narrow it down to exactly how you are trying to open the file.
Use logcat and see what intent generates the picker dialog.

Related

RSS Hub Stories Number in registry?

Anyone know if its possible to pull the number of unread stories in rss hub from the registry?
Im working on modding a battery status skin to my own needs, replacing the mms icon and counter with an rss icon and counter, just cant find out how i can pull this in.
Rss hub has a today screen plugin (which is a bit ugly) but id assume it stores it in the reg somewhere.
Any help would be great.
Not to worry, just found it at HKCU\Software\Ilium Software\Rss Hub\NewsItemsCount
however my mod just seems to break it, anyone here good with batterystatus?
Original xml file.
<Item class="registry_tracker" ontap="InboxMms">
<image src="MMS%d.png" left="0" />
<label text="%d" suppress0="1" fontsize="+3" bold="1" color="ffffff" left="-28" width="30" align="center">
<registry key_value="HKCU\System\State\Messages\mms\Unread\Count" />
</label>
</Item>
Click to expand...
Click to collapse
and then my version
<Item class="registry_tracker" ontap="InboxMms">
<image src="rss%d.png" left="0" />
<label text="%d" suppress0="1" fontsize="+3" bold="1" color="ffffff" left="-28" width="30" align="center">
<registry key_value="HKCU\Software\Ilium Software\RSS Hub\NewsItemsCount" />
</label>
</Item>
Click to expand...
Click to collapse
i have created the relevant rss0 and rss-1 graphics same as the mms but when i load my version of the mod that icon or where the mms icon would be is gone completely and the two other icons get shunted to the left in its place, but it does seem to be there because if i click to the right of the first icon it loads the "inboxmms" which i havent changed yet, that will ultimately need to be linked to rsshub.
Hope all this makes sense.
There's a BS dedicated thread here.

[Q] App Chooser not being shown when google browser is the default

I've seen a few other similar threads, but none that both matched my problem and had answers, so sorry if this retreads familiar ground.
I've got a browser and I'm trying to catch the same intents as the google browser. I've even gone so far as to copy and paste them directly from Froyo's browser. They are listed down below for reference. However, when I try to send an intent to create the chooser so the user can select my browser as the default it does not always appear. Here is the code for creating the intent (url-i-want-to-open is an actual url in the code, but I can't post it because I'm a new user):
Code:
Intent anIntent = new Intent("android.intent.action.VIEW",
"url-i-want-to-open");
anIntent.addCategory(Intent.CATEGORY_BROWSABLE);
startActivity(anIntent);
and the logcat output:
Code:
08-26 14:53:25.698: INFO/ActivityManager(85): Starting activity: Intent {
act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE]
dat=url-i-want-to-open cmp=com.android.browser/.BrowserActivity }
For some reason the intent is automatically resolving to Google's browser unless one of the following is true:
1) I've cleared the defaults from the google browser via application settings,
2) I've installed a third browser, or even just a HelloWorld app with the intent-filters listed below, or
3) I'm running on a platform earlier than 2.2
What is really confusing is #2. It doesn't matter what that third app is. I've used a default hello world with just the first intent-filter and that's enough to trigger something behind the scenes that tells Google it's no longer the only default browser. However, it's not enough in my own app, and the only differences in the two manifests are that mine has a sharedUserId, a couple of extra activities (none of which have intent-filters) and permissions (none of which have anything to do with browsing, in fact HelloWorld doesn't have any permissions at all).
The program flow is: user opens browser, it sees that it's not fully installed and opens another activity, that activity does some stuff (none of which deals with intents) and then checks to see if my browser is the default, if not it fires off the aforementioned intent to create the chooser so the user can set the default.
When I reverse the process (install my app first, then HelloWorld) and have a button in HelloWorld that calls startActivity, the same thing happens: HelloWorld cannot show the chooser unless I've already installed a third app.
Is there a change in froyo that would cause an application to not be able to use startActivity with a generic intent that matches to its own package? Or some other change to the way activities are resolved or installed that broke the way preferred activities are defined? I know that the PackageManager preferred activity functions have changed, but I'm not using them at all.
----- the intent-filters -----
Code:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="about" />
<data android:scheme="javascript" />
</intent-filter>
<!-- For these schemes where any of these particular MIME types
have been supplied, we are a good candidate. -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
<data android:scheme="https" />
<data android:scheme="inline" />
<data android:mimeType="text/html"/>
<data android:mimeType="text/plain"/>
<data android:mimeType="application/xhtml+xml"/>
<data android:mimeType="application/vnd.wap.xhtml+xml"/>
</intent-filter>
<!-- We are also the main entry point of the browser. -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
followup: It seems that the OS is remembering preference orders in between installations. So if they ever chose the google browser over mine, the OS will always choose the google browser over mine until either:
1) the google browser's defaults are cleared, or
2) another application is installed that listens to those intents, resetting the need for a chooser

[Q] Home-replacement help

I understand that home-replacement apps are a little (a lot) different than regular app. How exactly would I go about binding (if that's the right word) a view() to the home. When the home button is pressed, I want my home-replacement to be in the list. How would I do that? What specific property or activity() would allow me to do that? Thanks in advance
Code:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
In the android manifest for your specific activity
Thanks
Thank you so much If you would like to know what I'm working on, you can visit my site at futurinnovations.blogspot.com. I would like all the help I can get.
Now that I can bind a gridView to the home, I need to know how to launch applications from that gridView. The gridView is made up of all the application icons, but I don't know how to make it to where the applications are waiting behind their icons. Oh, and can someone help me with making a free-form surface to place applications on that can be freely dragged and dropped? I have attempted to get the code from the example "Making Sense of Multitouch" from the Google Dev Blog to work. I enter in the code (not copy and paste, since I have my own variables and such) exactly like they do, run the application, and all I get is a blank screen. What am I doing wrong?
Sounds to me like you aren't inflating the XML
Sent from my ADR6300 using XDA App
Ummmm...it doesn't have an xml. I'm pretty sure that it is dynamically created. What would I put in the default xml? and how would I inflate it?

[Q] Stock Messaging App - MMS Picture Size Limit?

Okay, personal preference - I'm happy with the stock messaging app on the Razr M. I have a few friends I trade pics with when we work on our cars. I used ChompSMS on my old phone and never had a problem, but now my friends are complaining that they can't save pictures on their phones (non android) I think because they are coming in too large when sent through the stock messaging app.
I did a test sending the same pic using Chomp and then using stock app. Chomp is set to a send size limit of 300kb. I sent a pic to my email address and when I saved it and checked it's properties, it was 230Kb. There is no similar setting in the stock app, however I did the same send and the saved pic turned out to be 1,0003Kb in size.
Anyhow, I decompiled the messaging apk and found these lines in the default_settings_values.xml file:
Code:
<setting type="integer" name="MmsRMMaximumMessageSize" value="307200" />
<setting type="integer" name="MmsRMMaxImageWidth" value="1600" />
<setting type="integer" name="MmsRMMaxImageHeight" value="1200" />
<setting type="integer" name="MmsSlideshowMaxImageWidth" value="1024" />
<setting type="integer" name="MmsSlideshowMaxImageHeight" value="728" />
I'm not sure what statement is controlling the image/message size. The image properties of my test pic through the stock app is 1836 x 3264 x 24 JPEG and 1,0003Kb - larger than what I think it should be based on the setting values. I would think that the MmsRMMaximumMessageSize of 307200 would be kilobytes. Maybe there should be a "0" in front of the 3? Or is it possible that these settings are being overridden elsewhere?
HemRoyd said:
Okay, personal preference - I'm happy with the stock messaging app on the Razr M. I have a few friends I trade pics with when we work on our cars. I used ChompSMS on my old phone and never had a problem, but now my friends are complaining that they can't save pictures on their phones (non android) I think because they are coming in too large when sent through the stock messaging app.
I did a test sending the same pic using Chomp and then using stock app. Chomp is set to a send size limit of 300kb. I sent a pic to my email address and when I saved it and checked it's properties, it was 230Kb. There is no similar setting in the stock app, however I did the same send and the saved pic turned out to be 1,0003Kb in size.
Anyhow, I decompiled the messaging apk and found these lines in the default_settings_values.xml file:
Code:
<setting type="integer" name="MmsRMMaximumMessageSize" value="307200" />
<setting type="integer" name="MmsRMMaxImageWidth" value="1600" />
<setting type="integer" name="MmsRMMaxImageHeight" value="1200" />
<setting type="integer" name="MmsSlideshowMaxImageWidth" value="1024" />
<setting type="integer" name="MmsSlideshowMaxImageHeight" value="728" />
I'm not sure what statement is controlling the image/message size. The image properties of my test pic through the stock app is 1836 x 3264 x 24 JPEG and 1,0003Kb - larger than what I think it should be based on the setting values. I would think that the MmsRMMaximumMessageSize of 307200 would be kilobytes. Maybe there should be a "0" in front of the 3? Or is it possible that these settings are being overridden elsewhere?
Click to expand...
Click to collapse
try MessageMe app. it also allows folks to draw/edit pics that are sent to them.
Resolved!
OK, so I was able to force the message size limit to 300Kb by opening messaging.apk in Virtual Ten Studio and editing res\xml\verizon_overlay.xml with the following line changes:
Code:
<setting type="integer" name="mms_maximum_message_size" value="307200" />
<setting type="integer" name="MmsMaxPictureSizeForRetry" value="307200" />
The original values were as follows:
Code:
<setting type="integer" name="mms_maximum_message_size" value="1228800" />
<setting type="integer" name="MmsMaxPictureSizeForRetry" value="512000" />
I also cleared app cache and data after pushing the apk to my phone, followed by a reboot. My picture message size is now compatible with my friend's phones and I think the size limit is plenty for casual pic sharing. Anything larger can be sent via email or cloud storage link as far as I'm concerned.

How to develop an App for Tablets?

Hey XDA-Developers!
I have a big problem with my app, Google Play says that isn't developed for Tablet, I try all, but I don't find the issue. This is my Manifest.xml:
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.advanced.rootchecker"
android:versionCode="16"
android:versionName="1.5.4" >
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="18" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true"
android:resizeable="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.INTERNET" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_COURSE_LOCATION" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" android:required="false"/>
<application
android:icon="@drawable/ic_launcher"
android:theme="@style/Theme.Sherlock"
android:label="@string/app_name" >
<activity
android:label="@string/appname"
android:name=".MainActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:label="@string/appname"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:name=".RootCheckerActivity" >
</activity>
<activity
android:label="@string/appname"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:name=".BusyboxCheckerActivity" >
</activity>
<activity
android:label="@string/appname"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:name=".RootDefinitionActivity" >
</activity>
<activity
android:label="@string/acercade"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:name=".AcercaDe" >
</activity>
<activity
android:label="@string/appname"
android:name=".FAQsActivity" >
</activity>
<activity
android:label="@string/appname"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:name=".BusyboxDefinitionActivity" >
</activity>
<activity
android:name="com.adsdk.sdk.banner.InAppWebView"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="com.adsdk.sdk.video.RichMediaActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:hardwareAccelerated="false" />
<activity
android:name="com.adsdk.sdk.mraid.MraidActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
</application>
</manifest>
Exactly, it says that is developed for more or less 3000 phone models. It isn't developed for Tablets but it works in Nexus 7 and Nexus 10.
This is the application:
https://play.google.com/store/apps/details?id=com.advanced.rootchecker&hl=es
I hope that you can help me. THANKS!
Ah, now I got your question.
It doesn't mean that those users can't install it. It just means that it's not optimized for tablets. They will introduce a new tablet-specific section where apps which are optimized for tablets will be shown.
Read this: http://android-developers.blogspot.ca/2013/10/more-visibility-for-tablet-apps-in.html
And this: http://developer.android.com/distribute/googleplay/quality/tablet.html
Here you can find the tablet section: https://play.google.com/store/apps/collection/tablet_featured
In Play developer console, take a look at the optimisation tips tab on the bottom, they are telling you there what you need to do. I think you need to add at least one 10 inch tablet Screenshot but it might be that the Play Team has to review your app...
Thank's!!
Enviado desde mi Galaxy Mini Plus 4G usando Tapatalk 2
Did you ever work it out? My game also says that and from what I can read, I think it may be because my game art is all in a folder called "drawable" as it is the same at all resolutions.
Maybe I just need to add some other drawable-hdpi folders with the game icons in them to resolve it. Not sure but was hoping someone else may know, you may have solved it or that my info may help anyone else as this is what I intend to try next update (hopefully later this week).
Burkey said:
Did you ever work it out? My game also says that and from what I can read, I think it may be because my game art is all in a folder called "drawable" as it is the same at all resolutions.
Maybe I just need to add some other drawable-hdpi folders with the game icons in them to resolve it. Not sure but was hoping someone else may know, you may have solved it or that my info may help anyone else as this is what I intend to try next update (hopefully later this week).
Click to expand...
Click to collapse
Have a look at this link: http://developer.android.com/distribute/googleplay/quality/tablet.html
nikwen said:
Have a look at this link: http://developer.android.com/distribute/googleplay/quality/tablet.html
Click to expand...
Click to collapse
Thanks @nikwen, I have read that but it appears a little ambiguous to me. Basically I would want to keep all my game textures in "drawable" for all resolutions and maybe put icon's for home screens in the various resolution specific folders. The article "appears" to just generalise making me wonder if my textures must be there too.. and therefore replicated. I would imagine not but have not tested it myself.
Just thought I would throw it out if anyone else done it this way and if it got past the "tablet optimisation" tip in the publishers control panel.
Burkey said:
Thanks @nikwen, I have read that but it appears a little ambiguous to me. Basically I would want to keep all my game textures in "drawable" for all resolutions and maybe put icon's for home screens in the various resolution specific folders. The article "appears" to just generalise making me wonder if my textures must be there too.. and therefore replicated. I would imagine not but have not tested it myself.
Just thought I would throw it out if anyone else done it this way and if it got past the "tablet optimisation" tip in the publishers control panel.
Click to expand...
Click to collapse
Maybe contact one at Google for that question?
Burkey said:
Thanks @nikwen, I have read that but it appears a little ambiguous to me. Basically I would want to keep all my game textures in "drawable" for all resolutions and maybe put icon's for home screens in the various resolution specific folders. The article "appears" to just generalise making me wonder if my textures must be there too.. and therefore replicated. I would imagine not but have not tested it myself.
Just thought I would throw it out if anyone else done it this way and if it got past the "tablet optimisation" tip in the publishers control panel.
Click to expand...
Click to collapse
You need to add a 7 inch and 10 inch screenshot to make it available for devices with those screen sizes.

Categories

Resources