How to use call wrappers for Intent Anko?
I am learning Anko
commons and in that, I see Intent
for easy to write code to startActivity. It's working. But in that I see Anko has call wrappers for some widely used Intents:
Goal Solution
------------ -------------------
Make a call makeCall(number) without tel:
Send a text sendSMS(number, [text]) without sms:
Browse the web browse(url)
Share some text share(text, [subject])
Send a email email(email, [subject], [text])
So I want to use this wrapper but don't know how. How can I use this?
Reference Like: https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents#useful-intent-callers
@9spl what you have written in the answer I know that all and I have used the latest dependency but my first question was how to use makeCall(). But I got that answer how to use then I have another problem, makeCall() doesn't work. I have declared permission in manifest although it's not working. why?
sendSMS() and browse() both are working but makeCall() is not working.
android android-intent kotlin anko
add a comment |
I am learning Anko
commons and in that, I see Intent
for easy to write code to startActivity. It's working. But in that I see Anko has call wrappers for some widely used Intents:
Goal Solution
------------ -------------------
Make a call makeCall(number) without tel:
Send a text sendSMS(number, [text]) without sms:
Browse the web browse(url)
Share some text share(text, [subject])
Send a email email(email, [subject], [text])
So I want to use this wrapper but don't know how. How can I use this?
Reference Like: https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents#useful-intent-callers
@9spl what you have written in the answer I know that all and I have used the latest dependency but my first question was how to use makeCall(). But I got that answer how to use then I have another problem, makeCall() doesn't work. I have declared permission in manifest although it's not working. why?
sendSMS() and browse() both are working but makeCall() is not working.
android android-intent kotlin anko
1
Include Anko (compile "org.jetbrains...."
) and call one of these functions fromActivity
(while not in Activity, you can specify it explicitly, e. g.activity.browse(...)
).
– Miha_x64
Jun 23 '17 at 12:25
yes, it's working. Thanks. But one more problem when I usemakeCall()
it doesn't work. why?
– Patel Pinkal
Jun 23 '17 at 12:39
What happens when you callmakeCall()
? Are there any logs?
– Bryan
Jun 23 '17 at 12:45
add a comment |
I am learning Anko
commons and in that, I see Intent
for easy to write code to startActivity. It's working. But in that I see Anko has call wrappers for some widely used Intents:
Goal Solution
------------ -------------------
Make a call makeCall(number) without tel:
Send a text sendSMS(number, [text]) without sms:
Browse the web browse(url)
Share some text share(text, [subject])
Send a email email(email, [subject], [text])
So I want to use this wrapper but don't know how. How can I use this?
Reference Like: https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents#useful-intent-callers
@9spl what you have written in the answer I know that all and I have used the latest dependency but my first question was how to use makeCall(). But I got that answer how to use then I have another problem, makeCall() doesn't work. I have declared permission in manifest although it's not working. why?
sendSMS() and browse() both are working but makeCall() is not working.
android android-intent kotlin anko
I am learning Anko
commons and in that, I see Intent
for easy to write code to startActivity. It's working. But in that I see Anko has call wrappers for some widely used Intents:
Goal Solution
------------ -------------------
Make a call makeCall(number) without tel:
Send a text sendSMS(number, [text]) without sms:
Browse the web browse(url)
Share some text share(text, [subject])
Send a email email(email, [subject], [text])
So I want to use this wrapper but don't know how. How can I use this?
Reference Like: https://github.com/Kotlin/anko/wiki/Anko-Commons-%E2%80%93-Intents#useful-intent-callers
@9spl what you have written in the answer I know that all and I have used the latest dependency but my first question was how to use makeCall(). But I got that answer how to use then I have another problem, makeCall() doesn't work. I have declared permission in manifest although it's not working. why?
sendSMS() and browse() both are working but makeCall() is not working.
android android-intent kotlin anko
android android-intent kotlin anko
edited Nov 21 '18 at 14:05
piet.t
9,94163245
9,94163245
asked Jun 23 '17 at 11:57
Patel PinkalPatel Pinkal
1,3921132
1,3921132
1
Include Anko (compile "org.jetbrains...."
) and call one of these functions fromActivity
(while not in Activity, you can specify it explicitly, e. g.activity.browse(...)
).
– Miha_x64
Jun 23 '17 at 12:25
yes, it's working. Thanks. But one more problem when I usemakeCall()
it doesn't work. why?
– Patel Pinkal
Jun 23 '17 at 12:39
What happens when you callmakeCall()
? Are there any logs?
– Bryan
Jun 23 '17 at 12:45
add a comment |
1
Include Anko (compile "org.jetbrains...."
) and call one of these functions fromActivity
(while not in Activity, you can specify it explicitly, e. g.activity.browse(...)
).
– Miha_x64
Jun 23 '17 at 12:25
yes, it's working. Thanks. But one more problem when I usemakeCall()
it doesn't work. why?
– Patel Pinkal
Jun 23 '17 at 12:39
What happens when you callmakeCall()
? Are there any logs?
– Bryan
Jun 23 '17 at 12:45
1
1
Include Anko (
compile "org.jetbrains...."
) and call one of these functions from Activity
(while not in Activity, you can specify it explicitly, e. g. activity.browse(...)
).– Miha_x64
Jun 23 '17 at 12:25
Include Anko (
compile "org.jetbrains...."
) and call one of these functions from Activity
(while not in Activity, you can specify it explicitly, e. g. activity.browse(...)
).– Miha_x64
Jun 23 '17 at 12:25
yes, it's working. Thanks. But one more problem when I use
makeCall()
it doesn't work. why?– Patel Pinkal
Jun 23 '17 at 12:39
yes, it's working. Thanks. But one more problem when I use
makeCall()
it doesn't work. why?– Patel Pinkal
Jun 23 '17 at 12:39
What happens when you call
makeCall()
? Are there any logs?– Bryan
Jun 23 '17 at 12:45
What happens when you call
makeCall()
? Are there any logs?– Bryan
Jun 23 '17 at 12:45
add a comment |
1 Answer
1
active
oldest
votes
just make sure you have added right dependency for anko in your app gradle
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3"
compile "org.jetbrains.anko:anko-commons:0.10.0"
Now it is so easy to use it use this as a functions of Anko
Ex.if you want to make call just simply call this function like
makeCall("PHONE_NUMBER")
All is working well but my next problem is when I callmakeCall()
it doesn't work
– Patel Pinkal
Jun 23 '17 at 12:43
Make sure you have given call permission in Manifest <uses-permission android:name="android.permission.CALL_PHONE"/> and same for others..@PatelPinkal
– 9spl
Jun 23 '17 at 12:48
I don't think you need specificallykotlin-stdlib-jre7
. From what I knowkotlin-stdlib
should work too.
– Mibac
Jun 23 '17 at 14:14
hi @PatelPinkal are you testing on Emulator or real device , Does real device have Sim Card in it?
– 9spl
Jun 27 '17 at 6:57
I have tried in both emulator and device with Sim card but its not working
– Patel Pinkal
Jun 27 '17 at 7:05
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44720913%2fhow-to-use-call-wrappers-for-intent-anko%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
just make sure you have added right dependency for anko in your app gradle
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3"
compile "org.jetbrains.anko:anko-commons:0.10.0"
Now it is so easy to use it use this as a functions of Anko
Ex.if you want to make call just simply call this function like
makeCall("PHONE_NUMBER")
All is working well but my next problem is when I callmakeCall()
it doesn't work
– Patel Pinkal
Jun 23 '17 at 12:43
Make sure you have given call permission in Manifest <uses-permission android:name="android.permission.CALL_PHONE"/> and same for others..@PatelPinkal
– 9spl
Jun 23 '17 at 12:48
I don't think you need specificallykotlin-stdlib-jre7
. From what I knowkotlin-stdlib
should work too.
– Mibac
Jun 23 '17 at 14:14
hi @PatelPinkal are you testing on Emulator or real device , Does real device have Sim Card in it?
– 9spl
Jun 27 '17 at 6:57
I have tried in both emulator and device with Sim card but its not working
– Patel Pinkal
Jun 27 '17 at 7:05
add a comment |
just make sure you have added right dependency for anko in your app gradle
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3"
compile "org.jetbrains.anko:anko-commons:0.10.0"
Now it is so easy to use it use this as a functions of Anko
Ex.if you want to make call just simply call this function like
makeCall("PHONE_NUMBER")
All is working well but my next problem is when I callmakeCall()
it doesn't work
– Patel Pinkal
Jun 23 '17 at 12:43
Make sure you have given call permission in Manifest <uses-permission android:name="android.permission.CALL_PHONE"/> and same for others..@PatelPinkal
– 9spl
Jun 23 '17 at 12:48
I don't think you need specificallykotlin-stdlib-jre7
. From what I knowkotlin-stdlib
should work too.
– Mibac
Jun 23 '17 at 14:14
hi @PatelPinkal are you testing on Emulator or real device , Does real device have Sim Card in it?
– 9spl
Jun 27 '17 at 6:57
I have tried in both emulator and device with Sim card but its not working
– Patel Pinkal
Jun 27 '17 at 7:05
add a comment |
just make sure you have added right dependency for anko in your app gradle
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3"
compile "org.jetbrains.anko:anko-commons:0.10.0"
Now it is so easy to use it use this as a functions of Anko
Ex.if you want to make call just simply call this function like
makeCall("PHONE_NUMBER")
just make sure you have added right dependency for anko in your app gradle
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.2-3"
compile "org.jetbrains.anko:anko-commons:0.10.0"
Now it is so easy to use it use this as a functions of Anko
Ex.if you want to make call just simply call this function like
makeCall("PHONE_NUMBER")
answered Jun 23 '17 at 12:40
9spl9spl
24619
24619
All is working well but my next problem is when I callmakeCall()
it doesn't work
– Patel Pinkal
Jun 23 '17 at 12:43
Make sure you have given call permission in Manifest <uses-permission android:name="android.permission.CALL_PHONE"/> and same for others..@PatelPinkal
– 9spl
Jun 23 '17 at 12:48
I don't think you need specificallykotlin-stdlib-jre7
. From what I knowkotlin-stdlib
should work too.
– Mibac
Jun 23 '17 at 14:14
hi @PatelPinkal are you testing on Emulator or real device , Does real device have Sim Card in it?
– 9spl
Jun 27 '17 at 6:57
I have tried in both emulator and device with Sim card but its not working
– Patel Pinkal
Jun 27 '17 at 7:05
add a comment |
All is working well but my next problem is when I callmakeCall()
it doesn't work
– Patel Pinkal
Jun 23 '17 at 12:43
Make sure you have given call permission in Manifest <uses-permission android:name="android.permission.CALL_PHONE"/> and same for others..@PatelPinkal
– 9spl
Jun 23 '17 at 12:48
I don't think you need specificallykotlin-stdlib-jre7
. From what I knowkotlin-stdlib
should work too.
– Mibac
Jun 23 '17 at 14:14
hi @PatelPinkal are you testing on Emulator or real device , Does real device have Sim Card in it?
– 9spl
Jun 27 '17 at 6:57
I have tried in both emulator and device with Sim card but its not working
– Patel Pinkal
Jun 27 '17 at 7:05
All is working well but my next problem is when I call
makeCall()
it doesn't work– Patel Pinkal
Jun 23 '17 at 12:43
All is working well but my next problem is when I call
makeCall()
it doesn't work– Patel Pinkal
Jun 23 '17 at 12:43
Make sure you have given call permission in Manifest <uses-permission android:name="android.permission.CALL_PHONE"/> and same for others..@PatelPinkal
– 9spl
Jun 23 '17 at 12:48
Make sure you have given call permission in Manifest <uses-permission android:name="android.permission.CALL_PHONE"/> and same for others..@PatelPinkal
– 9spl
Jun 23 '17 at 12:48
I don't think you need specifically
kotlin-stdlib-jre7
. From what I know kotlin-stdlib
should work too.– Mibac
Jun 23 '17 at 14:14
I don't think you need specifically
kotlin-stdlib-jre7
. From what I know kotlin-stdlib
should work too.– Mibac
Jun 23 '17 at 14:14
hi @PatelPinkal are you testing on Emulator or real device , Does real device have Sim Card in it?
– 9spl
Jun 27 '17 at 6:57
hi @PatelPinkal are you testing on Emulator or real device , Does real device have Sim Card in it?
– 9spl
Jun 27 '17 at 6:57
I have tried in both emulator and device with Sim card but its not working
– Patel Pinkal
Jun 27 '17 at 7:05
I have tried in both emulator and device with Sim card but its not working
– Patel Pinkal
Jun 27 '17 at 7:05
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f44720913%2fhow-to-use-call-wrappers-for-intent-anko%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Include Anko (
compile "org.jetbrains...."
) and call one of these functions fromActivity
(while not in Activity, you can specify it explicitly, e. g.activity.browse(...)
).– Miha_x64
Jun 23 '17 at 12:25
yes, it's working. Thanks. But one more problem when I use
makeCall()
it doesn't work. why?– Patel Pinkal
Jun 23 '17 at 12:39
What happens when you call
makeCall()
? Are there any logs?– Bryan
Jun 23 '17 at 12:45