Obviously this is hardcoding values, which would only make this solution valid for a specific device or those with similar configurations. We can generalize it by sending from Vuforia the actual size of the video stream. This size is calculated in the function '''configureVideoBackground''', and set up in the '''config.mSize''' variable. Just send this value to the Java codes like we previously did with the matrix, then do the calculations out of the real display screen, which is done in Android with this method:
 
Obviously this is hardcoding values, which would only make this solution valid for a specific device or those with similar configurations. We can generalize it by sending from Vuforia the actual size of the video stream. This size is calculated in the function '''configureVideoBackground''', and set up in the '''config.mSize''' variable. Just send this value to the Java codes like we previously did with the matrix, then do the calculations out of the real display screen, which is done in Android with this method:
 
<pre>
 
<pre>
Unexpected non-MediaWiki exception encountered, of type "Error"
[36d9cae4] /wiki/index.php?title=Integrating_JPCT-AE_with_Vuforia&diff=501&oldid=500 Exception from line 436 of /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php: Call to undefined function each()
Backtrace:
#0 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php(546): DiffEngine->diag(integer, integer, integer, integer, integer)
#1 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php(347): DiffEngine->compareSeq(integer, integer, integer, integer)
#2 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php(228): DiffEngine->diffLocal(array, array)
#3 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php(725): DiffEngine->diff(array, array)
#4 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php(864): Diff->__construct(array, array)
#5 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DairikiDiff.php(987): MappedDiff->__construct(array, array, array, array)
#6 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/TableDiffFormatter.php(193): WordLevelDiff->__construct(array, array)
#7 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DiffFormatter.php(143): TableDiffFormatter->changed(array, array)
#8 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DiffFormatter.php(112): DiffFormatter->block(integer, integer, integer, integer, array)
#9 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(939): DiffFormatter->format(Diff)
#10 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(844): DifferenceEngine->textDiff(string, string)
#11 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/poolcounter/PoolCounterWork.php(196): DifferenceEngine->{closure}()
#12 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/poolcounter/PoolCounterWork.php(112): PoolCounterWorkViaCallback->doWork()
#13 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(857): PoolCounterWork->execute()
#14 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(813): DifferenceEngine->generateTextDiffBody(string, string)
#15 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(743): DifferenceEngine->generateContentDiffBody(WikitextContent, WikitextContent)
#16 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(665): DifferenceEngine->getDiffBody()
#17 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(635): DifferenceEngine->getDiff(string, string, string)
#18 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/diff/DifferenceEngine.php(443): DifferenceEngine->showDiff(string, string, string)
#19 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/Article.php(826): DifferenceEngine->showDiffPage(boolean)
#20 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/Article.php(549): Article->showDiffPage()
#21 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/actions/ViewAction.php(44): Article->view()
#22 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/Wiki.php(487): ViewAction->show()
#23 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/Wiki.php(285): MediaWiki->performAction(Article, Title)
#24 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/Wiki.php(647): MediaWiki->performRequest()
#25 /zstore/backups/cn10/home/ws10522/public_html/wiki/includes/Wiki.php(506): MediaWiki->main()
#26 /zstore/backups/cn10/home/ws10522/public_html/wiki/index.php(48): MediaWiki->run()
#27 {main}