Implementing Chrome Custom Tabs? - Java for Android App Development

I am using Android Studio 2.0 to develop an app for my school and I want to use Chrome Custom Tabs to make opening links faster. So far I've downloaded the support library, edited my build.gradle file to compile it, and I can import the support library successfully, but when I start adding code it still gives me "cannot resolve symbol" errors. The guide on Google's dev page is a bit lacking and left me with these questions:
1. Is the code in Google's guide supposed to go in my main class or do I need to make a separate class for it?
2. Does anyone have an example app I can pick apart to see how it's done? The one on Google's page hasn't been very helpful...
Thanks,
Jeff

Use customtabsintent librart
Sent from my Lenovo A6000 using Tapatalk

Did you import the supportlibrary correctly from gradle dependencies?
Here is a example of custom tabs:
github.com/GoogleChrome/custom-tabs-client

Related

Convert .py to .apk

Sorry if this information is available already.. BUT is there a way to convert a .py to a .apk from the android phone or from the computer I'm sure there is but I don't know how and yes...I've checked on google
Sent from my Nexus One using XDA App
How do you mean converting .py to .apk? An .apk file is just a zip compressed archive with a certain file structure containing the compiled sources and your raw resources.
I'm quite certain that there is no way to just convert a Python script to a functional Android application.
If you instead meant that you are looking for an interpreter which interprets Python for example then yes there is a library called Bean shell.
okay thank you I was looking for a way to convert it but I guess it's okay is there a way to treat it as a market app.. where if I gave them a link with a barcode image that they can download it like a regular apk and perhaps give the option to install sl4a.. And how do you increase text size of the interpreter?
Sent from my Nexus One using XDA App
I found out how to convert it... It's in the sl4a wiki pages and requires eclipse, quite a bit of steps but it's possible
Sent from my Nexus One using XDA App
Legend28469 said:
I found out how to convert it... It's in the sl4a wiki pages and requires eclipse, quite a bit of steps but it's possible
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Just wanted to add the link for the wiki as it's quite disorganized
https://code.google.com/p/android-scripting/wiki/SharingScripts#Scripts_as_APKs
so would this work with a project file made up using tkinter? ive got a script i want to build into an app but cant get kivy to work because of an issue with pygame and tkinter works fine

Flash not loading in your WebView -- Android 3.0.1

Just in case anyone is looking for a fix to the same issue myself and a few other developers ran into with the new Android 3.0, I'm posting a link to the Question and Answer I posted myself on stackoverflow:
http://stackoverflow.com/questions/5383364/flash-video-not-displaying-in-webview-for-android-3-0-1
Basically I was trying to load a Flash enabled site into my WebView. Worked up to the point of me using Android 3.0 and testing a simple app on my Xoom. I ran through multiple attempts and techniques to correct the issue until the one line solved it all:
Code:
android:hardwareAccelerated="true"
Add it to your <application> tag under the applications Manifest XML.
I tried emailing Dolphin HD/Mini devs to understand the fix after they updated to support the Xoom, but no one seemed to want to share the quick fix -- that or they just don't check email very often =P Either way, there it is! Pretty obvious after I figured it out, but well, not obvious enough!
Enjoy Flash in your WebView devs!

Full Featured Developer Script for ROMs - Need ideas for a name

I am currently work on a program/script to manage ROMs, and I will be releasing it initially for the Kindle Fire for beta testing. This will be a full featured program with the following :
- Compile ROMs from source
- Extract & zip ROMs
- Decompile/Compile APK and JAR files in the ROM (selective or the whole ROM at once)
- Unpack / repack kernel
- ROMs and devices each will have their own config file to store information specific to each, such as comments and status
- Much more planned, such as the ability to browse and edit files, search and compare, etc
The big advantage to this, and what prompted me to write this in the first place, is the ability to have all of the necessary tools in one place and better keep track of your ROM projects. As I was working on modifying or porting ROMs, a big headache was having to go to so many places to do different things to a ROM, which leaves files scattered all over your hard drive.
This will help keep everything more organized and the goal is to cut out manually having to do so much when it comes to basic tasks, and eventually even the more advanced tasks involved.
The initial release will be for Linux, but a Windows version will follow (minus the Linux specific features such as compile from source).
I have made some great progress on this already, and am close to a beta release.
So, what I need help on is a name for this. Here is what I have so far as choices, I welcome suggestions. Those that reply with suggestions for a name will be the first to receive beta versions to try out
- DEVROID
- [ARM] Android Rom Master
That is all I have so far, so please throw some good options my way.
How about - Kindle Fire Rom Manager?
romifi_R_ed? or ROMIFI_r_ED? linked with youe nick
animefun135 said:
How about - Kindle Fire Rom Manager?
Click to expand...
Click to collapse
This was originally just for the KF but most of this stuff is generic enough to work on other devices, so I will be adding functionality for multiple devices. So the name shouldn't be specific to the KF. I'm just offering it for the KF first.
When it was going to be KF specific I had "Kindle Inferno" in mind....
Now that would be a good name for a ROM !
[ARDS] - Android Rom Developer Script (or Studio)
or
[ARDT] - Android Rom Developer Tool
or simply
[ARD] - Android Rom Developer (the shortcut is like a german television channel)
b63 said:
[TARDiS] - The Android Rom Developer Script (or Studio)
Click to expand...
Click to collapse
Fixed
Need to come up with something foe the "i"!
Sent from my SPH-D710 using xda premium
[CRT] Complete Rom Tool
Sent from my myTouch_4G_Slide using XDA App
I like the variation that @nykuil modified. Don't think you need to come up with anything for the I really. I know nearly nothing about Dr. Who, but love the name because it is recognizable.
Yeah the tardis is really a cool idea. who doesn't love Dr Who. ( at least the original )
Rockin' the Miui Incredible 2 w/xda premium
Thanks guys, keep 'em coming...
CWMR+KF
ClockWorkModRecovery+KindleFire? ?
Sent from my Kindle Fire using xda premium
Slrb script library for ROM
Slrp script library for ROM publishing
b63 said:
[TARDIS!] - Total Android Rom Development is Easy!
Click to expand...
Click to collapse
Maybe this?
Sent from my myTouch_4G_Slide using XDA App

