[idea][q] Long press on search button results? - Android Q&A, Help & Troubleshooting

I have an idea for an app that extends the default google search.
When you press the search button and search for a contact or app, each result will be long pressable so that you can drag the result to your desktop as a shortcut.
This will be a nice and easy way to create shortcuts to apps/contacts rather than finding them in the drawer/contact list.
Has this already been done ? Since CM7 allows the search target app to be customizable it seems do-able.

There are two things you can do with the Search button:
1. Open an internal search for your App data when you App is running and on top
2. Run your App when you long press the search button at any moment even when you are on other apps.
For the first option see the links:
http://developer.android.com/resources/articles/qsb.html
http://developer.android.com/resources/samples/SearchableDictionary/index.html
For the second option, which I understand that is what you wanted to do, you have to add to your Androidmanifest.xml the following intent filter:
Code:
<intent-filter>
<action android:name="android.intent.action.SEARCH_LONG_PRESS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Independently to these two options, another thing you may be interested in, is to add your App data to the global search (quick search box), like a dictionary App would do:
Code:
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/search_label"
android:searchSettingsDescription="@string/settings_description"
android:includeInGlobalSearch="true"
android:searchSuggestAuthority="dictionary"
android:searchSuggestIntentAction="android.intent.action.VIEW">
</searchable>

Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

mminbcn said:
There are two things you can do with the Search button:
1. Open an internal search for your App data when you App is running and on top
2. Run your App when you long press the search button at any moment even when you are on other apps.
For the first option see the links:
http://developer.android.com/resources/articles/qsb.html
http://developer.android.com/resources/samples/SearchableDictionary/index.html
For the second option, which I understand that is what you wanted to do, you have to add to your Androidmanifest.xml the following intent filter:
Code:
<intent-filter>
<action android:name="android.intent.action.SEARCH_LONG_PRESS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Independently to these two options, another thing you may be interested in, is to add your App data to the global search (quick search box), like a dictionary App would do:
Code:
<searchable xmlns:android="http://schemas.android.com/apk/res/android"
android:label="@string/search_label"
android:searchSettingsDescription="@string/settings_description"
android:includeInGlobalSearch="true"
android:searchSuggestAuthority="dictionary"
android:searchSuggestIntentAction="android.intent.action.VIEW">
</searchable>
Click to expand...
Click to collapse
Thanks, it indeed is the quick search i'm talking about.
I believe that most apps are searchable by default by their names.
I want to add long press functionality to the search results so I can add a shortcut directly from the search results instead of scrolling though the app-drawer looking for the app and then creating a shortcut.
I think this would be a good time saver.

Related

[HOWTO] Modify apps to not go fullscreen and hide the notification bar

this isn't a problem for those who are using a softkey app, but i wanted to see if i could hack the facebook app into not going fullscreen when viewing photos. i don't think it's legal for me to post my modified facebook apk (comments?), so here are some brief instructions for anyone interested. this technique should work for other apps too. please post if you have success with other apps.
1) use apktool to unpack your existing facebook apk
2) edit AndroidManifest.xml and change this line
Code:
<activity android:theme="@style/Theme.FacebookDark" android:name=".ViewPhotoActivity" />
to this
Code:
<activity android:theme="@android:style/Theme.Panel" android:name=".ViewPhotoActivity" />
3) rebuild the facebook apk with apktool
4) sign the apk using jarsigner and your own key
5) uninstall facebook and install the modified apk
if these instructions aren't detailed enough for you, then sorry but you probably shouldn't be messing around with stuff like this
Hey, thanks for tutorial. That's much better then just posting a link to a download. I'm not a Facebook user but I will try that on other apps.
gedster314 said:
Hey, thanks for tutorial. That's much better then just posting a link to a download. I'm not a Facebook user but I will try that on other apps.
Click to expand...
Click to collapse
ok, but note that Theme.Panel might not necessarily be the right theme for every situation. also, you only need to change the theme on activities that are full screen. you can find out the name of an activity by watching DDMS as you use the app. good luck.
Would it be possible to apply this technique to completely disable the notification bar system wide?
Benjyp said:
Would it be possible to apply this technique to completely disable the notification bar system wide?
Click to expand...
Click to collapse
No, this is app-specific... Coming from a completely different place.
I was afraid you would say that, thanks anyway! Your guides are a godsend!

[Q] Getting Custom Lockscreen to load on boot

