Related
I have a user of my app who is having a problem running it. My code launches another activity in the same app, and he is saying it is stopping before it should & returning to the previous activity, and he doesn't see any Force Close warnings.
I have run my code in the emulator & on my phone, I can't reproduce the error. We both run Android 2.2 on our phones, his is an HTC EVO & mine is a HTC Wildfire, as far as I can tell his specs are better than mine so shouldn't cause an issue - I deliberately chose a low spec for for my dev work so the code ought to run on anything.
As a bit of an Andoid dev noob (but been coding for years), is there any easy way I can make a special build of the app to send to him that would log any errors that happen ? I'd like to get a stack dump as well if possible, as I'm not sure exactly what routine in the activity its crashing out in. The activity that crashes is Gallery with 9 images in it, he can't flick through them or select one. I'm stumped as to whats causing it, any assistance would be gratefully received.
Thanks.
Why not point to your app and let others here try it on their phones? It could simply be other apps installed on his phone interfering with your app.
Long time programmer here too and when I get to where you're at (and I"m sure you've put some hours into this LOL), I go back to STEP 1.
I comment-out any and all code but the bare minimum; break it down to the Intent, startActivity and maybe a Toast message in the second activity. Even parse down your XML files to bare minimum.
See if that works. Then, ADD BACK ONE LINE OF CODE AT A TIME Run program and make sure it works. Yeah, it's painful, but in my 20 years of coding, I've learned to put my pride aside and to not "pretend" all the code I've written is correct.
Sometimes on bigger projects, I"ll change or add a couple of lines of code, run a back up and test. Rinse and repeat LOL. That way, I know I"m only a couple of lines of code from what "used" to work.
Good Luck!
Thanks both of you.
old_dude - Its a paid app. Only £0.99 but I don't think people would pay to help me. There is a free version of the same app (with less functionality) that this guy can get to work. If your really interested the 2 versions are -
Plink Log - Free Version
Plink Log Pro - Paid version
Rootstonian - agreed thats the approach I'd normally take if I was having problems on my dev phone or the emulator. The problem is that its OK on my HTC Wildfire/Android2.2 but on this guys HTC EVO/Android2.2 its having problems. I dont really want to keep sending him .apks with 1 or 2 lines extra enabled just to see if that fixes his specific issue. I was hoping there was something I could code to catch whatever crashes the activity & log it somewhere for me to analyse. When I do PC dev work, I have a global exception handler that catches anything I dont explicitly handle, and dumps the full call stack into a Log File I can read later.
I think I'll just have to take the existing app & put loads of debug code into it to save messages into a log file & see what bits of code are being called & what isn't & then get him to email me the results.
Thanks for the ideas guys, its always useful to get input from another perspective.
Dave
Hmmmm, just discovered setDefaultUncaughtExceptionHandler - might be able to use that with printStackTrace. Sounds interesting.
Hi,
I'm trying to figure out a way to force a specific locale for an application. I like to use my applications in their "native langage" so my system is in english. But for many applications, it would be better for me to be able to run them in french. For exemple, Google goggle doesnt not recognize frnech text when it's set in english...
I guess the app would probably need to have access to root privilege. But I dont know the Android API enough yet. Is there anyone here that have an idea if it's even possible ? I dont want to spend countless hours looking for a solution if anyone here can tell me it's impossible or if someone can put me on the track.
Thank you
HTC Desire CM7
If you add different layout folders to your app(layout-es, values-fr) they will be loaded according to the phone's locale.
here is the documentation: http://developer.android.com/guide/topics/resources/localization.html
also if this is for programs that you dont have access to the source then you could mess around with "Allow Mock Locations" in cm7. havent had a reason to try it so i dont know if this would be your answer but its worth a look. and im not sure if its exclusive to cm7.
Settings -> Applications -> Development -> Allow Mock Locations
Do you want to force locale on your own app (by creating an option where the user can change locale), or on some already existing apps that don't have such an option ?
If I understand correctly, you want to achieve the former. I would guess there's an application for this. Try "More locale". AFAIK it only changes the whole system's locale, but I didn't try it myself. Maybe it can change locale for specific apps.
I believe that by using Tasker, we can set up multiple task executions ata set time or situation. I haven't tried it myself but I'm planning to now. I just need some info on how to make it work. Most importantly, if it can do THIS:
LEGEND:
A = An App
B = Titanium Backup
C = Another app
IF - LAUNCH - A - THEN - LAUNCH - B - COMMAND - B - FREEZE - C.
In simple terms, is it possible to have Tasker run Titanium Backup and freeze an app whenever a designated app is launched? Basically, launching a specified app will 'trigger' Titanium Backup to be launched and freeze another app.
I hope I'm not confusing anyone.
Thanks, XDA! I'm so proud to be a part of this community.
It looks like you might be able to. I'm unfamiliar with tasker... But the dev does have something of a user manual on the site. You may want to start there.
http://tasker.dinglisch.net/userguide/en/index.html
Tried tinkering around. Couldn't get anywhere with this. Is there an existing guide somewhere in these forums that I might have missed? Can anyone please point me at the right direction? :'(
Well, I'm fairly new to Tasker myself, but there's no easy "tap, tap, scroll, tap, done" way to do it as far as I can tell. Post #3 here gives a suggested way forward (same question as yours only with a time context instead of an app) but it is quite technical and certainly beyond my understanding at this point.
Otherwise you could ask on the Tasker forum. The developer seems to answer most threads, even if only to say something's not possible.
Can I ask why you need to freeze an app on the fly like that? Maybe if you explain it a little, there could be a workaround.
selection16 said:
Well, I'm fairly new to Tasker myself, but there's no easy "tap, tap, scroll, tap, done" way to do it as far as I can tell. Post #3 here gives a suggested way forward (same question as yours only with a time context instead of an app) but it is quite technical and certainly beyond my understanding at this point.
Otherwise you could ask on the Tasker forum. The developer seems to answer most threads, even if only to say something's not possible.
Can I ask why you need to freeze an app on the fly like that? Maybe if you explain it a little, there could be a workaround.
Click to expand...
Click to collapse
Well I found out that one of my apps doesn't work when the other app is installed or active. I really liked the app in question, so I made an experiment to freeze all apps until I found the culprit. I did found it. That's why I'm trying to check if it can be achieved.
Have you tried just killing the app?
Context: Application > App A
Task: App > Kill App > App C (and most likely check "Use Root")
You may want to add an exit task to restart App C after you're done with App A.
If it works, that would stop it running in the background. The problem is that Android 2.2 and upwards have changes to stop an app being able to kill another app. It's inconsistent though - I've tested it on about 6 apps and it has worked on 2, so it's maybe worth a shot if you haven't tried.
If you or anyone else is still interested, this is easy to do. Just use the Secure Settings plugin, specifically it's Package Manager option, and disable or enable to have the same effect as freeze/unfreeze. TB isn't required.
selection16 said:
If you or anyone else is still interested, this is easy to do. Just use the Secure Settings plugin, specifically it's Package Manager option, and disable or enable to have the same effect as freeze/unfreeze. TB isn't required.
Click to expand...
Click to collapse
Thank you very much!!!
I downloaded the sample tasker app that expires in 7 days from their website and installed it. I can run tasker, enter code and save, and the icon shows it as running when I quit out to test my code. I can't get anything to work using code examples from the wiki for simple items such as action at preset time. I am running CyanogenMod 7.2.0 is this causing my problem?
It took us much longer than WP7 did, but the first Interop Unlock hack for WP8 is now available. It's currently limited to SAMSUNG phones, although we're trying to extend it to other phones, of course.
WARNING: Samsung is trying to break this hack! If you take the retail upgrade to GDR3 including the Samsung firmware update, it will not work!
A brief summary, for those unfamiliar with interop-lock: Windows Phone allows a number of high-privilege app capabilities, which can be used to make changes to the OS which are normally not possible for a third-party app. The limitation on whether we can use these capabilities or not is based on what "level" of developer unlock the phone has; standard "ISV" (Independent Software Vendor) dev unlock (max 10 apps or less) is what pretty much everybody gets; OEMs, however, get a special OEM Developer Unlock (300 apps or more) which gives them the ability to use much higher-privilege app capabilities than the standard ISV unlock permits. The name comes from ID_CAP_INTEROPSERVICES, the capability which was most important in WP7. In WP8, however, there are a great many interesting capabilities. Note that Interop-unlock by itself does not enable all of these. However, at least on Samsung phones, it is now possible to enable *all* the capabilities.
Guide for Samsung's ATIV phones:
The instructions are generally well-provided in @-W_O_L_F- 's app (direct link for updated XAP). You will also need the Diagnosis app, which is included (though hidden) on every Samsung WIndows phone.
The instructions are as follows:
Developer-unlock your phone. You will need the Windows Phone Developer Registration tool for this; it comes with the SDK.
Sideload the helper app using Application Deployment (included with SDK) or WPPT. It does not work to just copy the file to your phone, or similar.
Open the Phone dialer (the built-in one) and dial ##634# to install the Diagnosis app (if you hadn't already). You can exit it afterward.
Run the Interop Unlock Helper app and read the instructions, clicking Next until you get to Step 2.
Click the button to generate the toast notification for your phone's Diagnosis app, then tap on the toast to open the hidden registry editor.
Press-and-hold the Back button, and switch back to the helper app without closing the registry editor. Click Next to go to Step 3 in the helper app.
Copy the provided registry paths and values out of the helper app, use the Back-and-hold switcher to return to Diagnosis, paste the values into the registry editor, and write them.
Don't worry if the app says a write failed! Just hit Read afterward to verify the change.
Repeat the previous steps a few times, hitting Next after each set of instructions, until the Helper app says "Finish".
Once all the registry values are written, congratulations; you are interop-unlocked!
At this point, you probably want to run the EnableAllSideloading hack below.
If you want to enable sideloading even more high-privileged apps, you'll want the following:
Install the BootstrapSamsung app attached to this post. This requires having interop-unlock already, and will not work if you have Samsung's ships-with-GDR3 firmware update unless you unblock RPC.
Run the app once, and ensure it displays a success message. You may then exit and (optionally) remove the app.
Install the EnableAllSideloading app attached to this post. This requires the bootstrap step. However, it is not specific to Samsung (we just can't bootstrap anything else yet).
Run EnableAllSideloading once, and ensure it displays a success message. You may then exit and (optionally) remove the app.
At this point, you will be able to sideload any capability, even the ones used for built-in apps and services. However, there appear to still be restrictions, even with a capability such as ID_CAP_BUILTIN_TCB. Multiple XDA members, including @Heathcliff74 and myself, are working to overcome these restrictions.
It may be necessary to repeat these steps after a phone update.
Capabilities which will be enabled, without further modification, by using interop-unlock:
Note: This list is *just* the ones from Interop-unlock; it does not unclude the ones from EnableAllSideloading.
ID_CAP_CALLMESSAGING_FILTER
ID_CAP_CAMERA
ID_CAP_CELL_API_COMMON
ID_CAP_CELL_API_LOCATION
ID_CAP_CELL_API_OEM_PASSTHROUGH
ID_CAP_CELL_API_UICC
ID_CAP_CELL_API_UICC_LOWLEVEL
ID_CAP_CELL_WNF
ID_CAP_CSP_FOUNDATION
ID_CAP_CSP_MAIL
ID_CAP_CSP_OEM
ID_CAP_CSP_W4_APPLICATION
ID_CAP_CSP_WIFI_HOTSPOT
ID_CAP_DEVICE_MANAGEMENT
ID_CAP_DEVICE_MANAGEMENT_ADMIN
ID_CAP_DEVICE_MANAGEMENT_BOOTSTRAP
ID_CAP_DEVICE_MANAGEMENT_SECURITY_POLICIES
ID_CAP_DU_MIGRATOR_STATUS_OEM
ID_CAP_OEM_DEPLOYMENT
ID_CAP_INTERNET_EXPLORER_FAVORITES
ID_CAP_INTERNET_EXPLORER_SEARCH_PROVIDER_KEYS_HKCU
ID_CAP_INTEROPSERVICES
ID_CAP_KIDZONE_CUSTOMIZATION
ID_CAP_MAP_WRITE
ID_CAP_MEDIALIB_PHOTO_FULL
ID_CAP_NETWORKING_ADMIN
ID_CAP_OEM_ADC
ID_CAP_OEMPUBLICDIRECTORY
ID_CAP_PEOPLE_EXTENSION
ID_CAP_PEOPLE_EXTENSION_IM
ID_CAP_PEOPLE_EXTENSION_MOBILE
ID_CAP_PERSONAL_INFORMATION_IMPORT
ID_CAP_RUNTIME_CONFIG
ID_CAP_SMS_INTERCEPT_AGENT
ID_CAP_SMS_INTERCEPT_RECIPIENT
ID_CAP_SYNC_EXTENSION
ID_CAP_VOICEMAIL
ID_CAP_WALLET_SECUREELEMENT
ID_CAP_WIFI_BASIC
One of the goals of this thread will be to explore what we can do with interop-unlock, and look for ways to achieve full permissions. I think I've found one, but it requires the ability to write registry multi-string values. Basically, if we could add a "superuser" privilege, or enable the use of ID_CAP_BUILTIN_TCB, which already has it, this would allow the creation of "root" apps.
Aside from myself, credit for this hack goes to @cpuguy for the Native Toast Launcher tool which permits accessing otherwise-unreachable code, and @-W_O_L_F- for helping put the pieces together. I'm not actually certain which one of us achieved the interop-unlock first; we were both working on it. @Heathcliff74 continues to be a help on the quest for full-unlock.
The source code for the apps below is posted at http://forum.xda-developers.com/showpost.php?p=45606584&postcount=88
Questions and Answers
Can I install WP7 interop apps using this?
They will install, but there's no point. They almost certainly won't actually work. Interop-unlock enables access to parts of the OS which third-party developers were not intended to touch; consequently, there's no backward compatibility. Even the methods used for native code on WP7 (which is different from, but nearly essential to make use of, interop-unlock) won't work on WP8. However, it should be possible to port many of those applications to WP8.
Will this work on Lumia phones / How can I get this on my Lumia / Are you working on this for Lumia phones / What about HTC, or some other OEM?
The current hack relies on a Samsung-specific component. Adding support for other phones will require new hacks. We are looking into it, rest assured; at this time, however, there is no way to gain interop-unlock on any WP8 device other than a Samsung one.
EDIT: It looks like there should soon be a Huawei W1 custom ROM with interop-unlock included. I don't deal with custom ROMs, but you may be able to use homebrew apps on that phone too.
EDIT: Lumia phones *can* be interop-unlocked via JTAG. However, this requires some extra hardware and some phone disassembly. Not an online hack, and not for the faint of heart.
But what if we installed the Diagnosis app on a Lumia phone (using Fiddler proxy or similar) and then followed this guide?
I repeat, Samsung-specific component. Nokia doesn't put the required services/drivers for Samsung's Diagnosis app into their Lumia firmware, so the app would not work!
Can I upgrade my phone to GDR3 if I have this?
Yes. However, be aware: if you install Samsung's updates that come with the retail GDR3 update, it will break your ability to re-unlock, or to use some homebrew apps! (Developer preview updates are fine, as those are purely Microsoft code and don't mess with the Samsung components.)
EDIT: There's a way to unlock the Samsung services for full access again on GDR3. You still need to interop-unlock beforehand, though.
Can I re-lock my phone if I want to?
Yes, easily. The simplest method is to use the Windows Phone Developer Registration tool (the one that comes with the SDK) to de-register the phone (you can then re-register it if you want to get your normal dev-unlock back). This doesn't remove any changes that were made using the interop-unlock, though (for example, it won't undo the EnableAllSideloading hack, not will it set back the Full FS Access hack). Apps that require interop-unlock will still be installed, but may no longer run. To manually remove interop-unlock, you can reset all the registry values that were changed by the interop-unlock hack to their original values, and remove all the apps. There still may be a great many other changes that also need reverting, though, if you want to get back to stock settings. See next question.
Can I get my phone completely back to stock settings without knowing every little thing I changed?
Yes, a hard (factory) reset will undo all changes made by interop-unlock, or any apps (including ones that require interop-unlock), and will remove all apps. If you need to send your phone in for warranty servicing and are worried that they won't take it because you interop-unlocked it, this approach will fix that (they would probably tell you to hard-reset anyhow, if it's conceivably a software problem).
Will the interop-unlock survive a hard reset?
Not using this method! Read the question above. This unlock is purely in software, not firmware; it is reset along with everything else.
Can I upgrade my phone to WP8.1 if I have this?
Tentatively, yes! We're still working on figuring out exactly what WP8.1 means for the homebrew scene. The short version is that most apps and some (but not all) of the hacks they contain seem to still work, though. However, see next question...
Can I interop-unlock my phone on WP8.1?
At this time, I don't believe this is possible (unless you can use a custom ROM). One step of the process appears to have been "fixed" and we will need to find a different way. -W_O_L_F- has indicated that he has one, possibly coming soon...
Apps which use Interop Unlock
SamWP8 Tools Currently includes a basic registry editor and some tweaking tools, including an accent color editor.
Native Access Webserver that requires full capability unlock; still read-only at this time.
PDF to Office enables browsing and moving files.
WPH Tweaks allows easy access to a number of registry tweaks.
AppData Manager allows you to back up the data of an app so you can re-install it (possibly after a hard reset) and not lose its state.
Storage Cleanup allows you to list and delete space-wasting files on your phone.
Reserved for... whatever else is needed.
Awesome!
I suggest first app to the list: my SamWP8 Tools
Upd. I'm little bit late XD
well i ve got an ascend w1 bootloader unlocked if i can help let me know
It's awesome to have my phone Interop Unlocked. I hope to see something to clear my "Other Storage" soon. Its full with faulty Windows Store installation files.. But I guess even with this it will be a lost cause.
Sent from my GT-I8750 using Tapatalk
although the Samsung registry editor will install it will not run on my phone and I believe I was able to interop unlock any idea why it wont run?
@GoodDayToDie your wor is awesome and you are the man
Good luck buddy
@FricoRico: Actually, I'm pretty sure we can clear out those files. I've got a ton of stuff on my plate at the moment, but even if none of the capabilities that work with interop-unlock will natively allow access to the relevant folder (and I wouldn't be surprised if one does; what is the folder in question?) there's a function in the Samsung driver interface to move files; we can move them to a location where we have write access, and then delete them.
@noelito: No idea. If it installs, that means you're unlocked. Make sure your phone didn't re-lock, I guess - try deploying the app again, for example - and make sure you're using the official deployment tool (some of the unofficial ones for WP7 - which may or may not work on WP8 - strip interop capabilities) and then try again. If it still doesn't work, please give a more detailed error report.
I am using the official deployment tool, and I believe the interop unlock does work because I was able to side load operamini, Samsung photo studio, supreme shortcuts and couldn't before BUT that was it they're side loaded but do not work at all ? well actually supreme shortcuts does run but when I try to use a custom shortcut such as brightness it will crash
Sent from my SGH-T899M using XDA Windows Phone 7 App
Aha, an item for the FAQ...
WP7 INTEROP APPS WILL NOT WORK! Interop-unlock lets you develop high-privilege apps, but it's very OS-specific. This is all unofficial stuff; there's no reason for Microsoft to have maintained backward compatibility, and indeed they did not. New apps will need to be developed specific to WP8. That's why there isn't already a bunch of listed apps...
ohhh ok so this interop unlock
is paving the way for future wp8 homebrew apps?
Exactly. Things which I have in mind, beyond the obvious improvements to registry and file system browsing, include options such as sounds customizations, media library access, changing certain "restricted" file/URI associations (alter the default browser?), *possibly* better task management (not sure we have the permissions for that), cleaning up wasted storage space, and as much more as we can manage. There's also a lot of potential for future research which this enables: interop-unlocking more devices, getting even higher permissions, possibly even custom ROMs or at least custom kernel drivers (which is much the same, since once you've got that you can change anything).
Can you write anywhere on the file system?
I can write some places, certainly. We'll see. I've got a couple of ideas for exploits involving writing to System32, but if there's anywhere I *can't* write, it's probably there.
Maybe "test mode" from lumias work like diagnosis app from samsung, really don't know about WP8 because i went from android, but on my motorola some options in fastboot like "Factory Mode" are apk's. Maybe this is a dumb thing (because they are two diferent systems ) :silly: .
Really thank you for your work, u 're awesome.
Sry for my english
GoodDayToDie said:
I can write some places, certainly. We'll see. I've got a couple of ideas for exploits involving writing to System32, but if there's anywhere I *can't* write, it's probably there.
Click to expand...
Click to collapse
Might be able to port @Myriachan 's exploit.
Boss442 said:
Maybe "test mode" from lumias work like diagnosis app from samsung, really don't know about WP8 because i went from android, but on my motorola some options in fastboot like "Factory Mode" are apk's. Maybe this is a dumb thing (because they are two diferent systems ) :silly: .
Really thank you for your work, u 're awesome.
Sry for my english
Click to expand...
Click to collapse
Feature-wise, Test mode is heavily locked on Lumias. One has to authorize to use its the most sweet features.
Hi Guys,
I managed to root my FireTV a few days back, and yesterday decided to look at the voice search to see if I could use it for other things.
After reversing some code, I found the actual voice search is handled by com.amazon.vizzini.apk
The SearchOverlay.class has this piece of code, which calls back to the amazon fireTV UI SearchResultsActivity upon completion with the search result returned as a string.
I replaced the fire TV UI with my own code, which receives the search text, and then sends a JSON rpc to KODI's web interface, and brings KODI to the front after the search is completed.
Here is a video of it in action.
http://youtu.be/hpgKci_gJYY
android studio project
http://uptobox.com/ccykod7zua1l
mirror
http://www107.zippyshare.com/v/mAhl3UuM/file.html
***** I have a FireTV v1 updated to fire os 5 ******
I have no idea if this will work on older versions of software.
To make it work you will require ROOT, and you will have to uninstall or move the existing fireTV amazon UI.
Reason for this is that the vizinni.apk calls back to
localIntent.setComponent(new ComponentName("com.amazon.tv.launcher", "com.amazon.tv.launcher.ui.SearchResultsActivity"));
So your activity has to be in that package, and called SearchResultsActivity.
The only other way to possibly get round this would be to modify the vizinni.apk to call a different package instead, but then voice search wouldn't work on the amazon UI anyway. I wasn't really bothered about the amazon UI working myself which is why I did it the way I did.
I just moved the original system/priv-app/com.amazon.tv.launcher/com.amazon.tv.launcher.apk to /system then installed my code via android studio.
mount -o rw,remount /system
mv /system/priv-app/com.amazon.tv.launcher/com.amazon.tv.launcher.apk /system/
You will also need to change KODI's settings to enable web interface control on port 8080.
On my setup it was .. system.. services.. webserver.. and tick the box that says "Allow control of kodi via http" and make sure the port is set to 8080.
edit: 07/07/2016
I did start work a few months back on an Xposed module (works but not 100%), I was going to add a settings page but I think there was issues with xposed on android version that the fire tv runs on, due to permissions etc.
You can set a prefix in the code (currently hard coded to KODI) so if you say " kodi star wars" it would pass the param of "star wars" to kodi.
If you just say "star wars" without the prefix it would pass this to the normal amazon UI.
If anyone wants to take it further, it's attached on the link below.
http://uptobox.com/ensqll4a7r65
Mick
Thats actually pretty great.
Conventional wisdom was that both voice recognition and response "results packaging" was done server side - and the only return query you could get were preexisting amazon database references - not the result of the initial voice recognition.
I've actually read that multiple places - but as it turns out, no one had bothered reversing the process I guess.
Major props and thank god for overlays containing strings... Finally - that microphone might not be so useless after all..
Next step - implement it to interface with google search. (Weather in ...)
edit: Actually - there are three interesting usecases I can think of on top of my head...
1. Launch other Apps (maybe even with "fixed Keywords (App 1 f.e. would work edit: "Number 1" delivers better results. )" if App names arent known to Amazon) - so thats text>launcher app - see if sphinx02 has any interest in coding that as part of Firestarter..
2. google search (Whats the weather in.. ) text>google search app (if possible)
3. direct text input as seen in the POC video
edit 4. forward to Amazon - not to "break" their implementation
This could be realized by a quick 4 way select screen (just confirm with the direction button) after you select the string in the overlay.
great find and implementation. would love see more expansion as above post mentions. Are you planning to share fire tv UI code?
I was playing with voice search strings and found that Amazon tends to strip out "Google" in front of search queries -so instead of "Google how is the Weather tomorrow" only "How is the weather tomorrow" will get returned.
But - Alexa as a trigger word will be returned fine, so - I vote for using "Alexa" as a trigger word to forward all search queries to the google search app.
Ok - maybe not - but conceptually, this would be a great "work of art".
An even better idea than Harklekinrains' would be to check the foreground app and do different things based on that. For example, if Kodi is open it could send the intent to Kodi. If the Fire TV launcher is open it could fall back to default functionality, etc. Simulating keystrokes could also cover 99% of the other applications. I'm excited for this. It really makes the Fire TV so much less of a novelty.
I've just updated the original post with a copy of the android studio project, and a few more details.
Mick
Great mate,thanks! gonna check it out soon!
One question (as im not firm with intents and stuff): aint there a possibility to listen for intents sent to the amazon ui and catch them? Personally, i dont care too much about it right now as im using nothing but kodi, but maybe some day when wanting to use prime or similar stuff?
dafunkydan said:
Great mate,thanks! gonna check it out soon!
One question (as im not firm with intents and stuff): aint there a possibility to listen for intents sent to the amazon ui and catch them? Personally, i dont care too much about it right now as im using nothing but kodi, but maybe some day when wanting to use prime or similar stuff?
Click to expand...
Click to collapse
I don't think so as the actual code in the vinizzi apk is as follows:
Intent localIntent = new Intent();
localIntent.setComponent(new ComponentName("com.amazon.tv.launcher", "com.amazon.tv.launcher.ui.SearchResultsActivity"));
localIntent.putExtra("identifier", null);
localIntent.addFlags(402653184);
localIntent.putExtra("term", str);
localIntent.putExtra("text", str);
localIntent.putExtra("source", "VOICE");
localContext.startActivity(localIntent);
So basically when it receives the voice search response from amazon's server, it's starting the activity com.amazon.tv.launcher.ui.SearchResultsActivity from package com.amazon.tv.launcher
Mick
Integrating the search attempt based on the previous foreground app would mean that "voice search" could never "initate a new attempt". This would prevent the "lets just ask google, or lets launch an app - impulse use" of the feature. Still - in the long term it might turn out to be the right approach - f.e. if
"People tend to use the the google search only lets say "half a dozen times", and in the majority of cases just want text input in Kodi" Also - without having a select screen with "four (dont make it too many) predefined "use options"" discoverability is pretty non existent. People would have to read readmes to find out which interactions are supported.
Also Amazon wants you to "be able to always reach the Amazon content search from anywhere" - so, political implications.
Also - each time a new app would want to integrate the voice to text feature - they would have to contact the devs of this project - if you dont use "just text input" as a default in the "use the previously open app as an indicator of intent" approach. So make sure you default to "just text input" in that case. (Amazon launcher > forward query to Amazon (do not break functionality), ....)
Dont implement it as a mixed approach though as "Kodi is open most of the time" probably for most people - and the intent (message) gets "confusing".
--
What you probably shouldnt do - regardless, is to use "trigger words" as an "indicator of intent" - because Amazon can start blocking them. "Number 1" is probably generic enough so they wont try to block that - but in principal, they can. Also Amazons "voice to text" engine is optimized for "short phrases" - the longer your input query gets the more prone to errors their results become. Leave the actual "voice input" as "natural" as possible (dont embed logic there). Imho.
I'm in the USA and uptobox.com is not available in our country.
I want to give the source a look and see what I can do to contribute.
Can you put it on github or somewhere else?
Much appreciated.
kratosjohn said:
I'm in the USA and uptobox.com is not available in our country.
I want to give the source a look and see what I can do to contribute.
Can you put it on github or somewhere else?
Much appreciated.
Click to expand...
Click to collapse
I've just uploaded it to zippyshare too. Link added to original post.
Mick
It would be nice if this could be generic way of entering text in any app, similar to the FTV Remote App that has keyboard support. I am surprised Amazon has not done this already. If you are in a text field voice search would fill in the text, else it can continue with normal Alexa functionality letting you " always reach the Amazon content search from anywhere". Should be an easy solution for Amazon to implement, not sure if it could be added with the progress here, and it would really make the voice control so much more useful.
Hey Mick, as im still very exited about that (so frustating to enter searchphrases with a dpad...), i thought about what your great find could develop to. I hope u dont get me wrong, as i unfortunatly cant contribute any programming (if u need something made with tasker let me know ), its not that i want to demand anything - rather share my thoughts or ideas...
- I think its a good thought not to 'blow it up' by adding many keywords, make it more complicated, and avoid amzn to lock features down. even if it may be an abstract fear. I think with a well-structured menu in kodi, all apps one will need to start are just 2-3 clicks away.
- if i got it right, xposed could hook into every module and alter it, right? so basically it should be possible to avoid to exchange the amazon ui and/or alter the vizinni.apk,but just modify the SearchOverlay.class? wouldnt it be (on top) the most convenient way to decide wether one is on e.g. Amazon Prime, or on kodi, and either hand over the result to the original module, or hand it over to kodi?
So, please understand my post as a mixture between sugestions and questions, not as a demanding 'please make it how i want it asap'. Im really excited about your finding, appreciate your sharing, and want to contribute what i can do - unfortunatly its rather thoughts and suggestions. Cheers mate!
Great Work !!! I totally understand this is for amazon Fire products only. My question is would we be able to port for generic Android TV box like nVidia Shield which also has mic capability and comes with root support.
Good job @is0-mick it's great to see you accomplish something that Netflix doesn't even want to be bother with on their app.
harlekinrains said:
No you dont understand. You havent even read or understood the first posting - but you have bought another device and now want others to move in your direction on your behalf.
Click to expand...
Click to collapse
Seriously mate if XDA bothers you so much, you need to take a break from it for your own sanity!
fach1708 said:
Seriously mate if XDA bothers you so much, you need to take a break from it for your own sanity!
Click to expand...
Click to collapse
No, I really don't think he needs to take break, his argument is completely understandable. This is not a Shield forum (btw before we make judgements, I own both devices). We need to get this fixed for one device, before even mentioning whether other devices are an option.
is0-mick said:
To make it work you will require ROOT, and you will have to uninstall or move the existing fireTV amazon UI.
Reason for this is that the vizinni.apk calls back to
localIntent.setComponent(new ComponentName("com.amazon.tv.launcher", "com.amazon.tv.launcher.ui.SearchResultsActivity"));
So your activity has to be in that package, and called SearchResultsActivity.
The only other way to possibly get round this would be to modify the vizinni.apk to call a different package instead, but then voice search wouldn't work on the amazon UI anyway. I wasn't really bothered about the amazon UI working myself which is why I did it the way I did.
Click to expand...
Click to collapse
Is it not usefull for this to create a xposed mod? I thought xposed was made for this...
Perhaps you should talk with rbox in his thread about a integration into version 1.5 of his mods, look here.
is0-mick said:
I just moved the original system/priv-app/com.amazon.tv.launcher/com.amazon.tv.launcher.apk to /system then installed my code via android studio.
mount -o rw,remount /system
mv /system/priv-app/com.amazon.tv.launcher/com.amazon.tv.launcher.apk /system/
Click to expand...
Click to collapse
So does that mean, while you are using your proof-of-concept you can not use the normal Launcher-UI?
Really great your work! I hope we got more
Sadly I am with my FireTV-Stick (hardware-Rooted-superSU) and my FireTV box gen1 (hardware-Rooted-superSU+custom-recovery+unlocked-bl)on the old FW. I wait for custom roms.
Greetings by Idijt
EDIT:
I forgot to ask you something. Did you got the kind of search-request back?
Can you see if amazon-voice-rgn knows if it is a app or a video or a moviestar?
This looks pretty cool since I don't like typing the name of the movie in the search box... now I can just speak it.
As a novice I have one question, You wrote:
is0-mick said:
I just moved the original system/priv-app/com.amazon.tv.launcher/com.amazon.tv.launcher.apk to /system
Mick
Click to expand...
Click to collapse
The code I downloaded was in .RAR format not .apk. Do I need to covert it to .apk or rename it to .apk before replacing the original?
I've not rooted my device yet so I haven't looked at the file structure, but I'd be willing to root to get this feature. OR is the adding of this code better done by someone other than a novice?
Thanks
carpenter940 said:
The code I downloaded was in .RAR format not .apk. Do I need to covert it to .apk or rename it to .apk before replacing the original?
Click to expand...
Click to collapse
It's the source code. You have to compile it and create the apk with AndroidStudio.