Android Question I am new to forum please help..

Deepak Shede

Member
Licensed User
Longtime User
I have used following intent code to dial

#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region

#Extends: android.support.v7.app.AppCompatActivity
'#AdditionalJar: com.android.support:support-v4

Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub

Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private TabStrip1 As TabStrip
Private wbv1 As WebView
Dim p As PhoneCalls
End Sub

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")

Dim bar As ACActionBar
bar.Initialize
bar.Title = "शिवसेना दैनंदिनी"
bar.Subtitle = "सन २०२०-२१"

Activity.LoadLayout("TabMain")
TabStrip1.LoadLayout("TabPage1", "साहेब")
' TabStrip1.LoadLayout("Page2", "THIS IS PAGE 2")
' TabStrip1.LoadLayout("Page3", "AND PAGE 3")

wbv1.LoadUrl("file:///android_asset/saheb.html")

End Sub

Sub wbv1_OverrideUrl (Url As String) As Boolean
'wbv1.StopLoading
Log(Url)
If Url.StartsWith("mailto:") Then
Dim in As Intent
in.Initialize(in.ACTION_VIEW, "mailto:"&Url.SubString(7))
StartActivity(in)
Return True
else If Url.StartsWith("tel:") Then
StartActivity(p.Call(Url.SubString(4)))
Return True
Else
'StartActivity(p.OpenBrowser(Url))
End If

End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Now if i compile the above code with targetsdk=23 in manifest it works fine. Iam able to make a call if i click on call activity button. But my application crashes if i use targetsdk=28.

HtMl File Code:

<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">


<!-- <title>Hello, world!</title> -->

<style>
.fa {
padding: 15px;
font-size: 26px;
width: 60px;
text-align: center;
text-decoration: none;
margin: 4px 1px;
}

.fa:hover {
opacity: 0.5;
}

.fa-phone {
background:#ff6600;
color: white;
}

<!-- .fa-facebook { -->
<!-- background: #3B5998; -->
<!-- color: white; -->
<!-- } -->

.fa-twitter {
background: #55ACEE;
color: white;
<!-- } -->
</style>

</head>

<body>
<div class="card text-white bg-warning mb-3">
<div class="card-header"><h5><bold>वंदनीय हिंदुहृदयसम्राट मा.बाळासाहेब ठाकरे </bold></h5></div>
<img src="assets/bt.jpg" class="card-img-top" alt="...">
<div class="card-body bg-light text-dark">
<h5 class="card-title">मातोश्री,</h5>
<p class="card-text">कलानगर वांद्रे पूर्व मुंबई-४०००५१ <br>
संपर्क क्रमांक :- ०२२-२६५९००७७ /०२२-२६५९००६६</p>
<a href="tel:02226590077"><i class="fa fa-phone fa-flip-both"></i>
<a href="https://twitter.com/JadhavPrataprao" class="fa fa-twitter"></a><span class="fa fa-arrow-left"></span>Click<br>
<!-- <a href="https://www.saamana.com/" class="btn btn-primary">Saamana</a> -->
</div>
</div>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>

If i keep targetsdk=23 i am not able to publish my app on Google Play Store

Please help me i am stuck ...
 

Cableguy

Expert
Licensed User
Longtime User
Please, please, PLEASE.... use the Code tags!
The code part of you post/question becomes nearly unreadable without them!
 
Upvote 0

Jorge M A

Well-Known Member
Licensed User
Look here: https://www.b4x.com/android/forum/threads/android-jar-targetsdkversion-minsdkversion.87610/#content

PLEASE.... use the Code tags!

Here is how you can do it:

snap_2019-05-29_16h23m03s_001-png.80834
 
Upvote 0
Top