Edit: Just realized I posted this in the wrong forum, mods please feel free to move it to the General forum...my bad.
Hey guys,
So maybe somewhere here has an answer for this problem I'm having. I downloaded a custom lockscreen app (Simply Lockscreen), and it works great except for one major flaw: Upon booting/rebooting the phone, the lockscreen defaults to the system HTC Sense lockscreen. Now, as soon as I launch the app from the app drawer, the Sense lockscreen goes away and Simply Lockscreen loads up evey time just fine. But whenever I turn off the phone and reboot, the Sense lockscreen returns and I can't use the custom lockscreen until I manually launch it from the App drawer.
I downloaded System Tuner Pro and tried a few different things, including making sure Simply Lockscreen was marked as a "startup app" (which it was), disabling HTC Lockscreen as a startup app, disabling Rosie as a startup app, and finally (after none of the previous actions helped), uninstalling the HTC Lockscreen system app entirely. Unfortunately, after I did this, rather than Simpy Lockscreen popping up after boot, all I got was the Android default lockscreen (which I didn't even know existed on my phone but was apparently buried under Sense).
My question is, is there anything else I can do that may get my Simply Lockscreen custom lockscreen app to load on boot as the default lockscreen? Or is this 'simply' an app-related issue that only the developer can solve? I'm beginning to think it is, as I've downloaded and used other custom lockscreen apps in the past which have loaded up fine upon reboot (namely Go Locker). The only reason I'd like to stay with Simply Lockscreen is because of the really cool Honeycomb theme it has and the sheer number of features it allows you to enable on the lockscreen.
Before you ask, I'm running XBoarder's BulletProof v2.5 with Faux's latest kernel.
Thanks in advance for any advice!
Issue resolved. Found the bit of code i needed HERE
in AndroidManifest.xml (application-part):
<receiver android:enabled="true" android:name=".BootUpReceiver"
androidermission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
[..]
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
[..]
public class BootUpReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context, MyActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
Click to expand...
Click to collapse
Bling_Diggity said:
Edit: Just realized I posted this in the wrong forum, mods please feel free to move it to the General forum...my bad.
Click to expand...
Click to collapse
Done.
are you letting your device load completely before using it? i say that because the default lockscreen will always show up on boot until the replacement loads. i use mi locker and it doesnt show the replacement screen immediately, but wait a minute or so and it should load

[Q] Add-On App - Remove / Hide Launcher Icon WITHOUT Removing Category Launcher?

Hi,
I have an add-on / non-stand-alone app that I do not want an app icon to be created for. It is not meant to be run separately, since it is an add-on, but I would like it to show instructions on how to actually use it if someone does run it upon downloading from Google Play.
I have searched around, and kept finding people instructing others to remove
<category android:name="android.intent.category.LAUNCHER" />
I do not want to do this, as not only does it appear to cause the app to not function correctly, but it also prevents people from still having the option to run which would display instructions for use. I have seen others do this same thing I am seeking to do, and been able to look at their manifests: they look basically identical to mine, containing the launcher category, and I have verified that no launcher icon is present, checking directly after the install.
Thanks for your help.

CellBroadcast Receiver for CM 10 with Menu in Settings

Hi there !!
This is called CellBroadcast Receiver. no doubt everyone having a phone knows what it is... its real time update receiver from your network. and in a emergency situation its the most reliable and fasted method than regular SMS.
Everyone might not like this one. for some it will be useless. but for some it will be handy. all depend of the geographical location where you live and the network you use. so if it's useless to you then bye and have a nice day
ok for those who likes it this is for you . i have seen this in JB 4.2 Rom but never in 4.1 .
there are 3 options for you to have this app.
1. move app to system/app and use it - you will not get a menu but once u receives a notification then u can select the Settings options.
2. u can move app as well as Settings app . - you will have a menu in your settings under Wireless and Network
3. u can follow the tutorial in Post #2 and add it to your Settings menu. this way u can add it either on a main menu or in a sub menu
CellBroadcastReceiver app
Settings app with Cell broadcast menu
Hope you will like it
like to thank @Ticklefish for his wonderful tool @saqib nazm @Diaz1999 for there tutorials about how to add expended settings and tips
ok lets do the tutorial..............
things u need
1. Settings app from your ROM zip. ( system/app)
2. tool can be used to decompile and recompile . My recommendation TickleMyAndroid by @Ticklefish
3 Notepad +
============================================================================
1 Decompile Settings app
2 go to res\xml\settings_headers
3 find
<header android:icon="@drawable/ic_settings_data_usage" android:id="@id/data_usage_settings" android:title="@string/data_usage_summary_title" android:fragment="com.android.settings.DataUsageSummary" />
Click to expand...
Click to collapse
4 add
<header android:icon="@drawable/ic_settings_cell" android:id="@id/cell_settings" android:title="@string/cell_settings_title">
<intent android:targetPackage="com.android.cellbroadcastreceiver" android:action="android.intent.action.MAIN" android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastListActivity" />
</header>
Click to expand...
Click to collapse
5 so it will look like this
<header android:icon="@drawable/ic_settings_data_usage" android:id="@id/data_usage_settings" android:title="@string/data_usage_summary_title" android:fragment="com.android.settings.DataUsageSummary" />
<header android:icon="@drawable/ic_settings_cell" android:id="@id/cell_settings" android:title="@string/cell_settings_title">
<intent android:targetPackage="com.android.cellbroadcastreceiver" android:action="android.intent.action.MAIN" android:targetClass="com.android.cellbroadcastreceiver.CellBroadcastListActivity" />
</header>
Click to expand...
Click to collapse
6. save
Go to Res\values\ids.xml
1 find
<item type="id" name="wireless_settings">false</item>
Click to expand...
Click to collapse
2 add
<item type="id" name="cell_settings">false</item>
Click to expand...
Click to collapse
3 so it will look like this
<item type="id" name="wireless_settings">false</item>
<item type="id" name="cell_settings">false</item>
Click to expand...
Click to collapse
4 save
Go to res\valus\strings.xml
1 . find
string name="status_wifi_mac_address">Wi-Fi MAC address</string>
Click to expand...
Click to collapse
2 add
<string name="cell_settings_title">CellBroadcast Receiver</string>
Click to expand...
Click to collapse
3 so it will be look like this
<string name="status_wifi_mac_address">Wi-Fi MAC address</string>
<string name="cell_settings_title">CellBroadcast Receiver</string>
Click to expand...
Click to collapse
4 Save
download this png and copy to res\drawable-hdpi folder
ok now recompile and move to system/app . no need to reboot as soon as u set correct permissions ( RW-R-R) settings will be displayed with the changes you have made
NOTE- above was based on my settings app where i prefer cellbroadcast menu in a main menu as shown in the pictures. if u like u can set the menu under some sub menu . eg- inside More in wireless and network menu.
this is mine too
cool, bro! nice contribution!!! (with TuT & all )
but just for interest can u tell me a example for practical use of cellbroadcastreciver-messages, as my friend also asked i never had to do with this app ???
bejunk said:
cool, bro! nice contribution!!! (with TuT & all )
but just for interest can u tell me a example for practical use of cellbroadcastreciver-messages, as my friend also asked i never had to do with this app ???
Click to expand...
Click to collapse
thanks bro well in some network operators send alerts to mobile which is cell broadcast messages. for eg. warning messages/ news and weather alerts / location info etc. it really matters where you live and the network operator u use. as i know its very much in Use in United States. if u go through the 2nd picture u can see type of messages it receives. and Cell broadcast is real when it comes to SMS based alert system cos you maybe knowing in an emergency situation most networks SMS and voice get jammed.
but all depend of the network. in my country i get only location names as broadcast messages. meaning when i travel i receive name of the place by this app. LOL and 95 % it can be described as a useless feature but then again for some people its real value feature
give it a try and see what u get from ur phone operator

QSlide for any app?

Is it possible to make any app a QSlide app either with or without a rooted device?
Good question. Would like to know this too. Same with dual window. Not all apps can be used with that either. Good thing itll be a native feature with android n.
TheJOJ said:
Is it possible to make any app a QSlide app either with or without a rooted device?
Click to expand...
Click to collapse
Needs something like this added to its manifest
Permission to overdraw added to it
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
It needs to be made selectable within qslide
<application android:theme="null" android:label="App name" android:icon="app's data path to its icon.png"
Then made viewable in the launcher
<uses-library android:name="com.lge.app.floating" android:required="false" />
<activity android:label="App name" android:name="App name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
No simple drag n drop method can add apps to qslide but possibly a batch editor could be made one day to pull it off on the fly...one day.

Categories

Resources