[TOOL] Starting a new tool

I'm a beginner in AndroidModding, and the ways that I have found so far are boring (as well as my ability to describe my project).
Basically, I'm developing a visual tool to facilitate mods creation. I know there are already some, but I intend to make a better base for beginners as I don't make crap.
I'll leave out some screen shots and when I make the program more stable I'll upload a first test version.
I wish everyone who has any idea about what I can add in the project manifest and suggest the same. At the end I will give credit to all who help me improve things.
And also, if you guys think this is will be useless please tell me this too
[Change log]
14/10/13
Working features:
-Create and manage Devices and ROMs
--Auto framework change 90% complete
-Create multiple projects of same APK
-Import an APK via dialog box to avoid mistake at folder arrange
-Decompile, Build, Auto META-INF PATCH, Recompile and ZipAlign just at one click for each function.
-Shortcut to working folders
-Debug output
-Set zipalign compression option
Features i'm working on:
-Auto change framework for different devices
-Auto mod scripting
-Translation features
-Pull/Push files via ADB
Features that I already tought about:
-Multi-Framework capability: Switch between frameworks to mod apps of different Roms and devices without complication.
-Project creation: Create a new independent mod with just one click without losing your previous project.
-Auto patch: Select a Mod in a list, choose your preferences and watch while program do the hard work for you.
-Create a auto patch youself: If you are already experient and want automate your mods, you can create a list of actions to auto apply into an apk.
-Create a Zip file to install in recovery mod
-Default stuff to ApkTool like decompile, build, recompile, blabla
[add 06/10/13 18:30]
-Adb pull/push: send or get files from your phone by adb connection
-Smali code autopatch support
ps: I don't know speak english as well, so, sorry about any mistake
This is good and seems fun
will wait for a test release
Will it be Open Source ?
Then we could improve your work by submitting patches
Pixelvernichter said:
Will it be Open Source ?
Then we could improve your work by submitting patches
Click to expand...
Click to collapse
Its a good idea, I'll think aboit it
Sent from my GT-I9100 using xda app-developers app
Also, if you need an tester for your tool I have time and i would do it
That tool will be great for a nope like me thanks
Sent from my GT-I9100 using xda app-developers app
shfddi being
:good:
i'll help to test if u want to..
Live log would be good. To watch as phone boots into an inevitable bootloop when trying something new. Saves running log separately and lets you view as it happens. With filtering would be good. Adbmagic did something similar but you cant copy or search the log.
Sent from my GT-I9305 using Tapatalk 4
Solved!Does anyone know if a xml like instead when inner value is empty interferes something or just make file bigger? I mean to Android, because I know their same thing.
Also, who wants help me making me an logo? I was thinking about an android with Merlin's costume, but I don't have the skills to reproduce this
Goldieking said:
Live log would be good. To watch as phone boots into an inevitable bootloop when trying something new. Saves running log separately and lets you view as it happens. With filtering would be good. Adbmagic did something similar but you cant copy or search the log.
Sent from my GT-I9305 using Tapatalk 4
Click to expand...
Click to collapse
That's a good idea, i'll try implement that, thanks
Sent from my GT-I9100 using xda app-developers app
SkyaTura said:
Does anyone know if a xml like instead when inner value is empty interferes something or just make file bigger? I mean to Android, because I know their same thing.
Also, who wants help me making me an logo? I was thinking about an android with Merlin's costume, but I don't have the skills to reproduce this
That's a good idea, i'll try implement that, thanks
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Bump !
Logo in progress
( Android with Merlin Costum. lol xD )
New changes at thread!!!
I pretend to release a beta version this week yet
Pixelvernichter said:
Bump !
Logo in progress
( Android with Merlin Costum. lol xD )
Click to expand...
Click to collapse
Can we see a preview of our MerlinDroid?
(i would be annoying if i ask an icon version?)

[Q] appcombat_v7 and fragment_main.xml

Hello there,
I just started using Eclipse and I'm confused by the appcombat_v7 and fragment_main.xml.
I've never seen those files in a youtube-video I watched for tutorials.
Do I need them?
philip0908 said:
Hello there,
I just started using Eclipse and I'm confused by the appcombat_v7 and fragment_main.xml.
I've never seen those files in a youtube-video I watched for tutorials.
Do I need them?
Click to expand...
Click to collapse
its a new stuff they have added , if u don't want u can revert back adt and Eclipse
honorably ailughb
hisee said:
its a new stuff they have added , if u don't want u can revert back adt and Eclipse
Click to expand...
Click to collapse
what would you recommend? where do implement my code now?
in onCreate of Fragment class or of Activity class?
philip0908 said:
what would you recommend? where do implement my code now?
in onCreate of Fragment class or of Activity class?
Click to expand...
Click to collapse
Depends on what you want to do and what version of Android you are supporting. Using Fragments is usually a good style, but you need to make sure you understand them, so head over to the training class on fragments. To clarify with the appcompat-v7, that is one of the two support libraries which were released not so long ago to port some of the features and layouts only found in higher android versions back to v7 (which is 2.1) in this case. The v7 support lib is used to get the ActionBar in earlier versions. If you want to use fragments and support pre-Honeycomb, you'll need to use the v4 support library, which is just a jar file.

Categories

Resources