[Q] Getting Custom Lockscreen to load on boot - HTC Amaze 4G

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

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!

[idea][q] Long press on search button results?

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.

[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.

[Q][Theming] How fix dark text on dark background Dialog on Gingerbread?

Hi!
I've got the following problem:
I'm on JellyBlast 3 (Gingerbread, I guess) with my Galaxy Y and I'm a little unhappy with the theme that comes with JellyBlast. I have fixed some issues but I cannot figure out how to avoid black text on dark background in Alert Dialogs. This issue makes some dialogs of the hololauncher and some other apps completely ureadable if you do not turn the screen to full brightness (what I normally don't do).
I'm not quite sure, if this is possible at all...
What I've found out so far:
In the Gingerbread source the Theme for the the Alert Dialog is hard coded:
Code:
protected AlertDialog(Context context) {
this(context, com.android.internal.R.style.Theme_Dialog_Alert);
}
I'm not yet allowed to post external links... I found the above on github in the gingerbread branch in platform_frameworks_base -> core -> java -> android -> app -> AlertDialog.java
The hololauncher uses the AlertDialog.Builder class to create the Dialogs and it uses a TextView Widget to display the text. The layout looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<TextView android:textAppearance="?android:textAppearanceLargeInverse" android:gravity="center_vertical" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight" android:drawablePadding="14.0dip" />
Here you see, that the textAppearanceLargeInverse definition of the theme is used as text color. And the theme should always be "Theme.Dialog.Alert" since this is hardcoded.
I assume that com.android.internal.R.style.Theme_Dialog_Alert refers to the Theme.Dialog.Alert styledefinition in the ROMs framework-res.apk. So I added the following line to the styles.xml in framework-res.apk -> values/styles.xml inside Theme.Dialog.Alert:
Code:
<item name="textAppearanceLargeInverse">@style/TextAppearance.Large</item>
I hoped that this would overwrite the definition of textAppearanceLargeInverse for the AlertDialog so that I will not use the inherited definition of the dark theme. The color that's referenced by @style/TextAppearance.Large is (contrary to ...Large.Inverse) is #FFFFFFFF or at least close to it.
Unfortunately this does not work and I do not understand why. I got that far to figure all this stuff out and my phone seems little impressed by my effort. It still displays dark text on dark background.
The other changes I made took effect so I do not think that I'm doing something basically wrong. Can anyone help me with that?
Kanalpiroge said:
Hi!
I
Click to expand...
Click to collapse
try this one Guide

[Q] How can I change the layout for a widget in runtime?

Hi, I have a widget that I want to use as lockscreen as well ( since android 4.2+ allows it), so I need to change the layout when the widget is on the lock screen and when is on the regular screen, how can i do it? I tried to use the Intent ACTION_USER_PRESENT but my BroadcastReceiver never gets it. I have it defined in the manifest as well:
PHP:
<receiver
android:name="com.myApp.myApp.MyWidgetIntentReceiver"
android:exported="false"
android:label="widgetBroadcastReceiver" >
<intent-filter>
<action android:name="android.intent.action.USER_PRESENT" >
</action>
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/demo_widget_provider" />
</receiver>
public class MyWidgetIntentReceiver extends BroadcastReceiver{
public void onReceive(Context context, Intent intent) {
if(intent.getAction().equals(Intent.ACTION_USER_PRESENT){
Log.i("TICK", intent.getAction());
}
}
}
Is there any other way that I can check when the widget is in the lock screen or not? I tried this guide as well:
http://developer.android.com/guide/topics/appwidgets/index.html#lockscreen
But how do I check that every time that I lock/unlock the screen?
Thanks!
EDIT: I ended up using Intent.ACTION_USER_PRESENT to check when the screen is unlocked, Thanks!

Categories

Resources