This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
getting_started:faq [2015/07/15 15:26] sandudhate [How Do I Add Advertisements to my App?] |
getting_started:faq [2017/10/21 14:57] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Frequently Asked Questions ====== | ====== Frequently Asked Questions ====== | ||
- | This faq is expected to grow significantly over time. Please feel free to add to it or correct any mistakes. | + | This faq is expected to grow significantly over time. Please feel free to add ideas to it or correct any mistakes. |
+ | ===== What measurements does DroidScript use? ===== | ||
+ | In order to maintain the scale of graphical objects in devices with different screen resolutions and orientations, | ||
+ | |||
+ | For example creating a button with a width of 0.5 would make the button half the screen width and using a height of 0.1 would make the button one tenth of screen height. | ||
+ | |||
+ | You can however leave out the width and height parameters on many controls if you want the control to size according to its contents. | ||
+ | ===== Do I have to use layouts? ===== | ||
+ | **I am a web developer and just want to use my skills to build apps.**\\ | ||
+ | No you don't have to use layouts any more. | ||
+ | |||
+ | When you create a new project, you have the option to create either a JavaScript app or an HTML app. | ||
+ | |||
+ | The HTML type is much more like designing a web page. | ||
===== How do I set an icon for my app? ===== | ===== How do I set an icon for my app? ===== | ||
To see a personalized icon for your script in the program overview of DroidScript, | To see a personalized icon for your script in the program overview of DroidScript, | ||
Line 7: | Line 21: | ||
The easiest way to do this uses the **[[getting_started: | The easiest way to do this uses the **[[getting_started: | ||
+ | |||
+ | There are more notes there about the App icon requirements as well. See... [[getting_started: | ||
===== What is an SPK and how do I use it? ===== | ===== What is an SPK and how do I use it? ===== | ||
An SPK is a DroidScript package. | An SPK is a DroidScript package. | ||
- | To use an SPK, you need to import it into DroidScript. | + | To use an SPK, you need to import it into DroidScript. |
===== How can I get the Display Size? ===== | ===== How can I get the Display Size? ===== | ||
Line 21: | Line 37: | ||
< | < | ||
- | Sorry, DroidScript does not support anonymous functions as callback parameters.\\ | + | Sorry, DroidScript does support anonymous functions as callback parameters |
- | This is due to a limitation within the Android WebView-> | + | This was due to a limitation within the Android WebView-> |
=====How Do I Implement In-app-purchases in my DroidScript app?===== | =====How Do I Implement In-app-purchases in my DroidScript app?===== | ||
- | This information is copied from a post by Dave Smart at https:// | + | This information is copied from a post by Dave Smart at https:// |
Sorry this is not documented properly yet, but here are some code snippets that might help those trying to use In App Purchasing: | Sorry this is not documented properly yet, but here are some code snippets that might help those trying to use In App Purchasing: | ||
Line 108: | Line 124: | ||
=====How Do I Add Advertisements to my App?===== | =====How Do I Add Advertisements to my App?===== | ||
- | If your ad network provides HTML ads( which almose every one of them does ) then you can use it in WebView. | + | If your ad network provides HTML ads( which almose every one of them does ) then you can use it in WebView. |
- | For HTML ads, your network will give you link and you have to use it in <script src> tag. Something like this : | + | For HTML ads, your network will give you link and you have to use it in <script src> tag.(Chris Hopkins told this useful information) |
- | + | < | |
- | webView.LoadHtml('< | + | webView.LoadHtml('< |
+ | </ | ||
| |