How to use call wrappers for Intent Anko?












0














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.










share|improve this question




















  • 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












  • 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
















0














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.










share|improve this question




















  • 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












  • 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














0












0








0







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.










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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










  • What happens when you call makeCall()? Are there any logs?
    – Bryan
    Jun 23 '17 at 12:45














  • 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












  • 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








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












1 Answer
1






active

oldest

votes


















1














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")






share|improve this answer





















  • 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












  • 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










  • I have tried in both emulator and device with Sim card but its not working
    – Patel Pinkal
    Jun 27 '17 at 7:05











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
});


}
});














draft saved

draft discarded


















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









1














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")






share|improve this answer





















  • 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












  • 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










  • I have tried in both emulator and device with Sim card but its not working
    – Patel Pinkal
    Jun 27 '17 at 7:05
















1














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")






share|improve this answer





















  • 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












  • 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










  • I have tried in both emulator and device with Sim card but its not working
    – Patel Pinkal
    Jun 27 '17 at 7:05














1












1








1






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")






share|improve this answer












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")







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 23 '17 at 12:40









9spl9spl

24619




24619












  • 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












  • 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










  • 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










  • 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










  • 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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen