tv.js
Apple TV for Torrent Streaming in JS (Node/Chrome)
I'm testing the new support library leanback to design apps for TV, and i have a error ever android try to inflate the BrowseFragment and it throws this exception and don't know how to solve it. Thank you so much for your help.
android.view.InflateException: Binary XML file line #17: Error inflating class android.support.v17.leanback.widget.TitleView
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:816)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.support.v17.leanback.app.BrowseFragment.onCreateView(BrowseFragment.java:674)
at android.app.Fragment.performCreateView(Fragment.java:1700)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:866)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1040)
at android.app.FragmentManagerImpl.addFragment(FragmentManager.java:1142)
at android.app.Activity.onCreateView(Activity.java:4828)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:689)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at com.engel.engeldroid.fragments.HomeFragment.onCreateView(HomeFragment.java:28)
at android.app.Fragment.performCreateView(Fragment.java:1700)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:890)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1062)
at android.app.BackStackRecord.run(BackStackRecord.java:684)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:603)
at dalvik.system.NativeStart.main(Native Method)
My xml:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<fragment
android:id="@+id/browse_fragment"
android:name="android.support.v17.leanback.app.BrowseFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New Button"
android:id="@+id/button"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
Source: (StackOverflow)
I'm making a remote control app with 6 buttons which works with samsung tv's. For kitkat I used the new api ConsumerIRmanager but I want the app to work with jellybean also so the app works great for kitkat version but it won't start on jellybean here is the code:
public class MainActivity extends Activity {
Object irdaService;
Method irWrite;
SparseArray<String> irData;
TextView mFreqsText;
ConsumerIrManager mCIR;
ImageButton power;
SeekBar sBar;
@Override
protected void onCreate(Bundle savedInstanceState) {
// Be sure to call the super class.
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_layout);
power = (ImageButton) findViewById(R.id.powerBtn);
power.setVisibility(View.GONE);
irData = new SparseArray<String>();
irData.put(
R.id.toggleButton1,
hex2dec("0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0040 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e"));
irData.put(
R.id.upProg,
hex2dec("0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 003f 0015 003f 0015 0015 0015 0040 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e"));
irData.put(
R.id.downBtn,
hex2dec("0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 0015 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e"));
irData.put(
R.id.minusBtn,
hex2dec("0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 0015 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e"));
irData.put(
R.id.plusBtn,
hex2dec("0000 006d 0022 0003 00a9 00a8 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 003f 0015 003f 0015 0702 00a9 00a8 0015 0015 0015 0e6e"));
irData.put(
R.id.muteBtn,
hex2dec("0000 006c 0022 0003 00ab 00aa 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 003f 0015 003f 0015 0015 0015 0015 0015 0015 0015 003f 0015 0015 0015 003f 0015 0015 0015 0015 0015 003f 0015 003f 0015 003f 0015 0714 00ab 00aa 0015 0015 0015 0e91"));
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
irInit4KitKat();
} else {
irInit4JellyBean();
}
}
@TargetApi(Build.VERSION_CODES.KITKAT)
public void irInit4KitKat() {
// Get a reference to the ConsumerIrManager
mCIR = (ConsumerIrManager) getSystemService(Context.CONSUMER_IR_SERVICE);
}
public void irInit4JellyBean() {
Object irService = this.getSystemService("irda");
//irService.getClass();
Class irClass = irService.getClass();
Class params[] = new Class[1];
params[0] = String.class;
try {
irWrite = irClass.getMethod("write_irsend", params);
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
}
public void irSend(View view) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
irSend4Kitkat(view);
} else {
irSend4JellyBean(view);
}
}
@TargetApi(Build.VERSION_CODES.KITKAT)
private void irSend4Kitkat(View view) {
String data = irData.get(view.getId());
if (data != null) {
String values[] = data.split(",");
int[] pattern = new int[values.length - 1];
for (int i = 0; i < pattern.length; i++) {
pattern[i] = Integer.parseInt(values[i + 1]);
}
mCIR.transmit(Integer.parseInt(values[0]), pattern);
}
}
private void irSend4JellyBean(View view) {
String data = irData.get(view.getId());
if (data != null) {
try {
irWrite.invoke(irdaService, data);
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
protected String hex2dec(String irData) {
List<String> list = new ArrayList<String>(Arrays.asList(irData
.split(" ")));
list.remove(0); // dummy
int frequency = Integer.parseInt(list.remove(0), 16); // frequency
list.remove(0); // seq1
list.remove(0); // seq2
for (int i = 0; i < list.size(); i++) {
list.set(i, Integer.toString(Integer.parseInt(list.get(i), 16)));
}
frequency = (int) (1000000 / (frequency * 0.241246));
list.add(0, Integer.toString(frequency));
irData = "";
for (String s : list) {
irData += s + ",";
}
return irData;
}
}
mainfest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.irtest"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.TRANSMIT_IR"
android:required="false" />
<uses-feature android:name="android.hardware.consumerir" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:screenOrientation="portrait"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I get unable to start activity ComponentInfo com.example.irtest/com.irtest.MainActivity : java.lang.NullPointerException
and I have problems at this line Class irClass = irService.getClass();
Source: (StackOverflow)
I'm thinking of an app for Samsung SmartTV which, besides other information, displays the currently running TV program.
Since I haven't found any documentation about accessing and displaying the TV program inside of an app, I was wondering if this is even possible. Has anybody further information?
Thanks,
Markus
Source: (StackOverflow)
When I create a multi select input where i can select resources and I want the output to be a link to that resource. How can I get to link to read/show the title of the page i'm linking to? I can't find any info about that.
I've tried [[*pagetitle]], but then the link text is the pagetitle of the page i'm currently on.
Source: (StackOverflow)
i used all the examples and source code out there for displaying application content to external VGA display. while playing video in inside of the application am getting bellow thing in external device. any suggestion.... am i missing somthing.. but in device it showing actual window in fine way..

Source: (StackOverflow)
HI,
I have just submitted my first application to iTunes for approval, however, there is one thing I really want to add to it ASAP.
I would like to code into an app that it can use the TV Out functions of both the iPhone and iPad? Ideally it would work in a similar way to how keynote works i.e. you see a bit more on the iPad itself than is projected on the TV, but even just mirroring the screen would be a step in the right direction.
I have searched all over for this and all I keep getting is about downloading jailbreaks for you iPhone to mirror the screen, which doesn't really help.
Thanks in advance,
Source: (StackOverflow)
We are porting the existing HTML/JavaScript/CSS application to the Panasonic platform. In the application we use the JavaScript to generate HTML and the CSS to style the app.
The Panasonic Viera Connect platform programming language is JavaScript, but is “Non-browser JavaScript Engine”, which means that except of the engine classes we need to rewrite the whole UI rendering part, since they have for that their own API.
Is rewriting the application only way? Does anybody other experience?
Source: (StackOverflow)
I need my DVR live stream to have date object associated with it, I mean the time it was recorded. I need it for online TV project, I'm currently working on.
There is timeline where I have to display current stream by hours, min etc.
How can I do that?
Source: (StackOverflow)
Me & another member of the Android TV dev community on Google+ were working on a project and it requires access to the notification access. ex:the permission pushbullet asks for so it can mirror your phone notifications. And when trying to execute it it pushes me back to the open app screen and does nothing. Anyone's help would be great! Thanks!
Here's the project if it helps--https://github.com/Fleker/AndroidTVNotification
Anthony
Source: (StackOverflow)
I searched for examples or HowToes for CE-HTML. It took me 1/2 day and I found nearly nothing. I thought it would be a open standard like html which can be used by everyone. But it seems to cost 450$ only to see the standard.
Is there a good source to get more information? Ebooks? Blogs? Forum?
Thanks.
Source: (StackOverflow)
Background
I'm interested in deploying a web application on TVs that will show real time data with no user interaction.
Ideally, I'll just display this using the web browser that many new TVs have built in, rather than having to write a TV specific 'application' for each brand of TV.
I'd like to avoid attaching a PC to each TV for cost, power, maintenance and security reasons.
My questions
- Is there a reference, like http://caniuse.com/ , for what the web browsers in the various TV support with respect to JavaScript and CSS?
- Are there any specific frameworks that aid in developing web applications that work on multiple TVs (not built in applications)?
- Is any brand of TV considered superior when it comes to the built in web browser?
Thanks!
Source: (StackOverflow)
I am trying to do some manipulation of an XMLTV format file that contains TV schedule information. Within the file are sections that look like this:
<programme start="20141215220000 -0500" stop="20141216060000 -0500" channel="someid.someaddress.com">
<title lang="en">Local Programming</title>
<length units="hours">1</length>
<episode-num system="common">S00E00</episode-num>
<episode-num system="dd_progid">SH00019112.0000</episode-num>
<previously-shown />
</programme>
As you can see the second line contains this:
<title lang="en">Local Programming</title>
What I would like to find is some kind of command line utility that runs in Linux, that can look for that specific line and if it exists, remove everything between and including the programme tags. I am not very familiar with XML files so I don't know if there is a specific name for a block of data such as this, but I just want to remove that entire section whenever the title is "Local Programming".
It would actually work better for my purposes if I could remove the block only when the title is "Local Programming" AND the channel value in the first line is a certain specific value, since I only need to remove these for a specific channel, but it would not hurt anything to remove all of the "Local Programming" blocks on any channel, and to look for two values would probably make this a much more difficult problem. It has to be a command line utility because it will be called from a short shell script.
Basically I'm just trying to identify the best tool for the job. I'm not a programmer (unless you count making a bash shell script of a few lines, that just runs several things sequentially, as programming) so I'd like to stick with an existing command line tool if possible, but I'm not adverse to pulling in something new with apt-get either. Any suggestions?
EDIT: What worked was the xmlstarlet tool suggested by Charles Duffy, but only if I did not attempt to use the --var option and instead specified the values directly. For example, this removed all blocks with the title "Local Programming" from a file xmltv.xml:
xmlstarlet ed --delete "//programme[title='Local Programming']" <xmltv.xml >newfile.xml
And if I want to remove the block only when the title is "Local Programming" AND the channel value in the first line is a certain specific value, then it appears that this works:
xmlstarlet ed --delete "//programme[title='Local Programming'][@channel='someid.someaddress.com']" <xmltv.xml >newfile.xml
This is exactly what I was looking for, so I consider the problem solved. Thank you to all who replied.
Source: (StackOverflow)
I am developing a TV application for the TV. One thing I have noticed is that TV apps, once installed, often present users an Activation Code. The user is asked to enter the Activation Code on the app's website. Once it is entered in the website, the TV app is able to proceed.
What is the purpose of this Activation Code? Why can't the app simply ask the user to log-in/register a user account? Is there some technical advantageous reasoning behind using an activation code in this way?
Source: (StackOverflow)
Does anyone know how to programmatically obtain TV listings for a particular time zone? Is there a service I can subscribe to?
Thanks.
Source: (StackOverflow)
I want to write an Android app which controls my Samsung TV via the wifi network. This is possible because there are apps out there that do it (including Samsung's own remote app).
Is there a Samsung API available to do this? How does the app talk to the TV?
Source: (StackOverflow)