FB Messenger Battery Save - Tasker Tips & Tricks

Hey everyone,
So, FB blocked the messaging functionality on their mobile web page to force people to use the Messenger app.
I want to have Tasker completely kill the app when the device is not connected to the Internet and restart it when it connects again.
I know how to kill the app but I don't know how to restart it without it opening (basically, I want it to restart in the background).
I was thinking about intents or some shell command (am ?).
I have root & busybox.
EDIT: Not tested Tasker profile attached.

you need to , ectract this damn app like zip, after extract, you need to open the AndroidManifest.xml from the extracted folder, useing the RootExplorer.apk (this haves a text editor). Inside the AndroidManifest.xml, you will find the packagename, com.xxx.sss.etc, a list of the all activities are inside the tag <activity> on where you hcave to identify the initial activity that starts the app. For example, i took rootexplorer: i found the packagename: com.speedsoftware.rootexplorer, but is missing the MAIN component tagged in RootExplorer Activity, so, conclusing, by using the terminal emulator, or script executor builted in rootexplorer app or SManager i will type:
am start -n com.speedsoftware.rootexplorer/.RootExplorer
After this, the app starts
Legends:
am = application manager
start = am argument
-n = name of package
/.RootExplorer (token in example) = is the MainActivityComponent
I did never used tasker, but you can create bash shell script for call this command too.
Thata is all.
Sent from my XT687 using XDA Premium 4 mobile app

Dethfull said:
you need to , ectract this damn app like zip, after extract, you need to open the AndroidManifest.xml from the extracted folder, useing the RootExplorer.apk (this haves a text editor). Inside the AndroidManifest.xml, you will find the packagename, com.xxx.sss.etc, a list of the all activities are inside the tag <activity> on where you hcave to identify the initial activity that starts the app. For example, i took rootexplorer: i found the packagename: com.speedsoftware.rootexplorer, but is missing the MAIN component tagged in RootExplorer Activity, so, conclusing, by using the terminal emulator, or script executor builted in rootexplorer app or SManager i will type:
am start -n com.speedsoftware.rootexplorer/.RootExplorer
After this, the app starts
Legends:
am = application manager
start = am argument
-n = name of package
/.RootExplorer (token in example) = is the MainActivityComponent
I did never used tasker, but you can create bash shell script for call thppis command too.
Thata is all.
Sent from my XT687 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I think I found main activity of Messenger: com.facebook.orca/.neue.MainActivity
Not tested profile attached.

Related

HTC SPEAK

I am trying to make a shortcut to the CAR MODE APP known as SPEAK.
There is not an icon for it in the app drawer and I can only find one app ( QUCIKSHORTCUTMAKER ) that can see it installed for creating a shortcut.
When launching my shortcut I get the message: ' Insufficient permissions to launch app '.
I know this has something to do with HTC SENSE but I fail to understand what I have to do to launch this app when NOT in CAR mode.
The shortcut is: com.htc.HTCSPEAKER/com.htc.HTCSPEAKER.Action.VRActivity
Maybe someone with a better understanding of Intents and Activities can help me?
Thanks
I believe the problem is in the HTC Speak apk manifest file. It had provisions that prevent it from being launched if the parent process "car or phone" isn't running.

Certification failed for valid app

I developed an app and I sent it to processing submission but every time get certification failed.
this is an errors list
https://dev.windowsphone.com/FileVendor/FileAsset?fileid=b66b4fae-c1d6-48e8-802b-86afa07a56f6
MS told that app crashes when they press the button, but for me on my device everything works well. I don't know what could be wrong?
Try it on both phone and emulator. Using the emu, try it on different resolutions, try it on different amounts of RAM , etc.
Did they give you any exception details? Use those to try and track down where it could be coming from (example: if it's a NPE, check everything that *could* be null, even if it *shouldn't* be).
I dont have emulator because my pc dont support slat.
I really dont know how to test my app because on my device works well and i dont have another wp8 device
cro.dev said:
I dont have emulator because my pc dont support slat.
I really dont know how to test my app because on my device works well and i dont have another wp8 device
Click to expand...
Click to collapse
Try using Nokia Remote Device Access. They pretty mush have two or three of every Lumia device available.
Its free too!
Sent from my Lumia 928 (RM-860) using Tapatalk
Today my app finally submited to store but when I install it and open, when I try to log in it terminates. That was same error when my app certification failed. Microsoft told me that my app terminates when try to log in.
When I deploy my app on deployer it works like charm. But I dont know why same app not work when I install it from Store.
This is C# code in action when I press Log in button and app terminates
Code:
string zap;
if (cbZap.IsChecked.Value)
zap = "1";
else
zap = "0";
if (File.Exists("X.dat"))
File.Delete("X.dat");
using (StreamWriter sr = File.CreateText("X.dat"))
{
sr.WriteLine(string.Format("{0};{1};{2}", tbIme.Text, tbLozinka.Password, zap));
sr.Close();
}
//NavigationService.GoBack();
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
cro.dev said:
Today my app finally submited to store but when I install it and open, when I try to log in it terminates. That was same error when my app certification failed. Microsoft told me that my app terminates when try to log in.
When I deploy my app on deployer it works like charm. But I dont know why same app not work when I install it from Store.
This is C# code in action when I press Log in button and app terminates
Code:
string zap;
if (cbZap.IsChecked.Value)
zap = "1";
else
zap = "0";
if (File.Exists("X.dat"))
File.Delete("X.dat");
using (StreamWriter sr = File.CreateText("X.dat"))
{
sr.WriteLine(string.Format("{0};{1};{2}", tbIme.Text, tbLozinka.Password, zap));
sr.Close();
}
//NavigationService.GoBack();
NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative));
Click to expand...
Click to collapse
go to the DEBUG menu >exceptions...
Tick al the check-boxes under "thrown";
uninstall the app from your device. Debug the app again, look for any unhandled exceptions.
mcosmin222 said:
go to the DEBUG menu >exceptions...
Tick al the check-boxes under "thrown";
uninstall the app from your device. Debug the app again, look for any unhandled exceptions.
Click to expand...
Click to collapse
Looks like everything works well. There is no problem in app when I deploy it with deployer. Only with app downloaded from Store I've got problems.
I actually have a guess about that...
You're writing files to the app's install folder. This works (bizarrely enough) on sideloaded apps. However, it's entirely possible that store apps might *not* have the required permissions to write to their install folders. In that case, your code would be throwing Access Denied errors, and (since you aren't handling exceptions, apparently...) crashing.
Also, you should always set the global exception handler (in App.xaml.cs, for C# XAML apps) to do something useful.
GoodDayToDie said:
I actually have a guess about that...
You're writing files to the app's install folder. This works (bizarrely enough) on sideloaded apps. However, it's entirely possible that store apps might *not* have the required permissions to write to their install folders. In that case, your code would be throwing Access Denied errors, and (since you aren't handling exceptions, apparently...) crashing.
Also, you should always set the global exception handler (in App.xaml.cs, for C# XAML apps) to do something useful.
Click to expand...
Click to collapse
thank you for your tip. So where I would be able to write files then, because my app is based on writing and reading file.
... really? The isolated storage folder, like all the documentation around file handling on WP tells you. Writing files to an application's install directory has been a bad idea (and often not possible, unless you are running with more privileges than you should be) since before modern smartphones even existed.
You can do it using the normal System.IO classes, but there's actually an entire collection of classes (in System.IO.IsolatedStorage, see http://msdn.microsoft.com/en-us/library/System.IO.IsolatedStorage(v=vs.95).aspx) explicitly for managing files in WP (and other Silverlight) apps. The IsolatedStorageFile class is the one with most of the info you'll be interested in.
GoodDayToDie said:
... really? The isolated storage folder, like all the documentation around file handling on WP tells you. Writing files to an application's install directory has been a bad idea (and often not possible, unless you are running with more privileges than you should be) since before modern smartphones even existed.
You can do it using the normal System.IO classes, but there's actually an entire collection of classes (in System.IO.IsolatedStorage, see http://msdn.microsoft.com/en-us/library/System.IO.IsolatedStorage(v=vs.95).aspx) explicitly for managing files in WP (and other Silverlight) apps. The IsolatedStorageFile class is the one with most of the info you'll be interested in.
Click to expand...
Click to collapse
I forget to write that I found solution few hours ago. I found my answers here
http://www.c-sharpcorner.com/Upload...-to-save-and-read-text-file-from-windows-pho/
thanks. Everything works well now.

Q:xposed hook all methods of an app and monitor performance

I developed a module to monitor the performance of an app (for example: wechat , whatsapp, any app is ok), my motivation is to get the delay of all the methods of the app. So first I get all the classes list and save as a txt file in sdcard, then in my module I read the class name one by one and get declaredmethods and hook every method of the class.
Actually this module successed, but the app (wechat app) crashed (NO RESPONSE) , the app is very complicated and the large amount of classes,methods hook impact the app's normal running.
Q: I want to know tracking and hooking all methods of an app is possible? HOW TO FIX THIS PROBLEM THAT THE APP DO NOT RESPONSE?

Start PIA VPN when on work wifi ok, exit task not closing the app

I have a profile "Work Wifi VPN" which is
State Wifi Connected matching SSID
- Trigger Task "Launch App" PIA VPN (which the app automatically connects to the vpn upon opening the app.
- Exit trigger "Launch App"
I can't get the app to close. I tried using a new task to kill the app when not on matching wifi, but that didn't work either. The only thing that happens, is when I'm off the wifi, the app launches again causing it to reconnect to the VPN again.
I use PIA and will have a go to solve it
Sent from my KFFOWI using Tapatalk
---------- Post added at 03:49 PM ---------- Previous post was at 03:28 PM ----------
Only way I can achieve this, is by using secure settings and adding task to reboot the device but I know isn't the best option. But will keep exploring
Sent from my KFFOWI using Tapatalk
apollopayne said:
I use PIA and will have a go to solve it
Sent from my KFFOWI using Tapatalk
---------- Post added at 03:49 PM ---------- Previous post was at 03:28 PM ----------
Only way I can achieve this, is by using secure settings and adding task to reboot the device but I know isn't the best option. But will keep exploring
Sent from my KFFOWI using Tapatalk
Click to expand...
Click to collapse
Thanks, it looks like after some additional searching I can't kill the app without root (non-rooted nexus 6 currently). looks like it may be time to root after all
bigjoejoe said:
Thanks, it looks like after some additional searching I can't kill the app without root (non-rooted nexus 6 currently). looks like it may be time to root after all
Click to expand...
Click to collapse
I'm rooted but yet to solve it. But I'm only a beginner tasker user
Sent from my D6603 using Tapatalk
apollopayne said:
I'm rooted but yet to solve it. But I'm only a beginner tasker user
Sent from my D6603 using Tapatalk
Click to expand...
Click to collapse
I changed my exit task to be a kill app task. There is a checkbox to use root, which of course I can't. I read something about using the OpenVPN tasker plugin for this, but I still think I have to be rooted. oh well, I guess I'll have to keep clicking on disconnect when I leave the office. Thanks for checking!
I've tried the check button of root too but doesn't work. But will try that plugin now
Sent from my D6603 using Tapatalk
I tried the OpenVPN plugin. It seems to only work with OpenVPN. If you only use one server with PIA then this is a legit option - just set up OpenVPN using the settings for that server instead of using PIA's app. The down side to this of course is that you won't be able to automatically connect to the server with the fastest connection.
What I do is a little kludgey, but it works. I use the AutoInput plugin to actually open the PIA app and hit the buttons "Disconnect" and "Stop Killswitch". So basically:
1. Set up a profile for Display Unlock + Not Wifi Connected + %VPN = 1 (I set this to 1 when it initially connects to wifi)
2. Create task called VPN Off
3. Set %VPN to 0
4. Launch app PIA
5. AutoInput Root action (you'll need to record the action and save it to execute it)
6. Say "VPN Off"
There's got to be a more elegant way to do it than this, but for now this is working for me.
I use secure settings, package state, pia, disable. And that stops pia completely.
It's pretty simple actually. I was just browsing through the topics and I noticed this. I realise it's old, but maybe it will help somebody.
This works with any VPN provider. Not just PIA.
You'll need the OpenVPN Connect application: https://play.google.com/store/apps/details?id=net.openvpn.openvpn&hl=en
Install the app, import the OpenVPN configuration files from your VPN provider and give them easy to work with names.
In tasker:
Code:
Profile - State - Net - Wifi Connected (input safe Wifi networks)
Task - Name - VPN Disconnect (you're disconnecting the VPN when using Home Wifi / safe wifi's)
Task: System - Send Intent
Action: android.intent.action.VIEW
package: net.openvpn.openvpn
Class: net.openvpn.openvpn.OpenVPNDisconnect
Target: activity
Exit task
Code:
Name: VPN Connect
Task: System - Send Intent
Action: android.intent.action.VIEW
Extra: net.openvpn.openvpn.AUTOSTART_PROFILE_NAME:profile_name_in_openvpn_application (I use the name of the country for the server. example: net.openvpn.openvpn.AUTOSTART_PROFILE_NAME:Romania). This is the name of the profile in the OpenVPN application.
Package: net.openvpn.openvpn
Class: net.openvpn.openvpn.OpenVPNClient
Target: Activity
Good luck.
I know that you dont want to trigger exit tasks based on entry tasks as tasker automatically prioritizes and will constantly misfire and fail on the exit task.
instead, make the entry task load the app, and set a timer variable for instance %VPNSHUTDOWN to %TIMES+60 (60 secs in the future) and keep another profile that has a time context to trigger at %VPNSHUTDOWN and that entry task to exit the app AND clear the variable VPNSHUTDOWN. Set the priority high
IF YOU REALLY WANT your exit task to exit the app it just opened set the priority higher than the entry task and change the setting on the task to keep new instances and kill old so it will exit the entry task if it's running and keep the exit
I think you should have mentioned that Package State requires root.

Twinview Dock 3 - keyboard

Does anyone know if it is possible to have an onscreen keyboard on the bottom screen (ie the phone) when using the Twinview Dock 3? For example, if using it to type emails etc, the bottom screen would be the keyboard and the top screen would be the mobile app.
yes, took me a minute to figure out but it can be done
Thanks @biotoxin, might send you a message when the unit arrives for a hand in setting it up if that is ok. Will also post details here for other users.
heads up it's app specific, not broad form, the screens are effectively 2 independent systems, so it's up to each app to make it work
I've been looking at apps like an2an to maybe get something more universal but it seems like the twinview doesn't like multiple instances of the same app simultaneously but I remember there being an option to make it happen so I'm researching...
the twin apps feature might be one way but I'm not entirely sure... details below
Code:
1.Download file twinapps_required_apps.xml
https://gist.github.com/shakalaca/9c7a8c6769cb87c6e7d83e809cbe6e5d#file-twinapps_required_apps-xml
Remember, you must download the file from right corner "Raw" button, do not press "download zip" to download or copy and paste the strings from the link
2.Find out the app package name that you want to add , As the example from the tutorial, they choose "GoShare" as an example, you can check its package name from the website version Google play, the hyperlink after "id=" is its' package name.
For Example "https://play.google.com/store/apps/details?id=com.gogoro.goshare"
"com.gogoro.goshare" is the package name.
3.Edit the downloaded twinapps.xml. Find out this string from the file "<string-array name="twinapps_required_apps">" (for apps)
or <string-array name="twinapps_required_apps_games">(for games). Added <item></item> in the front and after the package name. For example if you want to add "Goshare" in the app list, it should be<item>com.gogoro.goshare</item>. Add it after <item>com.imo.android.imoim|imo free video calls and chat</item>. And Save the file.
4 Connect your phone to your pc and use adb to push the edited twinapps.xml into your phone adb push twinapps.xml /sdcard/.
5 After pushed the xml file to your file, use this command to update the twinapps list
adb shell am startservice -a "asus.intent.action.TWINAPPS_CDN_FILE_UPDATE" -d "file:///sdcard/twinapps.xml" --ei "ACTION" 1 com.asus.twinapps/.TwinAppsService.
@biotoxin - just got the twinview dock 3 - great piece of hardward, well built and the power/volume buttons are handy!
In relation to getting a keyboard working on the lower screen - which apps did you use that it worked on, are you able to share the settings? Thanks!
Basically everything that officially supports it is listed in the armory crate, there's a jank way to do some things but it irritates me on a fundamental level so I'm looking into api level access to see if maybe I can make a wrapper that'll launch anything/ everything, or at least wrap a keyboard, if you want to give it a stab unity has the api info readily available or there's the jank way mentioned above
Hmm definitely can't seem to find a way to launch a keyboard on the bottom screen, how did you manage to do it?
Could someone port something over from the Microsoft duo perhaps? Android is capable of it, would be awesome for so many things!
whatevvz

Categories

Resources