Ti.Map > map.createView is not supporting in Tishadow , is it true?

95 views
Skip to first unread message

Punuru

unread,
Apr 8, 2014, 12:54:50 AM4/8/14
to tish...@googlegroups.com
Hello Sir, 

I am using ti.map module and trying to create var mapView = map.createView ();
tiShadow is not recognizing this syntax? 

When I run the app with using Tishadow server, I don't see any issue it. 

Thanks,
Punur

David Bankier

unread,
Apr 8, 2014, 6:08:36 PM4/8/14
to tish...@googlegroups.com
No. I have it working fine.
Maps can be interesting to work with. Make sure the module is added, everything in the tiapp.xml is configured right, it works stand alone and if you are using GenyMotion that it has Google/Play services installed.

Punuru

unread,
Apr 14, 2014, 7:17:33 AM4/14/14
to tish...@googlegroups.com
Yes, it is not working with TiShadow. 

here is one more example: I am using this Admob module

I have installed using gittio. and also calling like their example:

var win = Ti.UI.createWindow({
backgroundColor:'#fff'
});

var admob = require('chocolabs.admobmediation');

var banner = admob.createAdView({
    height:50,
    width:320,
    top:20,
    backgroundColor:'#000',
    publisherId:'<<ENTER_YOUR_ADMOB_MEDIATION_ID>>'
});
win.add(banner);
win.add(medium);

win.open();


This is pretty much works with normal RUN AS -> iPhone ( 4 Inch ) or another iPhone models.
But when I run with TiShadow is not identifying this line #### admob.createAdView

Could you please help me?

Thanks,
Srikanth P

Gautier Michelin

unread,
Apr 14, 2014, 1:10:44 PM4/14/14
to tish...@googlegroups.com
Hi Srikanth Punuru,

The modules you need in your app need to be included in the tishadowapp also.
 
This is the <module> section of my tishadowapp tiapp.xml. The bottom lines with miga.tintimage are for example needed for my app (tourguide.io).

    <modules>
        <module platform="iphone" version="0.1">yy.tidynamicfont</module>
        <module platform="iphone" version="0.3">net.iamyellow.tiws</module>
        <module platform="android" version="0.1">net.iamyellow.tiws</module>
        <module platform="iphone" version="1.0.2">ti.compression</module>
        <module platform="android" version="2.0.3">ti.compression</module>
        <module platform="commonjs">ti.cloud</module>
        <module platform="android">ti.urbanairship</module>
        <module platform="iphone">dk.napp.social</module>
        <module platform="iphone">ti.imagefactory</module>
        <module platform="android">ti.imagefactory</module>
        <module platform="iphone">ti.map</module>
        <module platform="android">ti.map</module>
        <module platform="android">miga.tintimage</module>
    </modules>

Once you've added your modules to tishadowapp, you recompile it and send it to your android device or VM. Thereafter you can test your app on tishadow, and it will find in tishadowapp the required modules.

Bye,

Gautier

Punuru

unread,
Apr 14, 2014, 2:03:59 PM4/14/14
to tish...@googlegroups.com
Thank you Gautier, I am not aware of this. I will try it in couple of hours and update you . 

Punuru

unread,
Apr 14, 2014, 9:28:57 PM4/14/14
to tish...@googlegroups.com
Thanks again. I has some difficulties. Eventually I was able to add the module to tishadowapp . It works great now. Thanks again.  


On Monday, April 14, 2014 1:10:44 PM UTC-4, Gautier Michelin wrote:

Aaron

unread,
Feb 28, 2015, 12:09:15 AM2/28/15
to tish...@googlegroups.com
The other thing I had to do to get it working was to add my Google API key to the tishadow app that I had compiled.  Once that meta key was put in the application settings, it worked fine.

<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:versionCode="6" android:versionName="1.5.0">
...
<!-- ADDED this stuff for maps -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<!-- change <com.whatever.exampleappid> to whatever your appId is and your API_KEY to whatever google supplies for your google dev account -->
 <uses-permission android:name="<com.whatever.exampleappid>.permission.MAPS_RECEIVE"/>
<permission android:name="<com.whatever.exampleappid>.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<application>
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="<key from https://console.developers.google.com >"/>
</application>
</manifest>
</android>
Reply all
Reply to author
Forward
0 new messages