forked from benbahrenburg/Ti.GA
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'avitale' of https://github.com/caffeinalab/Ti.GA into c…
…affeinalab-avitale
- Loading branch information
Astrovic
authored and
Astrovic
committed
Jan 23, 2018
1 parent
0537ab8
commit a5d9e6b
Showing
49 changed files
with
1,332 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,6 @@ profile | |
*.moved-aside | ||
DerivedData | ||
.idea | ||
build.properties | ||
.DS_Store | ||
android/libs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,18 @@ | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/DictionaryBuilderProxy.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/TigaModule.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/TrackerProxy.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/builders/DictionaryBuilderInterface.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/builders/EventBuilder.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/builders/ScreenViewBuilder.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/ecommerce/ProductActionProxy.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/ecommerce/ProductProxy.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/ecommerce/PromotionProxy.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/src/ti/ga/ecommerce/ScreenViewBuilderProxy.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/java/ti/ga/TigaBootstrap.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/r/android/support/compat/R.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/r/android/support/design/R.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/r/android/support/v7/appcompat/R.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/r/android/support/v7/cardview/R.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/r/com/google/android/gms/R.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/r/ti/ga/R.java" | ||
"/Users/Astrovic/Dati/Applicazioni/Ti.GA/Android/build/generated/r/ti/modules/titanium/ui/R.java" |
File renamed without changes.
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package ti.ga; | ||
|
||
import org.appcelerator.kroll.KrollDict; | ||
import org.appcelerator.kroll.KrollProxy; | ||
import org.appcelerator.kroll.annotations.Kroll; | ||
|
||
import android.util.Log; | ||
import android.text.TextUtils; | ||
|
||
import ti.ga.builders.DictionaryBuilderInterface; | ||
import ti.ga.builders.EventBuilder; | ||
import ti.ga.builders.ScreenViewBuilder; | ||
|
||
import ti.ga.ecommerce.ProductProxy; | ||
import ti.ga.ecommerce.ProductActionProxy; | ||
import ti.ga.ecommerce.PromotionProxy; | ||
|
||
@Kroll.proxy(creatableInModule=TigaModule.class) | ||
public class DictionaryBuilderProxy extends KrollProxy { | ||
private String LCAT = "ti.ga.DictionaryBuilderProxy"; | ||
private DictionaryBuilderInterface builder; | ||
|
||
public DictionaryBuilderProxy() { | ||
super(); | ||
} | ||
|
||
public void handleCreationDict(KrollDict args) { | ||
if (args.containsKey("type") && args.getString("type").equals(TigaModule.BUILDER_TYPE_EVENT)) { | ||
this.builder = new EventBuilder(args.getKrollDict("options")); | ||
} else { | ||
this.builder = new ScreenViewBuilder(); | ||
} | ||
} | ||
|
||
@Kroll.method | ||
public void addProduct(ProductProxy product) { | ||
this.builder.addProduct(product.getNative()); | ||
} | ||
|
||
@Kroll.method | ||
public void setProductAction(ProductActionProxy action) { | ||
this.builder.setProductAction(action.getNative()); | ||
} | ||
|
||
@Kroll.method | ||
public void addPromotion(PromotionProxy promotion) { | ||
this.builder.addPromotion(promotion.getNative()); | ||
} | ||
|
||
@Kroll.method | ||
public void addImpression(ProductProxy product, String impressionList) { | ||
this.builder.addImpression(product.getNative(), impressionList); | ||
} | ||
|
||
public DictionaryBuilderInterface getNative() { | ||
return this.builder; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.