Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2022 – 144
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ganepola G.A.S.L IT19050386
2022 – 144
Commits
6ade800b
Commit
6ade800b
authored
Nov 18, 2022
by
Ravishani W.M.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
7d996612
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
65 additions
and
0 deletions
+65
-0
MusicTherapyT.java
MusicTherapyT.java
+65
-0
No files found.
MusicTherapyT.java
0 → 100644
View file @
6ade800b
package
com.example.smartpillow
;
import
androidx.appcompat.app.AppCompatActivity
;
import
android.os.Bundle
;
import
android.view.KeyEvent
;
import
android.webkit.WebSettings
;
import
android.webkit.WebView
;
import
android.webkit.WebViewClient
;
import
android.widget.Toast
;
import
com.google.android.youtube.player.YouTubeBaseActivity
;
import
com.google.android.youtube.player.YouTubeInitializationResult
;
import
com.google.android.youtube.player.YouTubePlayer
;
import
com.google.android.youtube.player.YouTubePlayerView
;
public
class
MusicTherapyT
extends
AppCompatActivity
{
/* YouTubePlayerView youtubev1,youtubev2,youtubev3,youtubev4,youtubev5;*/
WebView
web
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
activity_music_therapy_t
);
/*youtubev1 = findViewById(R.id.youtubeV1);
youtubev2 = findViewById(R.id.youtubeV2);
youtubev3 = findViewById(R.id.youtubeV3);
youtubev4 = findViewById(R.id.youtubeV4);
youtubev5 = findViewById(R.id.youtubeV5);
YouTubePlayer.OnInitializedListener listener1 = new YouTubePlayer.OnInitializedListener() {
@Override
public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {
youTubePlayer.loadVideo("Ho91a_GwYxs");
}
@Override
public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
Toast.makeText(getApplicationContext(), "Initialization Failed", Toast.LENGTH_SHORT).show();
}
};
youtubev1.initialize("AIzaSyCsEBTaWJpEXUhwCTRcPnTlOLl7k2UnHS0",listener1);*/
web
=
findViewById
(
R
.
id
.
webview21
);
WebSettings
webSettings
=
web
.
getSettings
();
webSettings
.
setJavaScriptEnabled
(
true
);
web
.
setWebViewClient
(
new
Callback
());
web
.
loadUrl
(
"https://smartpillo.eclick.lk/one/"
);
}
private
class
Callback
extends
WebViewClient
{
@Override
public
boolean
shouldOverrideKeyEvent
(
WebView
view
,
KeyEvent
event
)
{
return
false
;
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment